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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3688 // Load the argument into eax and convert it. | 3688 // Load the argument into eax and convert it. |
3689 VisitForAccumulatorValue(args->at(0)); | 3689 VisitForAccumulatorValue(args->at(0)); |
3690 | 3690 |
3691 // Convert the object to a name. | 3691 // Convert the object to a name. |
3692 Label convert, done_convert; | 3692 Label convert, done_convert; |
3693 __ JumpIfSmi(eax, &convert, Label::kNear); | 3693 __ JumpIfSmi(eax, &convert, Label::kNear); |
3694 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); | 3694 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
3695 __ CmpObjectType(eax, LAST_NAME_TYPE, ecx); | 3695 __ CmpObjectType(eax, LAST_NAME_TYPE, ecx); |
3696 __ j(below_equal, &done_convert, Label::kNear); | 3696 __ j(below_equal, &done_convert, Label::kNear); |
3697 __ bind(&convert); | 3697 __ bind(&convert); |
3698 ToStringStub stub(isolate()); | 3698 __ Push(eax); |
3699 __ CallStub(&stub); | 3699 __ CallRuntime(Runtime::kToName, 1); |
3700 __ bind(&done_convert); | 3700 __ bind(&done_convert); |
3701 context()->Plug(eax); | 3701 context()->Plug(eax); |
3702 } | 3702 } |
3703 | 3703 |
3704 | 3704 |
3705 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { | 3705 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
3706 ZoneList<Expression*>* args = expr->arguments(); | 3706 ZoneList<Expression*>* args = expr->arguments(); |
3707 DCHECK_EQ(1, args->length()); | 3707 DCHECK_EQ(1, args->length()); |
3708 | 3708 |
3709 // Load the argument into eax and convert it. | 3709 // Load the argument into eax and convert it. |
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5117 Assembler::target_address_at(call_target_address, | 5117 Assembler::target_address_at(call_target_address, |
5118 unoptimized_code)); | 5118 unoptimized_code)); |
5119 return OSR_AFTER_STACK_CHECK; | 5119 return OSR_AFTER_STACK_CHECK; |
5120 } | 5120 } |
5121 | 5121 |
5122 | 5122 |
5123 } // namespace internal | 5123 } // namespace internal |
5124 } // namespace v8 | 5124 } // namespace v8 |
5125 | 5125 |
5126 #endif // V8_TARGET_ARCH_X87 | 5126 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |