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

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 918653002: Propagate pseudo-constants expressions separately in tree rewriter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 10 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/tree_ir_builder.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index 2f7e5fe7e2e94fdfd1e17765259374304641d032..3181b59be3448c22e0a9d4ccfecf4ca6c5606f53 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -87,7 +87,9 @@ class Builder extends cps_ir.Visitor<Node> {
if (reference.definition.host != currentElement) {
return parent.getMutableVariableReference(reference);
}
- return local2mutable[reference.definition];
+ Variable variable = local2mutable[reference.definition];
+ ++variable.readCount;
+ return variable;
}
/// Obtains the variable representing the given primitive. Returns null for
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698