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 '../common/names.dart'; | 9 import '../common/names.dart'; |
10 import '../constants/constructors.dart'; | 10 import '../constants/constructors.dart'; |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 /// Returns the [FunctionType] of the [node]. | 38 /// Returns the [FunctionType] of the [node]. |
39 FunctionType getFunctionType(ir.FunctionNode node); | 39 FunctionType getFunctionType(ir.FunctionNode node); |
40 | 40 |
41 /// Returns the list of [DartType]s corresponding to [types]. | 41 /// Returns the list of [DartType]s corresponding to [types]. |
42 List<DartType> getDartTypes(List<ir.DartType> types); | 42 List<DartType> getDartTypes(List<ir.DartType> types); |
43 | 43 |
44 /// Returns the [InterfaceType] corresponding to [type]. | 44 /// Returns the [InterfaceType] corresponding to [type]. |
45 InterfaceType getInterfaceType(ir.InterfaceType type); | 45 InterfaceType getInterfaceType(ir.InterfaceType type); |
46 | 46 |
47 /// Returns the 'this type' of [cls]. That is, the instantiation of [cls] | |
48 /// where the type arguments are the type variables of [cls]. | |
49 InterfaceType getThisType(ClassEntity cls); | |
50 | |
51 /// Return the [InterfaceType] corresponding to the [cls] with the given | 47 /// Return the [InterfaceType] corresponding to the [cls] with the given |
52 /// [typeArguments]. | 48 /// [typeArguments]. |
53 InterfaceType createInterfaceType( | 49 InterfaceType createInterfaceType( |
54 ir.Class cls, List<ir.DartType> typeArguments); | 50 ir.Class cls, List<ir.DartType> typeArguments); |
55 | 51 |
56 /// Returns the [CallStructure] corresponding to the [arguments]. | 52 /// Returns the [CallStructure] corresponding to the [arguments]. |
57 CallStructure getCallStructure(ir.Arguments arguments); | 53 CallStructure getCallStructure(ir.Arguments arguments); |
58 | 54 |
59 /// Returns the [Selector] corresponding to the invocation or getter/setter | 55 /// Returns the [Selector] corresponding to the invocation or getter/setter |
60 /// access of [node]. | 56 /// access of [node]. |
(...skipping 18 matching lines...) Expand all Loading... |
79 /// | 75 /// |
80 /// Kernel will say that C()'s super initializer resolves to Object(), but | 76 /// Kernel will say that C()'s super initializer resolves to Object(), but |
81 /// this function will return an entity representing the unnamed mixin | 77 /// this function will return an entity representing the unnamed mixin |
82 /// application "Object+M"'s constructor. | 78 /// application "Object+M"'s constructor. |
83 ConstructorEntity getSuperConstructor( | 79 ConstructorEntity getSuperConstructor( |
84 ir.Constructor constructor, ir.Member target); | 80 ir.Constructor constructor, ir.Member target); |
85 | 81 |
86 /// Returns the [MemberEntity] corresponding to the member [node]. | 82 /// Returns the [MemberEntity] corresponding to the member [node]. |
87 MemberEntity getMember(ir.Member node); | 83 MemberEntity getMember(ir.Member node); |
88 | 84 |
| 85 /// Returns the kernel IR node that defines the [member]. |
| 86 ir.Member getMemberNode(MemberEntity member); |
| 87 |
89 /// Returns the [FunctionEntity] corresponding to the procedure [node]. | 88 /// Returns the [FunctionEntity] corresponding to the procedure [node]. |
90 FunctionEntity getMethod(ir.Procedure node); | 89 FunctionEntity getMethod(ir.Procedure node); |
91 | 90 |
92 /// Returns the super [MemberEntity] for a super invocation, get or set of | 91 /// Returns the super [MemberEntity] for a super invocation, get or set of |
93 /// [name] from the member [context]. | 92 /// [name] from the member [context]. |
94 /// | 93 /// |
95 /// The IR doesn't always resolve super accesses to the corresponding | 94 /// The IR doesn't always resolve super accesses to the corresponding |
96 /// [target]. If not, the target is computed using [name] and [setter] from | 95 /// [target]. If not, the target is computed using [name] and [setter] from |
97 /// the enclosing class of [context]. | 96 /// the enclosing class of [context]. |
98 MemberEntity getSuperMember(ir.Member context, ir.Name name, ir.Member target, | 97 MemberEntity getSuperMember(ir.Member context, ir.Name name, ir.Member target, |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 | 1036 |
1038 /// Returns the [JumpTarget] for the branch in [node]. | 1037 /// Returns the [JumpTarget] for the branch in [node]. |
1039 // TODO(johnniwinther): Split this by kind of [node]? | 1038 // TODO(johnniwinther): Split this by kind of [node]? |
1040 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}); | 1039 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}); |
1041 | 1040 |
1042 /// Returns the [LoopClosureRepresentationInfo] for the loop [node] in | 1041 /// Returns the [LoopClosureRepresentationInfo] for the loop [node] in |
1043 /// [closureClassMaps]. | 1042 /// [closureClassMaps]. |
1044 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop( | 1043 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop( |
1045 ClosureDataLookup closureLookup, ir.TreeNode node); | 1044 ClosureDataLookup closureLookup, ir.TreeNode node); |
1046 } | 1045 } |
OLD | NEW |