OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 stream->Add("B%d", block_id()); | 175 stream->Add("B%d", block_id()); |
176 } | 176 } |
177 | 177 |
178 | 178 |
179 void LBranch::PrintDataTo(StringStream* stream) { | 179 void LBranch::PrintDataTo(StringStream* stream) { |
180 stream->Add("B%d | B%d on ", true_block_id(), false_block_id()); | 180 stream->Add("B%d | B%d on ", true_block_id(), false_block_id()); |
181 value()->PrintTo(stream); | 181 value()->PrintTo(stream); |
182 } | 182 } |
183 | 183 |
184 | 184 |
185 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { | 185 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { |
186 stream->Add("if "); | 186 stream->Add("if "); |
187 left()->PrintTo(stream); | 187 left()->PrintTo(stream); |
188 stream->Add(" %s ", Token::String(op())); | 188 stream->Add(" %s ", Token::String(op())); |
189 right()->PrintTo(stream); | 189 right()->PrintTo(stream); |
190 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 190 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
191 } | 191 } |
192 | 192 |
193 | 193 |
194 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { | 194 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { |
195 stream->Add("if is_object("); | 195 stream->Add("if is_object("); |
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { | 1678 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
1679 ASSERT(instr->left()->representation().IsTagged()); | 1679 ASSERT(instr->left()->representation().IsTagged()); |
1680 ASSERT(instr->right()->representation().IsTagged()); | 1680 ASSERT(instr->right()->representation().IsTagged()); |
1681 LOperand* left = UseFixed(instr->left(), r1); | 1681 LOperand* left = UseFixed(instr->left(), r1); |
1682 LOperand* right = UseFixed(instr->right(), r0); | 1682 LOperand* right = UseFixed(instr->right(), r0); |
1683 LCmpT* result = new(zone()) LCmpT(left, right); | 1683 LCmpT* result = new(zone()) LCmpT(left, right); |
1684 return MarkAsCall(DefineFixed(result, r0), instr); | 1684 return MarkAsCall(DefineFixed(result, r0), instr); |
1685 } | 1685 } |
1686 | 1686 |
1687 | 1687 |
1688 LInstruction* LChunkBuilder::DoCompareIDAndBranch( | 1688 LInstruction* LChunkBuilder::DoCompareNumericAndBranch( |
1689 HCompareIDAndBranch* instr) { | 1689 HCompareNumericAndBranch* instr) { |
1690 Representation r = instr->representation(); | 1690 Representation r = instr->representation(); |
1691 if (r.IsSmiOrInteger32()) { | 1691 if (r.IsSmiOrInteger32()) { |
1692 ASSERT(instr->left()->representation().IsSmiOrInteger32()); | 1692 ASSERT(instr->left()->representation().IsSmiOrInteger32()); |
1693 ASSERT(instr->left()->representation().Equals( | 1693 ASSERT(instr->left()->representation().Equals( |
1694 instr->right()->representation())); | 1694 instr->right()->representation())); |
1695 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); | 1695 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); |
1696 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); | 1696 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); |
1697 return new(zone()) LCmpIDAndBranch(left, right); | 1697 return new(zone()) LCompareNumericAndBranch(left, right); |
1698 } else { | 1698 } else { |
1699 ASSERT(r.IsDouble()); | 1699 ASSERT(r.IsDouble()); |
1700 ASSERT(instr->left()->representation().IsDouble()); | 1700 ASSERT(instr->left()->representation().IsDouble()); |
1701 ASSERT(instr->right()->representation().IsDouble()); | 1701 ASSERT(instr->right()->representation().IsDouble()); |
1702 LOperand* left = UseRegisterAtStart(instr->left()); | 1702 LOperand* left = UseRegisterAtStart(instr->left()); |
1703 LOperand* right = UseRegisterAtStart(instr->right()); | 1703 LOperand* right = UseRegisterAtStart(instr->right()); |
1704 return new(zone()) LCmpIDAndBranch(left, right); | 1704 return new(zone()) LCompareNumericAndBranch(left, right); |
1705 } | 1705 } |
1706 } | 1706 } |
1707 | 1707 |
1708 | 1708 |
1709 LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( | 1709 LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( |
1710 HCompareObjectEqAndBranch* instr) { | 1710 HCompareObjectEqAndBranch* instr) { |
1711 LOperand* left = UseRegisterAtStart(instr->left()); | 1711 LOperand* left = UseRegisterAtStart(instr->left()); |
1712 LOperand* right = UseRegisterAtStart(instr->right()); | 1712 LOperand* right = UseRegisterAtStart(instr->right()); |
1713 return new(zone()) LCmpObjectEqAndBranch(left, right); | 1713 return new(zone()) LCmpObjectEqAndBranch(left, right); |
1714 } | 1714 } |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2640 | 2640 |
2641 | 2641 |
2642 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2642 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2643 LOperand* object = UseRegister(instr->object()); | 2643 LOperand* object = UseRegister(instr->object()); |
2644 LOperand* index = UseRegister(instr->index()); | 2644 LOperand* index = UseRegister(instr->index()); |
2645 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2645 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2646 } | 2646 } |
2647 | 2647 |
2648 | 2648 |
2649 } } // namespace v8::internal | 2649 } } // namespace v8::internal |
OLD | NEW |