OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 // IrNodes are kept in a separate library to have precise control over their | 5 // IrNodes are kept in a separate library to have precise control over their |
6 // dependencies on other parts of the system. | 6 // dependencies on other parts of the system. |
7 library dart2js.ir_nodes; | 7 library dart2js.ir_nodes; |
8 | 8 |
9 import '../dart2jslib.dart' as dart2js show Constant, ConstructedConstant, | 9 import '../dart2jslib.dart' as dart2js show Constant, ConstructedConstant, |
10 StringConstant, ListConstant, MapConstant; | 10 StringConstant, ListConstant, MapConstant; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 bool get isFactory => target.isFactoryConstructor; | 223 bool get isFactory => target.isFactoryConstructor; |
224 | 224 |
225 InvokeConstructor(this.type, | 225 InvokeConstructor(this.type, |
226 this.target, | 226 this.target, |
227 this.selector, | 227 this.selector, |
228 Continuation cont, | 228 Continuation cont, |
229 List<Definition> args) | 229 List<Definition> args) |
230 : continuation = new Reference(cont), | 230 : continuation = new Reference(cont), |
231 arguments = _referenceList(args) { | 231 arguments = _referenceList(args) { |
232 assert(target.isErroneous || target.isConstructor); | 232 assert(target.isErroneous || target.isConstructor); |
233 assert((target.isErroneous && type.isDynamic) || | 233 assert(target.isErroneous || type.isDynamic || |
234 type.element == target.enclosingElement); | 234 type.element == target.enclosingElement); |
235 } | 235 } |
236 | 236 |
237 accept(Visitor visitor) => visitor.visitInvokeConstructor(this); | 237 accept(Visitor visitor) => visitor.visitInvokeConstructor(this); |
238 } | 238 } |
239 | 239 |
240 class AsCast extends Expression { | 240 class AsCast extends Expression { |
241 final Reference receiver; | 241 final Reference receiver; |
242 final DartType type; | 242 final DartType type; |
243 final Reference continuation; | 243 final Reference continuation; |
244 | 244 |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 for (int i = node.parameters.length - 1; i >= 0; --i) { | 866 for (int i = node.parameters.length - 1; i >= 0; --i) { |
867 release(node.parameters[i]); | 867 release(node.parameters[i]); |
868 } | 868 } |
869 } | 869 } |
870 | 870 |
871 void visitIsTrue(IsTrue node) { | 871 void visitIsTrue(IsTrue node) { |
872 visitReference(node.value); | 872 visitReference(node.value); |
873 } | 873 } |
874 | 874 |
875 } | 875 } |
OLD | NEW |