| 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/hydrogen-osr.h" | 7 #include "src/hydrogen-osr.h" |
| 8 #include "src/lithium-inl.h" | 8 #include "src/lithium-inl.h" |
| 9 #include "src/ppc/lithium-codegen-ppc.h" | 9 #include "src/ppc/lithium-codegen-ppc.h" |
| 10 | 10 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { | 177 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { |
| 178 stream->Add("if "); | 178 stream->Add("if "); |
| 179 left()->PrintTo(stream); | 179 left()->PrintTo(stream); |
| 180 stream->Add(" %s ", Token::String(op())); | 180 stream->Add(" %s ", Token::String(op())); |
| 181 right()->PrintTo(stream); | 181 right()->PrintTo(stream); |
| 182 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 182 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
| 183 } | 183 } |
| 184 | 184 |
| 185 | 185 |
| 186 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { | |
| 187 stream->Add("if is_object("); | |
| 188 value()->PrintTo(stream); | |
| 189 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | |
| 190 } | |
| 191 | |
| 192 | |
| 193 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { | 186 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { |
| 194 stream->Add("if is_string("); | 187 stream->Add("if is_string("); |
| 195 value()->PrintTo(stream); | 188 value()->PrintTo(stream); |
| 196 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 189 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 197 } | 190 } |
| 198 | 191 |
| 199 | 192 |
| 200 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { | 193 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { |
| 201 stream->Add("if is_smi("); | 194 stream->Add("if is_smi("); |
| 202 value()->PrintTo(stream); | 195 value()->PrintTo(stream); |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1738 | 1731 |
| 1739 | 1732 |
| 1740 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( | 1733 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( |
| 1741 HCompareMinusZeroAndBranch* instr) { | 1734 HCompareMinusZeroAndBranch* instr) { |
| 1742 LOperand* value = UseRegister(instr->value()); | 1735 LOperand* value = UseRegister(instr->value()); |
| 1743 LOperand* scratch = TempRegister(); | 1736 LOperand* scratch = TempRegister(); |
| 1744 return new (zone()) LCompareMinusZeroAndBranch(value, scratch); | 1737 return new (zone()) LCompareMinusZeroAndBranch(value, scratch); |
| 1745 } | 1738 } |
| 1746 | 1739 |
| 1747 | 1740 |
| 1748 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { | |
| 1749 DCHECK(instr->value()->representation().IsTagged()); | |
| 1750 LOperand* value = UseRegisterAtStart(instr->value()); | |
| 1751 LOperand* temp = TempRegister(); | |
| 1752 return new (zone()) LIsObjectAndBranch(value, temp); | |
| 1753 } | |
| 1754 | |
| 1755 | |
| 1756 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { | 1741 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { |
| 1757 DCHECK(instr->value()->representation().IsTagged()); | 1742 DCHECK(instr->value()->representation().IsTagged()); |
| 1758 LOperand* value = UseRegisterAtStart(instr->value()); | 1743 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1759 LOperand* temp = TempRegister(); | 1744 LOperand* temp = TempRegister(); |
| 1760 return new (zone()) LIsStringAndBranch(value, temp); | 1745 return new (zone()) LIsStringAndBranch(value, temp); |
| 1761 } | 1746 } |
| 1762 | 1747 |
| 1763 | 1748 |
| 1764 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { | 1749 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { |
| 1765 DCHECK(instr->value()->representation().IsTagged()); | 1750 DCHECK(instr->value()->representation().IsTagged()); |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2664 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2649 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
| 2665 HAllocateBlockContext* instr) { | 2650 HAllocateBlockContext* instr) { |
| 2666 LOperand* context = UseFixed(instr->context(), cp); | 2651 LOperand* context = UseFixed(instr->context(), cp); |
| 2667 LOperand* function = UseRegisterAtStart(instr->function()); | 2652 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2668 LAllocateBlockContext* result = | 2653 LAllocateBlockContext* result = |
| 2669 new (zone()) LAllocateBlockContext(context, function); | 2654 new (zone()) LAllocateBlockContext(context, function); |
| 2670 return MarkAsCall(DefineFixed(result, cp), instr); | 2655 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2671 } | 2656 } |
| 2672 } // namespace internal | 2657 } // namespace internal |
| 2673 } // namespace v8 | 2658 } // namespace v8 |
| OLD | NEW |