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

Unified Diff: runtime/vm/flow_graph.cc

Issue 10829451: Make Value not a subclass of Computation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased 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/flow_graph_builder.h » ('j') | runtime/vm/flow_graph_builder.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.cc
===================================================================
--- runtime/vm/flow_graph.cc (revision 11037)
+++ runtime/vm/flow_graph.cc (working copy)
@@ -271,8 +271,9 @@
}
// All locals are initialized with #null.
- Definition* null_defn = new BindInstr(BindInstr::kUsed,
- new ConstantVal(Object::ZoneHandle()));
+ Definition* null_defn =
+ new BindInstr(BindInstr::kUsed,
+ new MaterializeComp(new ConstantVal(Object::ZoneHandle())));
// The null definition should not appear in input positions.
ASSERT(null_defn->ssa_temp_index() == -1);
while (start_env.length() < variable_count()) {
@@ -291,8 +292,8 @@
// Helper to either use the constant value of a definition or the definition.
static Value* UseDefinition(Definition* defn) {
- if (defn->IsBind() && defn->AsBind()->computation()->IsConstant()) {
- return defn->AsBind()->computation()->AsConstant();
+ if (defn->IsBind() && defn->AsBind()->computation()->IsMaterialize()) {
+ return defn->AsBind()->computation()->AsMaterialize()->constant_val();
} else {
return new UseVal(defn);
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.h » ('j') | runtime/vm/flow_graph_builder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698