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

Unified Diff: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart

Issue 1637843002: typeInformation in CreateInstance is a kind of TypeExpression (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/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;
}

Powered by Google App Engine
This is Rietveld 408576698