diff options
Diffstat (limited to 'Source/JavaScriptCore/llint/LLIntSlowPaths.cpp')
-rw-r--r-- | Source/JavaScriptCore/llint/LLIntSlowPaths.cpp | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp index a7698be37..fbc0146b8 100644 --- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp +++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp @@ -895,7 +895,13 @@ LLINT_SLOW_PATH_DECL(slow_path_get_by_id) && !structure->typeInfo().prohibitsPropertyCaching()) { pc[4].u.structure.set( globalData, codeBlock->ownerExecutable(), structure); - pc[5].u.operand = slot.cachedOffset() * sizeof(JSValue); + if (isInlineOffset(slot.cachedOffset())) { + pc[0].u.opcode = bitwise_cast<void*>(&llint_op_get_by_id); + pc[5].u.operand = offsetInInlineStorage(slot.cachedOffset()) * sizeof(JSValue) + JSObject::offsetOfInlineStorage(); + } else { + pc[0].u.opcode = bitwise_cast<void*>(&llint_op_get_by_id_out_of_line); + pc[5].u.operand = offsetInOutOfLineStorage(slot.cachedOffset()) * sizeof(JSValue); + } } } @@ -940,7 +946,7 @@ LLINT_SLOW_PATH_DECL(slow_path_put_by_id) && baseCell == slot.base()) { if (slot.type() == PutPropertySlot::NewProperty) { - if (!structure->isDictionary() && structure->previousID()->propertyStorageCapacity() == structure->propertyStorageCapacity()) { + if (!structure->isDictionary() && structure->previousID()->outOfLineCapacity() == structure->outOfLineCapacity()) { ASSERT(structure->previousID()->transitionWatchpointSetHasBeenInvalidated()); // This is needed because some of the methods we call @@ -952,7 +958,10 @@ LLINT_SLOW_PATH_DECL(slow_path_put_by_id) ASSERT(structure->previousID()->isObject()); pc[4].u.structure.set( globalData, codeBlock->ownerExecutable(), structure->previousID()); - pc[5].u.operand = slot.cachedOffset() * sizeof(JSValue); + if (isInlineOffset(slot.cachedOffset())) + pc[5].u.operand = offsetInInlineStorage(slot.cachedOffset()) * sizeof(JSValue) + JSObject::offsetOfInlineStorage(); + else + pc[5].u.operand = offsetInOutOfLineStorage(slot.cachedOffset()) * sizeof(JSValue); pc[6].u.structure.set( globalData, codeBlock->ownerExecutable(), structure); StructureChain* chain = structure->prototypeChain(exec); @@ -960,16 +969,28 @@ LLINT_SLOW_PATH_DECL(slow_path_put_by_id) pc[7].u.structureChain.set( globalData, codeBlock->ownerExecutable(), chain); - if (pc[8].u.operand) - pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id_transition_direct); - else - pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id_transition_normal); + if (pc[8].u.operand) { + if (isInlineOffset(slot.cachedOffset())) + pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id_transition_direct); + else + pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id_transition_direct_out_of_line); + } else { + if (isInlineOffset(slot.cachedOffset())) + pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id_transition_normal); + else + pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id_transition_normal_out_of_line); + } } } else { - pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id); pc[4].u.structure.set( globalData, codeBlock->ownerExecutable(), structure); - pc[5].u.operand = slot.cachedOffset() * sizeof(JSValue); + if (isInlineOffset(slot.cachedOffset())) { + pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id); + pc[5].u.operand = offsetInInlineStorage(slot.cachedOffset()) * sizeof(JSValue) + JSObject::offsetOfInlineStorage(); + } else { + pc[0].u.opcode = bitwise_cast<void*>(&llint_op_put_by_id_out_of_line); + pc[5].u.operand = offsetInOutOfLineStorage(slot.cachedOffset()) * sizeof(JSValue); + } } } } |