| Index: src/arm64/macro-assembler-arm64.cc
|
| diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc
|
| index c30f619215517a53c36d1f3b84847fda53ea403c..254d6d074b56aa0160c3e72a7b14b429d43ed1f4 100644
|
| --- a/src/arm64/macro-assembler-arm64.cc
|
| +++ b/src/arm64/macro-assembler-arm64.cc
|
| @@ -4397,21 +4397,29 @@ void MacroAssembler::JumpIfDictionaryInPrototypeChain(
|
| Register scratch1,
|
| Label* found) {
|
| DCHECK(!AreAliased(object, scratch0, scratch1));
|
| - Factory* factory = isolate()->factory();
|
| Register current = scratch0;
|
| - Label loop_again;
|
| + Label loop_again, end;
|
|
|
| // Scratch contains elements pointer.
|
| Mov(current, object);
|
| + Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset));
|
| + Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset));
|
| + CompareAndBranch(current, Heap::kNullValueRootIndex, eq, &end);
|
|
|
| // Loop based on the map going up the prototype chain.
|
| Bind(&loop_again);
|
| Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset));
|
| + STATIC_ASSERT(JS_PROXY_TYPE < JS_OBJECT_TYPE);
|
| + STATIC_ASSERT(JS_VALUE_TYPE < JS_OBJECT_TYPE);
|
| + CompareInstanceType(current, scratch1, JS_OBJECT_TYPE);
|
| + B(lo, found);
|
| Ldrb(scratch1, FieldMemOperand(current, Map::kBitField2Offset));
|
| DecodeField<Map::ElementsKindBits>(scratch1);
|
| CompareAndBranch(scratch1, DICTIONARY_ELEMENTS, eq, found);
|
| Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset));
|
| - CompareAndBranch(current, Operand(factory->null_value()), ne, &loop_again);
|
| + CompareAndBranch(current, Heap::kNullValueRootIndex, ne, &loop_again);
|
| +
|
| + Bind(&end);
|
| }
|
|
|
|
|
|
|