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/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 5413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5424 | 5424 |
5425 void LCodeGen::DoTypeof(LTypeof* instr) { | 5425 void LCodeGen::DoTypeof(LTypeof* instr) { |
5426 DCHECK(ToRegister(instr->context()).is(esi)); | 5426 DCHECK(ToRegister(instr->context()).is(esi)); |
5427 DCHECK(ToRegister(instr->value()).is(ebx)); | 5427 DCHECK(ToRegister(instr->value()).is(ebx)); |
5428 Label end, do_call; | 5428 Label end, do_call; |
5429 Register value_register = ToRegister(instr->value()); | 5429 Register value_register = ToRegister(instr->value()); |
5430 __ JumpIfNotSmi(value_register, &do_call); | 5430 __ JumpIfNotSmi(value_register, &do_call); |
5431 __ mov(eax, Immediate(isolate()->factory()->number_string())); | 5431 __ mov(eax, Immediate(isolate()->factory()->number_string())); |
5432 __ jmp(&end); | 5432 __ jmp(&end); |
5433 __ bind(&do_call); | 5433 __ bind(&do_call); |
5434 TypeofStub stub(isolate()); | 5434 Callable callable = CodeFactory::Typeof(isolate()); |
5435 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5435 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
5436 __ bind(&end); | 5436 __ bind(&end); |
5437 } | 5437 } |
5438 | 5438 |
5439 | 5439 |
5440 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5440 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
5441 Register input = ToRegister(instr->value()); | 5441 Register input = ToRegister(instr->value()); |
5442 Condition final_branch_condition = EmitTypeofIs(instr, input); | 5442 Condition final_branch_condition = EmitTypeofIs(instr, input); |
5443 if (final_branch_condition != no_condition) { | 5443 if (final_branch_condition != no_condition) { |
5444 EmitBranch(instr, final_branch_condition); | 5444 EmitBranch(instr, final_branch_condition); |
5445 } | 5445 } |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5772 __ bind(deferred->exit()); | 5772 __ bind(deferred->exit()); |
5773 __ bind(&done); | 5773 __ bind(&done); |
5774 } | 5774 } |
5775 | 5775 |
5776 #undef __ | 5776 #undef __ |
5777 | 5777 |
5778 } // namespace internal | 5778 } // namespace internal |
5779 } // namespace v8 | 5779 } // namespace v8 |
5780 | 5780 |
5781 #endif // V8_TARGET_ARCH_X87 | 5781 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |