Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart

Issue 2942623004: Fuse top level type inference with dependency generation. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index 8b56013254df04d8b1776370edcafc7e7e46c82d..c390ac4a8fc1755ce3746c92951c20231ef82f54 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -199,6 +199,8 @@ abstract class TypeInferrerImpl extends TypeInferrer {
static final FunctionType _functionReturningDynamic =
new FunctionType(const [], const DynamicType());
+ final TypeInferenceEngineImpl engine;
+
@override
final String uri;
@@ -221,6 +223,11 @@ abstract class TypeInferrerImpl extends TypeInferrer {
final InterfaceType thisType;
+ /// The [FieldNode] whose initializer will be type inferred using this
+ /// [TypeInferrerImpl], or `null` if this [TypeInferrerImpl] will be used to
+ /// infer types outside the scope of a field initializer.
+ final FieldNode fieldNode;
+
/// Context information for the current closure, or `null` if we are not
/// inside a closure.
ClosureContext closureContext;
@@ -233,8 +240,8 @@ abstract class TypeInferrerImpl extends TypeInferrer {
List<FieldNode> _dryRunDependencies;
- TypeInferrerImpl(TypeInferenceEngineImpl engine, this.uri, this.listener,
- bool topLevel, this.thisType)
+ TypeInferrerImpl(this.engine, this.uri, this.listener, bool topLevel,
+ this.thisType, this.fieldNode)
: coreTypes = engine.coreTypes,
strongMode = engine.strongMode,
classHierarchy = engine.classHierarchy,

Powered by Google App Engine
This is Rietveld 408576698