Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 7114004: Add support for hydrogen control instructions with >2 successor blocks. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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.HasNext(); it.Advance()) {
692 stream->Add(" B%d", first_id); 692 stream->Add(first_block ? "B%d" : ", B%d", it.Next()->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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 1772
1770 1773
1771 void HCheckPrototypeMaps::Verify() { 1774 void HCheckPrototypeMaps::Verify() {
1772 HInstruction::Verify(); 1775 HInstruction::Verify();
1773 ASSERT(HasNoUses()); 1776 ASSERT(HasNoUses());
1774 } 1777 }
1775 1778
1776 #endif 1779 #endif
1777 1780
1778 } } // namespace v8::internal 1781 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698