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

Unified Diff: src/hydrogen-instructions.cc

Issue 6366002: Begin changing Hydrogen branch instructions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Rebase to HEAD> Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index b13bb0c4d837e8a89db632d9b139344e991c0261..867ea752e7f990f396a13d609ed0958aa792a404 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -570,34 +570,29 @@ void HCallConstantFunction::PrintDataTo(StringStream* stream) const {
}
-void HBranch::PrintDataTo(StringStream* stream) const {
- int first_id = FirstSuccessor()->block_id();
- int second_id = SecondSuccessor()->block_id();
- stream->Add("on ");
- value()->PrintNameTo(stream);
- stream->Add(" (B%d, B%d)", first_id, second_id);
-}
-
-
-void HCompareMapAndBranch::PrintDataTo(StringStream* stream) const {
- stream->Add("on ");
- value()->PrintNameTo(stream);
- stream->Add(" (%p)", *map());
-}
-
-
-void HGoto::PrintDataTo(StringStream* stream) const {
- stream->Add("B%d", FirstSuccessor()->block_id());
+void HControlInstruction::PrintDataTo(StringStream* stream) const {
+ if (FirstSuccessor() != NULL) {
+ int first_id = FirstSuccessor()->block_id();
+ if (SecondSuccessor() == NULL) {
+ stream->Add(" B%d", first_id);
+ } else {
+ int second_id = SecondSuccessor()->block_id();
+ stream->Add(" goto (B%d, B%d)", first_id, second_id);
+ }
+ }
}
-void HReturn::PrintDataTo(StringStream* stream) const {
+void HUnaryControlInstruction::PrintDataTo(StringStream* stream) const {
value()->PrintNameTo(stream);
+ HControlInstruction::PrintDataTo(stream);
}
-void HThrow::PrintDataTo(StringStream* stream) const {
+void HCompareMap::PrintDataTo(StringStream* stream) const {
value()->PrintNameTo(stream);
+ stream->Add(" (%p)", *map());
+ HControlInstruction::PrintDataTo(stream);
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698