summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/llint
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-18 15:53:33 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-18 15:53:33 +0200
commit6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (patch)
treed9c68d1cca0b3e352f1e438561f3e504e641a08f /Source/JavaScriptCore/llint
parentd0424a769059c84ae20beb3c217812792ea6726b (diff)
downloadqtwebkit-6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2.tar.gz
Imported WebKit commit c7503cef7ecb236730d1309676ab9fc723fd061d (http://svn.webkit.org/repository/webkit/trunk@128886)
New snapshot with various build fixes
Diffstat (limited to 'Source/JavaScriptCore/llint')
-rw-r--r--Source/JavaScriptCore/llint/LLIntSlowPaths.cpp2
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter.asm15
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm33
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter64.asm31
4 files changed, 40 insertions, 41 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
index b0441e80b..1ddfca37c 100644
--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
@@ -1475,7 +1475,7 @@ LLINT_SLOW_PATH_DECL(slow_path_tear_off_arguments)
ASSERT(exec->codeBlock()->usesArguments());
Arguments* arguments = jsCast<Arguments*>(exec->uncheckedR(unmodifiedArgumentsRegister(pc[1].u.operand)).jsValue());
if (JSValue activationValue = LLINT_OP_C(2).jsValue())
- arguments->didTearOffActivation(globalData, jsCast<JSActivation*>(activationValue));
+ arguments->didTearOffActivation(exec, jsCast<JSActivation*>(activationValue));
else
arguments->tearOff(exec);
LLINT_END();
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
index 6f5460aa7..e347ccc70 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
@@ -187,6 +187,20 @@ macro slowPathForCall(advance, slowPath)
end)
end
+macro arrayProfile(structureAndIndexingType, profile, scratch)
+ const structure = structureAndIndexingType
+ const indexingType = structureAndIndexingType
+ if VALUE_PROFILER
+ storep structure, ArrayProfile::m_lastSeenStructure[profile]
+ loadb Structure::m_indexingType[structure], indexingType
+ move 1, scratch
+ lshifti indexingType, scratch
+ ori scratch, ArrayProfile::m_observedArrayModes[profile]
+ else
+ loadb Structure::m_indexingType[structure], indexingType
+ end
+end
+
macro checkSwitchToJIT(increment, action)
if JIT_ENABLED
loadp CodeBlock[cfr], t0
@@ -896,4 +910,3 @@ _llint_op_put_by_id_transition:
# Indicate the end of LLInt.
_llint_end:
crash()
-
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
index 0e37a4099..41926d8db 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
@@ -1176,12 +1176,9 @@ _llint_op_get_array_length:
loadp 16[PC], t1
loadConstantOrVariablePayload(t0, CellTag, t3, .opGetArrayLengthSlow)
loadp JSCell::m_structure[t3], t2
- if VALUE_PROFILER
- storep t2, ArrayProfile::m_lastSeenStructure[t1]
- end
- loadb Structure::m_indexingType[t2], t1
- btiz t1, IsArray, .opGetArrayLengthSlow
- btiz t1, HasArrayStorage, .opGetArrayLengthSlow
+ arrayProfile(t2, t1, t0)
+ btiz t2, IsArray, .opGetArrayLengthSlow
+ btiz t2, HasArrayStorage, .opGetArrayLengthSlow
loadi 4[PC], t1
loadp 32[PC], t2
loadp JSObject::m_butterfly[t3], t0
@@ -1308,17 +1305,15 @@ _llint_op_put_by_id_transition_normal_out_of_line:
_llint_op_get_by_val:
traceExecution()
loadi 8[PC], t2
- loadi 12[PC], t3
loadConstantOrVariablePayload(t2, CellTag, t0, .opGetByValSlow)
+ loadp JSCell::m_structure[t0], t2
+ loadp 16[PC], t3
+ arrayProfile(t2, t3, t1)
+ btiz t2, HasArrayStorage, .opGetByValSlow
+ loadi 12[PC], t3
loadConstantOrVariablePayload(t3, Int32Tag, t1, .opGetByValSlow)
- loadp JSCell::m_structure[t0], t3
- loadp 16[PC], t2
- if VALUE_PROFILER
- storep t3, ArrayProfile::m_lastSeenStructure[t2]
- end
- btpz Structure::m_indexingType[t3], HasArrayStorage, .opGetByValSlow
loadp JSObject::m_butterfly[t0], t3
- biaeq t1, -sizeof IndexingHeader + IndexingHeader::m_vectorLength[t0], .opGetByValSlow
+ biaeq t1, -sizeof IndexingHeader + IndexingHeader::m_vectorLength[t3], .opGetByValSlow
loadi 4[PC], t0
loadi ArrayStorage::m_vector + TagOffset[t3, t1, 8], t2
loadi ArrayStorage::m_vector + PayloadOffset[t3, t1, 8], t1
@@ -1392,14 +1387,12 @@ _llint_op_put_by_val:
traceExecution()
loadi 4[PC], t0
loadConstantOrVariablePayload(t0, CellTag, t1, .opPutByValSlow)
+ loadp JSCell::m_structure[t1], t2
+ loadp 16[PC], t0
+ arrayProfile(t2, t0, t3)
+ btiz t2, HasArrayStorage, .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
- btpz Structure::m_indexingType[t3], HasArrayStorage, .opPutByValSlow
loadp JSObject::m_butterfly[t1], t0
biaeq t2, -sizeof IndexingHeader + IndexingHeader::m_vectorLength[t0], .opPutByValSlow
bieq ArrayStorage::m_vector + TagOffset[t0, t2, 8], EmptyValueTag, .opPutByValEmpty
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
index 7dfcb6728..51a11f53f 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
@@ -1023,12 +1023,9 @@ _llint_op_get_array_length:
loadp 32[PB, PC, 8], t1
loadConstantOrVariableCell(t0, t3, .opGetArrayLengthSlow)
loadp JSCell::m_structure[t3], t2
- if VALUE_PROFILER
- storep t2, ArrayProfile::m_lastSeenStructure[t1]
- end
- loadb Structure::m_indexingType[t2], t1
- btiz t1, IsArray, .opGetArrayLengthSlow
- btiz t1, HasArrayStorage, .opGetArrayLengthSlow
+ arrayProfile(t2, t1, t0)
+ btiz t2, IsArray, .opGetArrayLengthSlow
+ btiz t2, HasArrayStorage, .opGetArrayLengthSlow
loadis 8[PB, PC, 8], t1
loadp 64[PB, PC, 8], t2
loadp JSObject::m_butterfly[t3], t0
@@ -1152,16 +1149,14 @@ _llint_op_put_by_id_transition_normal_out_of_line:
_llint_op_get_by_val:
traceExecution()
loadis 16[PB, PC, 8], t2
- loadis 24[PB, PC, 8], t3
loadConstantOrVariableCell(t2, t0, .opGetByValSlow)
+ loadp JSCell::m_structure[t0], t2
+ loadp 32[PB, PC, 8], t3
+ arrayProfile(t2, t3, t1)
+ loadis 24[PB, PC, 8], t3
+ btiz t2, HasArrayStorage, .opGetByValSlow
loadConstantOrVariableInt32(t3, t1, .opGetByValSlow)
sxi2p t1, t1
- loadp JSCell::m_structure[t0], t3
- loadp 32[PB, PC, 8], t2
- if VALUE_PROFILER
- storep t3, ArrayProfile::m_lastSeenStructure[t2]
- end
- btbz Structure::m_indexingType[t3], HasArrayStorage, .opGetByValSlow
loadp JSObject::m_butterfly[t0], t3
biaeq t1, -sizeof IndexingHeader + IndexingHeader::m_vectorLength[t3], .opGetByValSlow
loadis 8[PB, PC, 8], t0
@@ -1235,15 +1230,13 @@ _llint_op_put_by_val:
traceExecution()
loadis 8[PB, PC, 8], t0
loadConstantOrVariableCell(t0, t1, .opPutByValSlow)
+ loadp JSCell::m_structure[t1], t2
+ loadp 32[PB, PC, 8], t0
+ arrayProfile(t2, t0, t3)
+ btiz t2, HasArrayStorage, .opPutByValSlow
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
- btbz Structure::m_indexingType[t3], HasArrayStorage, .opPutByValSlow
loadp JSObject::m_butterfly[t1], t0
biaeq t2, -sizeof IndexingHeader + IndexingHeader::m_vectorLength[t0], .opPutByValSlow
btpz ArrayStorage::m_vector[t0, t2, 8], .opPutByValEmpty