OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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:collection" show LinkedList, LinkedListEntry; |
| 6 |
5 @patch class RegExp { | 7 @patch class RegExp { |
6 @patch factory RegExp(String source, | 8 @patch factory RegExp(String source, |
7 {bool multiLine: false, | 9 {bool multiLine: false, |
8 bool caseSensitive: true}) { | 10 bool caseSensitive: true}) { |
9 _RegExpHashKey key = new _RegExpHashKey( | 11 _RegExpHashKey key = new _RegExpHashKey( |
10 source, multiLine, caseSensitive); | 12 source, multiLine, caseSensitive); |
11 _RegExpHashValue value = _cache[key]; | 13 _RegExpHashValue value = _cache[key]; |
12 | 14 |
13 if (value == null) { | 15 if (value == null) { |
14 if (_cache.length > _MAX_CACHE_SIZE) { | 16 if (_cache.length > _MAX_CACHE_SIZE) { |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 _nextIndex++; | 274 _nextIndex++; |
273 } | 275 } |
274 return true; | 276 return true; |
275 } | 277 } |
276 } | 278 } |
277 _current = null; | 279 _current = null; |
278 _re = null; | 280 _re = null; |
279 return false; | 281 return false; |
280 } | 282 } |
281 } | 283 } |
OLD | NEW |