Index: src/arm/codegen-arm.cc |
diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc |
index aca6b4f3cdeefb1f64668628125c7e3d6080c805..5aa68e3390b64fd22423a1a5924ded4900fe9f14 100644 |
--- a/src/arm/codegen-arm.cc |
+++ b/src/arm/codegen-arm.cc |
@@ -5290,6 +5290,13 @@ void CodeGenerator::GenerateRegExpCloneResult(ZoneList<Expression*>* args) { |
__ cmp(r1, Operand(ip)); |
__ b(ne, &done); |
+ if (FLAG_debug_code) { |
+ __ LoadRoot(r2, Heap::kEmptyFixedArrayRootIndex); |
+ __ ldr(ip, FieldMemOperand(r0, JSObject::kPropertiesOffset)); |
+ __ cmp(ip, r2); |
+ __ Check(eq, "JSRegExpResult: default map but non-empty properties."); |
+ } |
+ |
// All set, copy the contents to a new object. |
__ AllocateInNewSpace(JSRegExpResult::kSize, |
r2, |
@@ -5305,7 +5312,6 @@ void CodeGenerator::GenerateRegExpCloneResult(ZoneList<Expression*>* args) { |
__ ldm(ib, r0, r3.bit() | r4.bit() | r5.bit() | r6.bit() | r7.bit()); |
__ stm(ia, r2, |
r1.bit() | r3.bit() | r4.bit() | r5.bit() | r6.bit() | r7.bit()); |
- ASSERT(!Heap::InNewSpace(Heap::fixed_cow_array_map())); |
ASSERT(JSRegExp::kElementsOffset == 2 * kPointerSize); |
// Check whether elements array is empty fixed array, and otherwise make |
// it copy-on-write (it never should be empty unless someone is messing |