Index: src/builtins/x87/builtins-x87.cc |
diff --git a/src/builtins/x87/builtins-x87.cc b/src/builtins/x87/builtins-x87.cc |
index a2f6943a0e951fb4573c12497d962fe43a5f768d..4d76070781b3f0c897bd7c95a0493c5d0ae513a1 100644 |
--- a/src/builtins/x87/builtins-x87.cc |
+++ b/src/builtins/x87/builtins-x87.cc |
@@ -110,15 +110,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 ------------- |
// -- eax: number of arguments |
// -- esi: context |
// -- edi: constructor function |
- // -- ebx: allocation site or undefined |
// -- edx: new target |
// ----------------------------------- |
@@ -127,10 +127,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
FrameScope scope(masm, StackFrame::CONSTRUCT); |
// Preserve the incoming parameters on the stack. |
- __ AssertUndefinedOrAllocationSite(ebx); |
- __ push(esi); |
- __ push(ebx); |
__ SmiTag(eax); |
+ __ push(esi); |
__ push(eax); |
if (create_implicit_receiver) { |
@@ -198,12 +196,12 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
Label use_receiver, exit; |
// If the result is a smi, it is *not* an object in the ECMA sense. |
- __ JumpIfSmi(eax, &use_receiver); |
+ __ JumpIfSmi(eax, &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. |
__ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); |
- __ 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. |
@@ -245,6 +243,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ ret(0); |
} |
+} // namespace |
+ |
void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) { |
Generate_JSConstructStubHelper(masm, false, true, false); |
} |