Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index ba1d17722db2b8c294af9d3502af238857c1ef05..bd15775d4b000f8e8a0478526b3c8c0c3939a5ce 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -3453,7 +3453,7 @@ Handle<Code> ConstructStubCompiler::CompileConstructStub( |
// t7: undefined |
__ lbu(a3, FieldMemOperand(a2, Map::kInstanceTypeOffset)); |
__ Check(ne, "Function constructed by construct stub.", |
- a3, Operand(JS_FUNCTION_TYPE)); |
+ a3, Operand(JS_FUNCTION_TYPE)); |
#endif |
// Now allocate the JSObject in new space. |
@@ -3461,7 +3461,13 @@ Handle<Code> ConstructStubCompiler::CompileConstructStub( |
// a1: constructor function |
// a2: initial map |
// t7: undefined |
+ ASSERT(function->has_initial_map()); |
__ lbu(a3, FieldMemOperand(a2, Map::kInstanceSizeOffset)); |
+#ifdef DEBUG |
+ int instance_size = function->initial_map()->instance_size(); |
+ __ Check(eq, "Instance size of initial map changed.", |
+ a3, Operand(instance_size >> kPointerSizeLog2)); |
+#endif |
__ AllocateInNewSpace(a3, t4, t5, t6, &generic_stub_call, SIZE_IN_WORDS); |
// Allocated the JSObject, now initialize the fields. Map is set to initial |
@@ -3524,7 +3530,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++) { |