| OLD | NEW |
| 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, InterfaceType, TypeVaria
bleType; | 9 import '../dart_types.dart' show DartType, GenericType, InterfaceType, TypeVaria
bleType; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 * A call to a static function or getter/setter to a static field. | 166 * A call to a static function or getter/setter to a static field. |
| 167 * | 167 * |
| 168 * In contrast to the CPS-based IR, the arguments can be arbitrary expressions. | 168 * In contrast to the CPS-based IR, the arguments can be arbitrary expressions. |
| 169 */ | 169 */ |
| 170 class InvokeStatic extends Expression implements Invoke { | 170 class InvokeStatic extends Expression implements Invoke { |
| 171 final Entity target; | 171 final Entity target; |
| 172 final List<Expression> arguments; | 172 final List<Expression> arguments; |
| 173 final Selector selector; | 173 final Selector selector; |
| 174 final SourceInformation sourceInformation; | 174 final SourceInformation sourceInformation; |
| 175 | 175 |
| 176 /// True if the [target] is known not to diverge or read or write any |
| 177 /// mutable state. |
| 178 /// |
| 179 /// This is set for calls to `getInterceptor` and `identical` to indicate |
| 180 /// that they can be safely be moved across an impure expression |
| 181 /// (assuming the [arguments] are not affected by the impure expression). |
| 182 bool isEffectivelyConstant = false; |
| 183 |
| 176 InvokeStatic(this.target, this.selector, this.arguments, | 184 InvokeStatic(this.target, this.selector, this.arguments, |
| 177 {this.sourceInformation}); | 185 {this.sourceInformation}); |
| 178 | 186 |
| 179 accept(ExpressionVisitor visitor) => visitor.visitInvokeStatic(this); | 187 accept(ExpressionVisitor visitor) => visitor.visitInvokeStatic(this); |
| 180 accept1(ExpressionVisitor1 visitor, arg) { | 188 accept1(ExpressionVisitor1 visitor, arg) { |
| 181 return visitor.visitInvokeStatic(this, arg); | 189 return visitor.visitInvokeStatic(this, arg); |
| 182 } | 190 } |
| 183 } | 191 } |
| 184 | 192 |
| 185 /** | 193 /** |
| (...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 visitReadTypeVariable(ReadTypeVariable node) { | 1340 visitReadTypeVariable(ReadTypeVariable node) { |
| 1333 node.target = visitExpression(node.target); | 1341 node.target = visitExpression(node.target); |
| 1334 return node; | 1342 return node; |
| 1335 } | 1343 } |
| 1336 | 1344 |
| 1337 visitTypeExpression(TypeExpression node) { | 1345 visitTypeExpression(TypeExpression node) { |
| 1338 _replaceExpressions(node.arguments); | 1346 _replaceExpressions(node.arguments); |
| 1339 return node; | 1347 return node; |
| 1340 } | 1348 } |
| 1341 } | 1349 } |
| OLD | NEW |