| 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 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2775 // -- x1 : requested object size (untagged) | 2775 // -- x1 : requested object size (untagged) |
| 2776 // -- lr : return address | 2776 // -- lr : return address |
| 2777 // ----------------------------------- | 2777 // ----------------------------------- |
| 2778 __ SmiTag(x1); | 2778 __ SmiTag(x1); |
| 2779 __ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | 2779 __ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
| 2780 __ Push(x1, x2); | 2780 __ Push(x1, x2); |
| 2781 __ Move(cp, Smi::FromInt(0)); | 2781 __ Move(cp, Smi::FromInt(0)); |
| 2782 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | 2782 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
| 2783 } | 2783 } |
| 2784 | 2784 |
| 2785 void Builtins::Generate_StringToNumber(MacroAssembler* masm) { |
| 2786 // The StringToNumber stub takes one argument in x0. |
| 2787 __ AssertString(x0); |
| 2788 |
| 2789 // Check if string has a cached array index. |
| 2790 Label runtime; |
| 2791 __ Ldr(x2, FieldMemOperand(x0, String::kHashFieldOffset)); |
| 2792 __ Tst(x2, Operand(String::kContainsCachedArrayIndexMask)); |
| 2793 __ B(ne, &runtime); |
| 2794 __ IndexFromHash(x2, x0); |
| 2795 __ Ret(); |
| 2796 |
| 2797 __ Bind(&runtime); |
| 2798 __ Push(x0); // Push argument. |
| 2799 __ TailCallRuntime(Runtime::kStringToNumber); |
| 2800 } |
| 2801 |
| 2785 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2802 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| 2786 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); | 2803 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); |
| 2787 // ----------- S t a t e ------------- | 2804 // ----------- S t a t e ------------- |
| 2788 // -- x0 : actual number of arguments | 2805 // -- x0 : actual number of arguments |
| 2789 // -- x1 : function (passed through to callee) | 2806 // -- x1 : function (passed through to callee) |
| 2790 // -- x2 : expected number of arguments | 2807 // -- x2 : expected number of arguments |
| 2791 // -- x3 : new target (passed through to callee) | 2808 // -- x3 : new target (passed through to callee) |
| 2792 // ----------------------------------- | 2809 // ----------------------------------- |
| 2793 | 2810 |
| 2794 Register argc_actual = x0; // Excluding the receiver. | 2811 Register argc_actual = x0; // Excluding the receiver. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2927 } | 2944 } |
| 2928 } | 2945 } |
| 2929 | 2946 |
| 2930 | 2947 |
| 2931 #undef __ | 2948 #undef __ |
| 2932 | 2949 |
| 2933 } // namespace internal | 2950 } // namespace internal |
| 2934 } // namespace v8 | 2951 } // namespace v8 |
| 2935 | 2952 |
| 2936 #endif // V8_TARGET_ARCH_ARM | 2953 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |