| OLD | NEW |
| 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 | 5 |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 Generate_CheckStackOverflow(masm, kFunctionOffset, v0, kArgcIsSmiTagged); | 1490 Generate_CheckStackOverflow(masm, kFunctionOffset, v0, kArgcIsSmiTagged); |
| 1491 | 1491 |
| 1492 // Push current limit and index. | 1492 // Push current limit and index. |
| 1493 const int kIndexOffset = | 1493 const int kIndexOffset = |
| 1494 StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize); | 1494 StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize); |
| 1495 const int kLimitOffset = | 1495 const int kLimitOffset = |
| 1496 StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize); | 1496 StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize); |
| 1497 __ push(v0); // limit | 1497 __ push(v0); // limit |
| 1498 __ mov(a1, zero_reg); // initial index | 1498 __ mov(a1, zero_reg); // initial index |
| 1499 __ push(a1); | 1499 __ push(a1); |
| 1500 // Push newTarget and callee functions | 1500 // Push the constructor function as callee. |
| 1501 __ ld(a0, MemOperand(fp, kNewTargetOffset)); | |
| 1502 __ push(a0); | |
| 1503 __ ld(a0, MemOperand(fp, kFunctionOffset)); | 1501 __ ld(a0, MemOperand(fp, kFunctionOffset)); |
| 1504 __ push(a0); | 1502 __ push(a0); |
| 1505 | 1503 |
| 1506 // Copy all arguments from the array to the stack. | 1504 // Copy all arguments from the array to the stack. |
| 1507 Generate_PushAppliedArguments( | 1505 Generate_PushAppliedArguments( |
| 1508 masm, kArgumentsOffset, kIndexOffset, kLimitOffset); | 1506 masm, kArgumentsOffset, kIndexOffset, kLimitOffset); |
| 1509 | 1507 |
| 1510 // Use undefined feedback vector | 1508 // Use undefined feedback vector |
| 1511 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 1509 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
| 1512 __ ld(a1, MemOperand(fp, kFunctionOffset)); | 1510 __ ld(a1, MemOperand(fp, kFunctionOffset)); |
| 1511 __ ld(a4, MemOperand(fp, kNewTargetOffset)); |
| 1513 | 1512 |
| 1514 // Call the function. | 1513 // Call the function. |
| 1515 CallConstructStub stub(masm->isolate(), SUPER_CONSTRUCTOR_CALL); | 1514 CallConstructStub stub(masm->isolate(), SUPER_CONSTRUCTOR_CALL); |
| 1516 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 1515 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 1517 | 1516 |
| 1518 __ Drop(1); | |
| 1519 | |
| 1520 // Leave internal frame. | 1517 // Leave internal frame. |
| 1521 } | 1518 } |
| 1522 __ jr(ra); | 1519 __ jr(ra); |
| 1523 __ Daddu(sp, sp, Operand(kStackSize * kPointerSize)); // In delay slot. | 1520 __ Daddu(sp, sp, Operand(kStackSize * kPointerSize)); // In delay slot. |
| 1524 } | 1521 } |
| 1525 | 1522 |
| 1526 | 1523 |
| 1527 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { | 1524 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
| 1528 Generate_ApplyHelper(masm, false); | 1525 Generate_ApplyHelper(masm, false); |
| 1529 } | 1526 } |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1736 } | 1733 } |
| 1737 } | 1734 } |
| 1738 | 1735 |
| 1739 | 1736 |
| 1740 #undef __ | 1737 #undef __ |
| 1741 | 1738 |
| 1742 } // namespace internal | 1739 } // namespace internal |
| 1743 } // namespace v8 | 1740 } // namespace v8 |
| 1744 | 1741 |
| 1745 #endif // V8_TARGET_ARCH_MIPS64 | 1742 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |