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

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: Cleanup small issues 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 c6a81da6671ef5838ad6e63fff9482d891d1e0f2..70c1568678c11a28f9a08e5f842f161c9516c121 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;
@@ -481,6 +486,14 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
@override
+ TypeSystem get typeSystem {
+ if (_typeSystem == null) {
+ _typeSystem = TypeSystem.create(this);
+ }
+ 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/constant.dart » ('j') | pkg/analyzer/lib/src/generated/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698