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

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

Issue 2301293002: kernel -> ssa: implement if-statements (Closed)
Patch Set: add visitNot 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698