Index: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
index 63d5f86ad2f1e3ab65decdc65f359bf6a657aff9..bd392df278f2492f3d1da50bd91357a9a6a8b287 100644 |
--- a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
+++ b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
@@ -1144,10 +1144,7 @@ class StatementRewriter extends Transformer implements Pass { |
// Some arguments will get inserted in a JS code template. The arguments |
// will not always be evaluated (e.g. the second placeholder in the template |
// '# && #'). |
- |
- // TODO(sra): Find out which tree_ir expressions are not nullable. It helps |
- // a lot with templates like '#.push(#)'. |
- bool isNullable(e) => true; |
+ bool isNullable(int position) => node.nullableArguments[position]; |
int safeArguments = |
PlaceholderSafetyAnalysis.analyze(node.codeTemplate.ast, isNullable); |