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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3699 | 3699 |
3700 // Load the argument into eax and convert it. | 3700 // Load the argument into eax and convert it. |
3701 VisitForAccumulatorValue(args->at(0)); | 3701 VisitForAccumulatorValue(args->at(0)); |
3702 | 3702 |
3703 ToStringStub stub(isolate()); | 3703 ToStringStub stub(isolate()); |
3704 __ CallStub(&stub); | 3704 __ CallStub(&stub); |
3705 context()->Plug(eax); | 3705 context()->Plug(eax); |
3706 } | 3706 } |
3707 | 3707 |
3708 | 3708 |
| 3709 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) { |
| 3710 ZoneList<Expression*>* args = expr->arguments(); |
| 3711 DCHECK_EQ(1, args->length()); |
| 3712 |
| 3713 // Load the argument into eax and convert it. |
| 3714 VisitForAccumulatorValue(args->at(0)); |
| 3715 |
| 3716 ToNumberStub stub(isolate()); |
| 3717 __ CallStub(&stub); |
| 3718 context()->Plug(eax); |
| 3719 } |
| 3720 |
| 3721 |
3709 void FullCodeGenerator::EmitToName(CallRuntime* expr) { | 3722 void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
3710 ZoneList<Expression*>* args = expr->arguments(); | 3723 ZoneList<Expression*>* args = expr->arguments(); |
3711 DCHECK_EQ(1, args->length()); | 3724 DCHECK_EQ(1, args->length()); |
3712 | 3725 |
3713 // Load the argument into eax and convert it. | 3726 // Load the argument into eax and convert it. |
3714 VisitForAccumulatorValue(args->at(0)); | 3727 VisitForAccumulatorValue(args->at(0)); |
3715 | 3728 |
3716 // Convert the object to a name. | 3729 // Convert the object to a name. |
3717 Label convert, done_convert; | 3730 Label convert, done_convert; |
3718 __ JumpIfSmi(eax, &convert, Label::kNear); | 3731 __ JumpIfSmi(eax, &convert, Label::kNear); |
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5142 Assembler::target_address_at(call_target_address, | 5155 Assembler::target_address_at(call_target_address, |
5143 unoptimized_code)); | 5156 unoptimized_code)); |
5144 return OSR_AFTER_STACK_CHECK; | 5157 return OSR_AFTER_STACK_CHECK; |
5145 } | 5158 } |
5146 | 5159 |
5147 | 5160 |
5148 } // namespace internal | 5161 } // namespace internal |
5149 } // namespace v8 | 5162 } // namespace v8 |
5150 | 5163 |
5151 #endif // V8_TARGET_ARCH_IA32 | 5164 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |