OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
6 | 6 |
7 import '../closure.dart'; | 7 import '../closure.dart'; |
8 import '../common.dart'; | 8 import '../common.dart'; |
9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
10 import '../common_elements.dart'; | 10 import '../common_elements.dart'; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 enum MemberKind { | 203 enum MemberKind { |
204 // A regular member defined by an [ir.Node]. | 204 // A regular member defined by an [ir.Node]. |
205 regular, | 205 regular, |
206 // A constructor whose initializer is defined by an [ir.Constructor] node. | 206 // A constructor whose initializer is defined by an [ir.Constructor] node. |
207 constructor, | 207 constructor, |
208 // A constructor whose body is defined by an [ir.Constructor] node. | 208 // A constructor whose body is defined by an [ir.Constructor] node. |
209 constructorBody, | 209 constructorBody, |
210 // A closure class `call` method whose body is defined by an | 210 // A closure class `call` method whose body is defined by an |
211 // [ir.FunctionExpression]. | 211 // [ir.FunctionExpression]. |
212 closureCall, | 212 closureCall, |
| 213 // A field corresponding to a captured variable in the closure. It does not |
| 214 // have a corresponding ir.Node. |
| 215 closureField, |
213 } | 216 } |
214 | 217 |
215 /// Definition information for a [MemberEntity]. | 218 /// Definition information for a [MemberEntity]. |
216 abstract class MemberDefinition { | 219 abstract class MemberDefinition { |
217 /// The defined member. | 220 /// The defined member. |
218 MemberEntity get member; | 221 MemberEntity get member; |
219 | 222 |
220 /// The kind of the defined member. This determines the semantics of [node]. | 223 /// The kind of the defined member. This determines the semantics of [node]. |
221 MemberKind get kind; | 224 MemberKind get kind; |
222 | 225 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 /// [closureClassMaps]. | 424 /// [closureClassMaps]. |
422 CapturedLoopScope getCapturedLoopScope( | 425 CapturedLoopScope getCapturedLoopScope( |
423 ClosureDataLookup closureLookup, ir.TreeNode node); | 426 ClosureDataLookup closureLookup, ir.TreeNode node); |
424 } | 427 } |
425 | 428 |
426 /// Comparator for the canonical order or named arguments. | 429 /// Comparator for the canonical order or named arguments. |
427 // TODO(johnniwinther): Remove this when named parameters are sorted in dill. | 430 // TODO(johnniwinther): Remove this when named parameters are sorted in dill. |
428 int namedOrdering(ir.VariableDeclaration a, ir.VariableDeclaration b) { | 431 int namedOrdering(ir.VariableDeclaration a, ir.VariableDeclaration b) { |
429 return a.name.compareTo(b.name); | 432 return a.name.compareTo(b.name); |
430 } | 433 } |
OLD | NEW |