| Index: src/mips64/code-stubs-mips64.cc
|
| diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
|
| index 6b9aa382e593d256f231b67811c6d146a2c1859e..4300ad9a0901f737b5c64d6e7eaa3d0c945678a7 100644
|
| --- a/src/mips64/code-stubs-mips64.cc
|
| +++ b/src/mips64/code-stubs-mips64.cc
|
| @@ -1700,7 +1700,8 @@
|
| const int kAliasedOffset =
|
| Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX);
|
|
|
| - __ ld(a4, NativeContextMemOperand());
|
| + __ ld(a4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| + __ ld(a4, FieldMemOperand(a4, JSGlobalObject::kNativeContextOffset));
|
| Label skip2_ne, skip2_eq;
|
| __ Branch(&skip2_ne, ne, a6, Operand(zero_reg));
|
| __ ld(a4, MemOperand(a4, kNormalOffset));
|
| @@ -1903,7 +1904,10 @@
|
| static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS));
|
|
|
| // Get the arguments boilerplate from the current native context.
|
| - __ LoadNativeContextSlot(Context::STRICT_ARGUMENTS_MAP_INDEX, a4);
|
| + __ ld(a4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| + __ ld(a4, FieldMemOperand(a4, JSGlobalObject::kNativeContextOffset));
|
| + __ ld(a4, MemOperand(a4, Context::SlotOffset(
|
| + Context::STRICT_ARGUMENTS_MAP_INDEX)));
|
|
|
| __ sd(a4, FieldMemOperand(v0, JSObject::kMapOffset));
|
| __ LoadRoot(a5, Heap::kEmptyFixedArrayRootIndex);
|
| @@ -2490,7 +2494,7 @@
|
| __ Branch(&miss, ne, feedback_map, Operand(at));
|
|
|
| // Make sure the function is the Array() function
|
| - __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, a5);
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, a5);
|
| __ Branch(&megamorphic, ne, a1, Operand(a5));
|
| __ jmp(&done);
|
|
|
| @@ -2512,7 +2516,7 @@
|
| // An uninitialized cache is patched with the function.
|
| __ bind(&initialize);
|
| // Make sure the function is the Array() function.
|
| - __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, a5);
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, a5);
|
| __ Branch(¬_array_function, ne, a1, Operand(a5));
|
|
|
| // The target function is the Array constructor,
|
| @@ -2619,7 +2623,7 @@
|
| // a3 - slot id
|
| // a2 - vector
|
| // a4 - allocation site (loaded from vector[slot])
|
| - __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, at);
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, at);
|
| __ Branch(miss, ne, a1, Operand(at));
|
|
|
| __ li(a0, Operand(arg_count()));
|
| @@ -2747,13 +2751,14 @@
|
|
|
| // Make sure the function is not the Array() function, which requires special
|
| // behavior on MISS.
|
| - __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, a4);
|
| + __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, a4);
|
| __ Branch(&miss, eq, a1, Operand(a4));
|
|
|
| - // Make sure the function belongs to the same native context.
|
| + // Make sure the function belongs to the same native context (which implies
|
| + // the same global object).
|
| __ ld(t0, FieldMemOperand(a1, JSFunction::kContextOffset));
|
| - __ ld(t0, ContextMemOperand(t0, Context::NATIVE_CONTEXT_INDEX));
|
| - __ ld(t1, NativeContextMemOperand());
|
| + __ ld(t0, ContextOperand(t0, Context::GLOBAL_OBJECT_INDEX));
|
| + __ ld(t1, GlobalObjectOperand());
|
| __ Branch(&miss, ne, t0, Operand(t1));
|
|
|
| // Update stats.
|
| @@ -5151,14 +5156,14 @@
|
|
|
| // Go up context chain to the script context.
|
| for (int i = 0; i < depth(); ++i) {
|
| - __ ld(result_reg, ContextMemOperand(context_reg, Context::PREVIOUS_INDEX));
|
| + __ ld(result_reg, ContextOperand(context_reg, Context::PREVIOUS_INDEX));
|
| context_reg = result_reg;
|
| }
|
|
|
| // Load the PropertyCell value at the specified slot.
|
| __ dsll(at, slot_reg, kPointerSizeLog2);
|
| __ Daddu(at, at, Operand(context_reg));
|
| - __ ld(result_reg, ContextMemOperand(at, 0));
|
| + __ ld(result_reg, ContextOperand(at, 0));
|
| __ ld(result_reg, FieldMemOperand(result_reg, PropertyCell::kValueOffset));
|
|
|
| // Check that value is not the_hole.
|
| @@ -5190,14 +5195,14 @@
|
|
|
| // Go up context chain to the script context.
|
| for (int i = 0; i < depth(); ++i) {
|
| - __ ld(cell_reg, ContextMemOperand(context_reg, Context::PREVIOUS_INDEX));
|
| + __ ld(cell_reg, ContextOperand(context_reg, Context::PREVIOUS_INDEX));
|
| context_reg = cell_reg;
|
| }
|
|
|
| // Load the PropertyCell at the specified slot.
|
| __ dsll(at, slot_reg, kPointerSizeLog2);
|
| __ Daddu(at, at, Operand(context_reg));
|
| - __ ld(cell_reg, ContextMemOperand(at, 0));
|
| + __ ld(cell_reg, ContextOperand(at, 0));
|
|
|
| // Load PropertyDetails for the cell (actually only the cell_type and kind).
|
| __ ld(cell_details_reg,
|
|
|