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 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/hydrogen-osr.h" | 8 #include "src/hydrogen-osr.h" |
9 #include "src/lithium-inl.h" | 9 #include "src/lithium-inl.h" |
10 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { | 162 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { |
163 stream->Add("if "); | 163 stream->Add("if "); |
164 left()->PrintTo(stream); | 164 left()->PrintTo(stream); |
165 stream->Add(" %s ", Token::String(op())); | 165 stream->Add(" %s ", Token::String(op())); |
166 right()->PrintTo(stream); | 166 right()->PrintTo(stream); |
167 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 167 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
168 } | 168 } |
169 | 169 |
170 | 170 |
171 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { | |
172 stream->Add("if is_object("); | |
173 value()->PrintTo(stream); | |
174 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | |
175 } | |
176 | |
177 | |
178 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { | 171 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { |
179 stream->Add("if is_string("); | 172 stream->Add("if is_string("); |
180 value()->PrintTo(stream); | 173 value()->PrintTo(stream); |
181 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 174 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
182 } | 175 } |
183 | 176 |
184 | 177 |
185 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { | 178 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { |
186 stream->Add("if is_smi("); | 179 stream->Add("if is_smi("); |
187 value()->PrintTo(stream); | 180 value()->PrintTo(stream); |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1769 | 1762 |
1770 | 1763 |
1771 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( | 1764 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( |
1772 HCompareMinusZeroAndBranch* instr) { | 1765 HCompareMinusZeroAndBranch* instr) { |
1773 LOperand* value = UseRegister(instr->value()); | 1766 LOperand* value = UseRegister(instr->value()); |
1774 LOperand* scratch = TempRegister(); | 1767 LOperand* scratch = TempRegister(); |
1775 return new(zone()) LCompareMinusZeroAndBranch(value, scratch); | 1768 return new(zone()) LCompareMinusZeroAndBranch(value, scratch); |
1776 } | 1769 } |
1777 | 1770 |
1778 | 1771 |
1779 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { | |
1780 DCHECK(instr->value()->representation().IsTagged()); | |
1781 LOperand* value = UseRegisterAtStart(instr->value()); | |
1782 LOperand* temp = TempRegister(); | |
1783 return new(zone()) LIsObjectAndBranch(value, temp); | |
1784 } | |
1785 | |
1786 | |
1787 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { | 1772 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { |
1788 DCHECK(instr->value()->representation().IsTagged()); | 1773 DCHECK(instr->value()->representation().IsTagged()); |
1789 LOperand* value = UseRegisterAtStart(instr->value()); | 1774 LOperand* value = UseRegisterAtStart(instr->value()); |
1790 LOperand* temp = TempRegister(); | 1775 LOperand* temp = TempRegister(); |
1791 return new(zone()) LIsStringAndBranch(value, temp); | 1776 return new(zone()) LIsStringAndBranch(value, temp); |
1792 } | 1777 } |
1793 | 1778 |
1794 | 1779 |
1795 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { | 1780 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { |
1796 DCHECK(instr->value()->representation().IsTagged()); | 1781 DCHECK(instr->value()->representation().IsTagged()); |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2707 HAllocateBlockContext* instr) { | 2692 HAllocateBlockContext* instr) { |
2708 LOperand* context = UseFixed(instr->context(), cp); | 2693 LOperand* context = UseFixed(instr->context(), cp); |
2709 LOperand* function = UseRegisterAtStart(instr->function()); | 2694 LOperand* function = UseRegisterAtStart(instr->function()); |
2710 LAllocateBlockContext* result = | 2695 LAllocateBlockContext* result = |
2711 new(zone()) LAllocateBlockContext(context, function); | 2696 new(zone()) LAllocateBlockContext(context, function); |
2712 return MarkAsCall(DefineFixed(result, cp), instr); | 2697 return MarkAsCall(DefineFixed(result, cp), instr); |
2713 } | 2698 } |
2714 | 2699 |
2715 } // namespace internal | 2700 } // namespace internal |
2716 } // namespace v8 | 2701 } // namespace v8 |
OLD | NEW |