Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index 99e38f6f1ea4d86b0341168ce619bb07a23d1b62..e68f0fd2650b01b7109e195dec843b9948955e52 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -326,8 +326,7 @@ void Builtins::Generate_InOptimizationQueue(MacroAssembler* masm) { |
static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
- bool is_api_function, |
- bool create_memento) { |
+ bool is_api_function) { |
// ----------- S t a t e ------------- |
// -- a0 : number of arguments |
// -- a1 : constructor function |
@@ -337,9 +336,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// -- sp[...]: constructor arguments |
// ----------------------------------- |
- // Should never create mementos for api functions. |
- DCHECK(!is_api_function || !create_memento); |
- |
Isolate* isolate = masm->isolate(); |
// Enter a construct frame. |
@@ -407,9 +403,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// a2: initial map |
Label rt_call_reload_new_target; |
__ lbu(a3, FieldMemOperand(a2, Map::kInstanceSizeOffset)); |
- if (create_memento) { |
- __ Daddu(a3, a3, Operand(AllocationMemento::kSize / kPointerSize)); |
- } |
__ Allocate(a3, t0, t1, t2, &rt_call_reload_new_target, SIZE_IN_WORDS); |
@@ -417,7 +410,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// initial map and properties and elements are set to empty fixed array. |
// a1: constructor function |
// a2: initial map |
- // a3: object size (including memento if create_memento) |
+ // a3: object size |
// t0: JSObject (not tagged) |
__ LoadRoot(t2, Heap::kEmptyFixedArrayRootIndex); |
__ mov(t1, t0); |
@@ -432,7 +425,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// Fill all the in-object properties with appropriate filler. |
// a1: constructor function |
// a2: initial map |
- // a3: object size (in words, including memento if create_memento) |
+ // a3: object size (in words) |
// t0: JSObject (not tagged) |
// t1: First in-object property of JSObject (not tagged) |
// a6: slack tracking counter (non-API function case) |
@@ -472,29 +465,9 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ bind(&no_inobject_slack_tracking); |
} |
- if (create_memento) { |
- __ Dsubu(a0, a3, Operand(AllocationMemento::kSize / kPointerSize)); |
- __ dsll(a0, a0, kPointerSizeLog2); |
- __ Daddu(a0, t0, Operand(a0)); // End of object. |
- __ InitializeFieldsWithFiller(t1, a0, t3); |
- |
- // Fill in memento fields. |
- // t1: points to the allocated but uninitialized memento. |
- __ LoadRoot(t3, Heap::kAllocationMementoMapRootIndex); |
- DCHECK_EQ(0 * kPointerSize, AllocationMemento::kMapOffset); |
- __ sd(t3, MemOperand(t1)); |
- __ Daddu(t1, t1, kPointerSize); |
- // Load the AllocationSite. |
- __ ld(t3, MemOperand(sp, 3 * kPointerSize)); |
- __ AssertUndefinedOrAllocationSite(t3, a0); |
- DCHECK_EQ(1 * kPointerSize, AllocationMemento::kAllocationSiteOffset); |
- __ sd(t3, MemOperand(t1)); |
- __ Daddu(t1, t1, kPointerSize); |
- } else { |
- __ dsll(at, a3, kPointerSizeLog2); |
- __ Daddu(a0, t0, Operand(at)); // End of object. |
- __ InitializeFieldsWithFiller(t1, a0, t3); |
- } |
+ __ dsll(at, a3, kPointerSizeLog2); |
+ __ Daddu(a0, t0, Operand(at)); // End of object. |
+ __ InitializeFieldsWithFiller(t1, a0, t3); |
// Add the object tag to make the JSObject real, so that we can continue |
// and jump into the continuation code at any time from now on. |
@@ -513,45 +486,15 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// a1: constructor function |
// a3: original constructor |
__ bind(&rt_call); |
- if (create_memento) { |
- // Get the cell or allocation site. |
- __ ld(a2, MemOperand(sp, 3 * kPointerSize)); |
- __ push(a2); // argument 1: allocation site |
- } |
__ Push(a1, a3); // arguments 2-3 / 1-2 |
- if (create_memento) { |
- __ CallRuntime(Runtime::kNewObjectWithAllocationSite, 3); |
- } else { |
- __ CallRuntime(Runtime::kNewObject, 2); |
- } |
+ __ CallRuntime(Runtime::kNewObject, 2); |
__ mov(t0, v0); |
- // Runtime_NewObjectWithAllocationSite increments allocation count. |
- // Skip the increment. |
- Label count_incremented; |
- if (create_memento) { |
- __ jmp(&count_incremented); |
- } |
- |
// Receiver for constructor call allocated. |
// t0: JSObject |
__ bind(&allocated); |
- if (create_memento) { |
- __ ld(a2, MemOperand(sp, 3 * kPointerSize)); |
- __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); |
- __ Branch(&count_incremented, eq, a2, Operand(t1)); |
- // a2 is an AllocationSite. We are creating a memento from it, so we |
- // need to increment the memento create count. |
- __ ld(a3, FieldMemOperand(a2, |
- AllocationSite::kPretenureCreateCountOffset)); |
- __ Daddu(a3, a3, Operand(Smi::FromInt(1))); |
- __ sd(a3, FieldMemOperand(a2, |
- AllocationSite::kPretenureCreateCountOffset)); |
- __ bind(&count_incremented); |
- } |
- |
// Restore the parameters. |
__ Pop(a3); // new.target |
__ Pop(a1); |
@@ -649,12 +592,12 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) { |
- Generate_JSConstructStubHelper(masm, false, FLAG_pretenuring_call_new); |
+ Generate_JSConstructStubHelper(masm, false); |
} |
void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) { |
- Generate_JSConstructStubHelper(masm, true, false); |
+ Generate_JSConstructStubHelper(masm, true); |
} |