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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1036723002: Move "null2" getter from ConstantVisitor to TypeProvider. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 17ec9deae4a325040010b6e846b84d5ff5be0488..7f95837e3f6013fef643c424ed115f52fc1df7ee 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -13172,6 +13172,11 @@ abstract class TypeProvider {
InterfaceType get mapType;
/**
+ * Return a [DartObjectImpl] representing the `null` object.
+ */
+ DartObjectImpl get nullObject;
+
+ /**
* Return the type representing the built-in type 'Null'.
*
* @return the type representing the built-in type 'null'
@@ -13312,6 +13317,11 @@ class TypeProviderImpl implements TypeProvider {
InterfaceType _mapType;
/**
+ * An shared object representing the value 'null'.
+ */
+ DartObjectImpl _nullObject;
+
+ /**
* The type representing the type 'Null'.
*/
InterfaceType _nullType;
@@ -13425,6 +13435,14 @@ class TypeProviderImpl implements TypeProvider {
InterfaceType get mapType => _mapType;
@override
+ DartObjectImpl get nullObject {
+ if (_nullObject == null) {
+ _nullObject = new DartObjectImpl(nullType, NullState.NULL_STATE);
+ }
+ return _nullObject;
+ }
+
+ @override
InterfaceType get nullType => _nullType;
@override
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | pkg/analyzer/lib/src/generated/testing/test_type_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698