Index: src/ppc/code-stubs-ppc.cc |
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc |
index 48a98a7edd1bccd8d6888dbce7cdf9702ba8bcb9..aae130c01e85f2e892fc433d4be2148cc6e968b3 100644 |
--- a/src/ppc/code-stubs-ppc.cc |
+++ b/src/ppc/code-stubs-ppc.cc |
@@ -3522,122 +3522,6 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) { |
GenerateCase(masm, FAST_ELEMENTS); |
} |
-void FastNewObjectStub::Generate(MacroAssembler* masm) { |
- // ----------- S t a t e ------------- |
- // -- r4 : target |
- // -- r6 : new target |
- // -- cp : context |
- // -- lr : return address |
- // ----------------------------------- |
- __ AssertFunction(r4); |
- __ AssertReceiver(r6); |
- |
- // Verify that the new target is a JSFunction. |
- Label new_object; |
- __ CompareObjectType(r6, r5, r5, JS_FUNCTION_TYPE); |
- __ bne(&new_object); |
- |
- // Load the initial map and verify that it's in fact a map. |
- __ LoadP(r5, FieldMemOperand(r6, JSFunction::kPrototypeOrInitialMapOffset)); |
- __ JumpIfSmi(r5, &new_object); |
- __ CompareObjectType(r5, r3, r3, MAP_TYPE); |
- __ bne(&new_object); |
- |
- // Fall back to runtime if the target differs from the new target's |
- // initial map constructor. |
- __ LoadP(r3, FieldMemOperand(r5, Map::kConstructorOrBackPointerOffset)); |
- __ cmp(r3, r4); |
- __ bne(&new_object); |
- |
- // Allocate the JSObject on the heap. |
- Label allocate, done_allocate; |
- __ lbz(r7, FieldMemOperand(r5, Map::kInstanceSizeOffset)); |
- __ Allocate(r7, r3, r8, r9, &allocate, SIZE_IN_WORDS); |
- __ bind(&done_allocate); |
- |
- // Initialize the JSObject fields. |
- __ StoreP(r5, FieldMemOperand(r3, JSObject::kMapOffset), r0); |
- __ LoadRoot(r6, Heap::kEmptyFixedArrayRootIndex); |
- __ StoreP(r6, FieldMemOperand(r3, JSObject::kPropertiesOffset), r0); |
- __ StoreP(r6, FieldMemOperand(r3, JSObject::kElementsOffset), r0); |
- STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize); |
- __ addi(r4, r3, Operand(JSObject::kHeaderSize - kHeapObjectTag)); |
- |
- // ----------- S t a t e ------------- |
- // -- r3 : result (tagged) |
- // -- r4 : result fields (untagged) |
- // -- r8 : result end (untagged) |
- // -- r5 : initial map |
- // -- cp : context |
- // -- lr : return address |
- // ----------------------------------- |
- |
- // Perform in-object slack tracking if requested. |
- Label slack_tracking; |
- STATIC_ASSERT(Map::kNoSlackTracking == 0); |
- __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); |
- __ lwz(r6, FieldMemOperand(r5, Map::kBitField3Offset)); |
- __ DecodeField<Map::ConstructionCounter>(r10, r6, SetRC); |
- __ bne(&slack_tracking, cr0); |
- { |
- // Initialize all in-object fields with undefined. |
- __ InitializeFieldsWithFiller(r4, r8, r9); |
- __ Ret(); |
- } |
- __ bind(&slack_tracking); |
- { |
- // Decrease generous allocation count. |
- STATIC_ASSERT(Map::ConstructionCounter::kNext == 32); |
- __ Add(r6, r6, -(1 << Map::ConstructionCounter::kShift), r0); |
- __ stw(r6, FieldMemOperand(r5, Map::kBitField3Offset)); |
- |
- // Initialize the in-object fields with undefined. |
- __ lbz(r7, FieldMemOperand(r5, Map::kUnusedPropertyFieldsOffset)); |
- __ ShiftLeftImm(r7, r7, Operand(kPointerSizeLog2)); |
- __ sub(r7, r8, r7); |
- __ InitializeFieldsWithFiller(r4, r7, r9); |
- |
- // Initialize the remaining (reserved) fields with one pointer filler map. |
- __ LoadRoot(r9, Heap::kOnePointerFillerMapRootIndex); |
- __ InitializeFieldsWithFiller(r4, r8, r9); |
- |
- // Check if we can finalize the instance size. |
- __ cmpi(r10, Operand(Map::kSlackTrackingCounterEnd)); |
- __ Ret(ne); |
- |
- // Finalize the instance size. |
- { |
- FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
- __ Push(r3, r5); |
- __ CallRuntime(Runtime::kFinalizeInstanceSize); |
- __ Pop(r3); |
- } |
- __ Ret(); |
- } |
- |
- // Fall back to %AllocateInNewSpace. |
- __ bind(&allocate); |
- { |
- FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
- STATIC_ASSERT(kSmiTag == 0); |
- __ ShiftLeftImm(r7, r7, |
- Operand(kPointerSizeLog2 + kSmiTagSize + kSmiShiftSize)); |
- __ Push(r5, r7); |
- __ CallRuntime(Runtime::kAllocateInNewSpace); |
- __ Pop(r5); |
- } |
- __ lbz(r8, FieldMemOperand(r5, Map::kInstanceSizeOffset)); |
- __ ShiftLeftImm(r8, r8, Operand(kPointerSizeLog2)); |
- __ add(r8, r3, r8); |
- __ subi(r8, r8, Operand(kHeapObjectTag)); |
- __ b(&done_allocate); |
- |
- // Fall back to %NewObject. |
- __ bind(&new_object); |
- __ Push(r4, r6); |
- __ TailCallRuntime(Runtime::kNewObject); |
-} |
- |
void FastNewRestParameterStub::Generate(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- r4 : function |