Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2208)

Unified Diff: src/ia32/builtins-ia32.cc

Issue 111613003: Load the global proxy from the context of the target function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: don't embed global object or receiver in hydrogen Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698