Skip to content

Commit

Permalink
Revert "Don't use LinkedList in the core libraries anymore."
Browse files Browse the repository at this point in the history
This reverts commit fe17b5b.

Review-Url: https://codereview.chromium.org/2974073002 .
  • Loading branch information
floitschG committed Jul 10, 2017
1 parent 807a1fb commit 5d4a786
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 150 deletions.
Expand Up @@ -370,7 +370,7 @@ class InheritanceManager {
* overridden in the inheritance path (for which the type is in the path).
*
* @param chain the inheritance path that is built up as this method calls itself recursively,
* when this method is called an empty [Queue] should be provided
* when this method is called an empty [LinkedList] should be provided
* @param currentType the current type in the inheritance path
* @param memberName the name of the member that is being looked up the inheritance path
*/
Expand Down
1 change: 1 addition & 0 deletions runtime/lib/core_patch.dart
Expand Up @@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.

import "dart:async";
import "dart:collection" show LinkedList, LinkedListEntry;
import 'dart:convert' show ASCII, JSON;
import "dart:isolate";
import "dart:math";
Expand Down
8 changes: 4 additions & 4 deletions runtime/lib/regexp_patch.dart
Expand Up @@ -13,7 +13,7 @@ class RegExp {
if (value == null) {
if (_cache.length > _MAX_CACHE_SIZE) {
_RegExpHashKey lastKey = _recentlyUsed.last;
_recentlyUsed.remove(lastKey);
lastKey.unlink();
_cache.remove(lastKey);
}

Expand Down Expand Up @@ -46,13 +46,13 @@ class RegExp {
static const int _MAX_CACHE_SIZE = 256;
static final Map<_RegExpHashKey, _RegExpHashValue> _cache =
new HashMap<_RegExpHashKey, _RegExpHashValue>();
static final internal.LinkedList<_RegExpHashKey> _recentlyUsed =
new internal.LinkedList<_RegExpHashKey>();
static final LinkedList<_RegExpHashKey> _recentlyUsed =
new LinkedList<_RegExpHashKey>();
}

// Represents both a key in the regular expression cache as well as its
// corresponding entry in the LRU list.
class _RegExpHashKey extends internal.LinkedListEntry<_RegExpHashKey> {
class _RegExpHashKey extends LinkedListEntry<_RegExpHashKey> {
final String pattern;
final bool multiLine;
final bool caseSensitive;
Expand Down
1 change: 0 additions & 1 deletion sdk/lib/internal/internal.dart
Expand Up @@ -15,7 +15,6 @@ part 'list.dart';
part 'print.dart';
part 'sort.dart';
part 'symbol.dart';
part 'linked_list.dart';

// Powers of 10 up to 10^22 are representable as doubles.
// Powers of 10 above that are only approximate due to lack of precission.
Expand Down
1 change: 0 additions & 1 deletion sdk/lib/internal/internal_sources.gypi
Expand Up @@ -9,7 +9,6 @@
# The above file needs to be first as it lists the parts below.
'iterable.dart',
'list.dart',
'linked_list.dart',
'print.dart',
'sort.dart',
'symbol.dart',
Expand Down
123 changes: 0 additions & 123 deletions sdk/lib/internal/linked_list.dart

This file was deleted.

9 changes: 8 additions & 1 deletion sdk/lib/io/io.dart
Expand Up @@ -197,7 +197,14 @@ library dart.io;
import 'dart:async';
import 'dart:_internal' hide Symbol;
import 'dart:collection'
show HashMap, HashSet, Queue, ListQueue, UnmodifiableMapView;
show
HashMap,
HashSet,
Queue,
ListQueue,
LinkedList,
LinkedListEntry,
UnmodifiableMapView;
import 'dart:convert';
import 'dart:developer' hide log;
import 'dart:isolate';
Expand Down
19 changes: 0 additions & 19 deletions tests/corelib/reg_exp_cache_test.dart

This file was deleted.

0 comments on commit 5d4a786

Please sign in to comment.