Index: src/x64/codegen-x64.cc |
diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc |
index 572fa623eec145417e2c2ddd8c8cf4117100d176..3358b2cbae025f73a0cc64e670fddc7ea87556a7 100644 |
--- a/src/x64/codegen-x64.cc |
+++ b/src/x64/codegen-x64.cc |
@@ -7529,9 +7529,11 @@ Result CodeGenerator::EmitKeyedLoad() { |
// is not a dictionary. |
__ movq(elements.reg(), |
FieldOperand(receiver.reg(), JSObject::kElementsOffset)); |
- __ Cmp(FieldOperand(elements.reg(), HeapObject::kMapOffset), |
- Factory::fixed_array_map()); |
- deferred->Branch(not_equal); |
+ if (FLAG_debug_code) { |
+ __ Cmp(FieldOperand(elements.reg(), HeapObject::kMapOffset), |
+ Factory::fixed_array_map()); |
+ __ Assert(equal, "JSObject with fast elements map has slow elements"); |
+ } |
// Check that key is within bounds. |
__ SmiCompare(key.reg(), |