Revision: 12076
Author:   [email protected]
Date:     Fri Jul 13 02:14:43 2012
Log: MIPS: Ensure that all descriptors have a valid enumeration index, and replace NextEnumIndex with LastAdded.

Port r12042 (ce65764e)

Original commit message:
The LastAdded points to the descriptor that was last added to the array. From the descriptor we can deduce the NextEnumerationIndex. This allows us to quickly find the property that we are transitioning to, which is necessary for transition-intensive code, eg JSON parsing.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10690178
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=12076

Modified:
 /branches/bleeding_edge/src/mips/full-codegen-mips.cc
 /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
 /branches/bleeding_edge/src/mips/macro-assembler-mips.cc

=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Fri Jul 13 02:13:10 2012 +++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Fri Jul 13 02:14:43 2012
@@ -1149,7 +1149,7 @@
   // We got a map in register v0. Get the enumeration cache from it.
   __ bind(&use_cache);
   __ LoadInstanceDescriptors(v0, a1, a2);
-  __ lw(a1, FieldMemOperand(a1, DescriptorArray::kEnumerationIndexOffset));
+  __ lw(a1, FieldMemOperand(a1, DescriptorArray::kLastAddedOffset));
__ lw(a2, FieldMemOperand(a1, DescriptorArray::kEnumCacheBridgeCacheOffset));

   // Set up the four remaining stack slots.
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Fri Jul 13 02:13:10 2012 +++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Fri Jul 13 02:14:43 2012
@@ -5168,7 +5168,7 @@
   Register scratch = ToRegister(instr->scratch());
   __ LoadInstanceDescriptors(map, result, scratch);
   __ lw(result,
-        FieldMemOperand(result, DescriptorArray::kEnumerationIndexOffset));
+        FieldMemOperand(result, DescriptorArray::kLastAddedOffset));
   __ lw(result,
         FieldMemOperand(result, FixedArray::SizeFor(instr->idx())));
   DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg));
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Fri Jul 13 02:13:10 2012 +++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Fri Jul 13 02:14:43 2012
@@ -5339,7 +5339,7 @@
   // Check that there is an enum cache in the non-empty instance
   // descriptors (a3).  This is the case if the next enumeration
   // index field does not contain a smi.
-  lw(a3, FieldMemOperand(a3, DescriptorArray::kEnumerationIndexOffset));
+  lw(a3, FieldMemOperand(a3, DescriptorArray::kLastAddedOffset));
   JumpIfSmi(a3, call_runtime);

   // For all objects but the receiver, check that the cache is empty.

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

Reply via email to