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

Unified Diff: runtime/vm/il_printer.cc

Issue 10823278: Use type propagation for removing Smi checks in binary operations and comparisons. Regis will adapt… (Closed) Base URL: http://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
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | runtime/vm/intermediate_language.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/il_printer.cc
===================================================================
--- runtime/vm/il_printer.cc (revision 10522)
+++ runtime/vm/il_printer.cc (working copy)
@@ -400,6 +400,17 @@
void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
f->Print("%2d: [graph]", block_id());
if (start_env_ != NULL) {
+ f->Print("\n{\n");
+ const GrowableArray<Value*>& values = start_env_->values();
+ for (intptr_t i = 0; i < values.length(); i++) {
+ if (values[i]->IsUse()) {
+ Definition* def = values[i]->AsUse()->definition();
+ f->Print(" ", i);
+ def->PrintTo(f);
+ f->Print("\n");
+ }
+ }
+ f->Print("} ");
start_env_->PrintTo(f);
}
}
@@ -421,6 +432,14 @@
}
+static void PrintPropagatedType(BufferFormatter* f, const Definition& def) {
+ if (def.HasPropagatedType()) {
+ String& name = String::Handle();
+ name = AbstractType::Handle(def.PropagatedType()).Name();
+ f->Print(" {PT: %s}", name.ToCString());
+ }
+}
+
void PhiInstr::PrintTo(BufferFormatter* f) const {
f->Print(" v%d <- phi(", ssa_temp_index());
for (intptr_t i = 0; i < inputs_.length(); ++i) {
@@ -428,6 +447,7 @@
if (i < inputs_.length() - 1) f->Print(", ");
}
f->Print(")");
+ PrintPropagatedType(f, *this);
}
@@ -461,6 +481,7 @@
f->Print(" t%d <- ", temp_index());
}
computation()->PrintTo(f);
+ PrintPropagatedType(f, *this);
}
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | runtime/vm/intermediate_language.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698