| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
| 7 | 7 |
| 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 5278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5289 | 5289 |
| 5290 void LCodeGen::DoTypeof(LTypeof* instr) { | 5290 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5291 DCHECK(ToRegister(instr->value()).is(r5)); | 5291 DCHECK(ToRegister(instr->value()).is(r5)); |
| 5292 DCHECK(ToRegister(instr->result()).is(r2)); | 5292 DCHECK(ToRegister(instr->result()).is(r2)); |
| 5293 Label end, do_call; | 5293 Label end, do_call; |
| 5294 Register value_register = ToRegister(instr->value()); | 5294 Register value_register = ToRegister(instr->value()); |
| 5295 __ JumpIfNotSmi(value_register, &do_call); | 5295 __ JumpIfNotSmi(value_register, &do_call); |
| 5296 __ mov(r2, Operand(isolate()->factory()->number_string())); | 5296 __ mov(r2, Operand(isolate()->factory()->number_string())); |
| 5297 __ b(&end); | 5297 __ b(&end); |
| 5298 __ bind(&do_call); | 5298 __ bind(&do_call); |
| 5299 Callable callable = CodeFactory::Typeof(isolate()); | 5299 Callable callable = Builtins::CallableFor(isolate(), Builtins::kTypeof); |
| 5300 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); | 5300 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
| 5301 __ bind(&end); | 5301 __ bind(&end); |
| 5302 } | 5302 } |
| 5303 | 5303 |
| 5304 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5304 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
| 5305 Register input = ToRegister(instr->value()); | 5305 Register input = ToRegister(instr->value()); |
| 5306 | 5306 |
| 5307 Condition final_branch_condition = | 5307 Condition final_branch_condition = |
| 5308 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, | 5308 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, |
| 5309 instr->type_literal()); | 5309 instr->type_literal()); |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5603 __ LoadP(result, | 5603 __ LoadP(result, |
| 5604 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5604 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5605 __ bind(deferred->exit()); | 5605 __ bind(deferred->exit()); |
| 5606 __ bind(&done); | 5606 __ bind(&done); |
| 5607 } | 5607 } |
| 5608 | 5608 |
| 5609 #undef __ | 5609 #undef __ |
| 5610 | 5610 |
| 5611 } // namespace internal | 5611 } // namespace internal |
| 5612 } // namespace v8 | 5612 } // namespace v8 |
| OLD | NEW |