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

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

Issue 2569733002: Even less reliance on Compiler.closedWorld (Closed)
Patch Set: Updated cf. comments. Created 4 years 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
« no previous file with comments | « pkg/compiler/lib/src/types/masks.dart ('k') | pkg/compiler/lib/src/universe/world_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e36e7003ca7241e6567444ec4e93778ca81af5c7..200185b3882e61b3bc1f499c06c6871bd4a956d2 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -185,8 +185,8 @@ abstract class TypesInferrer {
class GlobalTypeInferenceResults {
// TODO(sigmund): store relevant data & drop reference to inference engine.
final TypeGraphInferrer _inferrer;
- final Compiler compiler;
- final TypeMask dynamicType;
+ final ClosedWorld closedWorld;
+ final Compiler _compiler;
final Map<Element, GlobalTypeInferenceElementResult> _elementResults = {};
// TODO(sigmund,johnniwinther): compute result objects eagerly and make it an
@@ -207,13 +207,14 @@ class GlobalTypeInferenceResults {
element,
_inferrer.inferrer.inTreeData[key],
_inferrer,
- compiler.backend.isJsInterop(element),
+ _compiler.backend.isJsInterop(element),
dynamicType));
}
- GlobalTypeInferenceResults(this._inferrer, this.compiler, CommonMasks masks,
- TypeInformationSystem types)
- : dynamicType = masks.dynamicType;
+ GlobalTypeInferenceResults(this._inferrer, this._compiler, this.closedWorld,
+ TypeInformationSystem types);
+
+ TypeMask get dynamicType => closedWorld.commonMasks.dynamicType;
/// Returns the type of a [selector] when applied to a receiver with the given
/// type [mask].
@@ -254,7 +255,7 @@ class GlobalTypeInferenceTask extends CompilerTask {
typesInferrerInternal.analyzeMain(mainElement);
typesInferrerInternal.clear();
results = new GlobalTypeInferenceResults(typesInferrerInternal, compiler,
- closedWorld.commonMasks, typesInferrerInternal.inferrer.types);
+ closedWorld, typesInferrerInternal.inferrer.types);
});
}
}
« no previous file with comments | « pkg/compiler/lib/src/types/masks.dart ('k') | pkg/compiler/lib/src/universe/world_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698