OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/builtins/builtins-constructor.h" | 8 #include "src/builtins/builtins-constructor.h" |
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 5333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5344 | 5344 |
5345 void LCodeGen::DoTypeof(LTypeof* instr) { | 5345 void LCodeGen::DoTypeof(LTypeof* instr) { |
5346 DCHECK(ToRegister(instr->value()).is(r6)); | 5346 DCHECK(ToRegister(instr->value()).is(r6)); |
5347 DCHECK(ToRegister(instr->result()).is(r3)); | 5347 DCHECK(ToRegister(instr->result()).is(r3)); |
5348 Label end, do_call; | 5348 Label end, do_call; |
5349 Register value_register = ToRegister(instr->value()); | 5349 Register value_register = ToRegister(instr->value()); |
5350 __ JumpIfNotSmi(value_register, &do_call); | 5350 __ JumpIfNotSmi(value_register, &do_call); |
5351 __ mov(r3, Operand(isolate()->factory()->number_string())); | 5351 __ mov(r3, Operand(isolate()->factory()->number_string())); |
5352 __ b(&end); | 5352 __ b(&end); |
5353 __ bind(&do_call); | 5353 __ bind(&do_call); |
5354 Callable callable = CodeFactory::Typeof(isolate()); | 5354 Callable callable = Builtins::CallableFor(isolate(), Builtins::kTypeof); |
5355 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); | 5355 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
5356 __ bind(&end); | 5356 __ bind(&end); |
5357 } | 5357 } |
5358 | 5358 |
5359 | 5359 |
5360 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5360 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
5361 Register input = ToRegister(instr->value()); | 5361 Register input = ToRegister(instr->value()); |
5362 | 5362 |
5363 Condition final_branch_condition = | 5363 Condition final_branch_condition = |
5364 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, | 5364 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5675 __ LoadP(result, | 5675 __ LoadP(result, |
5676 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5676 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5677 __ bind(deferred->exit()); | 5677 __ bind(deferred->exit()); |
5678 __ bind(&done); | 5678 __ bind(&done); |
5679 } | 5679 } |
5680 | 5680 |
5681 #undef __ | 5681 #undef __ |
5682 | 5682 |
5683 } // namespace internal | 5683 } // namespace internal |
5684 } // namespace v8 | 5684 } // namespace v8 |
OLD | NEW |