Reviewers: Toon Verwaest, danno, Paul Lind, kisg,
Message:
Please land together with the following CL to avoid build and test errors:
https://chromiumcodereview.appspot.com/10692192/
Description:
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=
Please review this at https://chromiumcodereview.appspot.com/10690178/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mips/full-codegen-mips.cc
M src/mips/lithium-codegen-mips.cc
M src/mips/macro-assembler-mips.cc
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index
9ae025d7b2ac4ec6d8e8404da1c1ba3ff1d8a0bc..246fe2a13f2a9a8b4f8de9b624070ef37b46b1ff
100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -1149,7 +1149,7 @@ void
FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// 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.
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc
b/src/mips/lithium-codegen-mips.cc
index
737aafcc9be733301fb5686e68d53bc3e2659fa0..a090242f0618a26b64b9e143772680220d93f76b
100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -5168,7 +5168,7 @@ void LCodeGen::DoForInCacheArray(LForInCacheArray*
instr) {
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));
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc
b/src/mips/macro-assembler-mips.cc
index
6233b830e01107ec939a74441dbf15057b0a67d3..a0fea7705381152d4358b07ce56b7aa671bd824f
100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -5339,7 +5339,7 @@ void MacroAssembler::CheckEnumCache(Register
null_value, Label* call_runtime) {
// 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