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 5266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5277 | 5277 |
5278 void LCodeGen::DoTypeof(LTypeof* instr) { | 5278 void LCodeGen::DoTypeof(LTypeof* instr) { |
5279 DCHECK(ToRegister(instr->value()).is(r5)); | 5279 DCHECK(ToRegister(instr->value()).is(r5)); |
5280 DCHECK(ToRegister(instr->result()).is(r2)); | 5280 DCHECK(ToRegister(instr->result()).is(r2)); |
5281 Label end, do_call; | 5281 Label end, do_call; |
5282 Register value_register = ToRegister(instr->value()); | 5282 Register value_register = ToRegister(instr->value()); |
5283 __ JumpIfNotSmi(value_register, &do_call); | 5283 __ JumpIfNotSmi(value_register, &do_call); |
5284 __ mov(r2, Operand(isolate()->factory()->number_string())); | 5284 __ mov(r2, Operand(isolate()->factory()->number_string())); |
5285 __ b(&end); | 5285 __ b(&end); |
5286 __ bind(&do_call); | 5286 __ bind(&do_call); |
5287 TypeofStub stub(isolate()); | 5287 Callable callable = CodeFactory::Typeof(isolate()); |
5288 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5288 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
5289 __ bind(&end); | 5289 __ bind(&end); |
5290 } | 5290 } |
5291 | 5291 |
5292 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5292 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
5293 Register input = ToRegister(instr->value()); | 5293 Register input = ToRegister(instr->value()); |
5294 | 5294 |
5295 Condition final_branch_condition = | 5295 Condition final_branch_condition = |
5296 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, | 5296 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, |
5297 instr->type_literal()); | 5297 instr->type_literal()); |
5298 if (final_branch_condition != kNoCondition) { | 5298 if (final_branch_condition != kNoCondition) { |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5601 __ LoadP(result, | 5601 __ LoadP(result, |
5602 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5602 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5603 __ bind(deferred->exit()); | 5603 __ bind(deferred->exit()); |
5604 __ bind(&done); | 5604 __ bind(&done); |
5605 } | 5605 } |
5606 | 5606 |
5607 #undef __ | 5607 #undef __ |
5608 | 5608 |
5609 } // namespace internal | 5609 } // namespace internal |
5610 } // namespace v8 | 5610 } // namespace v8 |
OLD | NEW |