Revision: 10896
Author:   [email protected]
Date:     Thu Mar  1 09:20:11 2012
Log: MIPS: Properly check fast array property in StoreIC::GenerateArrayLength.

This is the cleanup of an old todo from r10254 (93483b6eb).

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9570010
Patch from Daniel Kalmar <[email protected]>.
http://code.google.com/p/v8/source/detail?r=10896

Modified:
 /branches/bleeding_edge/src/mips/ic-mips.cc

=======================================
--- /branches/bleeding_edge/src/mips/ic-mips.cc Thu Mar  1 04:12:56 2012
+++ /branches/bleeding_edge/src/mips/ic-mips.cc Thu Mar  1 09:20:11 2012
@@ -1571,7 +1571,10 @@

   // Check that the array has fast properties, otherwise the length
   // property might have been redefined.
-  // TODO(mstarzinger): Port this check to MIPS.
+  __ lw(scratch, FieldMemOperand(receiver, JSArray::kPropertiesOffset));
+  __ lw(scratch, FieldMemOperand(scratch, FixedArray::kMapOffset));
+  __ LoadRoot(at, Heap::kHashTableMapRootIndex);
+  __ Branch(&miss, eq, scratch, Operand(at));

   // Check that value is a smi.
   __ JumpIfNotSmi(value, &miss);

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

Reply via email to