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/x64/lithium-x64.h" | 5 #include "src/crankshaft/x64/lithium-x64.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 | 214 |
215 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { | 215 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
216 stream->Add("if has_instance_type("); | 216 stream->Add("if has_instance_type("); |
217 value()->PrintTo(stream); | 217 value()->PrintTo(stream); |
218 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 218 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
219 } | 219 } |
220 | 220 |
221 | 221 |
222 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { | |
223 stream->Add("if has_cached_array_index("); | |
224 value()->PrintTo(stream); | |
225 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | |
226 } | |
227 | |
228 | |
229 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { | 222 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { |
230 stream->Add("if class_of_test("); | 223 stream->Add("if class_of_test("); |
231 value()->PrintTo(stream); | 224 value()->PrintTo(stream); |
232 stream->Add(", \"%o\") then B%d else B%d", | 225 stream->Add(", \"%o\") then B%d else B%d", |
233 *hydrogen()->class_name(), | 226 *hydrogen()->class_name(), |
234 true_block_id(), | 227 true_block_id(), |
235 false_block_id()); | 228 false_block_id()); |
236 } | 229 } |
237 | 230 |
238 | 231 |
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 } | 1690 } |
1698 | 1691 |
1699 | 1692 |
1700 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( | 1693 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( |
1701 HHasInstanceTypeAndBranch* instr) { | 1694 HHasInstanceTypeAndBranch* instr) { |
1702 DCHECK(instr->value()->representation().IsTagged()); | 1695 DCHECK(instr->value()->representation().IsTagged()); |
1703 LOperand* value = UseRegisterAtStart(instr->value()); | 1696 LOperand* value = UseRegisterAtStart(instr->value()); |
1704 return new(zone()) LHasInstanceTypeAndBranch(value); | 1697 return new(zone()) LHasInstanceTypeAndBranch(value); |
1705 } | 1698 } |
1706 | 1699 |
1707 | |
1708 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | |
1709 HGetCachedArrayIndex* instr) { | |
1710 DCHECK(instr->value()->representation().IsTagged()); | |
1711 LOperand* value = UseRegisterAtStart(instr->value()); | |
1712 | |
1713 return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value)); | |
1714 } | |
1715 | |
1716 | |
1717 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( | |
1718 HHasCachedArrayIndexAndBranch* instr) { | |
1719 DCHECK(instr->value()->representation().IsTagged()); | |
1720 LOperand* value = UseRegisterAtStart(instr->value()); | |
1721 return new(zone()) LHasCachedArrayIndexAndBranch(value); | |
1722 } | |
1723 | |
1724 | |
1725 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( | 1700 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( |
1726 HClassOfTestAndBranch* instr) { | 1701 HClassOfTestAndBranch* instr) { |
1727 LOperand* value = UseRegister(instr->value()); | 1702 LOperand* value = UseRegister(instr->value()); |
1728 return new(zone()) LClassOfTestAndBranch(value, | 1703 return new(zone()) LClassOfTestAndBranch(value, |
1729 TempRegister(), | 1704 TempRegister(), |
1730 TempRegister()); | 1705 TempRegister()); |
1731 } | 1706 } |
1732 | 1707 |
1733 | 1708 |
1734 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1709 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2492 LOperand* index = UseTempRegister(instr->index()); | 2467 LOperand* index = UseTempRegister(instr->index()); |
2493 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2468 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2494 LInstruction* result = DefineSameAsFirst(load); | 2469 LInstruction* result = DefineSameAsFirst(load); |
2495 return AssignPointerMap(result); | 2470 return AssignPointerMap(result); |
2496 } | 2471 } |
2497 | 2472 |
2498 } // namespace internal | 2473 } // namespace internal |
2499 } // namespace v8 | 2474 } // namespace v8 |
2500 | 2475 |
2501 #endif // V8_TARGET_ARCH_X64 | 2476 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |