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

Unified Diff: pkg/compiler/lib/src/ssa/graph_builder.dart

Issue 2301293002: kernel -> ssa: implement if-statements (Closed)
Patch Set: Created 4 years, 3 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
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 1c4c68973faa4310e27fda94835ffcc5c83a6cf5..9d87ad808aaf7284e7bb8156f74dcbdc25a92e81 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.
@@ -29,6 +34,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'.
+ HBoolify popBoolified();
+
+ /// Pushes a boolean checking [expression] against null.
+ pushCheckNull(HInstruction expression);
+
void dup() {
stack.add(stack.last);
}

Powered by Google App Engine
This is Rietveld 408576698