| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/s390/lithium-s390.h" | 5 #include "src/crankshaft/s390/lithium-s390.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 } | 800 } |
| 801 | 801 |
| 802 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 802 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
| 803 return new (zone()) LGoto(instr->FirstSuccessor()); | 803 return new (zone()) LGoto(instr->FirstSuccessor()); |
| 804 } | 804 } |
| 805 | 805 |
| 806 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 806 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 807 HValue* value = instr->value(); | 807 HValue* value = instr->value(); |
| 808 Representation r = value->representation(); | 808 Representation r = value->representation(); |
| 809 HType type = value->type(); | 809 HType type = value->type(); |
| 810 ToBooleanICStub::Types expected = instr->expected_input_types(); | 810 ToBooleanHints expected = instr->expected_input_types(); |
| 811 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); | 811 if (expected == ToBooleanHint::kNone) expected = ToBooleanHint::kAny; |
| 812 | 812 |
| 813 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || | 813 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
| 814 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); | 814 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
| 815 LInstruction* branch = new (zone()) LBranch(UseRegister(value)); | 815 LInstruction* branch = new (zone()) LBranch(UseRegister(value)); |
| 816 if (!easy_case && | 816 if (!easy_case && ((!(expected & ToBooleanHint::kSmallInteger) && |
| 817 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || | 817 (expected & ToBooleanHint::kNeedsMap)) || |
| 818 !expected.IsGeneric())) { | 818 expected != ToBooleanHint::kAny)) { |
| 819 branch = AssignEnvironment(branch); | 819 branch = AssignEnvironment(branch); |
| 820 } | 820 } |
| 821 return branch; | 821 return branch; |
| 822 } | 822 } |
| 823 | 823 |
| 824 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 824 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
| 825 return new (zone()) LDebugBreak(); | 825 return new (zone()) LDebugBreak(); |
| 826 } | 826 } |
| 827 | 827 |
| 828 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { | 828 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2167 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2168 LOperand* object = UseRegister(instr->object()); | 2168 LOperand* object = UseRegister(instr->object()); |
| 2169 LOperand* index = UseTempRegister(instr->index()); | 2169 LOperand* index = UseTempRegister(instr->index()); |
| 2170 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2170 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
| 2171 LInstruction* result = DefineSameAsFirst(load); | 2171 LInstruction* result = DefineSameAsFirst(load); |
| 2172 return AssignPointerMap(result); | 2172 return AssignPointerMap(result); |
| 2173 } | 2173 } |
| 2174 | 2174 |
| 2175 } // namespace internal | 2175 } // namespace internal |
| 2176 } // namespace v8 | 2176 } // namespace v8 |
| OLD | NEW |