| OLD | NEW |
| 1 part of dart.core; | 1 part of dart.core; |
| 2 class Uri {final String _host; | 2 class Uri {final String _host; |
| 3 num _port; | 3 num _port; |
| 4 String _path; | 4 String _path; |
| 5 final String scheme; | 5 final String scheme; |
| 6 String get authority { | 6 String get authority { |
| 7 if (!hasAuthority) return ""; | 7 if (!hasAuthority) return ""; |
| 8 var sb = new StringBuffer(); | 8 var sb = new StringBuffer(); |
| 9 _writeAuthority(sb); | 9 _writeAuthority(sb); |
| 10 return sb.toString(); | 10 return sb.toString(); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } | 272 } |
| 273 factory Uri.file(String path, { | 273 factory Uri.file(String path, { |
| 274 bool windows} | 274 bool windows} |
| 275 ) { | 275 ) { |
| 276 windows = windows == null ? Uri._isWindows : windows; | 276 windows = windows == null ? Uri._isWindows : windows; |
| 277 return ((__x12) => DEVC$RT.cast(__x12, dynamic, Uri, "DynamicCast", """line 6
98, column 12 of dart:core/uri.dart: """, __x12 is Uri, true))(windows ? _makeWi
ndowsFileUrl(path) : _makeFileUri(path)); | 277 return ((__x12) => DEVC$RT.cast(__x12, dynamic, Uri, "DynamicCast", """line 6
98, column 12 of dart:core/uri.dart: """, __x12 is Uri, true))(windows ? _makeWi
ndowsFileUrl(path) : _makeFileUri(path)); |
| 278 } | 278 } |
| 279 external static Uri get base; | 279 external static Uri get base; |
| 280 external static bool get _isWindows; | 280 external static bool get _isWindows; |
| 281 static _checkNonWindowsPathReservedCharacters(List<String> segments, bool argum
entError) { | 281 static _checkNonWindowsPathReservedCharacters(List<String> segments, bool argum
entError) { |
| 282 segments.forEach(((__x18) => DEVC$RT.wrap((dynamic f(dynamic __u13)) { | 282 segments.forEach(((__x17) => DEVC$RT.cast(__x17, __t15, __t13, "InferableClosu
re", """line 716, column 22 of dart:core/uri.dart: """, __x17 is __t13, false))(
(segment) { |
| 283 dynamic c(dynamic x0) => f(x0); | |
| 284 return f == null ? null : c; | |
| 285 } | |
| 286 , __x18, __t16, __t14, "WrapLiteral", """line 716, column 22 of dart:core/uri.
dart: """, __x18 is __t14))((segment) { | |
| 287 if (segment.contains("/")) { | 283 if (segment.contains("/")) { |
| 288 if (argumentError) { | 284 if (argumentError) { |
| 289 throw new ArgumentError("Illegal path character $segment"); | 285 throw new ArgumentError("Illegal path character $segment"); |
| 290 } | 286 } |
| 291 else { | 287 else { |
| 292 throw new UnsupportedError("Illegal path character $segment"); | 288 throw new UnsupportedError("Illegal path character $segment"); |
| 293 } | 289 } |
| 294 } | 290 } |
| 295 } | 291 } |
| 296 )); | 292 )); |
| 297 } | 293 } |
| 298 static _checkWindowsPathReservedCharacters(List<String> segments, bool argument
Error, [int firstSegment = 0]) { | 294 static _checkWindowsPathReservedCharacters(List<String> segments, bool argument
Error, [int firstSegment = 0]) { |
| 299 segments.skip(firstSegment).forEach(((__x20) => DEVC$RT.wrap((dynamic f(dynami
c __u19)) { | 295 segments.skip(firstSegment).forEach(((__x18) => DEVC$RT.cast(__x18, __t15, __t
13, "InferableClosure", """line 730, column 41 of dart:core/uri.dart: """, __x18
is __t13, false))((segment) { |
| 300 dynamic c(dynamic x0) => f(x0); | |
| 301 return f == null ? null : c; | |
| 302 } | |
| 303 , __x20, __t16, __t14, "WrapLiteral", """line 730, column 41 of dart:core/uri.
dart: """, __x20 is __t14))((segment) { | |
| 304 if (segment.contains(new RegExp(r'["*/:<>?\\|]'))) { | 296 if (segment.contains(new RegExp(r'["*/:<>?\\|]'))) { |
| 305 if (argumentError) { | 297 if (argumentError) { |
| 306 throw new ArgumentError("Illegal character in path"); | 298 throw new ArgumentError("Illegal character in path"); |
| 307 } | 299 } |
| 308 else { | 300 else { |
| 309 throw new UnsupportedError("Illegal character in path"); | 301 throw new UnsupportedError("Illegal character in path"); |
| 310 } | 302 } |
| 311 } | 303 } |
| 312 } | 304 } |
| 313 )); | 305 )); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 if (userInfo != null) { | 384 if (userInfo != null) { |
| 393 userInfo = _makeUserInfo(userInfo, 0, userInfo.length); | 385 userInfo = _makeUserInfo(userInfo, 0, userInfo.length); |
| 394 } | 386 } |
| 395 else { | 387 else { |
| 396 userInfo = this.userInfo; | 388 userInfo = this.userInfo; |
| 397 } | 389 } |
| 398 if (port != null) { | 390 if (port != null) { |
| 399 port = _makePort(port, scheme); | 391 port = _makePort(port, scheme); |
| 400 } | 392 } |
| 401 else { | 393 else { |
| 402 port = ((__x21) => DEVC$RT.cast(__x21, num, int, "ImplicitCast", """line 889
, column 14 of dart:core/uri.dart: """, __x21 is int, true))(this._port); | 394 port = ((__x19) => DEVC$RT.cast(__x19, num, int, "ImplicitCast", """line 889
, column 14 of dart:core/uri.dart: """, __x19 is int, true))(this._port); |
| 403 if (schemeChanged) { | 395 if (schemeChanged) { |
| 404 port = _makePort(port, scheme); | 396 port = _makePort(port, scheme); |
| 405 } | 397 } |
| 406 } | 398 } |
| 407 if (host != null) { | 399 if (host != null) { |
| 408 host = _makeHost(host, 0, host.length, false); | 400 host = _makeHost(host, 0, host.length, false); |
| 409 } | 401 } |
| 410 else if (this.hasAuthority) { | 402 else if (this.hasAuthority) { |
| 411 host = this.host; | 403 host = this.host; |
| 412 } | 404 } |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 } | 574 } |
| 583 var result; | 575 var result; |
| 584 if (path != null) { | 576 if (path != null) { |
| 585 result = _normalize(path, start, end, DEVC$RT.cast(_pathCharOrSlashTable, DE
VC$RT.type((List<dynamic> _) { | 577 result = _normalize(path, start, end, DEVC$RT.cast(_pathCharOrSlashTable, DE
VC$RT.type((List<dynamic> _) { |
| 586 } | 578 } |
| 587 ), DEVC$RT.type((List<int> _) { | 579 ), DEVC$RT.type((List<int> _) { |
| 588 } | 580 } |
| 589 ), "CompositeCast", """line 1139, column 45 of dart:core/uri.dart: """, _pat
hCharOrSlashTable is List<int>, false)); | 581 ), "CompositeCast", """line 1139, column 45 of dart:core/uri.dart: """, _pat
hCharOrSlashTable is List<int>, false)); |
| 590 } | 582 } |
| 591 else { | 583 else { |
| 592 result = pathSegments.map(((__x27) => DEVC$RT.wrap((String f(dynamic __u22))
{ | 584 result = pathSegments.map(((__x24) => DEVC$RT.cast(__x24, __t22, __t20, "Inf
erableClosure", """line 1141, column 33 of dart:core/uri.dart: """, __x24 is __t
20, false))((s) => _uriEncode(DEVC$RT.cast(_pathCharTable, DEVC$RT.type((List<dy
namic> _) { |
| 593 String c(dynamic x0) => f(x0); | |
| 594 return f == null ? null : c; | |
| 595 } | |
| 596 , __x27, __t25, __t23, "WrapLiteral", """line 1141, column 33 of dart:core/u
ri.dart: """, __x27 is __t23))((s) => _uriEncode(DEVC$RT.cast(_pathCharTable, DE
VC$RT.type((List<dynamic> _) { | |
| 597 } | 585 } |
| 598 ), DEVC$RT.type((List<int> _) { | 586 ), DEVC$RT.type((List<int> _) { |
| 599 } | 587 } |
| 600 ), "CompositeCast", """line 1141, column 51 of dart:core/uri.dart: """, _pat
hCharTable is List<int>, false), DEVC$RT.cast(s, dynamic, String, "DynamicCast",
"""line 1141, column 67 of dart:core/uri.dart: """, s is String, true)))).join(
"/"); | 588 ), "CompositeCast", """line 1141, column 51 of dart:core/uri.dart: """, _pat
hCharTable is List<int>, false), DEVC$RT.cast(s, dynamic, String, "DynamicCast",
"""line 1141, column 67 of dart:core/uri.dart: """, s is String, true)))).join(
"/"); |
| 601 } | 589 } |
| 602 if (result.isEmpty) { | 590 if (result.isEmpty) { |
| 603 if (isFile) return "/"; | 591 if (isFile) return "/"; |
| 604 } | 592 } |
| 605 else if ((isFile || ensureLeadingSlash) && result.codeUnitAt(0) != _SLASH) { | 593 else if ((isFile || ensureLeadingSlash) && result.codeUnitAt(0) != _SLASH) { |
| 606 return "/$result"; | 594 return "/$result"; |
| 607 } | 595 } |
| 608 return DEVC$RT.cast(result, dynamic, String, "DynamicCast", """line 1149, col
umn 12 of dart:core/uri.dart: """, result is String, true); | 596 return DEVC$RT.cast(result, dynamic, String, "DynamicCast", """line 1149, col
umn 12 of dart:core/uri.dart: """, result is String, true); |
| 609 } | 597 } |
| 610 static String _makeQuery(String query, int start, int end, Map<String, String>
queryParameters) { | 598 static String _makeQuery(String query, int start, int end, Map<String, String>
queryParameters) { |
| 611 if (query == null && queryParameters == null) return null; | 599 if (query == null && queryParameters == null) return null; |
| 612 if (query != null && queryParameters != null) { | 600 if (query != null && queryParameters != null) { |
| 613 throw new ArgumentError('Both query and queryParameters specified'); | 601 throw new ArgumentError('Both query and queryParameters specified'); |
| 614 } | 602 } |
| 615 if (query != null) return _normalize(query, start, end, DEVC$RT.cast(_queryCh
arTable, DEVC$RT.type((List<dynamic> _) { | 603 if (query != null) return _normalize(query, start, end, DEVC$RT.cast(_queryCh
arTable, DEVC$RT.type((List<dynamic> _) { |
| 616 } | 604 } |
| 617 ), DEVC$RT.type((List<int> _) { | 605 ), DEVC$RT.type((List<int> _) { |
| 618 } | 606 } |
| 619 ), "CompositeCast", """line 1158, column 61 of dart:core/uri.dart: """, _query
CharTable is List<int>, false)); | 607 ), "CompositeCast", """line 1158, column 61 of dart:core/uri.dart: """, _query
CharTable is List<int>, false)); |
| 620 var result = new StringBuffer(); | 608 var result = new StringBuffer(); |
| 621 var first = true; | 609 var first = true; |
| 622 queryParameters.forEach(((__x36) => DEVC$RT.wrap((dynamic f(dynamic __u28, dy
namic __u29)) { | 610 queryParameters.forEach(((__x31) => DEVC$RT.cast(__x31, __t28, __t25, "Infera
bleClosure", """line 1162, column 29 of dart:core/uri.dart: """, __x31 is __t25,
false))((key, value) { |
| 623 dynamic c(dynamic x0, dynamic x1) => f(x0, x1); | |
| 624 return f == null ? null : c; | |
| 625 } | |
| 626 , __x36, __t33, __t30, "WrapLiteral", """line 1162, column 29 of dart:core/uri
.dart: """, __x36 is __t30))((key, value) { | |
| 627 if (!first) { | 611 if (!first) { |
| 628 result.write("&"); | 612 result.write("&"); |
| 629 } | 613 } |
| 630 first = false; | 614 first = false; |
| 631 result.write(Uri.encodeQueryComponent(DEVC$RT.cast(key, dynamic, String, "D
ynamicCast", """line 1167, column 45 of dart:core/uri.dart: """, key is String,
true))); | 615 result.write(Uri.encodeQueryComponent(DEVC$RT.cast(key, dynamic, String, "D
ynamicCast", """line 1167, column 45 of dart:core/uri.dart: """, key is String,
true))); |
| 632 if (value != null && !value.isEmpty) { | 616 if (value != null && !value.isEmpty) { |
| 633 result.write("="); | 617 result.write("="); |
| 634 result.write(Uri.encodeQueryComponent(DEVC$RT.cast(value, dynamic, String
, "DynamicCast", """line 1170, column 47 of dart:core/uri.dart: """, value is St
ring, true))); | 618 result.write(Uri.encodeQueryComponent(DEVC$RT.cast(value, dynamic, String
, "DynamicCast", """line 1170, column 47 of dart:core/uri.dart: """, value is St
ring, true))); |
| 635 } | 619 } |
| 636 } | 620 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 } | 663 } |
| 680 static bool _isUnreservedChar(int ch) { | 664 static bool _isUnreservedChar(int ch) { |
| 681 return ch < 127 && ((_unreservedTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); | 665 return ch < 127 && ((_unreservedTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); |
| 682 } | 666 } |
| 683 static String _escapeChar(char) { | 667 static String _escapeChar(char) { |
| 684 assert (char <= 0x10ffff); const hexDigits = "0123456789ABCDEF"; | 668 assert (char <= 0x10ffff); const hexDigits = "0123456789ABCDEF"; |
| 685 List codeUnits; | 669 List codeUnits; |
| 686 if (char < 0x80) { | 670 if (char < 0x80) { |
| 687 codeUnits = new List(3); | 671 codeUnits = new List(3); |
| 688 codeUnits[0] = _PERCENT; | 672 codeUnits[0] = _PERCENT; |
| 689 codeUnits[1] = hexDigits.codeUnitAt(((__x37) => DEVC$RT.cast(__x37, dynamic
, int, "DynamicCast", """line 1248, column 43 of dart:core/uri.dart: """, __x37
is int, true))(char >> 4)); | 673 codeUnits[1] = hexDigits.codeUnitAt(((__x32) => DEVC$RT.cast(__x32, dynamic
, int, "DynamicCast", """line 1248, column 43 of dart:core/uri.dart: """, __x32
is int, true))(char >> 4)); |
| 690 codeUnits[2] = hexDigits.codeUnitAt(((__x38) => DEVC$RT.cast(__x38, dynamic
, int, "DynamicCast", """line 1249, column 43 of dart:core/uri.dart: """, __x38
is int, true))(char & 0xf)); | 674 codeUnits[2] = hexDigits.codeUnitAt(((__x33) => DEVC$RT.cast(__x33, dynamic
, int, "DynamicCast", """line 1249, column 43 of dart:core/uri.dart: """, __x33
is int, true))(char & 0xf)); |
| 691 } | 675 } |
| 692 else { | 676 else { |
| 693 int flag = 0xc0; | 677 int flag = 0xc0; |
| 694 int encodedBytes = 2; | 678 int encodedBytes = 2; |
| 695 if (char > 0x7ff) { | 679 if (char > 0x7ff) { |
| 696 flag = 0xe0; | 680 flag = 0xe0; |
| 697 encodedBytes = 3; | 681 encodedBytes = 3; |
| 698 if (char > 0xffff) { | 682 if (char > 0xffff) { |
| 699 encodedBytes = 4; | 683 encodedBytes = 4; |
| 700 flag = 0xf0; | 684 flag = 0xf0; |
| 701 } | 685 } |
| 702 } | 686 } |
| 703 codeUnits = new List(3 * encodedBytes); | 687 codeUnits = new List(3 * encodedBytes); |
| 704 int index = 0; | 688 int index = 0; |
| 705 while (--encodedBytes >= 0) { | 689 while (--encodedBytes >= 0) { |
| 706 int byte = ((__x39) => DEVC$RT.cast(__x39, dynamic, int, "DynamicCast", ""
"line 1265, column 20 of dart:core/uri.dart: """, __x39 is int, true))(((char >>
(6 * encodedBytes)) & 0x3f) | flag); | 690 int byte = ((__x34) => DEVC$RT.cast(__x34, dynamic, int, "DynamicCast", ""
"line 1265, column 20 of dart:core/uri.dart: """, __x34 is int, true))(((char >>
(6 * encodedBytes)) & 0x3f) | flag); |
| 707 codeUnits[index] = _PERCENT; | 691 codeUnits[index] = _PERCENT; |
| 708 codeUnits[index + 1] = hexDigits.codeUnitAt(byte >> 4); | 692 codeUnits[index + 1] = hexDigits.codeUnitAt(byte >> 4); |
| 709 codeUnits[index + 2] = hexDigits.codeUnitAt(byte & 0xf); | 693 codeUnits[index + 2] = hexDigits.codeUnitAt(byte & 0xf); |
| 710 index += 3; | 694 index += 3; |
| 711 flag = 0x80; | 695 flag = 0x80; |
| 712 } | 696 } |
| 713 } | 697 } |
| 714 return new String.fromCharCodes(DEVC$RT.cast(codeUnits, DEVC$RT.type((List<dy
namic> _) { | 698 return new String.fromCharCodes(DEVC$RT.cast(codeUnits, DEVC$RT.type((List<dy
namic> _) { |
| 715 } | 699 } |
| 716 ), DEVC$RT.type((Iterable<int> _) { | 700 ), DEVC$RT.type((Iterable<int> _) { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 if (reference.path.startsWith("/")) { | 858 if (reference.path.startsWith("/")) { |
| 875 targetPath = _removeDotSegments(reference.path); | 859 targetPath = _removeDotSegments(reference.path); |
| 876 } | 860 } |
| 877 else { | 861 else { |
| 878 targetPath = _removeDotSegments(_merge(this._path, reference.path)); | 862 targetPath = _removeDotSegments(_merge(this._path, reference.path)); |
| 879 } | 863 } |
| 880 if (reference.hasQuery) targetQuery = reference.query; | 864 if (reference.hasQuery) targetQuery = reference.query; |
| 881 } | 865 } |
| 882 targetUserInfo = this._userInfo; | 866 targetUserInfo = this._userInfo; |
| 883 targetHost = this._host; | 867 targetHost = this._host; |
| 884 targetPort = ((__x40) => DEVC$RT.cast(__x40, num, int, "ImplicitCast", ""
"line 1489, column 22 of dart:core/uri.dart: """, __x40 is int, true))(this._por
t); | 868 targetPort = ((__x35) => DEVC$RT.cast(__x35, num, int, "ImplicitCast", ""
"line 1489, column 22 of dart:core/uri.dart: """, __x35 is int, true))(this._por
t); |
| 885 } | 869 } |
| 886 } | 870 } |
| 887 String fragment = reference.hasFragment ? reference.fragment : null; | 871 String fragment = reference.hasFragment ? reference.fragment : null; |
| 888 return new Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort
, targetPath, targetQuery, fragment); | 872 return new Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort
, targetPath, targetQuery, fragment); |
| 889 } | 873 } |
| 890 bool get hasAuthority => _host != null; | 874 bool get hasAuthority => _host != null; |
| 891 bool get hasPort => _port != null; | 875 bool get hasPort => _port != null; |
| 892 bool get hasQuery => _query != null; | 876 bool get hasQuery => _query != null; |
| 893 bool get hasFragment => _fragment != null; | 877 bool get hasFragment => _fragment != null; |
| 894 String get origin { | 878 String get origin { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 } | 963 } |
| 980 return sb.toString(); | 964 return sb.toString(); |
| 981 } | 965 } |
| 982 bool operator ==(other) { | 966 bool operator ==(other) { |
| 983 if (other is! Uri) return false; | 967 if (other is! Uri) return false; |
| 984 Uri uri = DEVC$RT.cast(other, dynamic, Uri, "DynamicCast", """line 1698, colu
mn 15 of dart:core/uri.dart: """, other is Uri, true); | 968 Uri uri = DEVC$RT.cast(other, dynamic, Uri, "DynamicCast", """line 1698, colu
mn 15 of dart:core/uri.dart: """, other is Uri, true); |
| 985 return scheme == uri.scheme && hasAuthority == uri.hasAuthority && userInfo =
= uri.userInfo && host == uri.host && port == uri.port && path == uri.path && ha
sQuery == uri.hasQuery && query == uri.query && hasFragment == uri.hasFragment &
& fragment == uri.fragment; | 969 return scheme == uri.scheme && hasAuthority == uri.hasAuthority && userInfo =
= uri.userInfo && host == uri.host && port == uri.port && path == uri.path && ha
sQuery == uri.hasQuery && query == uri.query && hasFragment == uri.hasFragment &
& fragment == uri.fragment; |
| 986 } | 970 } |
| 987 int get hashCode { | 971 int get hashCode { |
| 988 int combine(part, current) { | 972 int combine(part, current) { |
| 989 return ((__x41) => DEVC$RT.cast(__x41, dynamic, int, "DynamicCast", """line
1714, column 14 of dart:core/uri.dart: """, __x41 is int, true))((current * 31 +
part.hashCode) & 0x3FFFFFFF); | 973 return ((__x36) => DEVC$RT.cast(__x36, dynamic, int, "DynamicCast", """line
1714, column 14 of dart:core/uri.dart: """, __x36 is int, true))((current * 31 +
part.hashCode) & 0x3FFFFFFF); |
| 990 } | 974 } |
| 991 return combine(scheme, combine(userInfo, combine(host, combine(port, combine(
path, combine(query, combine(fragment, 1))))))); | 975 return combine(scheme, combine(userInfo, combine(host, combine(port, combine(
path, combine(query, combine(fragment, 1))))))); |
| 992 } | 976 } |
| 993 static void _addIfNonEmpty(StringBuffer sb, String test, String first, String s
econd) { | 977 static void _addIfNonEmpty(StringBuffer sb, String test, String first, String s
econd) { |
| 994 if ("" != test) { | 978 if ("" != test) { |
| 995 sb.write(first); | 979 sb.write(first); |
| 996 sb.write(second); | 980 sb.write(second); |
| 997 } | 981 } |
| 998 } | 982 } |
| 999 static String encodeComponent(String component) { | 983 static String encodeComponent(String component) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1026 ), DEVC$RT.type((List<int> _) { | 1010 ), DEVC$RT.type((List<int> _) { |
| 1027 } | 1011 } |
| 1028 ), "CompositeCast", """line 1832, column 23 of dart:core/uri.dart: """, _encod
eFullTable is List<int>, false), uri); | 1012 ), "CompositeCast", """line 1832, column 23 of dart:core/uri.dart: """, _encod
eFullTable is List<int>, false), uri); |
| 1029 } | 1013 } |
| 1030 static String decodeFull(String uri) { | 1014 static String decodeFull(String uri) { |
| 1031 return _uriDecode(uri); | 1015 return _uriDecode(uri); |
| 1032 } | 1016 } |
| 1033 static Map<String, String> splitQueryString(String query, { | 1017 static Map<String, String> splitQueryString(String query, { |
| 1034 Encoding encoding : UTF8} | 1018 Encoding encoding : UTF8} |
| 1035 ) { | 1019 ) { |
| 1036 return ((__x42) => DEVC$RT.cast(__x42, dynamic, DEVC$RT.type((Map<String, Stri
ng> _) { | 1020 return ((__x37) => DEVC$RT.cast(__x37, dynamic, DEVC$RT.type((Map<String, Stri
ng> _) { |
| 1037 } | 1021 } |
| 1038 ), "CompositeCast", """line 1864, column 12 of dart:core/uri.dart: """, __x42
is Map<String, String>, false))(query.split("&").fold({ | 1022 ), "CompositeCast", """line 1864, column 12 of dart:core/uri.dart: """, __x37
is Map<String, String>, false))(query.split("&").fold({ |
| 1039 } | 1023 } |
| 1040 , ((__x48) => DEVC$RT.wrap((dynamic f(dynamic __u43, dynamic __u44)) { | 1024 , ((__x41) => DEVC$RT.cast(__x41, __t28, __t38, "InferableClosure", """line 18
64, column 38 of dart:core/uri.dart: """, __x41 is __t38, false))((map, element)
{ |
| 1041 dynamic c(dynamic x0, dynamic x1) => f(x0, x1); | 1025 int index = ((__x42) => DEVC$RT.cast(__x42, dynamic, int, "DynamicCast", """
line 1865, column 19 of dart:core/uri.dart: """, __x42 is int, true))(element.in
dexOf("=")); |
| 1042 return f == null ? null : c; | |
| 1043 } | |
| 1044 , __x48, __t33, __t45, "WrapLiteral", """line 1864, column 38 of dart:core/uri
.dart: """, __x48 is __t45))((map, element) { | |
| 1045 int index = ((__x49) => DEVC$RT.cast(__x49, dynamic, int, "DynamicCast", """
line 1865, column 19 of dart:core/uri.dart: """, __x49 is int, true))(element.in
dexOf("=")); | |
| 1046 if (index == -1) { | 1026 if (index == -1) { |
| 1047 if (element != "") { | 1027 if (element != "") { |
| 1048 map[decodeQueryComponent(DEVC$RT.cast(element, dynamic, String, "Dynamic
Cast", """line 1868, column 36 of dart:core/uri.dart: """, element is String, tr
ue), encoding: encoding)] = ""; | 1028 map[decodeQueryComponent(DEVC$RT.cast(element, dynamic, String, "Dynamic
Cast", """line 1868, column 36 of dart:core/uri.dart: """, element is String, tr
ue), encoding: encoding)] = ""; |
| 1049 } | 1029 } |
| 1050 } | 1030 } |
| 1051 else if (index != 0) { | 1031 else if (index != 0) { |
| 1052 var key = element.substring(0, index); | 1032 var key = element.substring(0, index); |
| 1053 var value = element.substring(index + 1); | 1033 var value = element.substring(index + 1); |
| 1054 map[Uri.decodeQueryComponent(DEVC$RT.cast(key, dynamic, String, "DynamicC
ast", """line 1873, column 38 of dart:core/uri.dart: """, key is String, true),
encoding: encoding)] = decodeQueryComponent(DEVC$RT.cast(value, dynamic, String,
"DynamicCast", """line 1874, column 34 of dart:core/uri.dart: """, value is Str
ing, true), encoding: encoding); | 1034 map[Uri.decodeQueryComponent(DEVC$RT.cast(key, dynamic, String, "DynamicC
ast", """line 1873, column 38 of dart:core/uri.dart: """, key is String, true),
encoding: encoding)] = decodeQueryComponent(DEVC$RT.cast(value, dynamic, String,
"DynamicCast", """line 1874, column 34 of dart:core/uri.dart: """, value is Str
ing, true), encoding: encoding); |
| 1055 } | 1035 } |
| 1056 return map; | 1036 return map; |
| 1057 } | 1037 } |
| 1058 ))); | 1038 ))); |
| 1059 } | 1039 } |
| 1060 static List<int> parseIPv4Address(String host) { | 1040 static List<int> parseIPv4Address(String host) { |
| 1061 void error(String msg) { | 1041 void error(String msg) { |
| 1062 throw new FormatException('Illegal IPv4 address, $msg'); | 1042 throw new FormatException('Illegal IPv4 address, $msg'); |
| 1063 } | 1043 } |
| 1064 var bytes = host.split('.'); | 1044 var bytes = host.split('.'); |
| 1065 if (bytes.length != 4) { | 1045 if (bytes.length != 4) { |
| 1066 error('IPv4 address should contain exactly 4 parts'); | 1046 error('IPv4 address should contain exactly 4 parts'); |
| 1067 } | 1047 } |
| 1068 return ((__x50) => DEVC$RT.cast(__x50, DEVC$RT.type((List<dynamic> _) { | 1048 return ((__x43) => DEVC$RT.cast(__x43, DEVC$RT.type((List<dynamic> _) { |
| 1069 } | 1049 } |
| 1070 ), DEVC$RT.type((List<int> _) { | 1050 ), DEVC$RT.type((List<int> _) { |
| 1071 } | 1051 } |
| 1072 ), "CompositeCast", """line 1896, column 12 of dart:core/uri.dart: """, __x50
is List<int>, false))(bytes.map(((__x52) => DEVC$RT.wrap((dynamic f(dynamic __u5
1)) { | 1052 ), "CompositeCast", """line 1896, column 12 of dart:core/uri.dart: """, __x43
is List<int>, false))(bytes.map(((__x44) => DEVC$RT.cast(__x44, __t15, __t20, "I
nferableClosure", """line 1897, column 14 of dart:core/uri.dart: """, __x44 is _
_t20, false))((byteString) { |
| 1073 dynamic c(dynamic x0) => f(x0); | |
| 1074 return f == null ? null : c; | |
| 1075 } | |
| 1076 , __x52, __t16, __t23, "WrapLiteral", """line 1897, column 14 of dart:core/uri
.dart: """, __x52 is __t23))((byteString) { | |
| 1077 int byte = int.parse(DEVC$RT.cast(byteString, dynamic, String, "DynamicCast"
, """line 1898, column 32 of dart:core/uri.dart: """, byteString is String, true
)); | 1053 int byte = int.parse(DEVC$RT.cast(byteString, dynamic, String, "DynamicCast"
, """line 1898, column 32 of dart:core/uri.dart: """, byteString is String, true
)); |
| 1078 if (byte < 0 || byte > 255) { | 1054 if (byte < 0 || byte > 255) { |
| 1079 error('each part must be in the range of `0..255`'); | 1055 error('each part must be in the range of `0..255`'); |
| 1080 } | 1056 } |
| 1081 return byte; | 1057 return byte; |
| 1082 } | 1058 } |
| 1083 )).toList()); | 1059 )).toList()); |
| 1084 } | 1060 } |
| 1085 static List<int> parseIPv6Address(String host, [int start = 0, int end]) { | 1061 static List<int> parseIPv6Address(String host, [int start = 0, int end]) { |
| 1086 if (end == null) end = host.length; | 1062 if (end == null) end = host.length; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 static const int _RIGHT_BRACKET = 0x5D; | 1174 static const int _RIGHT_BRACKET = 0x5D; |
| 1199 static const int _LOWER_CASE_A = 0x61; | 1175 static const int _LOWER_CASE_A = 0x61; |
| 1200 static const int _LOWER_CASE_F = 0x66; | 1176 static const int _LOWER_CASE_F = 0x66; |
| 1201 static const int _LOWER_CASE_Z = 0x7A; | 1177 static const int _LOWER_CASE_Z = 0x7A; |
| 1202 static const int _BAR = 0x7C; | 1178 static const int _BAR = 0x7C; |
| 1203 static String _uriEncode(List<int> canonicalTable, String text, { | 1179 static String _uriEncode(List<int> canonicalTable, String text, { |
| 1204 Encoding encoding : UTF8, bool spaceToPlus : false} | 1180 Encoding encoding : UTF8, bool spaceToPlus : false} |
| 1205 ) { | 1181 ) { |
| 1206 byteToHex(byte, buffer) { | 1182 byteToHex(byte, buffer) { |
| 1207 const String hex = '0123456789ABCDEF'; | 1183 const String hex = '0123456789ABCDEF'; |
| 1208 buffer.writeCharCode(hex.codeUnitAt(((__x53) => DEVC$RT.cast(__x53, dynamic
, int, "DynamicCast", """line 2059, column 43 of dart:core/uri.dart: """, __x53
is int, true))(byte >> 4))); | 1184 buffer.writeCharCode(hex.codeUnitAt(((__x45) => DEVC$RT.cast(__x45, dynamic
, int, "DynamicCast", """line 2059, column 43 of dart:core/uri.dart: """, __x45
is int, true))(byte >> 4))); |
| 1209 buffer.writeCharCode(hex.codeUnitAt(((__x54) => DEVC$RT.cast(__x54, dynamic
, int, "DynamicCast", """line 2060, column 43 of dart:core/uri.dart: """, __x54
is int, true))(byte & 0x0f))); | 1185 buffer.writeCharCode(hex.codeUnitAt(((__x46) => DEVC$RT.cast(__x46, dynamic
, int, "DynamicCast", """line 2060, column 43 of dart:core/uri.dart: """, __x46
is int, true))(byte & 0x0f))); |
| 1210 } | 1186 } |
| 1211 StringBuffer result = new StringBuffer(); | 1187 StringBuffer result = new StringBuffer(); |
| 1212 var bytes = encoding.encode(text); | 1188 var bytes = encoding.encode(text); |
| 1213 for (int i = 0; i < bytes.length; i++) { | 1189 for (int i = 0; i < bytes.length; i++) { |
| 1214 int byte = bytes[i]; | 1190 int byte = bytes[i]; |
| 1215 if (byte < 128 && ((canonicalTable[byte >> 4] & (1 << (byte & 0x0f))) != 0)
) { | 1191 if (byte < 128 && ((canonicalTable[byte >> 4] & (1 << (byte & 0x0f))) != 0)
) { |
| 1216 result.writeCharCode(byte); | 1192 result.writeCharCode(byte); |
| 1217 } | 1193 } |
| 1218 else if (spaceToPlus && byte == _SPACE) { | 1194 else if (spaceToPlus && byte == _SPACE) { |
| 1219 result.writeCharCode(_PLUS); | 1195 result.writeCharCode(_PLUS); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 static const _schemeTable = const [0x0000, 0x0000, 0x6800, 0x03ff, 0xfffe, 0x07
ff, 0xfffe, 0x07ff]; | 1268 static const _schemeTable = const [0x0000, 0x0000, 0x6800, 0x03ff, 0xfffe, 0x07
ff, 0xfffe, 0x07ff]; |
| 1293 static const _schemeLowerTable = const [0x0000, 0x0000, 0x6800, 0x03ff, 0x0000,
0x0000, 0xfffe, 0x07ff]; | 1269 static const _schemeLowerTable = const [0x0000, 0x0000, 0x6800, 0x03ff, 0x0000,
0x0000, 0xfffe, 0x07ff]; |
| 1294 static const _subDelimitersTable = const [0x0000, 0x0000, 0x7fd2, 0x2bff, 0xfff
e, 0x87ff, 0xfffe, 0x47ff]; | 1270 static const _subDelimitersTable = const [0x0000, 0x0000, 0x7fd2, 0x2bff, 0xfff
e, 0x87ff, 0xfffe, 0x47ff]; |
| 1295 static const _genDelimitersTable = const [0x0000, 0x0000, 0x8008, 0x8400, 0x000
1, 0x2800, 0x0000, 0x0000]; | 1271 static const _genDelimitersTable = const [0x0000, 0x0000, 0x8008, 0x8400, 0x000
1, 0x2800, 0x0000, 0x0000]; |
| 1296 static const _userinfoTable = const [0x0000, 0x0000, 0x7fd2, 0x2fff, 0xfffe, 0x
87ff, 0xfffe, 0x47ff]; | 1272 static const _userinfoTable = const [0x0000, 0x0000, 0x7fd2, 0x2fff, 0xfffe, 0x
87ff, 0xfffe, 0x47ff]; |
| 1297 static const _regNameTable = const [0x0000, 0x0000, 0x7ff2, 0x2bff, 0xfffe, 0x8
7ff, 0xfffe, 0x47ff]; | 1273 static const _regNameTable = const [0x0000, 0x0000, 0x7ff2, 0x2bff, 0xfffe, 0x8
7ff, 0xfffe, 0x47ff]; |
| 1298 static const _pathCharTable = const [0x0000, 0x0000, 0x7fd2, 0x2fff, 0xffff, 0x
87ff, 0xfffe, 0x47ff]; | 1274 static const _pathCharTable = const [0x0000, 0x0000, 0x7fd2, 0x2fff, 0xffff, 0x
87ff, 0xfffe, 0x47ff]; |
| 1299 static const _pathCharOrSlashTable = const [0x0000, 0x0000, 0xffd2, 0x2fff, 0xf
fff, 0x87ff, 0xfffe, 0x47ff]; | 1275 static const _pathCharOrSlashTable = const [0x0000, 0x0000, 0xffd2, 0x2fff, 0xf
fff, 0x87ff, 0xfffe, 0x47ff]; |
| 1300 static const _queryCharTable = const [0x0000, 0x0000, 0xffd2, 0xafff, 0xffff, 0
x87ff, 0xfffe, 0x47ff]; | 1276 static const _queryCharTable = const [0x0000, 0x0000, 0xffd2, 0xafff, 0xffff, 0
x87ff, 0xfffe, 0x47ff]; |
| 1301 } | 1277 } |
| 1302 typedef void __t14(String __u15); | 1278 typedef void __t13(String __u14); |
| 1303 typedef dynamic __t16(dynamic __u17); | 1279 typedef dynamic __t15(dynamic __u16); |
| 1304 typedef dynamic __t23(String __u24); | 1280 typedef dynamic __t20(String __u21); |
| 1305 typedef String __t25(dynamic __u26); | 1281 typedef String __t22(dynamic __u23); |
| 1306 typedef void __t30(String __u31, String __u32); | 1282 typedef void __t25(String __u26, String __u27); |
| 1307 typedef dynamic __t33(dynamic __u34, dynamic __u35); | 1283 typedef dynamic __t28(dynamic __u29, dynamic __u30); |
| 1308 typedef dynamic __t45(dynamic __u46, String __u47); | 1284 typedef dynamic __t38(dynamic __u39, String __u40); |
| OLD | NEW |