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

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

Issue 1088493002: Assignment expressions in tree IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments Created 5 years, 8 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_nodes.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_integrity.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
index 8829e70d2d5875c252d265b02ee184cb703ac2f1..20225c932f89b0efb76ce4f5d9d1d4bceaae83ab 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
@@ -65,17 +65,16 @@ class CheckTreeIntegrity extends RecursiveVisitor {
read(node.variable);
}
- visitAssign(Assign node) {
+ visitVariableDeclaration(VariableDeclaration node) {
visitExpression(node.value);
- if (node.isDeclaration) {
- declare(node.variable);
- } else {
- write(node.variable);
- }
+ declare(node.variable);
visitStatement(node.next);
- if (node.isDeclaration) {
- undeclare(node.variable);
- }
+ undeclare(node.variable);
+ }
+
+ visitAssign(Assign node) {
+ visitExpression(node.value);
+ write(node.variable);
}
visitTry(Try node) {
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698