| 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/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 3281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3292 __ Tst(x2, Operand(String::kContainsCachedArrayIndexMask)); | 3292 __ Tst(x2, Operand(String::kContainsCachedArrayIndexMask)); |
| 3293 __ B(ne, &runtime); | 3293 __ B(ne, &runtime); |
| 3294 __ IndexFromHash(x2, x0); | 3294 __ IndexFromHash(x2, x0); |
| 3295 __ Ret(); | 3295 __ Ret(); |
| 3296 | 3296 |
| 3297 __ Bind(&runtime); | 3297 __ Bind(&runtime); |
| 3298 __ Push(x0); // Push argument. | 3298 __ Push(x0); // Push argument. |
| 3299 __ TailCallRuntime(Runtime::kStringToNumber); | 3299 __ TailCallRuntime(Runtime::kStringToNumber); |
| 3300 } | 3300 } |
| 3301 | 3301 |
| 3302 void ToLengthStub::Generate(MacroAssembler* masm) { | |
| 3303 // The ToLength stub takes one argument in x0. | |
| 3304 Label not_smi; | |
| 3305 __ JumpIfNotSmi(x0, ¬_smi); | |
| 3306 STATIC_ASSERT(kSmiTag == 0); | |
| 3307 __ Tst(x0, x0); | |
| 3308 __ Csel(x0, x0, Operand(0), ge); | |
| 3309 __ Ret(); | |
| 3310 __ Bind(¬_smi); | |
| 3311 | |
| 3312 __ Push(x0); // Push argument. | |
| 3313 __ TailCallRuntime(Runtime::kToLength); | |
| 3314 } | |
| 3315 | |
| 3316 | |
| 3317 void ToStringStub::Generate(MacroAssembler* masm) { | 3302 void ToStringStub::Generate(MacroAssembler* masm) { |
| 3318 // The ToString stub takes one argument in x0. | 3303 // The ToString stub takes one argument in x0. |
| 3319 Label is_number; | 3304 Label is_number; |
| 3320 __ JumpIfSmi(x0, &is_number); | 3305 __ JumpIfSmi(x0, &is_number); |
| 3321 | 3306 |
| 3322 Label not_string; | 3307 Label not_string; |
| 3323 __ JumpIfObjectType(x0, x1, x1, FIRST_NONSTRING_TYPE, ¬_string, hs); | 3308 __ JumpIfObjectType(x0, x1, x1, FIRST_NONSTRING_TYPE, ¬_string, hs); |
| 3324 // x0: receiver | 3309 // x0: receiver |
| 3325 // x1: receiver instance type | 3310 // x1: receiver instance type |
| 3326 __ Ret(); | 3311 __ Ret(); |
| (...skipping 2627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5954 return_value_operand, NULL); | 5939 return_value_operand, NULL); |
| 5955 } | 5940 } |
| 5956 | 5941 |
| 5957 | 5942 |
| 5958 #undef __ | 5943 #undef __ |
| 5959 | 5944 |
| 5960 } // namespace internal | 5945 } // namespace internal |
| 5961 } // namespace v8 | 5946 } // namespace v8 |
| 5962 | 5947 |
| 5963 #endif // V8_TARGET_ARCH_ARM64 | 5948 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |