Commit ae65c838 authored by plind44@gmail.com's avatar plind44@gmail.com

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=
R=plind44@gmail.com

Review URL: https://codereview.chromium.org/144023002

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 796a244b
......@@ -5554,11 +5554,17 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
bind(&start);
// Check that there are no elements. Register r2 contains the current JS
// Check that there are no elements. Register a2 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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment