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

Unified Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1414883011: Remove receiver conversion from function prologue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 1 month 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/full-codegen/mips64/full-codegen-mips64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x64/full-codegen-x64.cc
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
index f663b8f127efd0331fdec8907351e2321870e51b..5c834e6d5fa8da1d71b0ed0d96e0e377f6b16794 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -104,24 +104,12 @@ void FullCodeGenerator::Generate() {
}
#endif
- // Sloppy mode functions and builtins need to replace the receiver with the
- // global proxy when called as functions (without an explicit receiver
- // object).
- if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) {
- Label ok;
- // +1 for return address.
+ if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
StackArgumentsAccessor args(rsp, info->scope()->num_parameters());
__ movp(rcx, args.GetReceiverOperand());
-
- __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex);
- __ j(not_equal, &ok, Label::kNear);
-
- __ movp(rcx, GlobalObjectOperand());
- __ movp(rcx, FieldOperand(rcx, JSGlobalObject::kGlobalProxyOffset));
-
- __ movp(args.GetReceiverOperand(), rcx);
-
- __ bind(&ok);
+ __ AssertNotSmi(rcx);
+ __ CmpObjectType(rcx, FIRST_SPEC_OBJECT_TYPE, rcx);
+ __ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver);
}
// Open a frame scope to indicate that there is a frame on the stack. The
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698