| Index: pkg/compiler/lib/src/ssa/graph_builder.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/graph_builder.dart b/pkg/compiler/lib/src/ssa/graph_builder.dart
|
| index 969899f617e6e1032d0ca4031d2e56906a95b95d..1c4c68973faa4310e27fda94835ffcc5c83a6cf5 100644
|
| --- a/pkg/compiler/lib/src/ssa/graph_builder.dart
|
| +++ b/pkg/compiler/lib/src/ssa/graph_builder.dart
|
| @@ -14,6 +14,25 @@ abstract class GraphBuilder {
|
| /// Holds the resulting SSA graph.
|
| final HGraph graph = new HGraph();
|
|
|
| + /// A stack of instructions.
|
| + ///
|
| + /// We build the SSA graph by simulating a stack machine.
|
| + List<HInstruction> stack = <HInstruction>[];
|
| +
|
| +
|
| + void push(HInstruction instruction) {
|
| + add(instruction);
|
| + stack.add(instruction);
|
| + }
|
| +
|
| + HInstruction pop() {
|
| + return stack.removeLast();
|
| + }
|
| +
|
| + void dup() {
|
| + stack.add(stack.last);
|
| + }
|
| +
|
| HBasicBlock _current;
|
|
|
| /// The current block to add instructions to. Might be null, if we are
|
|
|