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/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 5025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5036 | 5036 |
5037 void LCodeGen::DoTypeof(LTypeof* instr) { | 5037 void LCodeGen::DoTypeof(LTypeof* instr) { |
5038 DCHECK(ToRegister(instr->value()).is(r3)); | 5038 DCHECK(ToRegister(instr->value()).is(r3)); |
5039 DCHECK(ToRegister(instr->result()).is(r0)); | 5039 DCHECK(ToRegister(instr->result()).is(r0)); |
5040 Label end, do_call; | 5040 Label end, do_call; |
5041 Register value_register = ToRegister(instr->value()); | 5041 Register value_register = ToRegister(instr->value()); |
5042 __ JumpIfNotSmi(value_register, &do_call); | 5042 __ JumpIfNotSmi(value_register, &do_call); |
5043 __ mov(r0, Operand(isolate()->factory()->number_string())); | 5043 __ mov(r0, Operand(isolate()->factory()->number_string())); |
5044 __ jmp(&end); | 5044 __ jmp(&end); |
5045 __ bind(&do_call); | 5045 __ bind(&do_call); |
5046 Callable callable = CodeFactory::Typeof(isolate()); | 5046 Callable callable = Builtins::CallableFor(isolate(), Builtins::kTypeof); |
5047 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); | 5047 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
5048 __ bind(&end); | 5048 __ bind(&end); |
5049 } | 5049 } |
5050 | 5050 |
5051 | 5051 |
5052 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5052 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
5053 Register input = ToRegister(instr->value()); | 5053 Register input = ToRegister(instr->value()); |
5054 | 5054 |
5055 Condition final_branch_condition = EmitTypeofIs(instr->TrueLabel(chunk_), | 5055 Condition final_branch_condition = EmitTypeofIs(instr->TrueLabel(chunk_), |
5056 instr->FalseLabel(chunk_), | 5056 instr->FalseLabel(chunk_), |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5379 __ ldr(result, FieldMemOperand(scratch, | 5379 __ ldr(result, FieldMemOperand(scratch, |
5380 FixedArray::kHeaderSize - kPointerSize)); | 5380 FixedArray::kHeaderSize - kPointerSize)); |
5381 __ bind(deferred->exit()); | 5381 __ bind(deferred->exit()); |
5382 __ bind(&done); | 5382 __ bind(&done); |
5383 } | 5383 } |
5384 | 5384 |
5385 #undef __ | 5385 #undef __ |
5386 | 5386 |
5387 } // namespace internal | 5387 } // namespace internal |
5388 } // namespace v8 | 5388 } // namespace v8 |
OLD | NEW |