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

Side by Side Diff: pkg/analyzer/lib/src/generated/index.dart

Issue 229653004: New analyzer snapshot with MapIterator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.index; 8 library engine.index;
9 9
10 import 'dart:collection' show Queue; 10 import 'dart:collection' show Queue;
11 import 'java_core.dart'; 11 import 'java_core.dart';
12 import 'java_engine.dart'; 12 import 'java_engine.dart';
13 import 'source.dart'; 13 import 'source.dart';
14 import 'scanner.dart' show Token; 14 import 'scanner.dart' show Token;
15 import 'ast.dart'; 15 import 'ast.dart';
16 import 'element.dart'; 16 import 'element.dart';
17 import 'resolver.dart' show Namespace, NamespaceBuilder; 17 import 'resolver.dart' show Namespace, NamespaceBuilder;
18 import 'engine.dart'; 18 import 'engine.dart';
19 import 'html.dart' as ht; 19 import 'html.dart' as ht;
20 import 'utilities_collection.dart';
20 21
21 /** 22 /**
22 * Instances of the [RemoveSourceOperation] implement an operation that removes from the index 23 * Instances of the [RemoveSourceOperation] implement an operation that removes from the index
23 * any data based on the content of a specified source. 24 * any data based on the content of a specified source.
24 */ 25 */
25 class RemoveSourceOperation implements IndexOperation { 26 class RemoveSourceOperation implements IndexOperation {
26 /** 27 /**
27 * The index store against which this operation is being run. 28 * The index store against which this operation is being run.
28 */ 29 */
29 final IndexStore _indexStore; 30 final IndexStore _indexStore;
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 // ensure that each ImportElement has set of elements 1498 // ensure that each ImportElement has set of elements
1498 for (ImportElement importElement in candidates) { 1499 for (ImportElement importElement in candidates) {
1499 if (importElementsMap.containsKey(importElement)) { 1500 if (importElementsMap.containsKey(importElement)) {
1500 continue; 1501 continue;
1501 } 1502 }
1502 Namespace namespace = new NamespaceBuilder().createImportNamespaceForDirec tive(importElement); 1503 Namespace namespace = new NamespaceBuilder().createImportNamespaceForDirec tive(importElement);
1503 Set<Element> elements = new Set(); 1504 Set<Element> elements = new Set();
1504 importElementsMap[importElement] = elements; 1505 importElementsMap[importElement] = elements;
1505 } 1506 }
1506 // use import namespace to choose correct one 1507 // use import namespace to choose correct one
1507 for (MapEntry<ImportElement, Set<Element>> entry in getMapEntrySet(importEle mentsMap)) { 1508 for (MapIterator<ImportElement, Set<Element>> iter = SingleMapIterator.forMa p(importElementsMap); iter.moveNext();) {
1508 if (entry.getValue().contains(usedElement)) { 1509 if (iter.value.contains(usedElement)) {
1509 return entry.getKey(); 1510 return iter.key;
1510 } 1511 }
1511 } 1512 }
1512 // not found 1513 // not found
1513 return null; 1514 return null;
1514 } 1515 }
1515 1516
1516 /** 1517 /**
1517 * @return `true` if given "node" is part of an import [Combinator]. 1518 * @return `true` if given "node" is part of an import [Combinator].
1518 */ 1519 */
1519 static bool _isIdentifierInImportCombinator(SimpleIdentifier node) { 1520 static bool _isIdentifierInImportCombinator(SimpleIdentifier node) {
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 * element are available. For example, if the element is a field and the relat ionship is the 2469 * element are available. For example, if the element is a field and the relat ionship is the
2469 * is-referenced-by relationship, then this method will be invoked with each l ocation at which the 2470 * is-referenced-by relationship, then this method will be invoked with each l ocation at which the
2470 * field is referenced. 2471 * field is referenced.
2471 * 2472 *
2472 * @param element the [Element] that has the relationship with the locations 2473 * @param element the [Element] that has the relationship with the locations
2473 * @param relationship the relationship between the given element and the loca tions 2474 * @param relationship the relationship between the given element and the loca tions
2474 * @param locations the locations that were found 2475 * @param locations the locations that were found
2475 */ 2476 */
2476 void hasRelationships(Element element, Relationship relationship, List<Locatio n> locations); 2477 void hasRelationships(Element element, Relationship relationship, List<Locatio n> locations);
2477 } 2478 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/html.dart ('k') | pkg/analyzer/lib/src/generated/java_engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698