| Index: pkg/compiler/lib/src/types/types.dart
|
| diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
|
| index 9858a6e1066fe8cf00ef8bb74d1b7450d263a506..3f9200c2682a37e76fb6386276bcd1adc18cc862 100644
|
| --- a/pkg/compiler/lib/src/types/types.dart
|
| +++ b/pkg/compiler/lib/src/types/types.dart
|
| @@ -15,8 +15,6 @@ import '../diagnostics/invariant.dart' show
|
| import '../diagnostics/spannable.dart' show
|
| NO_LOCATION_SPANNABLE;
|
| import '../elements/elements.dart';
|
| -import '../inferrer/concrete_types_inferrer.dart' show
|
| - ConcreteTypesInferrer;
|
| import '../inferrer/type_graph_inferrer.dart' show
|
| TypeGraphInferrer;
|
| import '../tree/tree.dart';
|
| @@ -64,15 +62,11 @@ class TypesTask extends CompilerTask {
|
| final String name = 'Type inference';
|
| final ClassWorld classWorld;
|
| TypesInferrer typesInferrer;
|
| - ConcreteTypesInferrer concreteTypesInferrer;
|
|
|
| TypesTask(Compiler compiler)
|
| : this.classWorld = compiler.world,
|
| super(compiler) {
|
| typesInferrer = new TypeGraphInferrer(compiler);
|
| - if (compiler.enableConcreteTypeInference) {
|
| - concreteTypesInferrer = new ConcreteTypesInferrer(compiler);
|
| - }
|
| }
|
|
|
| TypeMask dynamicTypeCache;
|
| @@ -284,15 +278,6 @@ class TypesTask extends CompilerTask {
|
| void onResolutionComplete(Element mainElement) {
|
| measure(() {
|
| typesInferrer.analyzeMain(mainElement);
|
| - if (concreteTypesInferrer != null) {
|
| - bool success = concreteTypesInferrer.analyzeMain(mainElement);
|
| - if (!success) {
|
| - // If the concrete type inference bailed out, we pretend it didn't
|
| - // happen. In the future we might want to record that it failed but
|
| - // use the partial results as hints.
|
| - concreteTypesInferrer = null;
|
| - }
|
| - }
|
| });
|
| typesInferrer.clear();
|
| }
|
| @@ -303,11 +288,7 @@ class TypesTask extends CompilerTask {
|
| TypeMask getGuaranteedTypeOfElement(Element element) {
|
| return measure(() {
|
| TypeMask guaranteedType = typesInferrer.getTypeOfElement(element);
|
| - return (concreteTypesInferrer == null)
|
| - ? guaranteedType
|
| - : intersection(guaranteedType,
|
| - concreteTypesInferrer.getTypeOfElement(element),
|
| - element);
|
| + return guaranteedType;
|
| });
|
| }
|
|
|
| @@ -315,11 +296,7 @@ class TypesTask extends CompilerTask {
|
| return measure(() {
|
| TypeMask guaranteedType =
|
| typesInferrer.getReturnTypeOfElement(element);
|
| - return (concreteTypesInferrer == null)
|
| - ? guaranteedType
|
| - : intersection(guaranteedType,
|
| - concreteTypesInferrer.getReturnTypeOfElement(element),
|
| - element);
|
| + return guaranteedType;
|
| });
|
| }
|
|
|
| @@ -330,11 +307,7 @@ class TypesTask extends CompilerTask {
|
| TypeMask getGuaranteedTypeOfNode(owner, node) {
|
| return measure(() {
|
| TypeMask guaranteedType = typesInferrer.getTypeOfNode(owner, node);
|
| - return (concreteTypesInferrer == null)
|
| - ? guaranteedType
|
| - : intersection(guaranteedType,
|
| - concreteTypesInferrer.getTypeOfNode(owner, node),
|
| - node);
|
| + return guaranteedType;
|
| });
|
| }
|
|
|
| @@ -345,12 +318,7 @@ class TypesTask extends CompilerTask {
|
| return measure(() {
|
| TypeMask guaranteedType =
|
| typesInferrer.getTypeOfSelector(selector, mask);
|
| - return (concreteTypesInferrer == null)
|
| - ? guaranteedType
|
| - : intersection(
|
| - guaranteedType,
|
| - concreteTypesInferrer.getTypeOfSelector(selector, mask),
|
| - selector);
|
| + return guaranteedType;
|
| });
|
| }
|
| }
|
|
|