| 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 2837 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2848   // x0: receiver |  2848   // x0: receiver | 
|  2849   // x1: receiver instance type |  2849   // x1: receiver instance type | 
|  2850   __ B(ne, ¬_heap_number); |  2850   __ B(ne, ¬_heap_number); | 
|  2851   __ Ret(); |  2851   __ Ret(); | 
|  2852   __ Bind(¬_heap_number); |  2852   __ Bind(¬_heap_number); | 
|  2853  |  2853  | 
|  2854   __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), |  2854   __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), | 
|  2855           RelocInfo::CODE_TARGET); |  2855           RelocInfo::CODE_TARGET); | 
|  2856 } |  2856 } | 
|  2857  |  2857  | 
|  2858 // static |  | 
|  2859 void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) { |  | 
|  2860   // The NonNumberToNumber stub takes one argument in x0. |  | 
|  2861   __ AssertNotNumber(x0); |  | 
|  2862  |  | 
|  2863   Label not_string; |  | 
|  2864   __ CompareObjectType(x0, x1, x1, FIRST_NONSTRING_TYPE); |  | 
|  2865   // x0: receiver |  | 
|  2866   // x1: receiver instance type |  | 
|  2867   __ B(hs, ¬_string); |  | 
|  2868   __ Jump(masm->isolate()->builtins()->StringToNumber(), |  | 
|  2869           RelocInfo::CODE_TARGET); |  | 
|  2870   __ Bind(¬_string); |  | 
|  2871  |  | 
|  2872   Label not_oddball; |  | 
|  2873   __ Cmp(x1, ODDBALL_TYPE); |  | 
|  2874   __ B(ne, ¬_oddball); |  | 
|  2875   __ Ldr(x0, FieldMemOperand(x0, Oddball::kToNumberOffset)); |  | 
|  2876   __ Ret(); |  | 
|  2877   __ Bind(¬_oddball); |  | 
|  2878   { |  | 
|  2879     FrameScope frame(masm, StackFrame::INTERNAL); |  | 
|  2880     // Push argument. |  | 
|  2881     __ Push(x0); |  | 
|  2882     // We cannot use a tail call here because this builtin can also be called |  | 
|  2883     // from wasm. |  | 
|  2884     __ CallRuntime(Runtime::kToNumber); |  | 
|  2885   } |  | 
|  2886   __ Ret(); |  | 
|  2887 } |  | 
|  2888  |  | 
|  2889 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |  2858 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 
|  2890   ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); |  2859   ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); | 
|  2891   // ----------- S t a t e ------------- |  2860   // ----------- S t a t e ------------- | 
|  2892   //  -- x0 : actual number of arguments |  2861   //  -- x0 : actual number of arguments | 
|  2893   //  -- x1 : function (passed through to callee) |  2862   //  -- x1 : function (passed through to callee) | 
|  2894   //  -- x2 : expected number of arguments |  2863   //  -- x2 : expected number of arguments | 
|  2895   //  -- x3 : new target (passed through to callee) |  2864   //  -- x3 : new target (passed through to callee) | 
|  2896   // ----------------------------------- |  2865   // ----------------------------------- | 
|  2897  |  2866  | 
|  2898   Register argc_actual = x0;    // Excluding the receiver. |  2867   Register argc_actual = x0;    // Excluding the receiver. | 
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3030     __ Unreachable(); |  2999     __ Unreachable(); | 
|  3031   } |  3000   } | 
|  3032 } |  3001 } | 
|  3033  |  3002  | 
|  3034 #undef __ |  3003 #undef __ | 
|  3035  |  3004  | 
|  3036 }  // namespace internal |  3005 }  // namespace internal | 
|  3037 }  // namespace v8 |  3006 }  // namespace v8 | 
|  3038  |  3007  | 
|  3039 #endif  // V8_TARGET_ARCH_ARM |  3008 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW |