| Index: src/arm/macro-assembler-arm.cc
|
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
|
| index 8e187a49f331ea25eb8881eb1b337473d425549a..2398e5fece6a5ae58576e16cb352b231e9c74f6a 100644
|
| --- a/src/arm/macro-assembler-arm.cc
|
| +++ b/src/arm/macro-assembler-arm.cc
|
| @@ -3928,6 +3928,32 @@ Register GetRegisterThatIsNotOneOf(Register reg1,
|
| }
|
|
|
|
|
| +void MacroAssembler::JumpIfDictionaryInPrototypeChain(
|
| + Register object,
|
| + Register scratch0,
|
| + Register scratch1,
|
| + Label* found) {
|
| + ASSERT(!scratch1.is(scratch0));
|
| + Factory* factory = isolate()->factory();
|
| + Register current = scratch0;
|
| + Label loop_again;
|
| +
|
| + // scratch contained elements pointer.
|
| + mov(current, object);
|
| +
|
| + // Loop based on the map going up the prototype chain.
|
| + bind(&loop_again);
|
| + ldr(current, FieldMemOperand(current, HeapObject::kMapOffset));
|
| + ldr(scratch1, FieldMemOperand(current, Map::kBitField2Offset));
|
| + Ubfx(scratch1, scratch1, Map::kElementsKindShift, Map::kElementsKindBitCount);
|
| + cmp(scratch1, Operand(DICTIONARY_ELEMENTS));
|
| + b(eq, found);
|
| + ldr(current, FieldMemOperand(current, Map::kPrototypeOffset));
|
| + cmp(current, Operand(factory->null_value()));
|
| + b(ne, &loop_again);
|
| +}
|
| +
|
| +
|
| #ifdef DEBUG
|
| bool AreAliased(Register reg1,
|
| Register reg2,
|
|
|