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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 right()->PrintTo(stream); | 196 right()->PrintTo(stream); |
197 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 197 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
198 } | 198 } |
199 | 199 |
200 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { | 200 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
201 stream->Add("if has_instance_type("); | 201 stream->Add("if has_instance_type("); |
202 value()->PrintTo(stream); | 202 value()->PrintTo(stream); |
203 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 203 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
204 } | 204 } |
205 | 205 |
206 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { | |
207 stream->Add("if has_cached_array_index("); | |
208 value()->PrintTo(stream); | |
209 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | |
210 } | |
211 | |
212 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { | 206 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { |
213 stream->Add("if class_of_test("); | 207 stream->Add("if class_of_test("); |
214 value()->PrintTo(stream); | 208 value()->PrintTo(stream); |
215 stream->Add(", \"%o\") then B%d else B%d", *hydrogen()->class_name(), | 209 stream->Add(", \"%o\") then B%d else B%d", *hydrogen()->class_name(), |
216 true_block_id(), false_block_id()); | 210 true_block_id(), false_block_id()); |
217 } | 211 } |
218 | 212 |
219 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { | 213 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { |
220 stream->Add("if typeof "); | 214 stream->Add("if typeof "); |
221 value()->PrintTo(stream); | 215 value()->PrintTo(stream); |
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 return MarkAsCall(result, instr); | 1539 return MarkAsCall(result, instr); |
1546 } | 1540 } |
1547 | 1541 |
1548 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( | 1542 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( |
1549 HHasInstanceTypeAndBranch* instr) { | 1543 HHasInstanceTypeAndBranch* instr) { |
1550 DCHECK(instr->value()->representation().IsTagged()); | 1544 DCHECK(instr->value()->representation().IsTagged()); |
1551 LOperand* value = UseRegisterAtStart(instr->value()); | 1545 LOperand* value = UseRegisterAtStart(instr->value()); |
1552 return new (zone()) LHasInstanceTypeAndBranch(value); | 1546 return new (zone()) LHasInstanceTypeAndBranch(value); |
1553 } | 1547 } |
1554 | 1548 |
1555 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | |
1556 HGetCachedArrayIndex* instr) { | |
1557 DCHECK(instr->value()->representation().IsTagged()); | |
1558 LOperand* value = UseRegisterAtStart(instr->value()); | |
1559 | |
1560 return DefineAsRegister(new (zone()) LGetCachedArrayIndex(value)); | |
1561 } | |
1562 | |
1563 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( | |
1564 HHasCachedArrayIndexAndBranch* instr) { | |
1565 DCHECK(instr->value()->representation().IsTagged()); | |
1566 return new (zone()) | |
1567 LHasCachedArrayIndexAndBranch(UseRegisterAtStart(instr->value())); | |
1568 } | |
1569 | |
1570 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( | 1549 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( |
1571 HClassOfTestAndBranch* instr) { | 1550 HClassOfTestAndBranch* instr) { |
1572 DCHECK(instr->value()->representation().IsTagged()); | 1551 DCHECK(instr->value()->representation().IsTagged()); |
1573 LOperand* value = UseRegister(instr->value()); | 1552 LOperand* value = UseRegister(instr->value()); |
1574 return new (zone()) LClassOfTestAndBranch(value, TempRegister()); | 1553 return new (zone()) LClassOfTestAndBranch(value, TempRegister()); |
1575 } | 1554 } |
1576 | 1555 |
1577 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1556 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
1578 LOperand* string = UseRegisterAtStart(instr->string()); | 1557 LOperand* string = UseRegisterAtStart(instr->string()); |
1579 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); | 1558 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2188 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2167 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2189 LOperand* object = UseRegister(instr->object()); | 2168 LOperand* object = UseRegister(instr->object()); |
2190 LOperand* index = UseTempRegister(instr->index()); | 2169 LOperand* index = UseTempRegister(instr->index()); |
2191 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2170 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
2192 LInstruction* result = DefineSameAsFirst(load); | 2171 LInstruction* result = DefineSameAsFirst(load); |
2193 return AssignPointerMap(result); | 2172 return AssignPointerMap(result); |
2194 } | 2173 } |
2195 | 2174 |
2196 } // namespace internal | 2175 } // namespace internal |
2197 } // namespace v8 | 2176 } // namespace v8 |
OLD | NEW |