Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index d3b58624c8b24058eda3cdec1742bc7ccc36c739..9fc39d4ad8610d4687a758bd56734dd5a6173904 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -3467,7 +3467,13 @@ Handle<Code> ConstructStubCompiler::CompileConstructStub( |
// r1: constructor function |
// r2: initial map |
// r7: undefined |
+ ASSERT(function->has_initial_map()); |
__ ldrb(r3, FieldMemOperand(r2, Map::kInstanceSizeOffset)); |
+#ifdef DEBUG |
+ int instance_size = function->initial_map()->instance_size(); |
+ __ cmp(r3, Operand(instance_size >> kPointerSizeLog2)); |
+ __ Check(eq, "Instance size of initial map changed."); |
+#endif |
__ AllocateInNewSpace(r3, r4, r5, r6, &generic_stub_call, SIZE_IN_WORDS); |
// Allocated the JSObject, now initialize the fields. Map is set to initial |
@@ -3525,7 +3531,6 @@ Handle<Code> ConstructStubCompiler::CompileConstructStub( |
} |
// Fill the unused in-object property fields with undefined. |
- ASSERT(function->has_initial_map()); |
for (int i = shared->this_property_assignments_count(); |
i < function->initial_map()->inobject_properties(); |
i++) { |