| Index: src/builtins/x64/builtins-x64.cc
|
| diff --git a/src/builtins/x64/builtins-x64.cc b/src/builtins/x64/builtins-x64.cc
|
| index 6469614b6b083e13a34ef670b9c7183fc613a79d..ed8300598a88fd7dc3210fd0874d13f80738e04c 100644
|
| --- a/src/builtins/x64/builtins-x64.cc
|
| +++ b/src/builtins/x64/builtins-x64.cc
|
| @@ -112,15 +112,15 @@ void Builtins::Generate_InOptimizationQueue(MacroAssembler* masm) {
|
| GenerateTailCallToSharedCode(masm);
|
| }
|
|
|
| -static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| - bool is_api_function,
|
| - bool create_implicit_receiver,
|
| - bool check_derived_construct) {
|
| +namespace {
|
| +
|
| +void Generate_JSConstructStubHelper(MacroAssembler* masm, bool is_api_function,
|
| + bool create_implicit_receiver,
|
| + bool check_derived_construct) {
|
| // ----------- S t a t e -------------
|
| // -- rax: number of arguments
|
| // -- rsi: context
|
| // -- rdi: constructor function
|
| - // -- rbx: allocation site or undefined
|
| // -- rdx: new target
|
| // -----------------------------------
|
|
|
| @@ -129,10 +129,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| FrameScope scope(masm, StackFrame::CONSTRUCT);
|
|
|
| // Preserve the incoming parameters on the stack.
|
| - __ AssertUndefinedOrAllocationSite(rbx);
|
| - __ Push(rsi);
|
| - __ Push(rbx);
|
| __ Integer32ToSmi(rcx, rax);
|
| + __ Push(rsi);
|
| __ Push(rcx);
|
|
|
| if (create_implicit_receiver) {
|
| @@ -197,13 +195,13 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| // on page 74.
|
| Label use_receiver, exit;
|
| // If the result is a smi, it is *not* an object in the ECMA sense.
|
| - __ JumpIfSmi(rax, &use_receiver);
|
| + __ JumpIfSmi(rax, &use_receiver, Label::kNear);
|
|
|
| // If the type of the result (stored in its map) is less than
|
| // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense.
|
| STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
|
| __ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rcx);
|
| - __ j(above_equal, &exit);
|
| + __ j(above_equal, &exit, Label::kNear);
|
|
|
| // Throw away the result of the constructor invocation and use the
|
| // on-stack receiver as the result.
|
| @@ -246,6 +244,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| __ ret(0);
|
| }
|
|
|
| +} // namespace
|
| +
|
| void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
|
| Generate_JSConstructStubHelper(masm, false, true, false);
|
| }
|
|
|