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

Unified Diff: pkg/analysis_server/lib/src/index/store/split_store.dart

Issue 351813002: A local file-based Index implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks Created 6 years, 6 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 | « pkg/analysis_server/lib/src/index/index.dart ('k') | pkg/analysis_server/lib/src/resource.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/index/store/split_store.dart
diff --git a/pkg/analysis_server/lib/src/index/store/split_store.dart b/pkg/analysis_server/lib/src/index/store/split_store.dart
index 6eb90e523e215931801196a55ee45a4464374cbc..ccb6bd9371c70060f5dddc132fd5d4640f828f4a 100644
--- a/pkg/analysis_server/lib/src/index/store/split_store.dart
+++ b/pkg/analysis_server/lib/src/index/store/split_store.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library index.split.store;
+library index.split_store;
import 'dart:async';
import 'dart:collection';
@@ -590,6 +590,7 @@ class SplitIndexStore implements IndexStore {
@override
void clear() {
+ _contextNodeRelations.clear();
_nodeManager.clear();
_nameToNodeNames.clear();
}
@@ -834,10 +835,19 @@ class SplitIndexStore implements IndexStore {
int libraryNameIndex = _stringCodec.encode(libraryName);
int unitNameIndex = _stringCodec.encode(unitName);
String nodeName = '${libraryNameIndex}_${unitNameIndex}.index';
+ int nodeNameId = _stringCodec.encode(nodeName);
_nodeManager.removeNode(nodeName);
// remove source
_sources.remove(library);
_sources.remove(unit);
+ // remove universe relations
+ {
+ int contextId = _contextCodec.encode(context);
+ Map<int, Object> nodeRelations = _contextNodeRelations[contextId];
+ if (nodeRelations != null) {
+ nodeRelations.remove(nodeNameId);
+ }
+ }
}
/**
« no previous file with comments | « pkg/analysis_server/lib/src/index/index.dart ('k') | pkg/analysis_server/lib/src/resource.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698