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

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

Issue 2849213002: Add a strong mode implementation of LUB to fasta; use it to infer ?: (Closed)
Patch Set: Created 3 years, 8 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_inference_engine.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index 8f2519c3ef853c0405cecb89f8e99557bfee9c9e..286840c006220a507d4794dfe907784e00b00511 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -5,6 +5,7 @@
import 'package:front_end/src/base/instrumentation.dart';
import 'package:front_end/src/dependency_walker.dart' as dependencyWalker;
import 'package:front_end/src/fasta/type_inference/type_inferrer.dart';
+import 'package:front_end/src/fasta/type_inference/type_schema_environment.dart';
import 'package:kernel/ast.dart' show DartType, DynamicType;
import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/core_types.dart';
@@ -96,6 +97,8 @@ abstract class TypeInferenceEngineImpl<F> extends TypeInferenceEngine<F> {
@override
ClassHierarchy classHierarchy;
+ TypeSchemaEnvironment typeSchemaEnvironment;
+
TypeInferenceEngineImpl(this.instrumentation, this.strongMode);
/// Clears the initializer of [field].
@@ -174,6 +177,8 @@ abstract class TypeInferenceEngineImpl<F> extends TypeInferenceEngine<F> {
void prepareTopLevel(CoreTypes coreTypes, ClassHierarchy hierarchy) {
this.coreTypes = coreTypes;
this.classHierarchy = classHierarchy;
Bob Nystrom 2017/05/02 23:22:17 Drive-by: Is this correct? It's re-assigning the f
Paul Berry 2017/05/03 17:31:24 Oops! That's most certainly wrong. I'll fix in a
+ this.typeSchemaEnvironment =
+ new TypeSchemaEnvironment(coreTypes, hierarchy);
}
@override

Powered by Google App Engine
This is Rietveld 408576698