Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/ppc/builtins-ppc.cc

Issue 1230103004: PPC: Switch CallConstructStub to take new.target in register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 1532
1533 Generate_CheckStackOverflow(masm, kFunctionOffset, r3, kArgcIsSmiTagged); 1533 Generate_CheckStackOverflow(masm, kFunctionOffset, r3, kArgcIsSmiTagged);
1534 1534
1535 // Push current limit and index. 1535 // Push current limit and index.
1536 const int kIndexOffset = 1536 const int kIndexOffset =
1537 StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize); 1537 StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize);
1538 const int kLimitOffset = 1538 const int kLimitOffset =
1539 StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize); 1539 StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize);
1540 __ li(r4, Operand::Zero()); 1540 __ li(r4, Operand::Zero());
1541 __ Push(r3, r4); // limit and initial index. 1541 __ Push(r3, r4); // limit and initial index.
1542 // Push newTarget and callee functions 1542 // Push the constructor function as callee
1543 __ LoadP(r3, MemOperand(fp, kNewTargetOffset));
1544 __ push(r3);
1545 __ LoadP(r3, MemOperand(fp, kFunctionOffset)); 1543 __ LoadP(r3, MemOperand(fp, kFunctionOffset));
1546 __ push(r3); 1544 __ push(r3);
1547 1545
1548 // Copy all arguments from the array to the stack. 1546 // Copy all arguments from the array to the stack.
1549 Generate_PushAppliedArguments(masm, kArgumentsOffset, kIndexOffset, 1547 Generate_PushAppliedArguments(masm, kArgumentsOffset, kIndexOffset,
1550 kLimitOffset); 1548 kLimitOffset);
1551 1549
1552 // Use undefined feedback vector 1550 // Use undefined feedback vector
1553 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); 1551 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex);
1554 __ LoadP(r4, MemOperand(fp, kFunctionOffset)); 1552 __ LoadP(r4, MemOperand(fp, kFunctionOffset));
1553 __ LoadP(r7, MemOperand(fp, kNewTargetOffset));
1555 1554
1556 // Call the function. 1555 // Call the function.
1557 CallConstructStub stub(masm->isolate(), SUPER_CONSTRUCTOR_CALL); 1556 CallConstructStub stub(masm->isolate(), SUPER_CONSTRUCTOR_CALL);
1558 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 1557 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
1559 1558
1560 __ Drop(1);
1561
1562 // Leave internal frame. 1559 // Leave internal frame.
1563 } 1560 }
1564 __ addi(sp, sp, Operand(kStackSize * kPointerSize)); 1561 __ addi(sp, sp, Operand(kStackSize * kPointerSize));
1565 __ blr(); 1562 __ blr();
1566 } 1563 }
1567 1564
1568 1565
1569 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { 1566 void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
1570 Generate_ApplyHelper(masm, false); 1567 Generate_ApplyHelper(masm, false);
1571 } 1568 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 __ bkpt(0); 1782 __ bkpt(0);
1786 } 1783 }
1787 } 1784 }
1788 1785
1789 1786
1790 #undef __ 1787 #undef __
1791 } // namespace internal 1788 } // namespace internal
1792 } // namespace v8 1789 } // namespace v8
1793 1790
1794 #endif // V8_TARGET_ARCH_PPC 1791 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698