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

Unified Diff: src/x64/stub-cache-x64.cc

Issue 131663003: Make the strict-mode calling convention for contextual calls the default one. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix arm port 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/x64/lithium-x64.cc ('k') | test/mjsunit/bugs/bug-2758.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index 49c46f9d3418130c6b91aa772b22d0668a471155..0d163017840fbff29e521b3524301123a1b592c9 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -2375,21 +2375,10 @@ void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
}
-void CallStubCompiler::PatchGlobalProxy(Handle<Object> object,
- Handle<JSFunction> function) {
+void CallStubCompiler::PatchImplicitReceiver(Handle<Object> object) {
if (object->IsGlobalObject()) {
StackArgumentsAccessor args(rsp, arguments());
- __ MoveHeapObject(rdx, handle(function->context()->global_proxy()));
- __ movq(args.GetReceiverOperand(), rdx);
- }
-}
-
-
-void CallStubCompiler::PatchGlobalProxy(Handle<Object> object,
- Register function) {
- if (object->IsGlobalObject()) {
- FetchGlobalProxy(masm(), rdx, function);
- StackArgumentsAccessor args(rsp, arguments().immediate());
+ __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex);
__ movq(args.GetReceiverOperand(), rdx);
}
}
@@ -2483,7 +2472,7 @@ void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
GenerateFunctionCheck(function, rbx, miss);
if (!function.is(rdi)) __ movq(rdi, function);
- PatchGlobalProxy(object, function);
+ PatchImplicitReceiver(object);
// Invoke the function.
__ InvokeFunction(rdi, arguments(), JUMP_FUNCTION,
@@ -2596,15 +2585,6 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
#define __ ACCESS_MASM(masm)
-void CallStubCompiler::FetchGlobalProxy(MacroAssembler* masm,
- Register target,
- Register function) {
- __ movq(target, FieldOperand(function, JSFunction::kContextOffset));
- __ movq(target, ContextOperand(target, Context::GLOBAL_OBJECT_INDEX));
- __ movq(target, FieldOperand(target, GlobalObject::kGlobalReceiverOffset));
-}
-
-
void StoreStubCompiler::GenerateStoreViaSetter(
MacroAssembler* masm,
Handle<JSFunction> setter) {
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | test/mjsunit/bugs/bug-2758.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698