OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/ia32/lithium-ia32.h" | 5 #include "src/crankshaft/ia32/lithium-ia32.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 | 10 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 217 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
218 } | 218 } |
219 | 219 |
220 | 220 |
221 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { | 221 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
222 stream->Add("if has_instance_type("); | 222 stream->Add("if has_instance_type("); |
223 value()->PrintTo(stream); | 223 value()->PrintTo(stream); |
224 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 224 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
225 } | 225 } |
226 | 226 |
227 | |
228 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { | |
229 stream->Add("if has_cached_array_index("); | |
230 value()->PrintTo(stream); | |
231 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | |
232 } | |
233 | |
234 | |
235 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { | 227 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { |
236 stream->Add("if class_of_test("); | 228 stream->Add("if class_of_test("); |
237 value()->PrintTo(stream); | 229 value()->PrintTo(stream); |
238 stream->Add(", \"%o\") then B%d else B%d", | 230 stream->Add(", \"%o\") then B%d else B%d", |
239 *hydrogen()->class_name(), | 231 *hydrogen()->class_name(), |
240 true_block_id(), | 232 true_block_id(), |
241 false_block_id()); | 233 false_block_id()); |
242 } | 234 } |
243 | 235 |
244 | 236 |
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 | 1685 |
1694 | 1686 |
1695 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( | 1687 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( |
1696 HHasInstanceTypeAndBranch* instr) { | 1688 HHasInstanceTypeAndBranch* instr) { |
1697 DCHECK(instr->value()->representation().IsTagged()); | 1689 DCHECK(instr->value()->representation().IsTagged()); |
1698 return new(zone()) LHasInstanceTypeAndBranch( | 1690 return new(zone()) LHasInstanceTypeAndBranch( |
1699 UseRegisterAtStart(instr->value()), | 1691 UseRegisterAtStart(instr->value()), |
1700 TempRegister()); | 1692 TempRegister()); |
1701 } | 1693 } |
1702 | 1694 |
1703 | |
1704 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | |
1705 HGetCachedArrayIndex* instr) { | |
1706 DCHECK(instr->value()->representation().IsTagged()); | |
1707 LOperand* value = UseRegisterAtStart(instr->value()); | |
1708 | |
1709 return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value)); | |
1710 } | |
1711 | |
1712 | |
1713 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( | |
1714 HHasCachedArrayIndexAndBranch* instr) { | |
1715 DCHECK(instr->value()->representation().IsTagged()); | |
1716 return new(zone()) LHasCachedArrayIndexAndBranch( | |
1717 UseRegisterAtStart(instr->value())); | |
1718 } | |
1719 | |
1720 | |
1721 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( | 1695 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( |
1722 HClassOfTestAndBranch* instr) { | 1696 HClassOfTestAndBranch* instr) { |
1723 DCHECK(instr->value()->representation().IsTagged()); | 1697 DCHECK(instr->value()->representation().IsTagged()); |
1724 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()), | 1698 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()), |
1725 TempRegister(), | 1699 TempRegister(), |
1726 TempRegister()); | 1700 TempRegister()); |
1727 } | 1701 } |
1728 | 1702 |
1729 | 1703 |
1730 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1704 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 LOperand* index = UseTempRegister(instr->index()); | 2462 LOperand* index = UseTempRegister(instr->index()); |
2489 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2463 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2490 LInstruction* result = DefineSameAsFirst(load); | 2464 LInstruction* result = DefineSameAsFirst(load); |
2491 return AssignPointerMap(result); | 2465 return AssignPointerMap(result); |
2492 } | 2466 } |
2493 | 2467 |
2494 } // namespace internal | 2468 } // namespace internal |
2495 } // namespace v8 | 2469 } // namespace v8 |
2496 | 2470 |
2497 #endif // V8_TARGET_ARCH_IA32 | 2471 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |