| Index: runtime/vm/flow_graph_builder.h
|
| diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
|
| index 3395428180f5ebf94d8a75939c355f6df1595d40..62a97b0b4021962f38f0d096d25420261be3998c 100644
|
| --- a/runtime/vm/flow_graph_builder.h
|
| +++ b/runtime/vm/flow_graph_builder.h
|
| @@ -114,7 +114,12 @@ class EffectGraphVisitor : public AstNodeVisitor {
|
|
|
| // Append a graph fragment to this graph. Assumes this graph is open.
|
| void Append(const EffectGraphVisitor& other_fragment);
|
| - // Append a single instruction. Assumes this graph is open.
|
| + // Append a computation with one use. Assumes this graph is open.
|
| + UseVal* Bind(Computation* computation);
|
| + // Append a computation with no uses. Assumes this graph is open.
|
| + void Do(Computation* computation);
|
| + // Append a single (non-Bind, non-Do) instruction. Assumes this graph is
|
| + // open.
|
| void AddInstruction(Instruction* instruction);
|
|
|
| // Append a 'diamond' branch and join to this graph, depending on which
|
| @@ -140,7 +145,7 @@ class EffectGraphVisitor : public AstNodeVisitor {
|
| // Creates an instantiated type argument vector used in preparation of an
|
| // allocation call.
|
| // May be called only if allocating an object of a parameterized class.
|
| - BindInstr* BuildInstantiatedTypeArguments(
|
| + Value* BuildInstantiatedTypeArguments(
|
| intptr_t token_pos,
|
| const AbstractTypeArguments& type_arguments);
|
|
|
| @@ -196,7 +201,7 @@ class EffectGraphVisitor : public AstNodeVisitor {
|
| virtual void CompiletimeStringInterpolation(const Function& interpol_func,
|
| const Array& literals);
|
|
|
| - BindInstr* BuildObjectAllocation(ConstructorCallNode* node);
|
| + Value* BuildObjectAllocation(ConstructorCallNode* node);
|
| void BuildConstructorCall(ConstructorCallNode* node, Value* alloc_value);
|
|
|
| void BuildStoreContext(const LocalVariable& variable);
|
| @@ -212,7 +217,7 @@ class EffectGraphVisitor : public AstNodeVisitor {
|
| // Specify a computation as the final result. Adds a Do instruction to
|
| // the graph, but normally overridden in subclasses.
|
| virtual void ReturnComputation(Computation* computation) {
|
| - AddInstruction(new DoInstr(computation));
|
| + Do(computation);
|
| }
|
|
|
| // Shared global state.
|
| @@ -267,9 +272,7 @@ class ValueGraphVisitor : public EffectGraphVisitor {
|
| // the graph and returns its temporary value (i.e., set the output
|
| // parameters).
|
| virtual void ReturnComputation(Computation* computation) {
|
| - BindInstr* defn = new BindInstr(computation);
|
| - AddInstruction(defn);
|
| - ReturnValue(new UseVal(defn));
|
| + ReturnValue(Bind(computation));
|
| }
|
|
|
| virtual void CompiletimeStringInterpolation(const Function& interpol_func,
|
|
|