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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-inl.h" | 10 #include "src/lithium-inl.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { | 175 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { |
176 stream->Add("if "); | 176 stream->Add("if "); |
177 left()->PrintTo(stream); | 177 left()->PrintTo(stream); |
178 stream->Add(" %s ", Token::String(op())); | 178 stream->Add(" %s ", Token::String(op())); |
179 right()->PrintTo(stream); | 179 right()->PrintTo(stream); |
180 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 180 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
181 } | 181 } |
182 | 182 |
183 | 183 |
184 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { | |
185 stream->Add("if is_object("); | |
186 value()->PrintTo(stream); | |
187 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | |
188 } | |
189 | |
190 | |
191 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { | 184 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { |
192 stream->Add("if is_string("); | 185 stream->Add("if is_string("); |
193 value()->PrintTo(stream); | 186 value()->PrintTo(stream); |
194 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 187 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
195 } | 188 } |
196 | 189 |
197 | 190 |
198 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { | 191 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { |
199 stream->Add("if is_smi("); | 192 stream->Add("if is_smi("); |
200 value()->PrintTo(stream); | 193 value()->PrintTo(stream); |
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1719 } | 1712 } |
1720 | 1713 |
1721 | 1714 |
1722 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( | 1715 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( |
1723 HCompareMinusZeroAndBranch* instr) { | 1716 HCompareMinusZeroAndBranch* instr) { |
1724 LOperand* value = UseRegister(instr->value()); | 1717 LOperand* value = UseRegister(instr->value()); |
1725 return new(zone()) LCompareMinusZeroAndBranch(value); | 1718 return new(zone()) LCompareMinusZeroAndBranch(value); |
1726 } | 1719 } |
1727 | 1720 |
1728 | 1721 |
1729 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { | |
1730 DCHECK(instr->value()->representation().IsTagged()); | |
1731 return new(zone()) LIsObjectAndBranch(UseRegisterAtStart(instr->value())); | |
1732 } | |
1733 | |
1734 | |
1735 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { | 1722 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { |
1736 DCHECK(instr->value()->representation().IsTagged()); | 1723 DCHECK(instr->value()->representation().IsTagged()); |
1737 LOperand* value = UseRegisterAtStart(instr->value()); | 1724 LOperand* value = UseRegisterAtStart(instr->value()); |
1738 LOperand* temp = TempRegister(); | 1725 LOperand* temp = TempRegister(); |
1739 return new(zone()) LIsStringAndBranch(value, temp); | 1726 return new(zone()) LIsStringAndBranch(value, temp); |
1740 } | 1727 } |
1741 | 1728 |
1742 | 1729 |
1743 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { | 1730 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { |
1744 DCHECK(instr->value()->representation().IsTagged()); | 1731 DCHECK(instr->value()->representation().IsTagged()); |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2753 LAllocateBlockContext* result = | 2740 LAllocateBlockContext* result = |
2754 new(zone()) LAllocateBlockContext(context, function); | 2741 new(zone()) LAllocateBlockContext(context, function); |
2755 return MarkAsCall(DefineFixed(result, rsi), instr); | 2742 return MarkAsCall(DefineFixed(result, rsi), instr); |
2756 } | 2743 } |
2757 | 2744 |
2758 | 2745 |
2759 } // namespace internal | 2746 } // namespace internal |
2760 } // namespace v8 | 2747 } // namespace v8 |
2761 | 2748 |
2762 #endif // V8_TARGET_ARCH_X64 | 2749 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |