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

Unified Diff: runtime/vm/il_printer.cc

Issue 10894034: Make constants computations instead of values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 ae0fd0f8e9463ff27c5c29e46779394d9f69f80d..47552d6657bcd1842a0b619c24799c560857b57b 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -157,16 +157,11 @@ void UseVal::PrintTo(BufferFormatter* f) const {
}
-void ConstantVal::PrintTo(BufferFormatter* f) const {
+void ConstantComp::PrintOperandsTo(BufferFormatter* f) const {
f->Print("#%s", value().ToCString());
}
-void MaterializeComp::PrintOperandsTo(BufferFormatter* f) const {
- constant_val()->PrintTo(f);
-}
-
-
void AssertAssignableComp::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
f->Print(", %s, '%s'%s",
@@ -743,29 +738,11 @@ void JoinEntryInstr::PrintToVisualizer(BufferFormatter* f) const {
void PhiInstr::PrintToVisualizer(BufferFormatter* f) const {
f->Print("v%d [", ssa_temp_index());
- bool has_constant = false;
for (intptr_t i = 0; i < InputCount(); ++i) {
if (i > 0) f->Print(" ");
- if (InputAt(i)->IsConstant()) {
- f->Print("const");
- has_constant = true;
- } else {
- InputAt(i)->PrintTo(f);
- }
+ InputAt(i)->PrintTo(f);
}
f->Print("]");
- // The vizualizer file format does not allow arbitrary strings inside the phi.
- // Print constants as a line-end comment instead.
- if (has_constant) {
- f->Print("\"");
- for (intptr_t i = 0; i < InputCount(); ++i) {
- if (i > 0) f->Print(" ");
- if (InputAt(i)->IsConstant()) {
- InputAt(i)->PrintTo(f);
- }
- }
- f->Print("\"");
- }
}

Powered by Google App Engine
This is Rietveld 408576698