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

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

Issue 980853002: dart2dart: Bugfix in copy propagator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 9 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/tree_ir/tree_ir_builder.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
index 7272c896c8ff365de5e08359a62d4e30cd8d4611..2e2d46287eb762eb5620915d05e9c28d56c9471d 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
@@ -116,6 +116,12 @@ class Variable extends Node {
/// - catch parameter in a [Try]
int writeCount = 0;
+ /// True if a nested function reads or writes this variable.
+ ///
+ /// Always false in JS-mode because closure conversion eliminated nested
+ /// functions.
+ bool isCaptured = false;
+
Variable(this.host, this.element) {
assert(host != null);
}
@@ -518,7 +524,7 @@ class Continue extends Jump {
class Assign extends Statement {
Statement next;
Variable variable;
- Expression definition;
+ Expression value;
/// If true, this assignes to a fresh variable scoped to the [next]
/// statement.
@@ -527,7 +533,7 @@ class Assign extends Statement {
bool isDeclaration;
/// Creates an assignment to [variable] and updates its `writeCount`.
- Assign(this.variable, this.definition, this.next,
+ Assign(this.variable, this.value, this.next,
{ this.isDeclaration: false }) {
variable.writeCount++;
}
@@ -962,7 +968,7 @@ class RecursiveVisitor extends Visitor {
}
visitAssign(Assign node) {
- visitExpression(node.definition);
+ visitExpression(node.value);
visitVariable(node.variable);
visitStatement(node.next);
}
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_builder.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