Chromium Code Reviews| 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 acb23bf4450d6b7e73450431b18f4396f390b065..2b6ad91e4a4f48b7db0c98cb7e9ca95205536f18 100644 |
| --- a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
| +++ b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
| @@ -253,6 +253,9 @@ class StatementRewriter extends Transformer implements Pass { |
| bool hasUnsafeVariableUse(Expression node) { |
| bool wasFound = false; |
| VariableUseVisitor.visit(node, (VariableUse use) { |
| + if (dominatingAssignments[use.variable] == null) { |
| + print('${use} ${use.variable} ${dominatingAssignments}'); |
| + } |
|
asgerf
2016/01/26 10:30:00
Debug code.
I'm guessing the this was related to
sra1
2016/01/26 22:21:08
Removed. Yes, you guessed right.
|
| if (dominatingAssignments[use.variable] > 1) { |
| wasFound = true; |
| } |
| @@ -372,6 +375,7 @@ class StatementRewriter extends Transformer implements Pass { |
| exp is CreateInvocationMirror || |
| exp is CreateInstance || |
| exp is CreateBox || |
| + exp is TypeExpression || |
| exp is GetStatic && exp.element.isFunction || |
| exp is Interceptor || |
| exp is ApplyBuiltinOperator || |
| @@ -823,6 +827,9 @@ class StatementRewriter extends Transformer implements Pass { |
| Expression visitCreateInstance(CreateInstance node) { |
| _rewriteList(node.arguments); |
| + if (node.typeInformation != null) { |
| + node.typeInformation = visitExpression(node.typeInformation); |
| + } |
|
asgerf
2016/01/26 10:30:01
In this pass traversal of expressions is right-to-
sra1
2016/01/26 22:21:08
Done.
Interestingly, it makes no difference, perh
|
| return node; |
| } |