| 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/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 5292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5303 | 5303 |
| 5304 void LCodeGen::DoTypeof(LTypeof* instr) { | 5304 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5305 DCHECK(ToRegister(instr->context()).is(esi)); | 5305 DCHECK(ToRegister(instr->context()).is(esi)); |
| 5306 DCHECK(ToRegister(instr->value()).is(ebx)); | 5306 DCHECK(ToRegister(instr->value()).is(ebx)); |
| 5307 Label end, do_call; | 5307 Label end, do_call; |
| 5308 Register value_register = ToRegister(instr->value()); | 5308 Register value_register = ToRegister(instr->value()); |
| 5309 __ JumpIfNotSmi(value_register, &do_call); | 5309 __ JumpIfNotSmi(value_register, &do_call); |
| 5310 __ mov(eax, Immediate(isolate()->factory()->number_string())); | 5310 __ mov(eax, Immediate(isolate()->factory()->number_string())); |
| 5311 __ jmp(&end); | 5311 __ jmp(&end); |
| 5312 __ bind(&do_call); | 5312 __ bind(&do_call); |
| 5313 Callable callable = CodeFactory::Typeof(isolate()); | 5313 Callable callable = Builtins::CallableFor(isolate(), Builtins::kTypeof); |
| 5314 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); | 5314 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
| 5315 __ bind(&end); | 5315 __ bind(&end); |
| 5316 } | 5316 } |
| 5317 | 5317 |
| 5318 | 5318 |
| 5319 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5319 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
| 5320 Register input = ToRegister(instr->value()); | 5320 Register input = ToRegister(instr->value()); |
| 5321 Condition final_branch_condition = EmitTypeofIs(instr, input); | 5321 Condition final_branch_condition = EmitTypeofIs(instr, input); |
| 5322 if (final_branch_condition != no_condition) { | 5322 if (final_branch_condition != no_condition) { |
| 5323 EmitBranch(instr, final_branch_condition); | 5323 EmitBranch(instr, final_branch_condition); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5639 __ bind(deferred->exit()); | 5639 __ bind(deferred->exit()); |
| 5640 __ bind(&done); | 5640 __ bind(&done); |
| 5641 } | 5641 } |
| 5642 | 5642 |
| 5643 #undef __ | 5643 #undef __ |
| 5644 | 5644 |
| 5645 } // namespace internal | 5645 } // namespace internal |
| 5646 } // namespace v8 | 5646 } // namespace v8 |
| 5647 | 5647 |
| 5648 #endif // V8_TARGET_ARCH_X87 | 5648 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |