Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 3a2ffc524be7ebc6f643f1424b6af5097405cad6..867c71af5c268f9c32ee4416087454dab5750041 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -2920,7 +2920,8 @@ Handle<Code> KeyedLoadStubCompiler::CompileLoadPolymorphic( |
// Specialized stub for constructing objects from functions which only have only |
// simple assignments of the form this.x = ...; in their body. |
-MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { |
+Handle<Code> ConstructStubCompiler::CompileConstructStub( |
+ Handle<JSFunction> function) { |
// ----------- S t a t e ------------- |
// -- rax : argc |
// -- rdi : constructor |
@@ -2963,12 +2964,8 @@ MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { |
// rbx: initial map |
__ movzxbq(rcx, FieldOperand(rbx, Map::kInstanceSizeOffset)); |
__ shl(rcx, Immediate(kPointerSizeLog2)); |
- __ AllocateInNewSpace(rcx, |
- rdx, |
- rcx, |
- no_reg, |
- &generic_stub_call, |
- NO_ALLOCATION_FLAGS); |
+ __ AllocateInNewSpace(rcx, rdx, rcx, no_reg, |
+ &generic_stub_call, NO_ALLOCATION_FLAGS); |
// Allocated the JSObject, now initialize the fields and add the heap tag. |
// rbx: initial map |
@@ -2993,7 +2990,7 @@ MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { |
// 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(); |
+ Handle<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. |
@@ -3041,10 +3038,8 @@ MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { |
// Jump to the generic stub in case the specialized code cannot handle the |
// construction. |
__ bind(&generic_stub_call); |
- Code* code = |
- isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric); |
- Handle<Code> generic_construct_stub(code); |
- __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
+ Handle<Code> code = isolate()->builtins()->JSConstructStubGeneric(); |
+ __ Jump(code, RelocInfo::CODE_TARGET); |
// Return the generated code. |
return GetCode(); |