Index: src/crankshaft/ia32/lithium-codegen-ia32.cc |
diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc |
index 7ea170f80c03d789efe9c71334f63455955b91eb..7c9405db0a31e70fdf081ee51a290bf338974464 100644 |
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc |
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc |
@@ -3188,8 +3188,10 @@ |
__ jmp(&receiver_ok, Label::kNear); |
__ bind(&global_object); |
__ mov(receiver, FieldOperand(function, JSFunction::kContextOffset)); |
- __ mov(receiver, ContextOperand(receiver, Context::NATIVE_CONTEXT_INDEX)); |
- __ mov(receiver, ContextOperand(receiver, Context::GLOBAL_PROXY_INDEX)); |
+ const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); |
+ __ mov(receiver, Operand(receiver, global_offset)); |
+ const int proxy_offset = JSGlobalObject::kGlobalProxyOffset; |
+ __ mov(receiver, FieldOperand(receiver, proxy_offset)); |
__ bind(&receiver_ok); |
} |