summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/llint/LowLevelInterpreter64.asm')
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter64.asm61
1 files changed, 42 insertions, 19 deletions
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
index 4bb7b8e1c..7dfcb6728 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
@@ -806,20 +806,20 @@ _llint_op_is_string:
macro loadPropertyAtVariableOffsetKnownNotFinal(propertyOffsetAsPointer, objectAndStorage, value)
assert(macro (ok) bigteq propertyOffsetAsPointer, InlineStorageCapacity, ok end)
negp propertyOffsetAsPointer
- loadp JSObject::m_outOfLineStorage[objectAndStorage], objectAndStorage
- loadp (InlineStorageCapacity - 2) * 8[objectAndStorage, propertyOffsetAsPointer, 8], value
+ loadp JSObject::m_butterfly[objectAndStorage], objectAndStorage
+ loadp (InlineStorageCapacity - 1) * 8 - sizeof IndexingHeader[objectAndStorage, propertyOffsetAsPointer, 8], value
end
macro loadPropertyAtVariableOffset(propertyOffsetAsInt, objectAndStorage, value)
bilt propertyOffsetAsInt, InlineStorageCapacity, .isInline
- loadp JSObject::m_outOfLineStorage[objectAndStorage], objectAndStorage
+ loadp JSObject::m_butterfly[objectAndStorage], objectAndStorage
negi propertyOffsetAsInt
sxi2p propertyOffsetAsInt, propertyOffsetAsInt
jmp .ready
.isInline:
- addp JSFinalObject::m_inlineStorage - (InlineStorageCapacity - 2) * 8, objectAndStorage
+ addp JSFinalObject::m_inlineStorage - (InlineStorageCapacity - 1) * 8 + sizeof IndexingHeader, objectAndStorage
.ready:
- loadp (InlineStorageCapacity - 2) * 8[objectAndStorage, propertyOffsetAsInt, 8], value
+ loadp (InlineStorageCapacity - 1) * 8 - sizeof IndexingHeader[objectAndStorage, propertyOffsetAsInt, 8], value
end
macro resolveGlobal(size, slow)
@@ -953,6 +953,7 @@ _llint_op_get_global_var_watchable:
getGlobalVar(5)
+_llint_op_init_global_const:
_llint_op_put_global_var:
traceExecution()
loadis 16[PB, PC, 8], t1
@@ -963,6 +964,7 @@ _llint_op_put_global_var:
dispatch(3)
+_llint_op_init_global_const_check:
_llint_op_put_global_var_check:
traceExecution()
loadp 24[PB, PC, 8], t2
@@ -1015,6 +1017,33 @@ _llint_op_get_by_id_out_of_line:
getById(withOutOfLineStorage)
+_llint_op_get_array_length:
+ traceExecution()
+ loadis 16[PB, PC, 8], t0
+ 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
+ loadis 8[PB, PC, 8], t1
+ loadp 64[PB, PC, 8], t2
+ loadp JSObject::m_butterfly[t3], t0
+ loadi -sizeof IndexingHeader + IndexingHeader::m_publicLength[t0], t0
+ bilt t0, 0, .opGetArrayLengthSlow
+ orp tagTypeNumber, t0
+ valueProfile(t0, t2)
+ storep t0, [cfr, t1, 8]
+ dispatch(9)
+
+.opGetArrayLengthSlow:
+ callSlowPath(_llint_slow_path_get_by_id)
+ dispatch(9)
+
+
_llint_op_get_arguments_length:
traceExecution()
loadis 16[PB, PC, 8], t0
@@ -1132,12 +1161,9 @@ _llint_op_get_by_val:
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
+ 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
loadp ArrayStorage::m_vector[t3, t1, 8], t2
btpz t2, .opGetByValSlow
@@ -1217,12 +1243,9 @@ _llint_op_put_by_val:
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 Structure::m_classInfo[t3], t0, .opPutByValSlow
- biaeq t2, JSArray::m_vectorLength[t1], .opPutByValSlow
- loadp JSArray::m_storage[t1], t0
+ 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
.opPutByValStoreResult:
loadis 24[PB, PC, 8], t3
@@ -1233,9 +1256,9 @@ _llint_op_put_by_val:
.opPutByValEmpty:
addi 1, ArrayStorage::m_numValuesInVector[t0]
- bib t2, ArrayStorage::m_length[t0], .opPutByValStoreResult
+ bib t2, -sizeof IndexingHeader + IndexingHeader::m_publicLength[t0], .opPutByValStoreResult
addi 1, t2, t1
- storei t1, ArrayStorage::m_length[t0]
+ storei t1, -sizeof IndexingHeader + IndexingHeader::m_publicLength[t0]
jmp .opPutByValStoreResult
.opPutByValSlow: