diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-21 10:57:44 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-21 10:57:44 +0200 |
commit | 5ef7c8a6a70875d4430752d146bdcb069605d71d (patch) | |
tree | f6256640b6c46d7da221435803cae65326817ba2 /Source/JavaScriptCore/llint | |
parent | decad929f578d8db641febc8740649ca6c574638 (diff) | |
download | qtwebkit-5ef7c8a6a70875d4430752d146bdcb069605d71d.tar.gz |
Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147)
New snapshot including various build fixes for newer Qt 5
Diffstat (limited to 'Source/JavaScriptCore/llint')
4 files changed, 61 insertions, 25 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntExceptions.cpp b/Source/JavaScriptCore/llint/LLIntExceptions.cpp index 20b0db3d9..a915c42e3 100644 --- a/Source/JavaScriptCore/llint/LLIntExceptions.cpp +++ b/Source/JavaScriptCore/llint/LLIntExceptions.cpp @@ -37,6 +37,14 @@ namespace JSC { namespace LLInt { +static void fixupPCforExceptionIfNeeded(ExecState* exec) +{ + CodeBlock* codeBlock = exec->codeBlock(); + ASSERT(!!codeBlock); + Instruction* pc = exec->currentVPC(); + exec->setCurrentVPC(codeBlock->adjustPCIfAtCallSite(pc)); +} + void interpreterThrowInCaller(ExecState* exec, ReturnAddressPtr pc) { JSGlobalData* globalData = &exec->globalData(); @@ -44,6 +52,7 @@ void interpreterThrowInCaller(ExecState* exec, ReturnAddressPtr pc) #if LLINT_SLOW_PATH_TRACING dataLog("Throwing exception %s.\n", globalData->exception.description()); #endif + fixupPCforExceptionIfNeeded(exec); genericThrow( globalData, exec, globalData->exception, exec->codeBlock()->bytecodeOffset(exec, pc)); @@ -61,6 +70,7 @@ Instruction* returnToThrow(ExecState* exec, Instruction* pc) #if LLINT_SLOW_PATH_TRACING dataLog("Throwing exception %s (returnToThrow).\n", globalData->exception.description()); #endif + fixupPCforExceptionIfNeeded(exec); genericThrow(globalData, exec, globalData->exception, pc - exec->codeBlock()->instructions().begin()); return globalData->llintData.exceptionInstructions(); @@ -73,6 +83,7 @@ void* callToThrow(ExecState* exec, Instruction* pc) #if LLINT_SLOW_PATH_TRACING dataLog("Throwing exception %s (callToThrow).\n", globalData->exception.description()); #endif + fixupPCforExceptionIfNeeded(exec); genericThrow(globalData, exec, globalData->exception, pc - exec->codeBlock()->instructions().begin()); return bitwise_cast<void*>(&llint_throw_during_call_trampoline); diff --git a/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp b/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp index f863cb218..cbb4258d0 100644 --- a/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp +++ b/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp @@ -25,6 +25,7 @@ #include "config.h" +#include "ArrayProfile.h" #include "CodeBlock.h" #include "Executable.h" #include "Heap.h" diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm index b8115dd6b..5f280ce1b 100644 --- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm +++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm @@ -1255,14 +1255,19 @@ _llint_op_put_by_id_transition_normal_out_of_line: _llint_op_get_by_val: traceExecution() - loadp CodeBlock[cfr], t1 loadi 8[PC], t2 loadi 12[PC], t3 - loadp CodeBlock::m_globalData[t1], t1 loadConstantOrVariablePayload(t2, CellTag, t0, .opGetByValSlow) - loadp JSGlobalData::jsArrayClassInfo[t1], t2 loadConstantOrVariablePayload(t3, Int32Tag, t1, .opGetByValSlow) - bpneq [t0], t2, .opGetByValSlow + loadp JSCell::m_structure[t0], t3 + loadp 16[PC], t2 + if VALUE_PROFILER + storep t3, ArrayProfile::m_lastSeenStructure[t2] + end + loadp CodeBlock[cfr], t2 + loadp CodeBlock::m_globalData[t2], t2 + loadp JSGlobalData::jsArrayClassInfo[t2], t2 + bpneq Structure::m_classInfo[t3], t2, .opGetByValSlow loadp JSArray::m_storage[t0], t3 biaeq t1, JSArray::m_vectorLength[t0], .opGetByValSlow loadi 4[PC], t0 @@ -1271,16 +1276,18 @@ _llint_op_get_by_val: bieq t2, EmptyValueTag, .opGetByValSlow storei t2, TagOffset[cfr, t0, 8] storei t1, PayloadOffset[cfr, t0, 8] - loadi 16[PC], t0 + loadi 20[PC], t0 valueProfile(t2, t1, t0) - dispatch(5) + dispatch(6) .opGetByValSlow: callSlowPath(_llint_slow_path_get_by_val) - dispatch(5) + dispatch(6) _llint_op_get_argument_by_val: + # FIXME: At some point we should array profile this. Right now it isn't necessary + # since the DFG will never turn a get_argument_by_val into a GetByVal. traceExecution() loadi 8[PC], t0 loadi 12[PC], t1 @@ -1293,15 +1300,15 @@ _llint_op_get_argument_by_val: loadi 4[PC], t3 loadi ThisArgumentOffset + TagOffset[cfr, t2, 8], t0 loadi ThisArgumentOffset + PayloadOffset[cfr, t2, 8], t1 - loadi 16[PC], t2 + loadi 20[PC], t2 storei t0, TagOffset[cfr, t3, 8] storei t1, PayloadOffset[cfr, t3, 8] valueProfile(t0, t1, t2) - dispatch(5) + dispatch(6) .opGetArgumentByValSlow: callSlowPath(_llint_slow_path_get_argument_by_val) - dispatch(5) + dispatch(6) _llint_op_get_by_pname: @@ -1338,10 +1345,15 @@ _llint_op_put_by_val: loadConstantOrVariablePayload(t0, CellTag, t1, .opPutByValSlow) loadi 8[PC], t0 loadConstantOrVariablePayload(t0, Int32Tag, t2, .opPutByValSlow) + loadp JSCell::m_structure[t1], t3 + loadp 16[PC], t0 + if VALUE_PROFILER + storep t3, ArrayProfile::m_lastSeenStructure[t0] + end loadp CodeBlock[cfr], t0 loadp CodeBlock::m_globalData[t0], t0 loadp JSGlobalData::jsArrayClassInfo[t0], t0 - bpneq [t1], t0, .opPutByValSlow + bpneq Structure::m_classInfo[t3], t0, .opPutByValSlow biaeq t2, JSArray::m_vectorLength[t1], .opPutByValSlow loadp JSArray::m_storage[t1], t0 bieq ArrayStorage::m_vector + TagOffset[t0, t2, 8], EmptyValueTag, .opPutByValEmpty @@ -1351,7 +1363,7 @@ _llint_op_put_by_val: writeBarrier(t1, t3) storei t1, ArrayStorage::m_vector + TagOffset[t0, t2, 8] storei t3, ArrayStorage::m_vector + PayloadOffset[t0, t2, 8] - dispatch(4) + dispatch(5) .opPutByValEmpty: addi 1, ArrayStorage::m_numValuesInVector[t0] @@ -1362,7 +1374,7 @@ _llint_op_put_by_val: .opPutByValSlow: callSlowPath(_llint_slow_path_put_by_val) - dispatch(4) + dispatch(5) _llint_op_loop: diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm index 6e752a6d0..f1a7e2998 100644 --- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm +++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm @@ -1099,31 +1099,38 @@ _llint_op_put_by_id_transition_normal_out_of_line: _llint_op_get_by_val: traceExecution() - loadp CodeBlock[cfr], t1 loadis 16[PB, PC, 8], t2 loadis 24[PB, PC, 8], t3 - loadp CodeBlock::m_globalData[t1], t1 loadConstantOrVariableCell(t2, t0, .opGetByValSlow) - loadp JSGlobalData::jsArrayClassInfo[t1], t2 loadConstantOrVariableInt32(t3, t1, .opGetByValSlow) sxi2p t1, t1 - bpneq [t0], t2, .opGetByValSlow + loadp JSCell::m_structure[t0], t3 + loadp 32[PB, PC, 8], t2 + if VALUE_PROFILER + storep t3, ArrayProfile::m_lastSeenStructure[t2] + end + loadp CodeBlock[cfr], t2 + loadp CodeBlock::m_globalData[t2], t2 + loadp JSGlobalData::jsArrayClassInfo[t2], t2 + bpneq Structure::m_classInfo[t3], t2, .opGetByValSlow loadp JSArray::m_storage[t0], t3 biaeq t1, JSArray::m_vectorLength[t0], .opGetByValSlow loadis 8[PB, PC, 8], t0 loadp ArrayStorage::m_vector[t3, t1, 8], t2 btpz t2, .opGetByValSlow storep t2, [cfr, t0, 8] - loadp 32[PB, PC, 8], t0 + loadp 40[PB, PC, 8], t0 valueProfile(t2, t0) - dispatch(5) + dispatch(6) .opGetByValSlow: callSlowPath(_llint_slow_path_get_by_val) - dispatch(5) + dispatch(6) _llint_op_get_argument_by_val: + # FIXME: At some point we should array profile this. Right now it isn't necessary + # since the DFG will never turn a get_argument_by_val into a GetByVal. traceExecution() loadis 16[PB, PC, 8], t0 loadis 24[PB, PC, 8], t1 @@ -1139,11 +1146,11 @@ _llint_op_get_argument_by_val: loadp ThisArgumentOffset[cfr, t2, 8], t0 storep t0, [cfr, t3, 8] valueProfile(t0, t1) - dispatch(5) + dispatch(6) .opGetArgumentByValSlow: callSlowPath(_llint_slow_path_get_argument_by_val) - dispatch(5) + dispatch(6) _llint_op_get_by_pname: @@ -1182,10 +1189,15 @@ _llint_op_put_by_val: loadis 16[PB, PC, 8], t0 loadConstantOrVariableInt32(t0, t2, .opPutByValSlow) sxi2p t2, t2 + loadp JSCell::m_structure[t1], t3 + loadp 32[PB, PC, 8], t0 + if VALUE_PROFILER + storep t3, ArrayProfile::m_lastSeenStructure[t0] + end loadp CodeBlock[cfr], t0 loadp CodeBlock::m_globalData[t0], t0 loadp JSGlobalData::jsArrayClassInfo[t0], t0 - bpneq [t1], t0, .opPutByValSlow + bpneq Structure::m_classInfo[t3], t0, .opPutByValSlow biaeq t2, JSArray::m_vectorLength[t1], .opPutByValSlow loadp JSArray::m_storage[t1], t0 btpz ArrayStorage::m_vector[t0, t2, 8], .opPutByValEmpty @@ -1194,7 +1206,7 @@ _llint_op_put_by_val: loadConstantOrVariable(t3, t1) writeBarrier(t1) storep t1, ArrayStorage::m_vector[t0, t2, 8] - dispatch(4) + dispatch(5) .opPutByValEmpty: addi 1, ArrayStorage::m_numValuesInVector[t0] @@ -1205,7 +1217,7 @@ _llint_op_put_by_val: .opPutByValSlow: callSlowPath(_llint_slow_path_put_by_val) - dispatch(4) + dispatch(5) _llint_op_loop: |