Reviewers: danno, Paul Lind, dusmil, kisg, palfia, ulan,

Description:
MIPS: Fix loading of global object in LWrapReceiver.

Port r18421 (39719ed)

Original commit message:
Since r16993 the cp register is handled by registers allocator,
and we cannot assume that the cp always contains the context.

BUG=318420
LOG=Y
TEST=test/mjsunit/regress/regress-318420.js

Please review this at https://codereview.chromium.org/123183002/

SVN Base: https://github.com/v8/v8.git@gbl

Affected files (+3, -1 lines):
  M src/mips/lithium-codegen-mips.cc


Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index 5ac470399ad9358e67f5622d2967106900c45ec6..02eb26903ef498b483668e009aec28e1a548b0bb 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -3371,7 +3371,9 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
   __ Branch(&result_in_receiver);

   __ bind(&global_object);
-  __ lw(result, GlobalObjectOperand());
+
+  __ lw(result, MemOperand(fp, StandardFrameConstants::kContextOffset));
+  __ lw(result, ContextOperand(result, Context::GLOBAL_OBJECT_INDEX));
   __ lw(result,
          FieldMemOperand(result, JSGlobalObject::kGlobalReceiverOffset));
   if (result.is(receiver)) {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to