diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:09:45 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:10:13 +0100 |
commit | 470286ecfe79d59df14944e5b5d34630fc739391 (patch) | |
tree | 43983212872e06cebefd2ae474418fa2908ca54c /Source/JavaScriptCore/llint/LLIntSlowPaths.cpp | |
parent | 23037105e948c2065da5a937d3a2396b0ff45c1e (diff) | |
download | qtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz |
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/llint/LLIntSlowPaths.cpp')
-rw-r--r-- | Source/JavaScriptCore/llint/LLIntSlowPaths.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp index ba44bf404..584100e50 100644 --- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp +++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp @@ -162,7 +162,7 @@ namespace JSC { namespace LLInt { extern "C" SlowPathReturnType llint_trace_operand(ExecState* exec, Instruction* pc, int fromWhere, int operand) { LLINT_BEGIN(); - dataLog("%p / %p: executing bc#%zu, op#%u: Trace(%d): %d: %d\n", + dataLogF("%p / %p: executing bc#%zu, op#%u: Trace(%d): %d: %d\n", exec->codeBlock(), exec, static_cast<intptr_t>(pc - exec->codeBlock()->instructions().begin()), @@ -184,7 +184,7 @@ extern "C" SlowPathReturnType llint_trace_value(ExecState* exec, Instruction* pc EncodedJSValue asValue; } u; u.asValue = JSValue::encode(value); - dataLog("%p / %p: executing bc#%zu, op#%u: Trace(%d): %d: %d: %08x:%08x: %s\n", + dataLogF("%p / %p: executing bc#%zu, op#%u: Trace(%d): %d: %d: %08x:%08x: %s\n", exec->codeBlock(), exec, static_cast<intptr_t>(pc - exec->codeBlock()->instructions().begin()), @@ -200,7 +200,7 @@ extern "C" SlowPathReturnType llint_trace_value(ExecState* exec, Instruction* pc LLINT_SLOW_PATH_DECL(trace_prologue) { - dataLog("%p / %p: in prologue.\n", exec->codeBlock(), exec); + dataLogF("%p / %p: in prologue.\n", exec->codeBlock(), exec); LLINT_END_IMPL(); } @@ -209,7 +209,7 @@ static void traceFunctionPrologue(ExecState* exec, const char* comment, CodeSpec JSFunction* callee = jsCast<JSFunction*>(exec->callee()); FunctionExecutable* executable = callee->jsExecutable(); CodeBlock* codeBlock = &executable->generatedBytecodeFor(kind); - dataLog("%p / %p: in %s of function %p, executable %p; numVars = %u, numParameters = %u, numCalleeRegisters = %u, caller = %p.\n", + dataLogF("%p / %p: in %s of function %p, executable %p; numVars = %u, numParameters = %u, numCalleeRegisters = %u, caller = %p.\n", codeBlock, exec, comment, callee, executable, codeBlock->m_numVars, codeBlock->numParameters(), codeBlock->m_numCalleeRegisters, exec->callerFrame()); @@ -241,22 +241,22 @@ LLINT_SLOW_PATH_DECL(trace_arityCheck_for_construct) LLINT_SLOW_PATH_DECL(trace) { - dataLog("%p / %p: executing bc#%zu, %s, scope %p\n", + dataLogF("%p / %p: executing bc#%zu, %s, scope %p\n", exec->codeBlock(), exec, static_cast<intptr_t>(pc - exec->codeBlock()->instructions().begin()), opcodeNames[exec->globalData().interpreter->getOpcodeID(pc[0].u.opcode)], exec->scope()); if (exec->globalData().interpreter->getOpcodeID(pc[0].u.opcode) == op_ret) { - dataLog("Will be returning to %p\n", exec->returnPC().value()); - dataLog("The new cfr will be %p\n", exec->callerFrame()); + dataLogF("Will be returning to %p\n", exec->returnPC().value()); + dataLogF("The new cfr will be %p\n", exec->callerFrame()); } LLINT_END_IMPL(); } LLINT_SLOW_PATH_DECL(special_trace) { - dataLog("%p / %p: executing special case bc#%zu, op#%u, return PC is %p\n", + dataLogF("%p / %p: executing special case bc#%zu, op#%u, return PC is %p\n", exec->codeBlock(), exec, static_cast<intptr_t>(pc - exec->codeBlock()->instructions().begin()), @@ -275,11 +275,11 @@ inline bool shouldJIT(ExecState* exec) // Returns true if we should try to OSR. inline bool jitCompileAndSetHeuristics(CodeBlock* codeBlock, ExecState* exec) { - codeBlock->updateAllPredictions(); + codeBlock->updateAllValueProfilePredictions(); if (!codeBlock->checkIfJITThresholdReached()) { #if ENABLE(JIT_VERBOSE_OSR) - dataLog(" JIT threshold should be lifted.\n"); + dataLogF(" JIT threshold should be lifted.\n"); #endif return false; } @@ -288,19 +288,19 @@ inline bool jitCompileAndSetHeuristics(CodeBlock* codeBlock, ExecState* exec) switch (result) { case CodeBlock::AlreadyCompiled: #if ENABLE(JIT_VERBOSE_OSR) - dataLog(" Code was already compiled.\n"); + dataLogF(" Code was already compiled.\n"); #endif codeBlock->jitSoon(); return true; case CodeBlock::CouldNotCompile: #if ENABLE(JIT_VERBOSE_OSR) - dataLog(" JIT compilation failed.\n"); + dataLogF(" JIT compilation failed.\n"); #endif codeBlock->dontJITAnytimeSoon(); return false; case CodeBlock::CompiledSuccessfully: #if ENABLE(JIT_VERBOSE_OSR) - dataLog(" JIT compilation successful.\n"); + dataLogF(" JIT compilation successful.\n"); #endif codeBlock->jitSoon(); return true; @@ -313,7 +313,7 @@ enum EntryKind { Prologue, ArityCheck }; static SlowPathReturnType entryOSR(ExecState* exec, Instruction*, CodeBlock* codeBlock, const char *name, EntryKind kind) { #if ENABLE(JIT_VERBOSE_OSR) - dataLog("%p: Entered %s with executeCounter = %s\n", codeBlock, name, + dataLogF("%p: Entered %s with executeCounter = %s\n", codeBlock, name, codeBlock->llintExecuteCounter().status()); #else UNUSED_PARAM(name); @@ -362,7 +362,7 @@ LLINT_SLOW_PATH_DECL(loop_osr) CodeBlock* codeBlock = exec->codeBlock(); #if ENABLE(JIT_VERBOSE_OSR) - dataLog("%p: Entered loop_osr with executeCounter = %s\n", codeBlock, + dataLogF("%p: Entered loop_osr with executeCounter = %s\n", codeBlock, codeBlock->llintExecuteCounter().status()); #endif @@ -393,7 +393,7 @@ LLINT_SLOW_PATH_DECL(replace) CodeBlock* codeBlock = exec->codeBlock(); #if ENABLE(JIT_VERBOSE_OSR) - dataLog("%p: Entered replace with executeCounter = %s\n", codeBlock, + dataLogF("%p: Entered replace with executeCounter = %s\n", codeBlock, codeBlock->llintExecuteCounter().status()); #endif @@ -409,11 +409,11 @@ LLINT_SLOW_PATH_DECL(stack_check) { LLINT_BEGIN(); #if LLINT_SLOW_PATH_TRACING - dataLog("Checking stack height with exec = %p.\n", exec); - dataLog("CodeBlock = %p.\n", exec->codeBlock()); - dataLog("Num callee registers = %u.\n", exec->codeBlock()->m_numCalleeRegisters); - dataLog("Num vars = %u.\n", exec->codeBlock()->m_numVars); - dataLog("Current end is at %p.\n", exec->globalData().interpreter->stack().end()); + dataLogF("Checking stack height with exec = %p.\n", exec); + dataLogF("CodeBlock = %p.\n", exec->codeBlock()); + dataLogF("Num callee registers = %u.\n", exec->codeBlock()->m_numCalleeRegisters); + dataLogF("Num vars = %u.\n", exec->codeBlock()->m_numVars); + dataLogF("Current end is at %p.\n", exec->globalData().interpreter->stack().end()); #endif ASSERT(&exec->registers()[exec->codeBlock()->m_numCalleeRegisters] > exec->globalData().interpreter->stack().end()); if (UNLIKELY(!globalData.interpreter->stack().grow(&exec->registers()[exec->codeBlock()->m_numCalleeRegisters]))) { @@ -458,7 +458,7 @@ LLINT_SLOW_PATH_DECL(slow_path_create_activation) { LLINT_BEGIN(); #if LLINT_SLOW_PATH_TRACING - dataLog("Creating an activation, exec = %p!\n", exec); + dataLogF("Creating an activation, exec = %p!\n", exec); #endif JSActivation* activation = JSActivation::create(globalData, exec, exec->codeBlock()); exec->setScope(activation); @@ -478,7 +478,7 @@ LLINT_SLOW_PATH_DECL(slow_path_create_arguments) LLINT_SLOW_PATH_DECL(slow_path_create_this) { LLINT_BEGIN(); - JSFunction* constructor = jsCast<JSFunction*>(exec->callee()); + JSFunction* constructor = jsCast<JSFunction*>(LLINT_OP(2).jsValue().asCell()); #if !ASSERT_DISABLED ConstructData constructData; @@ -510,19 +510,19 @@ LLINT_SLOW_PATH_DECL(slow_path_new_object) LLINT_SLOW_PATH_DECL(slow_path_new_array) { LLINT_BEGIN(); - LLINT_RETURN(constructArray(exec, bitwise_cast<JSValue*>(&LLINT_OP(2)), pc[3].u.operand)); + LLINT_RETURN(constructArray(exec, pc[4].u.arrayAllocationProfile, bitwise_cast<JSValue*>(&LLINT_OP(2)), pc[3].u.operand)); } LLINT_SLOW_PATH_DECL(slow_path_new_array_with_size) { LLINT_BEGIN(); - LLINT_RETURN(constructArrayWithSizeQuirk(exec, exec->lexicalGlobalObject(), LLINT_OP_C(2).jsValue())); + LLINT_RETURN(constructArrayWithSizeQuirk(exec, pc[3].u.arrayAllocationProfile, exec->lexicalGlobalObject(), LLINT_OP_C(2).jsValue())); } LLINT_SLOW_PATH_DECL(slow_path_new_array_buffer) { LLINT_BEGIN(); - LLINT_RETURN(constructArray(exec, exec->codeBlock()->constantBuffer(pc[2].u.operand), pc[3].u.operand)); + LLINT_RETURN(constructArray(exec, pc[4].u.arrayAllocationProfile, exec->codeBlock()->constantBuffer(pc[2].u.operand), pc[3].u.operand)); } LLINT_SLOW_PATH_DECL(slow_path_new_regexp) @@ -635,8 +635,8 @@ LLINT_SLOW_PATH_DECL(slow_path_add) JSValue v2 = LLINT_OP_C(3).jsValue(); #if LLINT_SLOW_PATH_TRACING - dataLog("Trying to add %s", v1.description()); - dataLog(" to %s.\n", v2.description()); + dataLogF("Trying to add %s", v1.description()); + dataLogF(" to %s.\n", v2.description()); #endif if (v1.isString() && !v2.isObject()) @@ -1328,7 +1328,7 @@ LLINT_SLOW_PATH_DECL(slow_path_new_func) || !codeBlock->needsFullScopeChain() || exec->uncheckedR(codeBlock->activationRegister()).jsValue()); #if LLINT_SLOW_PATH_TRACING - dataLog("Creating function!\n"); + dataLogF("Creating function!\n"); #endif LLINT_RETURN(JSFunction::create(exec, codeBlock->functionDecl(pc[2].u.operand), exec->scope())); } @@ -1367,7 +1367,7 @@ static SlowPathReturnType handleHostCall(ExecState* execCallee, Instruction* pc, } #if LLINT_SLOW_PATH_TRACING - dataLog("Call callee is not a function: %s\n", callee.description()); + dataLogF("Call callee is not a function: %s\n", callee.description()); #endif ASSERT(callType == CallTypeNone); @@ -1390,7 +1390,7 @@ static SlowPathReturnType handleHostCall(ExecState* execCallee, Instruction* pc, } #if LLINT_SLOW_PATH_TRACING - dataLog("Constructor callee is not a function: %s\n", callee.description()); + dataLogF("Constructor callee is not a function: %s\n", callee.description()); #endif ASSERT(constructType == ConstructTypeNone); @@ -1400,7 +1400,7 @@ static SlowPathReturnType handleHostCall(ExecState* execCallee, Instruction* pc, inline SlowPathReturnType setUpCall(ExecState* execCallee, Instruction* pc, CodeSpecializationKind kind, JSValue calleeAsValue, LLIntCallLinkInfo* callLinkInfo = 0) { #if LLINT_SLOW_PATH_TRACING - dataLog("Performing call with recorded PC = %p\n", execCallee->callerFrame()->currentVPC()); + dataLogF("Performing call with recorded PC = %p\n", execCallee->callerFrame()->currentVPC()); #endif JSCell* calleeAsFunctionCell = getJSFunction(calleeAsValue); |