| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
| 10 import 'package:analyzer/src/summary/format.dart'; | 10 import 'package:analyzer/src/summary/format.dart'; |
| 11 import 'package:analyzer/src/summary/idl.dart'; | 11 import 'package:analyzer/src/summary/idl.dart'; |
| 12 import 'package:analyzer/src/summary/index_unit.dart'; | 12 import 'package:analyzer/src/summary/index_unit.dart'; |
| 13 import 'package:collection/collection.dart'; | 13 import 'package:collection/collection.dart'; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * Return a new [Index2] instance that keeps information in memory. | 16 * Return a new [Index2] instance that keeps information in memory. |
| 17 */ | 17 */ |
| 18 Index2 createMemoryIndex() { | 18 Index2 createMemoryIndex2() { |
| 19 _MemoryPackageIndexStore store = new _MemoryPackageIndexStore(); | 19 _MemoryPackageIndexStore store = new _MemoryPackageIndexStore(); |
| 20 return new Index2(store); | 20 return new Index2(store); |
| 21 } | 21 } |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Return the index of the first occurrence of the [value] in the [sortedList], | 24 * Return the index of the first occurrence of the [value] in the [sortedList], |
| 25 * or `-1` if the [value] is not in the list. | 25 * or `-1` if the [value] is not in the list. |
| 26 */ | 26 */ |
| 27 int _findFirstOccurrence(List<int> sortedList, int value) { | 27 int _findFirstOccurrence(List<int> sortedList, int value) { |
| 28 // Find an occurrence. | 28 // Find an occurrence. |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 unitLibraryUri, | 326 unitLibraryUri, |
| 327 unitUnitUri, | 327 unitUnitUri, |
| 328 unitIndex.usedElementOffsets[i], | 328 unitIndex.usedElementOffsets[i], |
| 329 unitIndex.usedElementLengths[i], | 329 unitIndex.usedElementLengths[i], |
| 330 unitIndex.usedElementIsQualifiedFlags[i])); | 330 unitIndex.usedElementIsQualifiedFlags[i])); |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 return locations; | 333 return locations; |
| 334 } | 334 } |
| 335 } | 335 } |
| OLD | NEW |