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

Unified Diff: src/stub-cache.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: 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/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index a562ace477a66ae99fc8d5cd638ebbad8817791e..23426384e8a21395a69adebf710abfed3f1ad8dc 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -1149,9 +1149,19 @@ void CallStubCompiler::GenerateJumpFunctionIgnoreReceiver(
}
+void CallStubCompiler::PatchGlobalProxy(Handle<Object> object,
+ Register function) {
+ if (object->IsGlobalObject()) {
+ FetchGlobalProxy(masm(), function, rdx);
Toon Verwaest 2013/12/18 13:09:33 EEK! rdx in src/stub-cache.cc? Please run tests o
+ StackArgumentsAccessor args(rsp, arguments().immediate());
+ __ movq(args.GetReceiverOperand(), rdx);
+ }
+}
+
+
void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
Handle<JSFunction> function) {
- PatchGlobalProxy(object);
+ PatchGlobalProxy(object, function);
GenerateJumpFunctionIgnoreReceiver(function);
}
@@ -1159,7 +1169,7 @@ void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
Register actual_closure,
Handle<JSFunction> function) {
- PatchGlobalProxy(object);
+ PatchGlobalProxy(object, function);
ParameterCount expected(function);
__ InvokeFunction(actual_closure, expected, arguments(),
JUMP_FUNCTION, NullCallWrapper(), call_kind());

Powered by Google App Engine
This is Rietveld 408576698