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 '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/names.dart'; | 8 import '../common/names.dart'; |
9 import '../constants/constructors.dart'; | 9 import '../constants/constructors.dart'; |
10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 /// application "Object+M"'s constructor. | 71 /// application "Object+M"'s constructor. |
72 ConstructorEntity getSuperConstructor( | 72 ConstructorEntity getSuperConstructor( |
73 ir.Constructor constructor, ir.Member target); | 73 ir.Constructor constructor, ir.Member target); |
74 | 74 |
75 /// Returns the [MemberEntity] corresponding to the member [node]. | 75 /// Returns the [MemberEntity] corresponding to the member [node]. |
76 MemberEntity getMember(ir.Member node); | 76 MemberEntity getMember(ir.Member node); |
77 | 77 |
78 /// Returns the [FunctionEntity] corresponding to the procedure [node]. | 78 /// Returns the [FunctionEntity] corresponding to the procedure [node]. |
79 FunctionEntity getMethod(ir.Procedure node); | 79 FunctionEntity getMethod(ir.Procedure node); |
80 | 80 |
| 81 /// Returns the super [MemberEntity] for a super invocation, get or set of |
| 82 /// [name] from the member [context]. |
| 83 /// |
| 84 /// The IR doesn't always resolve super accesses to the corresponding |
| 85 /// [target]. If not, the target is computed using [name] and [setter] from |
| 86 /// the enclosing class of [context]. |
| 87 MemberEntity getSuperMember(ir.Member context, ir.Name name, ir.Member target, |
| 88 {bool setter: false}); |
| 89 |
81 /// Returns the [FieldEntity] corresponding to the field [node]. | 90 /// Returns the [FieldEntity] corresponding to the field [node]. |
82 FieldEntity getField(ir.Field node); | 91 FieldEntity getField(ir.Field node); |
83 | 92 |
84 /// Returns the [ClassEntity] corresponding to the class [node]. | 93 /// Returns the [ClassEntity] corresponding to the class [node]. |
85 ClassEntity getClass(ir.Class node); | 94 ClassEntity getClass(ir.Class node); |
86 | 95 |
87 /// Returns the [Local] corresponding to the [node]. The node must be either | 96 /// Returns the [Local] corresponding to the [node]. The node must be either |
88 /// a [ir.FunctionDeclaration] or [ir.FunctionExpression]. | 97 /// a [ir.FunctionDeclaration] or [ir.FunctionExpression]. |
89 Local getLocalFunction(ir.TreeNode node); | 98 Local getLocalFunction(ir.TreeNode node); |
90 | 99 |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 } | 842 } |
834 if (isRedirecting) { | 843 if (isRedirecting) { |
835 return new RedirectingGenerativeConstantConstructor( | 844 return new RedirectingGenerativeConstantConstructor( |
836 defaultValues, superConstructorInvocation); | 845 defaultValues, superConstructorInvocation); |
837 } else { | 846 } else { |
838 return new GenerativeConstantConstructor( | 847 return new GenerativeConstantConstructor( |
839 type, defaultValues, fieldMap, superConstructorInvocation); | 848 type, defaultValues, fieldMap, superConstructorInvocation); |
840 } | 849 } |
841 } | 850 } |
842 } | 851 } |
OLD | NEW |