Index: src/builtins-ia32.cc |
=================================================================== |
--- src/builtins-ia32.cc (revision 539) |
+++ src/builtins-ia32.cc (working copy) |
@@ -450,11 +450,12 @@ |
__ LeaveInternalFrame(); |
__ jmp(&patch_receiver); |
- // Use the global object from the called function as the receiver. |
+ // Use the global receiver object from the called function as the receiver. |
__ bind(&use_global_receiver); |
const int kGlobalIndex = |
Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
__ mov(ebx, FieldOperand(esi, kGlobalIndex)); |
+ __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); |
__ bind(&patch_receiver); |
__ mov(Operand(esp, eax, times_4, 0), ebx); |
@@ -593,11 +594,12 @@ |
__ mov(ebx, Operand(eax)); |
__ jmp(&push_receiver); |
- // Use the current global object as the receiver. |
+ // Use the current global receiver object as the receiver. |
__ bind(&use_global_receiver); |
const int kGlobalOffset = |
Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
__ mov(ebx, FieldOperand(esi, kGlobalOffset)); |
+ __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); |
// Push the receiver. |
__ bind(&push_receiver); |