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

Unified Diff: pkg/analyzer/lib/src/task/incremental_element_builder.dart

Issue 1117143004: Don't recurse into (external) compilation units. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/incremental_element_builder.dart
diff --git a/pkg/analyzer/lib/src/task/incremental_element_builder.dart b/pkg/analyzer/lib/src/task/incremental_element_builder.dart
index 15f02dc33abd328efbd9fa5c78537da41d87b493..d4c107ef42d912fec24537f65853b6446285dd06 100644
--- a/pkg/analyzer/lib/src/task/incremental_element_builder.dart
+++ b/pkg/analyzer/lib/src/task/incremental_element_builder.dart
@@ -273,13 +273,17 @@ class _UpdateElementOffsetsVisitor extends GeneralizingElementVisitor {
_UpdateElementOffsetsVisitor(this.map);
- visitElement(Element element) {
- int oldOffset = element.nameOffset;
- if (oldOffset != -1) {
- int newOffset = map[oldOffset];
- assert(newOffset != null);
- (element as ElementImpl).nameOffset = newOffset;
+ void visitElement(Element element) {
+ if (element is CompilationUnitElement) {
+ return;
}
+ if (element.isSynthetic) {
+ return;
+ }
+ int oldOffset = element.nameOffset;
+ int newOffset = map[oldOffset];
+ assert(newOffset != null);
+ (element as ElementImpl).nameOffset = newOffset;
if (element is! LibraryElement) {
super.visitElement(element);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698