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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'package:front_end/src/base/instrumentation.dart'; | 5 import 'package:front_end/src/base/instrumentation.dart'; |
6 import 'package:front_end/src/dependency_walker.dart' as dependencyWalker; | 6 import 'package:front_end/src/dependency_walker.dart' as dependencyWalker; |
7 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart'; | 7 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart'; |
8 import 'package:kernel/ast.dart' show DartType, DynamicType; | 8 import 'package:kernel/ast.dart' show DartType, DynamicType; |
9 import 'package:kernel/class_hierarchy.dart'; | 9 import 'package:kernel/class_hierarchy.dart'; |
10 import 'package:kernel/core_types.dart'; | 10 import 'package:kernel/core_types.dart'; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 final fieldNodes = <FieldNode<F>>[]; | 91 final fieldNodes = <FieldNode<F>>[]; |
92 | 92 |
93 @override | 93 @override |
94 CoreTypes coreTypes; | 94 CoreTypes coreTypes; |
95 | 95 |
96 @override | 96 @override |
97 ClassHierarchy classHierarchy; | 97 ClassHierarchy classHierarchy; |
98 | 98 |
99 TypeInferenceEngineImpl(this.instrumentation, this.strongMode); | 99 TypeInferenceEngineImpl(this.instrumentation, this.strongMode); |
100 | 100 |
101 /// Cleares the initializer of [field]. | 101 /// Clears the initializer of [field]. |
102 void clearFieldInitializer(F field); | 102 void clearFieldInitializer(F field); |
103 | 103 |
104 /// Creates a [FieldNode] to track dependencies of the given [field]. | 104 /// Creates a [FieldNode] to track dependencies of the given [field]. |
105 FieldNode<F> createFieldNode(F field); | 105 FieldNode<F> createFieldNode(F field); |
106 | 106 |
107 /// Queries whether the given [field] has an initializer. | 107 /// Queries whether the given [field] has an initializer. |
108 bool fieldHasInitializer(F field); | 108 bool fieldHasInitializer(F field); |
109 | 109 |
110 @override | 110 @override |
111 void finishTopLevel() { | 111 void finishTopLevel() { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 @override | 198 @override |
199 void evaluateScc(List<FieldNode<F>> scc) { | 199 void evaluateScc(List<FieldNode<F>> scc) { |
200 for (var f in scc) { | 200 for (var f in scc) { |
201 f._typeInferenceEngine.inferFieldCircular(f._field); | 201 f._typeInferenceEngine.inferFieldCircular(f._field); |
202 } | 202 } |
203 for (var f in scc) { | 203 for (var f in scc) { |
204 f._typeInferenceEngine.inferField(f._field); | 204 f._typeInferenceEngine.inferField(f._field); |
205 } | 205 } |
206 } | 206 } |
207 } | 207 } |
OLD | NEW |