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

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 1700203002: Serialize and resynthesize unresolved identifiers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index eaec96768d94f9986982ae68ff0cbab38df02034..f6905647a083385498c531c9578b0ec42141bcac 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -439,13 +439,9 @@ class _ConstExprBuilder {
case UnlinkedConstOperation.pushReference:
EntityRef ref = uc.references[refPtr++];
_ReferenceInfo info = resynthesizer.referenceInfos[ref.reference];
- if (info.element != null) {
- SimpleIdentifier node = AstFactory.identifier3(info.name);
- node.staticElement = info.element;
- _push(node);
- } else {
- throw new StateError('Unsupported reference ${ref.toMap()}');
- }
+ SimpleIdentifier node = AstFactory.identifier3(info.name);
+ node.staticElement = info.element;
+ _push(node);
break;
case UnlinkedConstOperation.invokeConstructor:
_pushInstanceCreation();
@@ -1844,7 +1840,7 @@ class _LibraryResynthesizer {
int numTypeParameters = linkedReference.numTypeParameters;
if (linkedReference.kind == ReferenceKind.unresolved) {
type = summaryResynthesizer.typeProvider.undefinedType;
- element = type.element;
+ element = null;
} else if (name == 'dynamic') {
type = summaryResynthesizer.typeProvider.dynamicType;
element = type.element;
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698