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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 185 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
186 return new(zone()) LDebugBreak(); | 186 return new(zone()) LDebugBreak(); |
187 } | 187 } |
188 | 188 |
189 | 189 |
190 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { | 190 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { |
191 stream->Add("if "); | 191 stream->Add("if "); |
192 left()->PrintTo(stream); | 192 left()->PrintTo(stream); |
193 stream->Add(" %s ", Token::String(op())); | 193 stream->Add(" %s ", Token::String(op())); |
194 right()->PrintTo(stream); | 194 right()->PrintTo(stream); |
195 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 195 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
196 } | 196 } |
197 | 197 |
198 | 198 |
199 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { | 199 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { |
200 stream->Add("if is_object("); | 200 stream->Add("if is_object("); |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1599 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { | 1599 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
1600 ASSERT(instr->left()->representation().IsTagged()); | 1600 ASSERT(instr->left()->representation().IsTagged()); |
1601 ASSERT(instr->right()->representation().IsTagged()); | 1601 ASSERT(instr->right()->representation().IsTagged()); |
1602 LOperand* left = UseFixed(instr->left(), a1); | 1602 LOperand* left = UseFixed(instr->left(), a1); |
1603 LOperand* right = UseFixed(instr->right(), a0); | 1603 LOperand* right = UseFixed(instr->right(), a0); |
1604 LCmpT* result = new(zone()) LCmpT(left, right); | 1604 LCmpT* result = new(zone()) LCmpT(left, right); |
1605 return MarkAsCall(DefineFixed(result, v0), instr); | 1605 return MarkAsCall(DefineFixed(result, v0), instr); |
1606 } | 1606 } |
1607 | 1607 |
1608 | 1608 |
1609 LInstruction* LChunkBuilder::DoCompareIDAndBranch( | 1609 LInstruction* LChunkBuilder::DoCompareNumericAndBranch( |
1610 HCompareIDAndBranch* instr) { | 1610 HCompareNumericAndBranch* instr) { |
1611 Representation r = instr->representation(); | 1611 Representation r = instr->representation(); |
1612 if (r.IsSmiOrInteger32()) { | 1612 if (r.IsSmiOrInteger32()) { |
1613 ASSERT(instr->left()->representation().IsSmiOrInteger32()); | 1613 ASSERT(instr->left()->representation().IsSmiOrInteger32()); |
1614 ASSERT(instr->left()->representation().Equals( | 1614 ASSERT(instr->left()->representation().Equals( |
1615 instr->right()->representation())); | 1615 instr->right()->representation())); |
1616 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); | 1616 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); |
1617 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); | 1617 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); |
1618 return new(zone()) LCmpIDAndBranch(left, right); | 1618 return new(zone()) LCompareNumericAndBranch(left, right); |
1619 } else { | 1619 } else { |
1620 ASSERT(r.IsDouble()); | 1620 ASSERT(r.IsDouble()); |
1621 ASSERT(instr->left()->representation().IsDouble()); | 1621 ASSERT(instr->left()->representation().IsDouble()); |
1622 ASSERT(instr->right()->representation().IsDouble()); | 1622 ASSERT(instr->right()->representation().IsDouble()); |
1623 LOperand* left = UseRegisterAtStart(instr->left()); | 1623 LOperand* left = UseRegisterAtStart(instr->left()); |
1624 LOperand* right = UseRegisterAtStart(instr->right()); | 1624 LOperand* right = UseRegisterAtStart(instr->right()); |
1625 return new(zone()) LCmpIDAndBranch(left, right); | 1625 return new(zone()) LCompareNumericAndBranch(left, right); |
1626 } | 1626 } |
1627 } | 1627 } |
1628 | 1628 |
1629 | 1629 |
1630 LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( | 1630 LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( |
1631 HCompareObjectEqAndBranch* instr) { | 1631 HCompareObjectEqAndBranch* instr) { |
1632 LOperand* left = UseRegisterAtStart(instr->left()); | 1632 LOperand* left = UseRegisterAtStart(instr->left()); |
1633 LOperand* right = UseRegisterAtStart(instr->right()); | 1633 LOperand* right = UseRegisterAtStart(instr->right()); |
1634 return new(zone()) LCmpObjectEqAndBranch(left, right); | 1634 return new(zone()) LCmpObjectEqAndBranch(left, right); |
1635 } | 1635 } |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 | 2563 |
2564 | 2564 |
2565 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2565 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2566 LOperand* object = UseRegister(instr->object()); | 2566 LOperand* object = UseRegister(instr->object()); |
2567 LOperand* index = UseRegister(instr->index()); | 2567 LOperand* index = UseRegister(instr->index()); |
2568 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2568 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2569 } | 2569 } |
2570 | 2570 |
2571 | 2571 |
2572 } } // namespace v8::internal | 2572 } } // namespace v8::internal |
OLD | NEW |