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 17f3985ef2c1997a3214ba977a312c08aa5dc316..f7578f37c3ad1e10a755e8431bf0bd314c3b37b0 100644 |
--- a/pkg/compiler/lib/src/ssa/graph_builder.dart |
+++ b/pkg/compiler/lib/src/ssa/graph_builder.dart |
@@ -4,6 +4,8 @@ |
import '../elements/elements.dart'; |
import '../types/types.dart'; |
+ |
+import 'locals_handler.dart'; |
import 'nodes.dart'; |
/// Base class for objects that build up an SSA graph. |
@@ -14,6 +16,9 @@ abstract class GraphBuilder { |
/// Holds the resulting SSA graph. |
final HGraph graph = new HGraph(); |
+ /// Used to track the locals while building the graph. |
+ LocalsHandler localsHandler; |
+ |
/// A stack of instructions. |
/// |
/// We build the SSA graph by simulating a stack machine. |
@@ -28,6 +33,14 @@ abstract class GraphBuilder { |
return stack.removeLast(); |
} |
+ /// Pops the most recent instruction from the stack and 'boolifies' it. |
+ /// |
+ /// Boolification is checking if the value is '=== true'. |
+ HInstruction popBoolified(); |
+ |
+ /// Pushes a boolean checking [expression] against null. |
+ pushCheckNull(HInstruction expression); |
+ |
void dup() { |
stack.add(stack.last); |
} |