OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 3686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3697 | 3697 |
3698 // Load the argument into rax and convert it. | 3698 // Load the argument into rax and convert it. |
3699 VisitForAccumulatorValue(args->at(0)); | 3699 VisitForAccumulatorValue(args->at(0)); |
3700 | 3700 |
3701 ToStringStub stub(isolate()); | 3701 ToStringStub stub(isolate()); |
3702 __ CallStub(&stub); | 3702 __ CallStub(&stub); |
3703 context()->Plug(rax); | 3703 context()->Plug(rax); |
3704 } | 3704 } |
3705 | 3705 |
3706 | 3706 |
| 3707 void FullCodeGenerator::EmitToLength(CallRuntime* expr) { |
| 3708 ZoneList<Expression*>* args = expr->arguments(); |
| 3709 DCHECK_EQ(1, args->length()); |
| 3710 |
| 3711 // Load the argument into rax and convert it. |
| 3712 VisitForAccumulatorValue(args->at(0)); |
| 3713 |
| 3714 ToLengthStub stub(isolate()); |
| 3715 __ CallStub(&stub); |
| 3716 context()->Plug(rax); |
| 3717 } |
| 3718 |
| 3719 |
3707 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) { | 3720 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) { |
3708 ZoneList<Expression*>* args = expr->arguments(); | 3721 ZoneList<Expression*>* args = expr->arguments(); |
3709 DCHECK_EQ(1, args->length()); | 3722 DCHECK_EQ(1, args->length()); |
3710 | 3723 |
3711 // Load the argument into rax and convert it. | 3724 // Load the argument into rax and convert it. |
3712 VisitForAccumulatorValue(args->at(0)); | 3725 VisitForAccumulatorValue(args->at(0)); |
3713 | 3726 |
3714 ToNumberStub stub(isolate()); | 3727 ToNumberStub stub(isolate()); |
3715 __ CallStub(&stub); | 3728 __ CallStub(&stub); |
3716 context()->Plug(rax); | 3729 context()->Plug(rax); |
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5177 Assembler::target_address_at(call_target_address, | 5190 Assembler::target_address_at(call_target_address, |
5178 unoptimized_code)); | 5191 unoptimized_code)); |
5179 return OSR_AFTER_STACK_CHECK; | 5192 return OSR_AFTER_STACK_CHECK; |
5180 } | 5193 } |
5181 | 5194 |
5182 | 5195 |
5183 } // namespace internal | 5196 } // namespace internal |
5184 } // namespace v8 | 5197 } // namespace v8 |
5185 | 5198 |
5186 #endif // V8_TARGET_ARCH_X64 | 5199 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |