Index: src/x64/stub-cache-x64.cc |
=================================================================== |
--- src/x64/stub-cache-x64.cc (revision 5878) |
+++ src/x64/stub-cache-x64.cc (working copy) |
@@ -2890,8 +2890,7 @@ |
// Specialized stub for constructing objects from functions which only have only |
// simple assignments of the form this.x = ...; in their body. |
-MaybeObject* ConstructStubCompiler::CompileConstructStub( |
- SharedFunctionInfo* shared) { |
+MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { |
// ----------- S t a t e ------------- |
// -- rax : argc |
// -- rdi : constructor |
@@ -2964,6 +2963,7 @@ |
// r9: first in-object property of the JSObject |
// Fill the initialized properties with a constant value or a passed argument |
// depending on the this.x = ...; assignment in the function. |
+ SharedFunctionInfo* shared = function->shared(); |
for (int i = 0; i < shared->this_property_assignments_count(); i++) { |
if (shared->IsThisPropertyAssignmentArgument(i)) { |
// Check if the argument assigned to the property is actually passed. |
@@ -2983,8 +2983,9 @@ |
} |
// Fill the unused in-object property fields with undefined. |
+ ASSERT(function->has_initial_map()); |
for (int i = shared->this_property_assignments_count(); |
- i < shared->CalculateInObjectProperties(); |
+ i < function->initial_map()->inobject_properties(); |
i++) { |
__ movq(Operand(r9, i * kPointerSize), r8); |
} |