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

Unified Diff: pkg/analyzer/lib/src/util/fast_uri.dart

Issue 2220373002: Reapply fast-URI patch. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix bug in SimpleUri.replace where ? was included in the result's query. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | runtime/lib/uri_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/util/fast_uri.dart
diff --git a/pkg/analyzer/lib/src/util/fast_uri.dart b/pkg/analyzer/lib/src/util/fast_uri.dart
index 8af548c82640e91fc126f9b29fcc099891cb9211..0df5ce05ae85257bbf96471396802c7723685194 100644
--- a/pkg/analyzer/lib/src/util/fast_uri.dart
+++ b/pkg/analyzer/lib/src/util/fast_uri.dart
@@ -62,23 +62,7 @@ class FastUri implements Uri {
bool get hasFragment => false;
@override
- int get hashCode {
- // This code is copied from the standard Uri implementation.
- // It is important that Uri and FastUri generate compatible hashCodes
- // because Uri and FastUri may be used as keys in the same map.
- int combine(part, current) {
- // The sum is truncated to 30 bits to make sure it fits into a Smi.
- return (current * 31 + part.hashCode) & 0x3FFFFFFF;
- }
- return _hashCode ??= combine(
- scheme,
- combine(
- userInfo,
- combine(
- host,
- combine(port,
- combine(path, combine(query, combine(fragment, 1)))))));
- }
+ int get hashCode => _text.hashCode;
@override
bool get hasPort => false;
« no previous file with comments | « CHANGELOG.md ('k') | runtime/lib/uri_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698