OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 void HAccessArgumentsAt::PrintDataTo(StringStream* stream) { | 679 void HAccessArgumentsAt::PrintDataTo(StringStream* stream) { |
680 arguments()->PrintNameTo(stream); | 680 arguments()->PrintNameTo(stream); |
681 stream->Add("["); | 681 stream->Add("["); |
682 index()->PrintNameTo(stream); | 682 index()->PrintNameTo(stream); |
683 stream->Add("], length "); | 683 stream->Add("], length "); |
684 length()->PrintNameTo(stream); | 684 length()->PrintNameTo(stream); |
685 } | 685 } |
686 | 686 |
687 | 687 |
688 void HControlInstruction::PrintDataTo(StringStream* stream) { | 688 void HControlInstruction::PrintDataTo(StringStream* stream) { |
689 if (FirstSuccessor() != NULL) { | 689 stream->Add(" goto ("); |
690 int first_id = FirstSuccessor()->block_id(); | 690 bool first_block = true; |
691 if (SecondSuccessor() == NULL) { | 691 for (HSuccessorIterator it(this); !it.Done(); it.Advance()) { |
692 stream->Add(" B%d", first_id); | 692 stream->Add(first_block ? "B%d" : ", B%d", it.Current()->block_id()); |
693 } else { | 693 first_block = false; |
694 int second_id = SecondSuccessor()->block_id(); | |
695 stream->Add(" goto (B%d, B%d)", first_id, second_id); | |
696 } | |
697 } | 694 } |
| 695 stream->Add(")"); |
698 } | 696 } |
699 | 697 |
700 | 698 |
701 void HUnaryControlInstruction::PrintDataTo(StringStream* stream) { | 699 void HUnaryControlInstruction::PrintDataTo(StringStream* stream) { |
702 value()->PrintNameTo(stream); | 700 value()->PrintNameTo(stream); |
703 HControlInstruction::PrintDataTo(stream); | 701 HControlInstruction::PrintDataTo(stream); |
704 } | 702 } |
705 | 703 |
706 | 704 |
| 705 void HReturn::PrintDataTo(StringStream* stream) { |
| 706 value()->PrintNameTo(stream); |
| 707 } |
| 708 |
| 709 |
707 void HCompareMap::PrintDataTo(StringStream* stream) { | 710 void HCompareMap::PrintDataTo(StringStream* stream) { |
708 value()->PrintNameTo(stream); | 711 value()->PrintNameTo(stream); |
709 stream->Add(" (%p)", *map()); | 712 stream->Add(" (%p)", *map()); |
710 HControlInstruction::PrintDataTo(stream); | 713 HControlInstruction::PrintDataTo(stream); |
711 } | 714 } |
712 | 715 |
713 | 716 |
714 const char* HUnaryMathOperation::OpName() const { | 717 const char* HUnaryMathOperation::OpName() const { |
715 switch (op()) { | 718 switch (op()) { |
716 case kMathFloor: return "floor"; | 719 case kMathFloor: return "floor"; |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1782 | 1785 |
1783 | 1786 |
1784 void HCheckPrototypeMaps::Verify() { | 1787 void HCheckPrototypeMaps::Verify() { |
1785 HInstruction::Verify(); | 1788 HInstruction::Verify(); |
1786 ASSERT(HasNoUses()); | 1789 ASSERT(HasNoUses()); |
1787 } | 1790 } |
1788 | 1791 |
1789 #endif | 1792 #endif |
1790 | 1793 |
1791 } } // namespace v8::internal | 1794 } } // namespace v8::internal |
OLD | NEW |