Index: src/mips/builtins-mips.cc |
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc |
index 0342e6505daf986f6aa979d6e0ee5aba85419236..93ba3a0098876362d52b1617990cd06e5f244799 100644 |
--- a/src/mips/builtins-mips.cc |
+++ b/src/mips/builtins-mips.cc |
@@ -79,13 +79,12 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, |
// Load the built-in InternalArray function from the current context. |
static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, |
Register result) { |
- // Load the native context. |
+ // Load the global context. |
+ __ lw(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
__ lw(result, |
- MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
- __ lw(result, |
- FieldMemOperand(result, GlobalObject::kNativeContextOffset)); |
- // Load the InternalArray function from the native context. |
+ FieldMemOperand(result, GlobalObject::kGlobalContextOffset)); |
+ // Load the InternalArray function from the global context. |
__ lw(result, |
MemOperand(result, |
Context::SlotOffset( |
@@ -95,13 +94,12 @@ static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, |
// Load the built-in Array function from the current context. |
static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) { |
- // Load the native context. |
+ // Load the global context. |
+ __ lw(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
__ lw(result, |
- MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
- __ lw(result, |
- FieldMemOperand(result, GlobalObject::kNativeContextOffset)); |
- // Load the Array function from the native context. |
+ FieldMemOperand(result, GlobalObject::kGlobalContextOffset)); |
+ // Load the Array function from the global context. |
__ lw(result, |
MemOperand(result, |
Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); |
@@ -1432,9 +1430,9 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
// receiver. |
__ bind(&use_global_receiver); |
const int kGlobalIndex = |
- Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; |
+ Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
__ lw(a2, FieldMemOperand(cp, kGlobalIndex)); |
- __ lw(a2, FieldMemOperand(a2, GlobalObject::kNativeContextOffset)); |
+ __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalContextOffset)); |
__ lw(a2, FieldMemOperand(a2, kGlobalIndex)); |
__ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset)); |
@@ -1625,9 +1623,9 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
// Use the current global receiver object as the receiver. |
__ bind(&use_global_receiver); |
const int kGlobalOffset = |
- Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; |
+ Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
__ lw(a0, FieldMemOperand(cp, kGlobalOffset)); |
- __ lw(a0, FieldMemOperand(a0, GlobalObject::kNativeContextOffset)); |
+ __ lw(a0, FieldMemOperand(a0, GlobalObject::kGlobalContextOffset)); |
__ lw(a0, FieldMemOperand(a0, kGlobalOffset)); |
__ lw(a0, FieldMemOperand(a0, GlobalObject::kGlobalReceiverOffset)); |