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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library tree_ir_nodes; 5 library tree_ir_nodes;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../constants/values.dart' as values; 8 import '../constants/values.dart' as values;
9 import '../dart_types.dart' show DartType, GenericType, TypeVariableType; 9 import '../dart_types.dart' show DartType, GenericType, TypeVariableType;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 /// Number of places where this variable occurs in a [VariableUse]. 109 /// Number of places where this variable occurs in a [VariableUse].
110 int readCount = 0; 110 int readCount = 0;
111 111
112 /// Number of places where this variable occurs as: 112 /// Number of places where this variable occurs as:
113 /// - left-hand of an [Assign] 113 /// - left-hand of an [Assign]
114 /// - left-hand of a [FunctionDeclaration] 114 /// - left-hand of a [FunctionDeclaration]
115 /// - parameter in a [FunctionDefinition] 115 /// - parameter in a [FunctionDefinition]
116 /// - catch parameter in a [Try] 116 /// - catch parameter in a [Try]
117 int writeCount = 0; 117 int writeCount = 0;
118 118
119 /// True if a nested function reads or writes this variable.
120 ///
121 /// Always false in JS-mode because closure conversion eliminated nested
122 /// functions.
123 bool isCaptured = false;
124
119 Variable(this.host, this.element) { 125 Variable(this.host, this.element) {
120 assert(host != null); 126 assert(host != null);
121 } 127 }
122 } 128 }
123 129
124 /// Read the value of a variable. 130 /// Read the value of a variable.
125 class VariableUse extends Expression { 131 class VariableUse extends Expression {
126 Variable variable; 132 Variable variable;
127 133
128 /// Creates a use of [variable] and updates its `readCount`. 134 /// Creates a use of [variable] and updates its `readCount`.
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 } 1038 }
1033 1039
1034 visitReifyRuntimeType(ReifyRuntimeType node) { 1040 visitReifyRuntimeType(ReifyRuntimeType node) {
1035 visitExpression(node.value); 1041 visitExpression(node.value);
1036 } 1042 }
1037 1043
1038 visitReadTypeVariable(ReadTypeVariable node) { 1044 visitReadTypeVariable(ReadTypeVariable node) {
1039 visitExpression(node.target); 1045 visitExpression(node.target);
1040 } 1046 }
1041 } 1047 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698