OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/builtins/builtins-constructor.h" | 10 #include "src/builtins/builtins-constructor.h" |
(...skipping 5070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5081 | 5081 |
5082 void LCodeGen::DoTypeof(LTypeof* instr) { | 5082 void LCodeGen::DoTypeof(LTypeof* instr) { |
5083 DCHECK(ToRegister(instr->context()).is(rsi)); | 5083 DCHECK(ToRegister(instr->context()).is(rsi)); |
5084 DCHECK(ToRegister(instr->value()).is(rbx)); | 5084 DCHECK(ToRegister(instr->value()).is(rbx)); |
5085 Label end, do_call; | 5085 Label end, do_call; |
5086 Register value_register = ToRegister(instr->value()); | 5086 Register value_register = ToRegister(instr->value()); |
5087 __ JumpIfNotSmi(value_register, &do_call); | 5087 __ JumpIfNotSmi(value_register, &do_call); |
5088 __ Move(rax, isolate()->factory()->number_string()); | 5088 __ Move(rax, isolate()->factory()->number_string()); |
5089 __ jmp(&end); | 5089 __ jmp(&end); |
5090 __ bind(&do_call); | 5090 __ bind(&do_call); |
5091 Callable callable = CodeFactory::Typeof(isolate()); | 5091 Callable callable = Builtins::CallableFor(isolate(), Builtins::kTypeof); |
5092 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); | 5092 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
5093 __ bind(&end); | 5093 __ bind(&end); |
5094 } | 5094 } |
5095 | 5095 |
5096 | 5096 |
5097 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { | 5097 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { |
5098 DCHECK(!operand->IsDoubleRegister()); | 5098 DCHECK(!operand->IsDoubleRegister()); |
5099 if (operand->IsConstantOperand()) { | 5099 if (operand->IsConstantOperand()) { |
5100 __ Push(ToHandle(LConstantOperand::cast(operand))); | 5100 __ Push(ToHandle(LConstantOperand::cast(operand))); |
5101 } else if (operand->IsRegister()) { | 5101 } else if (operand->IsRegister()) { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5426 __ bind(deferred->exit()); | 5426 __ bind(deferred->exit()); |
5427 __ bind(&done); | 5427 __ bind(&done); |
5428 } | 5428 } |
5429 | 5429 |
5430 #undef __ | 5430 #undef __ |
5431 | 5431 |
5432 } // namespace internal | 5432 } // namespace internal |
5433 } // namespace v8 | 5433 } // namespace v8 |
5434 | 5434 |
5435 #endif // V8_TARGET_ARCH_X64 | 5435 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |