OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug.h" | 10 #include "src/debug.h" |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 // Check if the arguments will overflow the stack. | 821 // Check if the arguments will overflow the stack. |
822 if (argc_is_tagged == kArgcIsSmiTagged) { | 822 if (argc_is_tagged == kArgcIsSmiTagged) { |
823 __ Cmp(x10, Operand::UntagSmiAndScale(argc, kPointerSizeLog2)); | 823 __ Cmp(x10, Operand::UntagSmiAndScale(argc, kPointerSizeLog2)); |
824 } else { | 824 } else { |
825 DCHECK(argc_is_tagged == kArgcIsUntaggedInt); | 825 DCHECK(argc_is_tagged == kArgcIsUntaggedInt); |
826 __ Cmp(x10, Operand(argc, LSL, kPointerSizeLog2)); | 826 __ Cmp(x10, Operand(argc, LSL, kPointerSizeLog2)); |
827 } | 827 } |
828 __ B(gt, &enough_stack_space); | 828 __ B(gt, &enough_stack_space); |
829 // There is not enough stack space, so use a builtin to throw an appropriate | 829 // There is not enough stack space, so use a builtin to throw an appropriate |
830 // error. | 830 // error. |
| 831 if (argc_is_tagged == kArgcIsUntaggedInt) { |
| 832 __ SmiTag(argc); |
| 833 } |
831 __ Push(function, argc); | 834 __ Push(function, argc); |
832 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); | 835 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); |
833 // We should never return from the APPLY_OVERFLOW builtin. | 836 // We should never return from the APPLY_OVERFLOW builtin. |
834 if (__ emit_debug_code()) { | 837 if (__ emit_debug_code()) { |
835 __ Unreachable(); | 838 __ Unreachable(); |
836 } | 839 } |
837 | 840 |
838 __ Bind(&enough_stack_space); | 841 __ Bind(&enough_stack_space); |
839 } | 842 } |
840 | 843 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 __ Unreachable(); | 1799 __ Unreachable(); |
1797 } | 1800 } |
1798 } | 1801 } |
1799 | 1802 |
1800 | 1803 |
1801 #undef __ | 1804 #undef __ |
1802 | 1805 |
1803 } } // namespace v8::internal | 1806 } } // namespace v8::internal |
1804 | 1807 |
1805 #endif // V8_TARGET_ARCH_ARM | 1808 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |