Reviewers: danno, Toon Verwaest, Paul Lind, palfia, dusmil, kisg,
Description:
MIPS: Stay in fast enum case if the empty_slow_element_dictionary is used.
Port r18705 (78b4ea3)
Original commit message:
This fixes slow for-in over frozen objects.
BUG=
Please review this at https://codereview.chromium.org/144023002/
SVN Base: https://github.com/v8/v8.git@gbl
Affected files (+7, -1 lines):
M src/mips/macro-assembler-mips.cc
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc
b/src/mips/macro-assembler-mips.cc
index
8d85aed0ba226b708948bf61e13e9495e7d30594..b6476499f0560c3f27d8dedef76004dfbda9a520
100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -5556,9 +5556,15 @@ void MacroAssembler::CheckEnumCache(Register
null_value, Label* call_runtime) {
// Check that there are no elements. Register r2 contains the current JS
// object we've reached through the prototype chain.
+ Label no_elements;
lw(a2, FieldMemOperand(a2, JSObject::kElementsOffset));
- Branch(call_runtime, ne, a2, Operand(empty_fixed_array_value));
+ Branch(&no_elements, eq, a2, Operand(empty_fixed_array_value));
+ // Second chance, the object may be using the empty slow element
dictionary.
+ LoadRoot(at, Heap::kEmptySlowElementDictionaryRootIndex);
+ Branch(call_runtime, ne, a2, Operand(at));
+
+ bind(&no_elements);
lw(a2, FieldMemOperand(a1, Map::kPrototypeOffset));
Branch(&next, ne, a2, Operand(null_value));
}
--
--
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.