37 using namespace v8::internal;
43 for (
int i = 0; i < 4; i++) {
44 seeds->set(i, static_cast<byte>(state0 >> (i *
kBitsPerByte)));
45 seeds->set(i + 4, static_cast<byte>(state1 >> (i * kBitsPerByte)));
54 bool has_pending_exception;
61 CHECK(value->IsHeapNumber());
62 CHECK(fun->IsOptimized());
68 CHECK_EQ(runtime_value, crankshaft_value);
82 bool has_pending_exception;
84 CompileRun(
"function f() { return Math.random(); }");
86 Object* symbol =
FACTORY->LookupAsciiSymbol(
"f")->ToObjectChecked();
87 MaybeObject* fun_object =
94 if (!fun->IsOptimized()) fun->MarkForLazyRecompilation();
97 TestSeeds(fun, context, 0xC0C0AFFE, 0x31415926);
98 TestSeeds(fun, context, 0x01020304, 0xFFFFFFFF);
99 TestSeeds(fun, context, 0x00000001, 0x00000000);
105 CHECK(value->IsHeapNumber());
106 CHECK(fun->IsOptimized());
#define CHECK_EQ(expected, value)
static String * cast(Object *obj)
static bool UseCrankshaft()
static Object * FillHeapNumberWithRandom(Object *heap_number, Context *context)
void SetSeeds(Handle< ByteArray > seeds, uint32_t state0, uint32_t state1)
#define CHECK_NE(unexpected, value)
static Handle< Object > Call(Handle< Object > callable, Handle< Object > receiver, int argc, Handle< Object > argv[], bool *pending_exception, bool convert_receiver=false)
static HeapNumber * cast(Object *obj)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 enable use of ARMv7 instructions if enable use of MIPS FPU instructions if NULL
void TestSeeds(Handle< JSFunction > fun, Handle< Context > context, uint32_t state0, uint32_t state1)
static Persistent< Context > New(ExtensionConfiguration *extensions=NULL, Handle< ObjectTemplate > global_template=Handle< ObjectTemplate >(), Handle< Value > global_object=Handle< Value >())
static JSFunction * cast(Object *obj)