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/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 5354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5365 | 5365 |
5366 void LCodeGen::DoTypeof(LTypeof* instr) { | 5366 void LCodeGen::DoTypeof(LTypeof* instr) { |
5367 DCHECK(ToRegister(instr->value()).is(a3)); | 5367 DCHECK(ToRegister(instr->value()).is(a3)); |
5368 DCHECK(ToRegister(instr->result()).is(v0)); | 5368 DCHECK(ToRegister(instr->result()).is(v0)); |
5369 Label end, do_call; | 5369 Label end, do_call; |
5370 Register value_register = ToRegister(instr->value()); | 5370 Register value_register = ToRegister(instr->value()); |
5371 __ JumpIfNotSmi(value_register, &do_call); | 5371 __ JumpIfNotSmi(value_register, &do_call); |
5372 __ li(v0, Operand(isolate()->factory()->number_string())); | 5372 __ li(v0, Operand(isolate()->factory()->number_string())); |
5373 __ jmp(&end); | 5373 __ jmp(&end); |
5374 __ bind(&do_call); | 5374 __ bind(&do_call); |
5375 TypeofStub stub(isolate()); | 5375 Callable callable = CodeFactory::Typeof(isolate()); |
5376 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5376 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
5377 __ bind(&end); | 5377 __ bind(&end); |
5378 } | 5378 } |
5379 | 5379 |
5380 | 5380 |
5381 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5381 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
5382 Register input = ToRegister(instr->value()); | 5382 Register input = ToRegister(instr->value()); |
5383 | 5383 |
5384 Register cmp1 = no_reg; | 5384 Register cmp1 = no_reg; |
5385 Operand cmp2 = Operand(no_reg); | 5385 Operand cmp2 = Operand(no_reg); |
5386 | 5386 |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5748 __ ld(result, FieldMemOperand(scratch, | 5748 __ ld(result, FieldMemOperand(scratch, |
5749 FixedArray::kHeaderSize - kPointerSize)); | 5749 FixedArray::kHeaderSize - kPointerSize)); |
5750 __ bind(deferred->exit()); | 5750 __ bind(deferred->exit()); |
5751 __ bind(&done); | 5751 __ bind(&done); |
5752 } | 5752 } |
5753 | 5753 |
5754 #undef __ | 5754 #undef __ |
5755 | 5755 |
5756 } // namespace internal | 5756 } // namespace internal |
5757 } // namespace v8 | 5757 } // namespace v8 |
OLD | NEW |