| Index: src/mips/macro-assembler-mips.cc
 | 
| diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
 | 
| index 515685590eaadf5347dfbd2bb85b95281219e61e..349937d716813fe604f15ea714fcd87c690be21b 100644
 | 
| --- a/src/mips/macro-assembler-mips.cc
 | 
| +++ b/src/mips/macro-assembler-mips.cc
 | 
| @@ -361,29 +361,28 @@ void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
 | 
|        scratch, Operand(zero_reg));
 | 
|  #endif
 | 
|  
 | 
| -  // Load the native context of the current context.
 | 
| -  int offset =
 | 
| -      Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
 | 
| +  // Load the global context of the current context.
 | 
| +  int offset = Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize;
 | 
|    lw(scratch, FieldMemOperand(scratch, offset));
 | 
| -  lw(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
 | 
| +  lw(scratch, FieldMemOperand(scratch, GlobalObject::kGlobalContextOffset));
 | 
|  
 | 
| -  // Check the context is a native context.
 | 
| +  // Check the context is a global context.
 | 
|    if (emit_debug_code()) {
 | 
|      // TODO(119): Avoid push(holder_reg)/pop(holder_reg).
 | 
|      push(holder_reg);  // Temporarily save holder on the stack.
 | 
| -    // Read the first word and compare to the native_context_map.
 | 
| +    // Read the first word and compare to the global_context_map.
 | 
|      lw(holder_reg, FieldMemOperand(scratch, HeapObject::kMapOffset));
 | 
| -    LoadRoot(at, Heap::kNativeContextMapRootIndex);
 | 
| -    Check(eq, "JSGlobalObject::native_context should be a native context.",
 | 
| +    LoadRoot(at, Heap::kGlobalContextMapRootIndex);
 | 
| +    Check(eq, "JSGlobalObject::global_context should be a global context.",
 | 
|            holder_reg, Operand(at));
 | 
|      pop(holder_reg);  // Restore holder.
 | 
|    }
 | 
|  
 | 
|    // Check if both contexts are the same.
 | 
| -  lw(at, FieldMemOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
 | 
| +  lw(at, FieldMemOperand(holder_reg, JSGlobalProxy::kContextOffset));
 | 
|    Branch(&same_contexts, eq, scratch, Operand(at));
 | 
|  
 | 
| -  // Check the context is a native context.
 | 
| +  // Check the context is a global context.
 | 
|    if (emit_debug_code()) {
 | 
|      // TODO(119): Avoid push(holder_reg)/pop(holder_reg).
 | 
|      push(holder_reg);  // Temporarily save holder on the stack.
 | 
| @@ -393,13 +392,13 @@ void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
 | 
|            holder_reg, Operand(at));
 | 
|  
 | 
|      lw(holder_reg, FieldMemOperand(holder_reg, HeapObject::kMapOffset));
 | 
| -    LoadRoot(at, Heap::kNativeContextMapRootIndex);
 | 
| -    Check(eq, "JSGlobalObject::native_context should be a native context.",
 | 
| +    LoadRoot(at, Heap::kGlobalContextMapRootIndex);
 | 
| +    Check(eq, "JSGlobalObject::global_context should be a global context.",
 | 
|            holder_reg, Operand(at));
 | 
|      // Restore at is not needed. at is reloaded below.
 | 
|      pop(holder_reg);  // Restore holder.
 | 
|      // Restore at to holder's context.
 | 
| -    lw(at, FieldMemOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
 | 
| +    lw(at, FieldMemOperand(holder_reg, JSGlobalProxy::kContextOffset));
 | 
|    }
 | 
|  
 | 
|    // Check that the security token in the calling global object is
 | 
| @@ -4283,7 +4282,7 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
 | 
|  void MacroAssembler::GetBuiltinFunction(Register target,
 | 
|                                          Builtins::JavaScript id) {
 | 
|    // Load the builtins object into target register.
 | 
| -  lw(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
 | 
| +  lw(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
 | 
|    lw(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset));
 | 
|    // Load the JavaScript builtin function from the builtins object.
 | 
|    lw(target, FieldMemOperand(target,
 | 
| @@ -4452,9 +4451,8 @@ void MacroAssembler::LoadTransitionedArrayMapConditional(
 | 
|      Register scratch,
 | 
|      Label* no_map_match) {
 | 
|    // Load the global or builtins object from the current context.
 | 
| -  lw(scratch,
 | 
| -     MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
 | 
| -  lw(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
 | 
| +  lw(scratch, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
 | 
| +  lw(scratch, FieldMemOperand(scratch, GlobalObject::kGlobalContextOffset));
 | 
|  
 | 
|    // Check that the function's map is the same as the expected cached map.
 | 
|    lw(scratch,
 | 
| @@ -4499,12 +4497,11 @@ void MacroAssembler::LoadInitialArrayMap(
 | 
|  
 | 
|  void MacroAssembler::LoadGlobalFunction(int index, Register function) {
 | 
|    // Load the global or builtins object from the current context.
 | 
| -  lw(function,
 | 
| -     MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
 | 
| -  // Load the native context from the global or builtins object.
 | 
| +  lw(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
 | 
| +  // Load the global context from the global or builtins object.
 | 
|    lw(function, FieldMemOperand(function,
 | 
| -                               GlobalObject::kNativeContextOffset));
 | 
| -  // Load the function from the native context.
 | 
| +                               GlobalObject::kGlobalContextOffset));
 | 
| +  // Load the function from the global context.
 | 
|    lw(function, MemOperand(function, Context::SlotOffset(index)));
 | 
|  }
 | 
|  
 | 
| 
 |