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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 1829463002: Issue 26063. Index declarations in even partically analyzed units. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:core' hide Resource; 9 import 'dart:core' hide Resource;
10 import 'dart:math' show max; 10 import 'dart:math' show max;
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 * for summary information and linking pre-indexed packages into the index, 1464 * for summary information and linking pre-indexed packages into the index,
1465 * but for now we only invalidate project specific index information. 1465 * but for now we only invalidate project specific index information.
1466 */ 1466 */
1467 void _setupIndexInvalidation() { 1467 void _setupIndexInvalidation() {
1468 if (index == null) { 1468 if (index == null) {
1469 return; 1469 return;
1470 } 1470 }
1471 onContextsChanged.listen((ContextsChangedEvent event) { 1471 onContextsChanged.listen((ContextsChangedEvent event) {
1472 for (AnalysisContext context in event.added) { 1472 for (AnalysisContext context in event.added) {
1473 context 1473 context
1474 .onResultChanged(RESOLVED_UNIT2)
1475 .listen((ResultChangedEvent event) {
1476 if (event.wasComputed) {
1477 Object value = event.value;
1478 if (value is CompilationUnit) {
1479 index.indexDeclarations(value);
1480 }
1481 }
1482 });
1483 context
1474 .onResultChanged(RESOLVED_UNIT) 1484 .onResultChanged(RESOLVED_UNIT)
1475 .listen((ResultChangedEvent event) { 1485 .listen((ResultChangedEvent event) {
1476 if (event.wasInvalidated) { 1486 if (event.wasInvalidated) {
1477 LibrarySpecificUnit target = event.target; 1487 LibrarySpecificUnit target = event.target;
1478 index.removeUnit(event.context, target.library, target.unit); 1488 index.removeUnit(event.context, target.library, target.unit);
1479 } 1489 }
1480 }); 1490 });
1481 } 1491 }
1482 for (AnalysisContext context in event.removed) { 1492 for (AnalysisContext context in event.removed) {
1483 index.removeContext(context); 1493 index.removeContext(context);
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 /** 1751 /**
1742 * The [PerformanceTag] for time spent in server request handlers. 1752 * The [PerformanceTag] for time spent in server request handlers.
1743 */ 1753 */
1744 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1754 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1745 1755
1746 /** 1756 /**
1747 * The [PerformanceTag] for time spent in split store microtasks. 1757 * The [PerformanceTag] for time spent in split store microtasks.
1748 */ 1758 */
1749 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1759 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1750 } 1760 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698