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 #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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 // sp[2]: number of arguments (smi-tagged) | 781 // sp[2]: number of arguments (smi-tagged) |
782 Label loop, entry; | 782 Label loop, entry; |
783 __ b(&entry); | 783 __ b(&entry); |
784 __ bind(&loop); | 784 __ bind(&loop); |
785 __ ldr(ip, MemOperand(r2, r4, LSL, kPointerSizeLog2 - 1)); | 785 __ ldr(ip, MemOperand(r2, r4, LSL, kPointerSizeLog2 - 1)); |
786 __ push(ip); | 786 __ push(ip); |
787 __ bind(&entry); | 787 __ bind(&entry); |
788 __ sub(r4, r4, Operand(2), SetCC); | 788 __ sub(r4, r4, Operand(2), SetCC); |
789 __ b(ge, &loop); | 789 __ b(ge, &loop); |
790 | 790 |
| 791 __ add(r0, r0, Operand(1)); |
| 792 |
| 793 // Handle step in. |
| 794 Label skip_step_in; |
| 795 ExternalReference debug_step_in_fp = |
| 796 ExternalReference::debug_step_in_fp_address(masm->isolate()); |
| 797 __ mov(r2, Operand(debug_step_in_fp)); |
| 798 __ ldr(r2, MemOperand(r2)); |
| 799 __ tst(r2, r2); |
| 800 __ b(eq, &skip_step_in); |
| 801 |
| 802 __ Push(r0); |
| 803 __ Push(r1); |
| 804 __ Push(r1); |
| 805 __ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1); |
| 806 __ Pop(r1); |
| 807 __ Pop(r0); |
| 808 |
| 809 __ bind(&skip_step_in); |
| 810 |
791 // Call the function. | 811 // Call the function. |
792 // r0: number of arguments | 812 // r0: number of arguments |
793 // r1: constructor function | 813 // r1: constructor function |
794 __ add(r0, r0, Operand(1)); | |
795 ParameterCount actual(r0); | 814 ParameterCount actual(r0); |
796 __ InvokeFunction(r1, actual, CALL_FUNCTION, NullCallWrapper()); | 815 __ InvokeFunction(r1, actual, CALL_FUNCTION, NullCallWrapper()); |
797 | 816 |
798 // Restore context from the frame. | 817 // Restore context from the frame. |
799 // r0: result | 818 // r0: result |
800 // sp[0]: number of arguments (smi-tagged) | 819 // sp[0]: number of arguments (smi-tagged) |
801 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 820 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
802 __ ldr(r1, MemOperand(sp, 0)); | 821 __ ldr(r1, MemOperand(sp, 0)); |
803 | 822 |
804 // Leave construct frame. | 823 // Leave construct frame. |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 __ bkpt(0); | 1652 __ bkpt(0); |
1634 } | 1653 } |
1635 } | 1654 } |
1636 | 1655 |
1637 | 1656 |
1638 #undef __ | 1657 #undef __ |
1639 | 1658 |
1640 } } // namespace v8::internal | 1659 } } // namespace v8::internal |
1641 | 1660 |
1642 #endif // V8_TARGET_ARCH_ARM | 1661 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |