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

Unified Diff: runtime/vm/flow_graph_builder.h

Issue 10228001: Turn more explicitly named temps into uses of definitions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.h
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index 9d50834e2e6cb487f002d198e3ceb4ee1b063746..eb1bfa22a7e2127791f407c7266e7dbbde5b3e15 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -251,8 +251,10 @@ class ValueGraphVisitor : public EffectGraphVisitor {
// the graph and returns its temporary value (i.e., set the output
// parameters).
virtual void ReturnComputation(Computation* computation) {
- AddInstruction(new BindInstr(temp_index(), computation));
- value_ = new TempVal(AllocateTempIndex());
+ BindInstr* defn = new BindInstr(temp_index(), computation);
+ AddInstruction(defn);
+ AllocateTempIndex();
+ value_ = new UseVal(defn);
}
virtual void CompiletimeStringInterpolation(const Function& interpol_func,
@@ -332,8 +334,9 @@ class TestGraphVisitor : public ValueGraphVisitor {
// Specify a computation as the final result. Adds a Bind instruction to
// the graph and branches on its value.
virtual void ReturnComputation(Computation* computation) {
- AddInstruction(new BindInstr(temp_index(), computation));
- ReturnValue(new TempVal(temp_index()));
+ BindInstr* defn = new BindInstr(temp_index(), computation);
+ AddInstruction(defn);
+ ReturnValue(new UseVal(defn));
}
// Output parameters.
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698