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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1329743005: Abstract over the type system. (Closed) Base URL: git@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/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index d90b0918cd0338597fce1088f24ce85a9fe490f6..86c81a67966abd62f645772ee039e2f511bc9262 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -161,6 +161,11 @@ class AnalysisContextImpl implements InternalAnalysisContext {
TypeProvider _typeProvider;
/**
+ * The [TypeSystem] for this context, `null` if not yet created.
+ */
+ TypeSystem _typeSystem;
+
+ /**
* The controller for sending [SourcesChangedEvent]s.
*/
StreamController<SourcesChangedEvent> _onSourcesChangedController;
@@ -479,6 +484,14 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
@override
+ TypeSystem get typeSystem {
+ if (_typeSystem == null) {
+ _typeSystem = new TypeSystemImpl(typeProvider);
+ }
+ return _typeSystem;
+ }
+
+ @override
void addListener(AnalysisListener listener) {
if (!_listeners.contains(listener)) {
_listeners.add(listener);
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698