| 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/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 5335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5346 | 5346 |
| 5347 void LCodeGen::DoTypeof(LTypeof* instr) { | 5347 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5348 DCHECK(ToRegister(instr->value()).is(r5)); | 5348 DCHECK(ToRegister(instr->value()).is(r5)); |
| 5349 DCHECK(ToRegister(instr->result()).is(r2)); | 5349 DCHECK(ToRegister(instr->result()).is(r2)); |
| 5350 Label end, do_call; | 5350 Label end, do_call; |
| 5351 Register value_register = ToRegister(instr->value()); | 5351 Register value_register = ToRegister(instr->value()); |
| 5352 __ JumpIfNotSmi(value_register, &do_call); | 5352 __ JumpIfNotSmi(value_register, &do_call); |
| 5353 __ mov(r2, Operand(isolate()->factory()->number_string())); | 5353 __ mov(r2, Operand(isolate()->factory()->number_string())); |
| 5354 __ b(&end); | 5354 __ b(&end); |
| 5355 __ bind(&do_call); | 5355 __ bind(&do_call); |
| 5356 TypeofStub stub(isolate()); | 5356 Callable callable = CodeFactory::Typeof(isolate()); |
| 5357 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5357 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
| 5358 __ bind(&end); | 5358 __ bind(&end); |
| 5359 } | 5359 } |
| 5360 | 5360 |
| 5361 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5361 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
| 5362 Register input = ToRegister(instr->value()); | 5362 Register input = ToRegister(instr->value()); |
| 5363 | 5363 |
| 5364 Condition final_branch_condition = | 5364 Condition final_branch_condition = |
| 5365 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, | 5365 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, |
| 5366 instr->type_literal()); | 5366 instr->type_literal()); |
| 5367 if (final_branch_condition != kNoCondition) { | 5367 if (final_branch_condition != kNoCondition) { |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5670 __ LoadP(result, | 5670 __ LoadP(result, |
| 5671 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5671 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5672 __ bind(deferred->exit()); | 5672 __ bind(deferred->exit()); |
| 5673 __ bind(&done); | 5673 __ bind(&done); |
| 5674 } | 5674 } |
| 5675 | 5675 |
| 5676 #undef __ | 5676 #undef __ |
| 5677 | 5677 |
| 5678 } // namespace internal | 5678 } // namespace internal |
| 5679 } // namespace v8 | 5679 } // namespace v8 |
| OLD | NEW |