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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/engine.dart

Issue 19590006: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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_experimental/lib/src/generated/engine.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/engine.dart b/pkg/analyzer_experimental/lib/src/generated/engine.dart
index 8bc9ce1fc67bbd737666aef66d911ad11d8f92ec..d1658b195e8bd3adcaad3becfc453ebea28e286e 100644
--- a/pkg/analyzer_experimental/lib/src/generated/engine.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/engine.dart
@@ -1109,7 +1109,11 @@ class DartEntryImpl extends SourceEntryImpl implements DartEntry {
state = state._nextState;
}
;
- return CacheState.INVALID;
+ if (identical(descriptor, DartEntry.RESOLUTION_ERRORS) || identical(descriptor, DartEntry.RESOLVED_UNIT) || identical(descriptor, DartEntry.HINTS)) {
+ return CacheState.INVALID;
+ } else {
+ throw new IllegalArgumentException("Invalid descriptor: ${descriptor}");
+ }
}
Object getValue(DataDescriptor descriptor) {
if (identical(descriptor, DartEntry.ELEMENT)) {
@@ -1311,9 +1315,11 @@ class DartEntryImpl extends SourceEntryImpl implements DartEntry {
}
if (_parsedUnitState != CacheState.VALID) {
_parsedUnit = unit;
+ _parsedUnitState = CacheState.VALID;
}
if (_parseErrorsState != CacheState.VALID) {
_parseErrors = errors == null ? AnalysisError.NO_ERRORS : errors;
+ _parseErrorsState = CacheState.VALID;
}
}
void setState(DataDescriptor<Object> descriptor, CacheState state) {
@@ -4964,10 +4970,12 @@ class RecordingErrorListener implements AnalysisErrorListener {
*/
class ResolutionEraser extends GeneralizingASTVisitor<Object> {
Object visitAssignmentExpression(AssignmentExpression node) {
+ node.staticElement = null;
node.element = null;
return super.visitAssignmentExpression(node);
}
Object visitBinaryExpression(BinaryExpression node) {
+ node.staticElement = null;
node.element = null;
return super.visitBinaryExpression(node);
}
@@ -4980,6 +4988,7 @@ class ResolutionEraser extends GeneralizingASTVisitor<Object> {
return super.visitConstructorDeclaration(node);
}
Object visitConstructorName(ConstructorName node) {
+ node.staticElement = null;
node.element = null;
return super.visitConstructorName(node);
}
@@ -4997,34 +5006,42 @@ class ResolutionEraser extends GeneralizingASTVisitor<Object> {
return super.visitFunctionExpression(node);
}
Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+ node.staticElement = null;
node.element = null;
return super.visitFunctionExpressionInvocation(node);
}
Object visitIndexExpression(IndexExpression node) {
+ node.staticElement = null;
node.element = null;
return super.visitIndexExpression(node);
}
Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+ node.staticElement = null;
node.element = null;
return super.visitInstanceCreationExpression(node);
}
Object visitPostfixExpression(PostfixExpression node) {
+ node.staticElement = null;
node.element = null;
return super.visitPostfixExpression(node);
}
Object visitPrefixExpression(PrefixExpression node) {
+ node.staticElement = null;
node.element = null;
return super.visitPrefixExpression(node);
}
Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
+ node.staticElement = null;
node.element = null;
return super.visitRedirectingConstructorInvocation(node);
}
Object visitSimpleIdentifier(SimpleIdentifier node) {
+ node.staticElement = null;
node.element = null;
return super.visitSimpleIdentifier(node);
}
Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+ node.staticElement = null;
node.element = null;
return super.visitSuperConstructorInvocation(node);
}
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/element.dart ('k') | pkg/analyzer_experimental/lib/src/generated/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698