| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2758 | 2758 |
| 2759 __ CompareObjectType(r0, r1, r1, HEAP_NUMBER_TYPE); | 2759 __ CompareObjectType(r0, r1, r1, HEAP_NUMBER_TYPE); |
| 2760 // r0: receiver | 2760 // r0: receiver |
| 2761 // r1: receiver instance type | 2761 // r1: receiver instance type |
| 2762 __ Ret(eq); | 2762 __ Ret(eq); |
| 2763 | 2763 |
| 2764 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), | 2764 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), |
| 2765 RelocInfo::CODE_TARGET); | 2765 RelocInfo::CODE_TARGET); |
| 2766 } | 2766 } |
| 2767 | 2767 |
| 2768 void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) { | |
| 2769 // The NonNumberToNumber stub takes one argument in r0. | |
| 2770 __ AssertNotNumber(r0); | |
| 2771 | |
| 2772 __ CompareObjectType(r0, r1, r1, FIRST_NONSTRING_TYPE); | |
| 2773 // r0: receiver | |
| 2774 // r1: receiver instance type | |
| 2775 __ Jump(masm->isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET, | |
| 2776 lo); | |
| 2777 | |
| 2778 Label not_oddball; | |
| 2779 __ cmp(r1, Operand(ODDBALL_TYPE)); | |
| 2780 __ b(ne, ¬_oddball); | |
| 2781 __ ldr(r0, FieldMemOperand(r0, Oddball::kToNumberOffset)); | |
| 2782 __ Ret(); | |
| 2783 __ bind(¬_oddball); | |
| 2784 { | |
| 2785 FrameScope frame(masm, StackFrame::INTERNAL); | |
| 2786 // Push argument. | |
| 2787 __ Push(r0); | |
| 2788 // We cannot use a tail call here because this builtin can also be called | |
| 2789 // from wasm. | |
| 2790 __ CallRuntime(Runtime::kToNumber); | |
| 2791 } | |
| 2792 __ Ret(); | |
| 2793 } | |
| 2794 | |
| 2795 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2768 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| 2796 // ----------- S t a t e ------------- | 2769 // ----------- S t a t e ------------- |
| 2797 // -- r0 : actual number of arguments | 2770 // -- r0 : actual number of arguments |
| 2798 // -- r1 : function (passed through to callee) | 2771 // -- r1 : function (passed through to callee) |
| 2799 // -- r2 : expected number of arguments | 2772 // -- r2 : expected number of arguments |
| 2800 // -- r3 : new target (passed through to callee) | 2773 // -- r3 : new target (passed through to callee) |
| 2801 // ----------------------------------- | 2774 // ----------------------------------- |
| 2802 | 2775 |
| 2803 Label invoke, dont_adapt_arguments, stack_overflow; | 2776 Label invoke, dont_adapt_arguments, stack_overflow; |
| 2804 | 2777 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2914 __ bkpt(0); | 2887 __ bkpt(0); |
| 2915 } | 2888 } |
| 2916 } | 2889 } |
| 2917 | 2890 |
| 2918 #undef __ | 2891 #undef __ |
| 2919 | 2892 |
| 2920 } // namespace internal | 2893 } // namespace internal |
| 2921 } // namespace v8 | 2894 } // namespace v8 |
| 2922 | 2895 |
| 2923 #endif // V8_TARGET_ARCH_ARM | 2896 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |