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 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3682 | 3682 |
3683 // Load the argument into x0 and call the stub. | 3683 // Load the argument into x0 and call the stub. |
3684 VisitForAccumulatorValue(args->at(0)); | 3684 VisitForAccumulatorValue(args->at(0)); |
3685 | 3685 |
3686 NumberToStringStub stub(isolate()); | 3686 NumberToStringStub stub(isolate()); |
3687 __ CallStub(&stub); | 3687 __ CallStub(&stub); |
3688 context()->Plug(x0); | 3688 context()->Plug(x0); |
3689 } | 3689 } |
3690 | 3690 |
3691 | 3691 |
| 3692 void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
| 3693 ZoneList<Expression*>* args = expr->arguments(); |
| 3694 DCHECK_EQ(1, args->length()); |
| 3695 |
| 3696 // Load the argument into x0 and convert it. |
| 3697 VisitForAccumulatorValue(args->at(0)); |
| 3698 |
| 3699 ToStringStub stub(isolate()); |
| 3700 __ CallStub(&stub); |
| 3701 context()->Plug(x0); |
| 3702 } |
| 3703 |
| 3704 |
| 3705 void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
| 3706 ZoneList<Expression*>* args = expr->arguments(); |
| 3707 DCHECK_EQ(1, args->length()); |
| 3708 |
| 3709 // Load the argument into x0 and convert it. |
| 3710 VisitForAccumulatorValue(args->at(0)); |
| 3711 |
| 3712 Label convert, done_convert; |
| 3713 __ JumpIfSmi(x0, &convert); |
| 3714 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
| 3715 __ JumpIfObjectType(x0, x1, x1, LAST_NAME_TYPE, &done_convert, ls); |
| 3716 __ Bind(&convert); |
| 3717 ToStringStub stub(isolate()); |
| 3718 __ CallStub(&stub); |
| 3719 __ Bind(&done_convert); |
| 3720 context()->Plug(x0); |
| 3721 } |
| 3722 |
| 3723 |
3692 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { | 3724 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
3693 ZoneList<Expression*>* args = expr->arguments(); | 3725 ZoneList<Expression*>* args = expr->arguments(); |
3694 DCHECK_EQ(1, args->length()); | 3726 DCHECK_EQ(1, args->length()); |
3695 | 3727 |
3696 // Load the argument into x0 and convert it. | 3728 // Load the argument into x0 and convert it. |
3697 VisitForAccumulatorValue(args->at(0)); | 3729 VisitForAccumulatorValue(args->at(0)); |
3698 | 3730 |
3699 ToObjectStub stub(isolate()); | 3731 ToObjectStub stub(isolate()); |
3700 __ CallStub(&stub); | 3732 __ CallStub(&stub); |
3701 context()->Plug(x0); | 3733 context()->Plug(x0); |
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5366 } | 5398 } |
5367 | 5399 |
5368 return INTERRUPT; | 5400 return INTERRUPT; |
5369 } | 5401 } |
5370 | 5402 |
5371 | 5403 |
5372 } // namespace internal | 5404 } // namespace internal |
5373 } // namespace v8 | 5405 } // namespace v8 |
5374 | 5406 |
5375 #endif // V8_TARGET_ARCH_ARM64 | 5407 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |