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

Unified Diff: runtime/vm/il_printer.cc

Issue 564843002: Initial steps towards cleaning up integer arithmetic IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
Index: runtime/vm/il_printer.cc
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 4afa845b3c62bd7995fa0d3e177a5442503d6ba7..1861aeb20c2fc5eb7940ae16a0281e48ff82b8f4 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -592,30 +592,20 @@ void ExtractNthOutputInstr::PrintOperandsTo(BufferFormatter* f) const {
}
-void BinarySmiOpInstr::PrintTo(BufferFormatter* f) const {
- Definition::PrintTo(f);
- f->Print(" %co", overflow_ ? '+' : '-');
- f->Print(" %ct", IsTruncating() ? '+' : '-');
-}
-
-
-void BinarySmiOpInstr::PrintOperandsTo(BufferFormatter* f) const {
+void UnaryIntegerOpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(op_kind()));
- left()->PrintTo(f);
- f->Print(", ");
- right()->PrintTo(f);
-}
-
-
-void BinaryInt32OpInstr::PrintTo(BufferFormatter* f) const {
- Definition::PrintTo(f);
- f->Print(" %co", overflow_ ? '+' : '-');
- f->Print(" %ct", IsTruncating() ? '+' : '-');
+ value()->PrintTo(f);
}
-void BinaryInt32OpInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, ", Token::Str(op_kind()));
+void BinaryIntegerOpInstr::PrintOperandsTo(BufferFormatter* f) const {
+ f->Print("%s", Token::Str(op_kind()));
+ if (is_truncating()) {
+ f->Print(" [tr]");
+ } else if (!can_overflow()) {
+ f->Print(" [-o]");
+ }
+ f->Print(", ");
left()->PrintTo(f);
f->Print(", ");
right()->PrintTo(f);
@@ -871,56 +861,6 @@ void BinaryInt32x4OpInstr::PrintOperandsTo(BufferFormatter* f) const {
}
-void BinaryMintOpInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, ", Token::Str(op_kind()));
- left()->PrintTo(f);
- f->Print(", ");
- right()->PrintTo(f);
-}
-
-
-void ShiftMintOpInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, ", Token::Str(op_kind()));
- left()->PrintTo(f);
- f->Print(", ");
- right()->PrintTo(f);
-}
-
-
-void UnaryMintOpInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, ", Token::Str(op_kind()));
- value()->PrintTo(f);
-}
-
-
-void BinaryUint32OpInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, ", Token::Str(op_kind()));
- left()->PrintTo(f);
- f->Print(", ");
- right()->PrintTo(f);
-}
-
-
-void ShiftUint32OpInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, ", Token::Str(op_kind()));
- left()->PrintTo(f);
- f->Print(", ");
- right()->PrintTo(f);
-}
-
-
-void UnaryUint32OpInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, ", Token::Str(op_kind()));
- value()->PrintTo(f);
-}
-
-
-void UnarySmiOpInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, ", Token::Str(op_kind()));
- value()->PrintTo(f);
-}
-
-
void UnaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(op_kind()));
value()->PrintTo(f);

Powered by Google App Engine
This is Rietveld 408576698