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

Side by Side Diff: pkg/analyzer/lib/src/util/fast_uri.dart

Issue 2265793002: Code clean-up (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/constant_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:collection'; 5 import 'dart:collection';
6 6
7 /** 7 /**
8 * Implementation of [Uri] that understands only a limited set of valid 8 * Implementation of [Uri] that understands only a limited set of valid
9 * URI formats, but works fast. In practice Dart code almost always uses such 9 * URI formats, but works fast. In practice Dart code almost always uses such
10 * limited URI format, so almost always can be processed fast. 10 * limited URI format, so almost always can be processed fast.
(...skipping 12 matching lines...) Expand all
23 final String _text; 23 final String _text;
24 final String _scheme; 24 final String _scheme;
25 final bool _hasEmptyAuthority; 25 final bool _hasEmptyAuthority;
26 final String _path; 26 final String _path;
27 27
28 /** 28 /**
29 * The offset of the last `/` in [_text], or `null` if there isn't any. 29 * The offset of the last `/` in [_text], or `null` if there isn't any.
30 */ 30 */
31 final int _lastSlashIndex; 31 final int _lastSlashIndex;
32 32
33 /**
34 * The cached hashcode.
35 */
36 int _hashCode;
37
38 Uri _cachedFallbackUri; 33 Uri _cachedFallbackUri;
39 34
40 FastUri._(this._cacheGeneration, this._text, this._scheme, 35 FastUri._(this._cacheGeneration, this._text, this._scheme,
41 this._hasEmptyAuthority, this._path, this._lastSlashIndex); 36 this._hasEmptyAuthority, this._path, this._lastSlashIndex);
42 37
43 @override 38 @override
44 String get authority => ''; 39 String get authority => '';
45 40
46 @override 41 @override
47 UriData get data => null; 42 UriData get data => null;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 hasEmptyAuthority = true; 261 hasEmptyAuthority = true;
267 path = path.substring(2); 262 path = path.substring(2);
268 if (!path.startsWith('/')) { 263 if (!path.startsWith('/')) {
269 return null; 264 return null;
270 } 265 }
271 } 266 }
272 return new FastUri._(_currentCacheGeneration, text, scheme, 267 return new FastUri._(_currentCacheGeneration, text, scheme,
273 hasEmptyAuthority, path, lastSlashIndex); 268 hasEmptyAuthority, path, lastSlashIndex);
274 } 269 }
275 } 270 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/constant_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698