Reviewers: danno, Paul Lind, kisg,

Description:
MIPS: Properly initialize element-transitioning array literals on ARM.

Port r10624 (172d021).

BUG=
TEST=


Please review this at http://codereview.chromium.org/9689010/

Affected files:
  M src/mips/code-stubs-mips.cc
  M src/mips/macro-assembler-mips.h


Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 19346af04bf29fd205e87a109cac20f962e79a7b..859d8e32bfe45c6f0b278e2df5f4c703c03d1391 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -7677,7 +7677,7 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
   // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS.
   __ bind(&double_elements);
   __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset));
-  __ StoreNumberToDoubleElements(a0, a3, a1, t1, t2, t3, t5, t6,
+  __ StoreNumberToDoubleElements(a0, a3, a1, t1, t2, t3, t5, a2,
                                  &slow_elements);
   __ Ret(USE_DELAY_SLOT);
   __ mov(v0, a0);
Index: src/mips/macro-assembler-mips.h
diff --git a/src/mips/macro-assembler-mips.h b/src/mips/macro-assembler-mips.h index 6ae8657e1e6399114a0ebddbb62f2421d7ed8dcd..ef015fda53cc7270f1c505f61ae7d550c2fe4394 100644
--- a/src/mips/macro-assembler-mips.h
+++ b/src/mips/macro-assembler-mips.h
@@ -934,7 +934,8 @@ class MacroAssembler: public Assembler {

   // Check to see if maybe_number can be stored as a double in
// FastDoubleElements. If it can, store it at the index specified by key in
-  // the FastDoubleElements array elements, otherwise jump to fail.
+ // the FastDoubleElements array elements. Otherwise jump to fail, in which
+  // case scratch2, scratch3 and scratch4 are unmodified.
   void StoreNumberToDoubleElements(Register value_reg,
                                    Register key_reg,
                                    Register receiver_reg,


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to