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

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

Issue 2863073003: Access NativeData only through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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 454d6f1f08678feb8cd7256a044933702ff2f2f4..7bb35eb5e267d5ea47199777e07755fc0fd1a6ee 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -191,7 +191,6 @@ class GlobalTypeInferenceResults {
// TODO(sigmund): store relevant data & drop reference to inference engine.
final TypeGraphInferrer _inferrer;
final ClosedWorld closedWorld;
- final Compiler _compiler;
final Map<Element, GlobalTypeInferenceElementResult> _elementResults = {};
GlobalTypeInferenceElementResult resultOfMember(MemberElement element) {
@@ -221,10 +220,10 @@ class GlobalTypeInferenceResults {
: element;
bool isJsInterop = false;
if (element is MemberElement) {
- isJsInterop = _compiler.backend.nativeData.isJsInteropMember(element);
+ isJsInterop = closedWorld.nativeData.isJsInteropMember(element);
} else if (element is ClassElement) {
// TODO(johnniwinther): Can we meet classes here?
- isJsInterop = _compiler.backend.nativeData.isJsInteropClass(element);
+ isJsInterop = closedWorld.nativeData.isJsInteropClass(element);
}
return _elementResults.putIfAbsent(
element,
@@ -237,7 +236,7 @@ class GlobalTypeInferenceResults {
}
GlobalTypeInferenceResults(
- this._inferrer, this._compiler, this.closedWorld, TypeSystem types);
+ this._inferrer, this.closedWorld, TypeSystem types);
TypeMask get dynamicType => closedWorld.commonMasks.dynamicType;
@@ -279,7 +278,7 @@ class GlobalTypeInferenceTask extends CompilerTask {
new TypeGraphInferrer(compiler, closedWorld, closedWorldRefiner);
typesInferrerInternal.analyzeMain(mainElement);
typesInferrerInternal.clear();
- results = new GlobalTypeInferenceResults(typesInferrerInternal, compiler,
+ results = new GlobalTypeInferenceResults(typesInferrerInternal,
closedWorld, typesInferrerInternal.inferrer.types);
});
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | pkg/compiler/lib/src/universe/element_world_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698