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

Unified Diff: pkg/compiler/lib/src/types/types.dart

Issue 1376113002: dart2js: Remove ConcreteTypeInference (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/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;
});
}
}
« no previous file with comments | « pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart ('k') | pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698