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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 3983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3994 __ LoadRoot(result, Heap::kNanValueRootIndex); | 3994 __ LoadRoot(result, Heap::kNanValueRootIndex); |
3995 __ jmp(&done); | 3995 __ jmp(&done); |
3996 | 3996 |
3997 __ bind(&need_conversion); | 3997 __ bind(&need_conversion); |
3998 // Move the undefined value into the result register, which will | 3998 // Move the undefined value into the result register, which will |
3999 // trigger conversion. | 3999 // trigger conversion. |
4000 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 4000 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
4001 __ jmp(&done); | 4001 __ jmp(&done); |
4002 | 4002 |
4003 NopRuntimeCallHelper call_helper; | 4003 NopRuntimeCallHelper call_helper; |
4004 generator.GenerateSlow(masm_, call_helper); | 4004 generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); |
4005 | 4005 |
4006 __ bind(&done); | 4006 __ bind(&done); |
4007 context()->Plug(result); | 4007 context()->Plug(result); |
4008 } | 4008 } |
4009 | 4009 |
4010 | 4010 |
4011 void FullCodeGenerator::EmitStringCharAt(CallRuntime* expr) { | 4011 void FullCodeGenerator::EmitStringCharAt(CallRuntime* expr) { |
4012 ZoneList<Expression*>* args = expr->arguments(); | 4012 ZoneList<Expression*>* args = expr->arguments(); |
4013 DCHECK(args->length() == 2); | 4013 DCHECK(args->length() == 2); |
4014 | 4014 |
(...skipping 27 matching lines...) Expand all Loading... |
4042 __ LoadRoot(result, Heap::kempty_stringRootIndex); | 4042 __ LoadRoot(result, Heap::kempty_stringRootIndex); |
4043 __ jmp(&done); | 4043 __ jmp(&done); |
4044 | 4044 |
4045 __ bind(&need_conversion); | 4045 __ bind(&need_conversion); |
4046 // Move smi zero into the result register, which will trigger | 4046 // Move smi zero into the result register, which will trigger |
4047 // conversion. | 4047 // conversion. |
4048 __ Move(result, Smi::FromInt(0)); | 4048 __ Move(result, Smi::FromInt(0)); |
4049 __ jmp(&done); | 4049 __ jmp(&done); |
4050 | 4050 |
4051 NopRuntimeCallHelper call_helper; | 4051 NopRuntimeCallHelper call_helper; |
4052 generator.GenerateSlow(masm_, call_helper); | 4052 generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); |
4053 | 4053 |
4054 __ bind(&done); | 4054 __ bind(&done); |
4055 context()->Plug(result); | 4055 context()->Plug(result); |
4056 } | 4056 } |
4057 | 4057 |
4058 | 4058 |
4059 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { | 4059 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { |
4060 ZoneList<Expression*>* args = expr->arguments(); | 4060 ZoneList<Expression*>* args = expr->arguments(); |
4061 DCHECK_EQ(2, args->length()); | 4061 DCHECK_EQ(2, args->length()); |
4062 VisitForStackValue(args->at(0)); | 4062 VisitForStackValue(args->at(0)); |
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5406 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5406 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5407 Assembler::target_address_at(call_target_address, | 5407 Assembler::target_address_at(call_target_address, |
5408 unoptimized_code)); | 5408 unoptimized_code)); |
5409 return OSR_AFTER_STACK_CHECK; | 5409 return OSR_AFTER_STACK_CHECK; |
5410 } | 5410 } |
5411 | 5411 |
5412 | 5412 |
5413 } } // namespace v8::internal | 5413 } } // namespace v8::internal |
5414 | 5414 |
5415 #endif // V8_TARGET_ARCH_X64 | 5415 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |