| Index: src/arm/codegen-arm.cc
|
| diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc
|
| index bc46af8af6408b4280cf5759aa25bd97777a2d52..bd7b9b502f774be8e7964e5cb53abf54f058430f 100644
|
| --- a/src/arm/codegen-arm.cc
|
| +++ b/src/arm/codegen-arm.cc
|
| @@ -6116,10 +6116,12 @@ void CodeGenerator::EmitKeyedLoad() {
|
| // Get the elements array from the receiver and check that it
|
| // is not a dictionary.
|
| __ ldr(scratch1, FieldMemOperand(receiver, JSObject::kElementsOffset));
|
| - __ ldr(scratch2, FieldMemOperand(scratch1, JSObject::kMapOffset));
|
| - __ LoadRoot(ip, Heap::kFixedArrayMapRootIndex);
|
| - __ cmp(scratch2, ip);
|
| - deferred->Branch(ne);
|
| + if (FLAG_debug_code) {
|
| + __ ldr(scratch2, FieldMemOperand(scratch1, JSObject::kMapOffset));
|
| + __ LoadRoot(ip, Heap::kFixedArrayMapRootIndex);
|
| + __ cmp(scratch2, ip);
|
| + __ Assert(eq, "JSObject with fast elements map has slow elements");
|
| + }
|
|
|
| // Check that key is within bounds. Use unsigned comparison to handle
|
| // negative keys.
|
| @@ -6140,7 +6142,7 @@ void CodeGenerator::EmitKeyedLoad() {
|
|
|
| __ mov(r0, scratch1);
|
| // Make sure that the expected number of instructions are generated.
|
| - ASSERT_EQ(kInlinedKeyedLoadInstructionsAfterPatch,
|
| + ASSERT_EQ(GetInlinedKeyedLoadInstructionsAfterPatch(),
|
| masm_->InstructionsGeneratedSince(&check_inlined_codesize));
|
| }
|
|
|
|
|