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/errors.dart'; | 7 import 'package:front_end/src/fasta/errors.dart'; |
8 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'; | 8 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'; |
9 import 'package:front_end/src/fasta/type_inference/type_inference_listener.dart'
; | 9 import 'package:front_end/src/fasta/type_inference/type_inference_listener.dart'
; |
10 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart'; | 10 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart'; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 final overrides = <Procedure>[]; | 114 final overrides = <Procedure>[]; |
115 | 115 |
116 MethodNode(this.procedure); | 116 MethodNode(this.procedure); |
117 | 117 |
118 @override | 118 @override |
119 String toString() => procedure.toString(); | 119 String toString() => procedure.toString(); |
120 } | 120 } |
121 | 121 |
122 /// Keeps track of the global state for the type inference that occurs outside | 122 /// Keeps track of the global state for the type inference that occurs outside |
123 /// of method bodies and initalizers. | 123 /// of method bodies and initializers. |
124 /// | 124 /// |
125 /// This class describes the interface for use by clients of type inference | 125 /// This class describes the interface for use by clients of type inference |
126 /// (e.g. DietListener). Derived classes should derive from | 126 /// (e.g. DietListener). Derived classes should derive from |
127 /// [TypeInferenceEngineImpl]. | 127 /// [TypeInferenceEngineImpl]. |
128 abstract class TypeInferenceEngine { | 128 abstract class TypeInferenceEngine { |
129 ClassHierarchy get classHierarchy; | 129 ClassHierarchy get classHierarchy; |
130 | 130 |
131 CoreTypes get coreTypes; | 131 CoreTypes get coreTypes; |
132 | 132 |
133 /// Creates a type inferrer for use inside of a method body declared in a file | 133 /// Creates a type inferrer for use inside of a method body declared in a file |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 } | 616 } |
617 | 617 |
618 @override | 618 @override |
619 void evaluateScc(List<AccessorNode> scc) { | 619 void evaluateScc(List<AccessorNode> scc) { |
620 // Mark every accessor as part of a circularity. | 620 // Mark every accessor as part of a circularity. |
621 for (var f in scc) { | 621 for (var f in scc) { |
622 f._typeInferenceEngine.inferAccessorCircular(f); | 622 f._typeInferenceEngine.inferAccessorCircular(f); |
623 } | 623 } |
624 } | 624 } |
625 } | 625 } |
OLD | NEW |