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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3979 __ Move(result, Immediate(isolate()->factory()->nan_value())); | 3979 __ Move(result, Immediate(isolate()->factory()->nan_value())); |
3980 __ jmp(&done); | 3980 __ jmp(&done); |
3981 | 3981 |
3982 __ bind(&need_conversion); | 3982 __ bind(&need_conversion); |
3983 // Move the undefined value into the result register, which will | 3983 // Move the undefined value into the result register, which will |
3984 // trigger conversion. | 3984 // trigger conversion. |
3985 __ Move(result, Immediate(isolate()->factory()->undefined_value())); | 3985 __ Move(result, Immediate(isolate()->factory()->undefined_value())); |
3986 __ jmp(&done); | 3986 __ jmp(&done); |
3987 | 3987 |
3988 NopRuntimeCallHelper call_helper; | 3988 NopRuntimeCallHelper call_helper; |
3989 generator.GenerateSlow(masm_, call_helper); | 3989 generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); |
3990 | 3990 |
3991 __ bind(&done); | 3991 __ bind(&done); |
3992 context()->Plug(result); | 3992 context()->Plug(result); |
3993 } | 3993 } |
3994 | 3994 |
3995 | 3995 |
3996 void FullCodeGenerator::EmitStringCharAt(CallRuntime* expr) { | 3996 void FullCodeGenerator::EmitStringCharAt(CallRuntime* expr) { |
3997 ZoneList<Expression*>* args = expr->arguments(); | 3997 ZoneList<Expression*>* args = expr->arguments(); |
3998 DCHECK(args->length() == 2); | 3998 DCHECK(args->length() == 2); |
3999 | 3999 |
(...skipping 27 matching lines...) Expand all Loading... |
4027 __ Move(result, Immediate(isolate()->factory()->empty_string())); | 4027 __ Move(result, Immediate(isolate()->factory()->empty_string())); |
4028 __ jmp(&done); | 4028 __ jmp(&done); |
4029 | 4029 |
4030 __ bind(&need_conversion); | 4030 __ bind(&need_conversion); |
4031 // Move smi zero into the result register, which will trigger | 4031 // Move smi zero into the result register, which will trigger |
4032 // conversion. | 4032 // conversion. |
4033 __ Move(result, Immediate(Smi::FromInt(0))); | 4033 __ Move(result, Immediate(Smi::FromInt(0))); |
4034 __ jmp(&done); | 4034 __ jmp(&done); |
4035 | 4035 |
4036 NopRuntimeCallHelper call_helper; | 4036 NopRuntimeCallHelper call_helper; |
4037 generator.GenerateSlow(masm_, call_helper); | 4037 generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); |
4038 | 4038 |
4039 __ bind(&done); | 4039 __ bind(&done); |
4040 context()->Plug(result); | 4040 context()->Plug(result); |
4041 } | 4041 } |
4042 | 4042 |
4043 | 4043 |
4044 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { | 4044 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { |
4045 ZoneList<Expression*>* args = expr->arguments(); | 4045 ZoneList<Expression*>* args = expr->arguments(); |
4046 DCHECK_EQ(2, args->length()); | 4046 DCHECK_EQ(2, args->length()); |
4047 VisitForStackValue(args->at(0)); | 4047 VisitForStackValue(args->at(0)); |
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5362 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5362 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5363 Assembler::target_address_at(call_target_address, | 5363 Assembler::target_address_at(call_target_address, |
5364 unoptimized_code)); | 5364 unoptimized_code)); |
5365 return OSR_AFTER_STACK_CHECK; | 5365 return OSR_AFTER_STACK_CHECK; |
5366 } | 5366 } |
5367 | 5367 |
5368 | 5368 |
5369 } } // namespace v8::internal | 5369 } } // namespace v8::internal |
5370 | 5370 |
5371 #endif // V8_TARGET_ARCH_X87 | 5371 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |