Commit 489843f5 authored by ziyang's avatar ziyang Committed by Commit bot

PPC/s390: [builtins] Remove the unused AllocationSite slot from ConstructFrame.

Port 77419488

Original commit message:

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

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2429983002
Cr-Commit-Position: refs/heads/master@{#40441}
parent cade0f4b
......@@ -555,14 +555,14 @@ 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 -------------
// -- r3 : number of arguments
// -- r4 : constructor function
// -- r5 : allocation site or undefined
// -- r6 : new target
// -- cp : context
// -- lr : return address
......@@ -576,15 +576,14 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT);
// Preserve the incoming parameters on the stack.
__ AssertUndefinedOrAllocationSite(r5, r7);
if (!create_implicit_receiver) {
__ SmiTag(r7, r3, SetRC);
__ Push(cp, r5, r7);
__ Push(cp, r7);
__ PushRoot(Heap::kTheHoleValueRootIndex);
} else {
__ SmiTag(r3);
__ Push(cp, r5, r3);
__ Push(cp, r3);
// Allocate the new receiver object.
__ Push(r4, r6);
......@@ -711,6 +710,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ blr();
}
} // namespace
void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
Generate_JSConstructStubHelper(masm, false, true, false);
}
......
......@@ -551,14 +551,14 @@ 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 -------------
// -- r2 : number of arguments
// -- r3 : constructor function
// -- r4 : allocation site or undefined
// -- r5 : new target
// -- cp : context
// -- lr : return address
......@@ -572,16 +572,15 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT);
// Preserve the incoming parameters on the stack.
__ AssertUndefinedOrAllocationSite(r4, r6);
if (!create_implicit_receiver) {
__ SmiTag(r6, r2);
__ LoadAndTestP(r6, r6);
__ Push(cp, r4, r6);
__ Push(cp, r6);
__ PushRoot(Heap::kTheHoleValueRootIndex);
} else {
__ SmiTag(r2);
__ Push(cp, r4, r2);
__ Push(cp, r2);
// Allocate the new receiver object.
__ Push(r3, r5);
......@@ -710,6 +709,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ Ret();
}
} // namespace
void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
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