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

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

Issue 2378113004: Some kernel->ssa cleanups. (Closed)
Patch Set: fix import 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') | no next file » | 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 9898c6a96212c2b817c851af41b88b54a2160bbc..a6ef442029211640d91a884b05271e4dfd607ca0 100644
--- a/pkg/compiler/lib/src/ssa/graph_builder.dart
+++ b/pkg/compiler/lib/src/ssa/graph_builder.dart
@@ -4,9 +4,9 @@
import '../compiler.dart';
import '../elements/elements.dart';
+import '../js_backend/js_backend.dart';
import '../resolution/tree_elements.dart';
import '../types/types.dart';
-
import 'jump_handler.dart';
import 'locals_handler.dart';
import 'nodes.dart';
@@ -23,6 +23,9 @@ abstract class GraphBuilder {
/// A reference to the compiler.
Compiler compiler;
+ /// The JavaScript backend we are targeting in this compilation.
+ JavaScriptBackend get backend;
+
/// The tree elements for the element being built into an SSA graph.
TreeElements get elements;
@@ -58,7 +61,10 @@ abstract class GraphBuilder {
HInstruction popBoolified();
/// Pushes a boolean checking [expression] against null.
- pushCheckNull(HInstruction expression);
+ pushCheckNull(HInstruction expression) {
+ push(new HIdentity(
+ expression, graph.addConstantNull(compiler), null, backend.boolType));
+ }
void dup() {
stack.add(stack.last);
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698