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-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3511 | 3511 |
3512 // Load the argument into x0 and convert it. | 3512 // Load the argument into x0 and convert it. |
3513 VisitForAccumulatorValue(args->at(0)); | 3513 VisitForAccumulatorValue(args->at(0)); |
3514 | 3514 |
3515 ToStringStub stub(isolate()); | 3515 ToStringStub stub(isolate()); |
3516 __ CallStub(&stub); | 3516 __ CallStub(&stub); |
3517 context()->Plug(x0); | 3517 context()->Plug(x0); |
3518 } | 3518 } |
3519 | 3519 |
3520 | 3520 |
| 3521 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) { |
| 3522 ZoneList<Expression*>* args = expr->arguments(); |
| 3523 DCHECK_EQ(1, args->length()); |
| 3524 |
| 3525 // Load the argument into x0 and convert it. |
| 3526 VisitForAccumulatorValue(args->at(0)); |
| 3527 |
| 3528 ToNumberStub stub(isolate()); |
| 3529 __ CallStub(&stub); |
| 3530 context()->Plug(x0); |
| 3531 } |
| 3532 |
| 3533 |
3521 void FullCodeGenerator::EmitToName(CallRuntime* expr) { | 3534 void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
3522 ZoneList<Expression*>* args = expr->arguments(); | 3535 ZoneList<Expression*>* args = expr->arguments(); |
3523 DCHECK_EQ(1, args->length()); | 3536 DCHECK_EQ(1, args->length()); |
3524 | 3537 |
3525 // Load the argument into x0 and convert it. | 3538 // Load the argument into x0 and convert it. |
3526 VisitForAccumulatorValue(args->at(0)); | 3539 VisitForAccumulatorValue(args->at(0)); |
3527 | 3540 |
3528 Label convert, done_convert; | 3541 Label convert, done_convert; |
3529 __ JumpIfSmi(x0, &convert); | 3542 __ JumpIfSmi(x0, &convert); |
3530 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); | 3543 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5257 } | 5270 } |
5258 | 5271 |
5259 return INTERRUPT; | 5272 return INTERRUPT; |
5260 } | 5273 } |
5261 | 5274 |
5262 | 5275 |
5263 } // namespace internal | 5276 } // namespace internal |
5264 } // namespace v8 | 5277 } // namespace v8 |
5265 | 5278 |
5266 #endif // V8_TARGET_ARCH_ARM64 | 5279 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |