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

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

Issue 1237813002: Switch CallConstructStub to take new.target in register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments about ARM and MIPS. 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/arm/code-stubs-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 Generate_CheckStackOverflow(masm, kFunctionOffset, r0, kArgcIsSmiTagged); 1496 Generate_CheckStackOverflow(masm, kFunctionOffset, r0, kArgcIsSmiTagged);
1497 1497
1498 // Push current limit and index. 1498 // Push current limit and index.
1499 const int kIndexOffset = 1499 const int kIndexOffset =
1500 StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize); 1500 StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize);
1501 const int kLimitOffset = 1501 const int kLimitOffset =
1502 StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize); 1502 StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize);
1503 __ push(r0); // limit 1503 __ push(r0); // limit
1504 __ mov(r1, Operand::Zero()); // initial index 1504 __ mov(r1, Operand::Zero()); // initial index
1505 __ push(r1); 1505 __ push(r1);
1506 // Push newTarget and callee functions 1506 // Push the constructor function as callee.
1507 __ ldr(r0, MemOperand(fp, kNewTargetOffset));
1508 __ push(r0);
1509 __ ldr(r0, MemOperand(fp, kFunctionOffset)); 1507 __ ldr(r0, MemOperand(fp, kFunctionOffset));
1510 __ push(r0); 1508 __ push(r0);
1511 1509
1512 // Copy all arguments from the array to the stack. 1510 // Copy all arguments from the array to the stack.
1513 Generate_PushAppliedArguments( 1511 Generate_PushAppliedArguments(
1514 masm, kArgumentsOffset, kIndexOffset, kLimitOffset); 1512 masm, kArgumentsOffset, kIndexOffset, kLimitOffset);
1515 1513
1516 // Use undefined feedback vector 1514 // Use undefined feedback vector
1517 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); 1515 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
1518 __ ldr(r1, MemOperand(fp, kFunctionOffset)); 1516 __ ldr(r1, MemOperand(fp, kFunctionOffset));
1517 __ ldr(r4, MemOperand(fp, kNewTargetOffset));
1519 1518
1520 // Call the function. 1519 // Call the function.
1521 CallConstructStub stub(masm->isolate(), SUPER_CONSTRUCTOR_CALL); 1520 CallConstructStub stub(masm->isolate(), SUPER_CONSTRUCTOR_CALL);
1522 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 1521 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
1523 1522
1524 __ Drop(1);
1525
1526 // Leave internal frame. 1523 // Leave internal frame.
1527 } 1524 }
1528 __ add(sp, sp, Operand(kStackSize * kPointerSize)); 1525 __ add(sp, sp, Operand(kStackSize * kPointerSize));
1529 __ Jump(lr); 1526 __ Jump(lr);
1530 } 1527 }
1531 1528
1532 1529
1533 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { 1530 void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
1534 Generate_ApplyHelper(masm, false); 1531 Generate_ApplyHelper(masm, false);
1535 } 1532 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 } 1727 }
1731 } 1728 }
1732 1729
1733 1730
1734 #undef __ 1731 #undef __
1735 1732
1736 } // namespace internal 1733 } // namespace internal
1737 } // namespace v8 1734 } // namespace v8
1738 1735
1739 #endif // V8_TARGET_ARCH_ARM 1736 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698