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

Unified Diff: src/codegen-arm.cc

Issue 42009: Fix issue 267: Functions now called with global object as receiver. (Closed)
Patch Set: Now with regression test Created 11 years, 9 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/ast.h ('k') | src/codegen-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-arm.cc
diff --git a/src/codegen-arm.cc b/src/codegen-arm.cc
index c1497989eb89f4dd733d47ea5c21f6426f8a1903..9193a4e96dd25185fd87b5467e943631ba2624a3 100644
--- a/src/codegen-arm.cc
+++ b/src/codegen-arm.cc
@@ -3076,8 +3076,13 @@ void CodeGenerator::VisitCall(Call* node) {
ref.GetValueAndSpill(NOT_INSIDE_TYPEOF); // receiver
// Pass receiver to called function.
- __ ldr(r0, frame_->ElementAt(ref.size()));
- frame_->EmitPush(r0);
+ if (property->is_synthetic()) {
+ LoadGlobalReceiver(r0);
+ } else {
+ __ ldr(r0, frame_->ElementAt(ref.size()));
+ frame_->EmitPush(r0);
+ }
+
// Call the function.
CallWithArguments(args, node->position());
frame_->EmitPush(r0);
« no previous file with comments | « src/ast.h ('k') | src/codegen-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698