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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2909 // ----------- S t a t e ------------- | 2909 // ----------- S t a t e ------------- |
2910 // -- x1 : message_id as Smi | 2910 // -- x1 : message_id as Smi |
2911 // -- lr : return address | 2911 // -- lr : return address |
2912 // ----------------------------------- | 2912 // ----------------------------------- |
2913 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); | 2913 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); |
2914 __ Push(x1); | 2914 __ Push(x1); |
2915 __ Move(cp, Smi::FromInt(0)); | 2915 __ Move(cp, Smi::FromInt(0)); |
2916 __ TailCallRuntime(Runtime::kAbort); | 2916 __ TailCallRuntime(Runtime::kAbort); |
2917 } | 2917 } |
2918 | 2918 |
2919 // static | |
2920 void Builtins::Generate_ToNumber(MacroAssembler* masm) { | |
2921 // The ToNumber stub takes one argument in x0. | |
2922 Label not_smi; | |
2923 __ JumpIfNotSmi(x0, ¬_smi); | |
2924 __ Ret(); | |
2925 __ Bind(¬_smi); | |
2926 | |
2927 Label not_heap_number; | |
2928 __ CompareObjectType(x0, x1, x1, HEAP_NUMBER_TYPE); | |
2929 // x0: receiver | |
2930 // x1: receiver instance type | |
2931 __ B(ne, ¬_heap_number); | |
2932 __ Ret(); | |
2933 __ Bind(¬_heap_number); | |
2934 | |
2935 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), | |
2936 RelocInfo::CODE_TARGET); | |
2937 } | |
2938 | |
2939 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2919 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2940 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); | 2920 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); |
2941 // ----------- S t a t e ------------- | 2921 // ----------- S t a t e ------------- |
2942 // -- x0 : actual number of arguments | 2922 // -- x0 : actual number of arguments |
2943 // -- x1 : function (passed through to callee) | 2923 // -- x1 : function (passed through to callee) |
2944 // -- x2 : expected number of arguments | 2924 // -- x2 : expected number of arguments |
2945 // -- x3 : new target (passed through to callee) | 2925 // -- x3 : new target (passed through to callee) |
2946 // ----------------------------------- | 2926 // ----------------------------------- |
2947 | 2927 |
2948 Register argc_actual = x0; // Excluding the receiver. | 2928 Register argc_actual = x0; // Excluding the receiver. |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3080 __ Unreachable(); | 3060 __ Unreachable(); |
3081 } | 3061 } |
3082 } | 3062 } |
3083 | 3063 |
3084 #undef __ | 3064 #undef __ |
3085 | 3065 |
3086 } // namespace internal | 3066 } // namespace internal |
3087 } // namespace v8 | 3067 } // namespace v8 |
3088 | 3068 |
3089 #endif // V8_TARGET_ARCH_ARM | 3069 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |