MIPS: port Fix receiver for calls to strict-mode and builtin functions ....
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 1 Jun 2011 09:06:46 +0000 (09:06 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 1 Jun 2011 09:06:46 +0000 (09:06 +0000)
Fix receiver for calls to strict-mode and builtin functions that
are potentially shadowed by eval.

Port r8116 (e8a1e4842) to mips.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7090003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/mips/full-codegen-mips.cc

index b98831a..b085859 100644 (file)
@@ -2310,9 +2310,9 @@ void FullCodeGenerator::VisitCall(Call* expr) {
       __ bind(&done);
       // Push function.
       __ push(v0);
-      // Push global receiver.
-      __ lw(a1, GlobalObjectOperand());
-      __ lw(a1, FieldMemOperand(a1, GlobalObject::kGlobalReceiverOffset));
+      // The receiver is implicitly the global receiver. Indicate this
+      // by passing the hole to the call function stub.
+      __ LoadRoot(a1, Heap::kTheHoleValueRootIndex);
       __ push(a1);
       __ bind(&call);
     }