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

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

Issue 93863006: Revert "Load the global proxy from the context of the target function." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months 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
« no previous file with comments | « src/v8globals.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/builtins-x64.cc
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
index b2cd558a7a71925f41ded701d57805ad819186d3..780307317881d0720884cc8b8beec64e45a070e6 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -32,7 +32,6 @@
#include "codegen.h"
#include "deoptimizer.h"
#include "full-codegen.h"
-#include "stub-cache.h"
namespace v8 {
namespace internal {
@@ -847,7 +846,12 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
// Use the global receiver object from the called function as the
// receiver.
__ bind(&use_global_receiver);
- CallStubCompiler::FetchGlobalProxy(masm, rbx, rdi);
+ const int kGlobalIndex =
+ Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
+ __ movq(rbx, FieldOperand(rsi, kGlobalIndex));
+ __ movq(rbx, FieldOperand(rbx, GlobalObject::kNativeContextOffset));
+ __ movq(rbx, FieldOperand(rbx, kGlobalIndex));
+ __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset));
__ bind(&patch_receiver);
__ movq(args.GetArgumentOperand(1), rbx);
@@ -1027,7 +1031,13 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Use the current global receiver object as the receiver.
__ bind(&use_global_receiver);
- CallStubCompiler::FetchGlobalProxy(masm, rbx, rdi);
+ const int kGlobalOffset =
+ Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
+ __ movq(rbx, FieldOperand(rsi, kGlobalOffset));
+ __ movq(rbx, FieldOperand(rbx, GlobalObject::kNativeContextOffset));
+ __ movq(rbx, FieldOperand(rbx, kGlobalOffset));
+ __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset));
+
// Push the receiver.
__ bind(&push_receiver);
__ push(rbx);
« no previous file with comments | « src/v8globals.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698