Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 58678e78a1a80e5502d5f63b96948344ecd95b27..2919f5768f9b2cf9338c78d9d1f36b0c2ce6ec89 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -7076,13 +7076,10 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ CompareRoot(r3, Heap::kUndefinedValueRootIndex); |
__ b(eq, &no_info); |
- // We should have an allocation site object |
- if (FLAG_debug_code) { |
- __ push(r3); |
- __ ldr(r3, FieldMemOperand(r3, 0)); |
- __ CompareRoot(r3, Heap::kAllocationSiteMapRootIndex); |
- __ Assert(eq, "Expected AllocationSite object in register edx"); |
- } |
+ // The type cell has either an AllocationSite or a JSFunction |
+ __ ldr(r4, FieldMemOperand(r3, 0)); |
+ __ CompareRoot(r4, Heap::kAllocationSiteMapRootIndex); |
+ __ b(ne, &no_info); |
__ ldr(r3, FieldMemOperand(r3, AllocationSite::kPayloadOffset)); |
__ SmiUntag(r3); |