| 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/builtins/builtins-constructor.h" | 7 #include "src/builtins/builtins-constructor.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
| (...skipping 5216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5227 | 5227 |
| 5228 void LCodeGen::DoTypeof(LTypeof* instr) { | 5228 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5229 DCHECK(ToRegister(instr->value()).is(a3)); | 5229 DCHECK(ToRegister(instr->value()).is(a3)); |
| 5230 DCHECK(ToRegister(instr->result()).is(v0)); | 5230 DCHECK(ToRegister(instr->result()).is(v0)); |
| 5231 Label end, do_call; | 5231 Label end, do_call; |
| 5232 Register value_register = ToRegister(instr->value()); | 5232 Register value_register = ToRegister(instr->value()); |
| 5233 __ JumpIfNotSmi(value_register, &do_call); | 5233 __ JumpIfNotSmi(value_register, &do_call); |
| 5234 __ li(v0, Operand(isolate()->factory()->number_string())); | 5234 __ li(v0, Operand(isolate()->factory()->number_string())); |
| 5235 __ jmp(&end); | 5235 __ jmp(&end); |
| 5236 __ bind(&do_call); | 5236 __ bind(&do_call); |
| 5237 Callable callable = CodeFactory::Typeof(isolate()); | 5237 Callable callable = Builtins::CallableFor(isolate(), Builtins::kTypeof); |
| 5238 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); | 5238 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
| 5239 __ bind(&end); | 5239 __ bind(&end); |
| 5240 } | 5240 } |
| 5241 | 5241 |
| 5242 | 5242 |
| 5243 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5243 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
| 5244 Register input = ToRegister(instr->value()); | 5244 Register input = ToRegister(instr->value()); |
| 5245 | 5245 |
| 5246 Register cmp1 = no_reg; | 5246 Register cmp1 = no_reg; |
| 5247 Operand cmp2 = Operand(no_reg); | 5247 Operand cmp2 = Operand(no_reg); |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5595 __ Ld(result, | 5595 __ Ld(result, |
| 5596 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5596 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5597 __ bind(deferred->exit()); | 5597 __ bind(deferred->exit()); |
| 5598 __ bind(&done); | 5598 __ bind(&done); |
| 5599 } | 5599 } |
| 5600 | 5600 |
| 5601 #undef __ | 5601 #undef __ |
| 5602 | 5602 |
| 5603 } // namespace internal | 5603 } // namespace internal |
| 5604 } // namespace v8 | 5604 } // namespace v8 |
| OLD | NEW |