| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 83aef7801a70bc663815a9270b61eb5b9df33af1..7d621a34fd972d767ab7f154fb1f994f8c153f76 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -982,24 +982,23 @@ void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
|
| cmp(scratch, Immediate(0));
|
| Check(not_equal, "we should not have an empty lexical context");
|
| }
|
| - // 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;
|
| mov(scratch, FieldOperand(scratch, offset));
|
| - mov(scratch, FieldOperand(scratch, GlobalObject::kNativeContextOffset));
|
| + mov(scratch, FieldOperand(scratch, GlobalObject::kGlobalContextOffset));
|
|
|
| - // Check the context is a native context.
|
| + // Check the context is a global context.
|
| if (emit_debug_code()) {
|
| push(scratch);
|
| - // Read the first word and compare to native_context_map.
|
| + // Read the first word and compare to global_context_map.
|
| mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset));
|
| - cmp(scratch, isolate()->factory()->native_context_map());
|
| - Check(equal, "JSGlobalObject::native_context should be a native context.");
|
| + cmp(scratch, isolate()->factory()->global_context_map());
|
| + Check(equal, "JSGlobalObject::global_context should be a global context.");
|
| pop(scratch);
|
| }
|
|
|
| // Check if both contexts are the same.
|
| - cmp(scratch, FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
|
| + cmp(scratch, FieldOperand(holder_reg, JSGlobalProxy::kContextOffset));
|
| j(equal, &same_contexts);
|
|
|
| // Compare security tokens, save holder_reg on the stack so we can use it
|
| @@ -1010,19 +1009,18 @@ void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
|
| // Check that the security token in the calling global object is
|
| // compatible with the security token in the receiving global
|
| // object.
|
| - mov(holder_reg,
|
| - FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
|
| + mov(holder_reg, FieldOperand(holder_reg, JSGlobalProxy::kContextOffset));
|
|
|
| - // Check the context is a native context.
|
| + // Check the context is a global context.
|
| if (emit_debug_code()) {
|
| cmp(holder_reg, isolate()->factory()->null_value());
|
| Check(not_equal, "JSGlobalProxy::context() should not be null.");
|
|
|
| push(holder_reg);
|
| - // Read the first word and compare to native_context_map(),
|
| + // Read the first word and compare to global_context_map(),
|
| mov(holder_reg, FieldOperand(holder_reg, HeapObject::kMapOffset));
|
| - cmp(holder_reg, isolate()->factory()->native_context_map());
|
| - Check(equal, "JSGlobalObject::native_context should be a native context.");
|
| + cmp(holder_reg, isolate()->factory()->global_context_map());
|
| + Check(equal, "JSGlobalObject::global_context should be a global context.");
|
| pop(holder_reg);
|
| }
|
|
|
| @@ -2172,7 +2170,7 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
|
| void MacroAssembler::GetBuiltinFunction(Register target,
|
| Builtins::JavaScript id) {
|
| // Load the JavaScript builtin function from the builtins object.
|
| - mov(target, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| + mov(target, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
| mov(target, FieldOperand(target, GlobalObject::kBuiltinsOffset));
|
| mov(target, FieldOperand(target,
|
| JSBuiltinsObject::OffsetOfFunctionWithId(id)));
|
| @@ -2221,8 +2219,8 @@ void MacroAssembler::LoadTransitionedArrayMapConditional(
|
| Register scratch,
|
| Label* no_map_match) {
|
| // Load the global or builtins object from the current context.
|
| - mov(scratch, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - mov(scratch, FieldOperand(scratch, GlobalObject::kNativeContextOffset));
|
| + mov(scratch, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
| + mov(scratch, FieldOperand(scratch, GlobalObject::kGlobalContextOffset));
|
|
|
| // Check that the function's map is the same as the expected cached map.
|
| mov(scratch, Operand(scratch,
|
| @@ -2267,11 +2265,10 @@ void MacroAssembler::LoadInitialArrayMap(
|
|
|
| void MacroAssembler::LoadGlobalFunction(int index, Register function) {
|
| // Load the global or builtins object from the current context.
|
| - mov(function,
|
| - Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - // Load the native context from the global or builtins object.
|
| - mov(function, FieldOperand(function, GlobalObject::kNativeContextOffset));
|
| - // Load the function from the native context.
|
| + mov(function, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
| + // Load the global context from the global or builtins object.
|
| + mov(function, FieldOperand(function, GlobalObject::kGlobalContextOffset));
|
| + // Load the function from the global context.
|
| mov(function, Operand(function, Context::SlotOffset(index)));
|
| }
|
|
|
|
|