Commit 62649b82 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [builtins] Remove the unused AllocationSite slot from ConstructFrame.

  port 77419488 (r40377)

  original commit message:
  This slot is completely unused and always undefined anyways, so there's
  no need to maintain the slot during object construction.

BUG=

Review-Url: https://codereview.chromium.org/2425183002
Cr-Commit-Position: refs/heads/master@{#40389}
parent a05f85a3
...@@ -110,15 +110,15 @@ void Builtins::Generate_InOptimizationQueue(MacroAssembler* masm) { ...@@ -110,15 +110,15 @@ void Builtins::Generate_InOptimizationQueue(MacroAssembler* masm) {
GenerateTailCallToSharedCode(masm); GenerateTailCallToSharedCode(masm);
} }
static void Generate_JSConstructStubHelper(MacroAssembler* masm, namespace {
bool is_api_function,
bool create_implicit_receiver, void Generate_JSConstructStubHelper(MacroAssembler* masm, bool is_api_function,
bool check_derived_construct) { bool create_implicit_receiver,
bool check_derived_construct) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- eax: number of arguments // -- eax: number of arguments
// -- esi: context // -- esi: context
// -- edi: constructor function // -- edi: constructor function
// -- ebx: allocation site or undefined
// -- edx: new target // -- edx: new target
// ----------------------------------- // -----------------------------------
...@@ -127,10 +127,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, ...@@ -127,10 +127,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
FrameScope scope(masm, StackFrame::CONSTRUCT); FrameScope scope(masm, StackFrame::CONSTRUCT);
// Preserve the incoming parameters on the stack. // Preserve the incoming parameters on the stack.
__ AssertUndefinedOrAllocationSite(ebx);
__ push(esi);
__ push(ebx);
__ SmiTag(eax); __ SmiTag(eax);
__ push(esi);
__ push(eax); __ push(eax);
if (create_implicit_receiver) { if (create_implicit_receiver) {
...@@ -198,12 +196,12 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, ...@@ -198,12 +196,12 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
Label use_receiver, exit; Label use_receiver, exit;
// If the result is a smi, it is *not* an object in the ECMA sense. // 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 // 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. // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense.
__ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); __ 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 // Throw away the result of the constructor invocation and use the
// on-stack receiver as the result. // on-stack receiver as the result.
...@@ -245,6 +243,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, ...@@ -245,6 +243,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ ret(0); __ ret(0);
} }
} // namespace
void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) { void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
Generate_JSConstructStubHelper(masm, false, true, false); Generate_JSConstructStubHelper(masm, false, true, false);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment