| Index: src/ia32/builtins-ia32.cc
|
| diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
|
| index 2de5ef875a10417b3705f33fdec8ab411431a5e1..7170348c2cf888d58894d1abb75e700ba0b19ccd 100644
|
| --- a/src/ia32/builtins-ia32.cc
|
| +++ b/src/ia32/builtins-ia32.cc
|
| @@ -32,6 +32,7 @@
|
| #include "codegen.h"
|
| #include "deoptimizer.h"
|
| #include "full-codegen.h"
|
| +#include "stub-cache.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -763,12 +764,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
|
| // Use the global receiver object from the called function as the
|
| // receiver.
|
| __ bind(&use_global_receiver);
|
| - const int kGlobalIndex =
|
| - Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
|
| - __ mov(ebx, FieldOperand(esi, kGlobalIndex));
|
| - __ mov(ebx, FieldOperand(ebx, GlobalObject::kNativeContextOffset));
|
| - __ mov(ebx, FieldOperand(ebx, kGlobalIndex));
|
| - __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset));
|
| + CallStubCompiler::FetchGlobalProxy(masm, ebx, edi);
|
|
|
| __ bind(&patch_receiver);
|
| __ mov(Operand(esp, eax, times_4, 0), ebx);
|
| @@ -941,12 +937,7 @@ 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;
|
| - __ mov(ebx, FieldOperand(esi, kGlobalOffset));
|
| - __ mov(ebx, FieldOperand(ebx, GlobalObject::kNativeContextOffset));
|
| - __ mov(ebx, FieldOperand(ebx, kGlobalOffset));
|
| - __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset));
|
| + CallStubCompiler::FetchGlobalProxy(masm, ebx, edi);
|
|
|
| // Push the receiver.
|
| __ bind(&push_receiver);
|
|
|