| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 _pathSegments = ((__x22) => DEVC$RT.cast(__x22, DEVC$RT.type((DDC$collectio
n$.UnmodifiableListView<dynamic> _) { | 443 _pathSegments = ((__x22) => DEVC$RT.cast(__x22, DEVC$RT.type((DDC$collectio
n$.UnmodifiableListView<dynamic> _) { |
| 444 } | 444 } |
| 445 ), DEVC$RT.type((List<String> _) { | 445 ), DEVC$RT.type((List<String> _) { |
| 446 } | 446 } |
| 447 ), "InferableAllocation", """line 945, column 23 of dart:core/uri.dart: """,
__x22 is List<String>, false))(new UnmodifiableListView(pathToSplit == "" ? con
st <String> [] : pathToSplit.split("/").map(Uri.decodeComponent).toList(growable
: false))); | 447 ), "InferableAllocation", """line 945, column 23 of dart:core/uri.dart: """,
__x22 is List<String>, false))(new UnmodifiableListView(pathToSplit == "" ? con
st <String> [] : pathToSplit.split("/").map(Uri.decodeComponent).toList(growable
: false))); |
| 448 } | 448 } |
| 449 return _pathSegments; | 449 return _pathSegments; |
| 450 } | 450 } |
| 451 Map<String, String> get queryParameters { | 451 Map<String, String> get queryParameters { |
| 452 if (_queryParameters == null) { | 452 if (_queryParameters == null) { |
| 453 _queryParameters = ((__x23) => DEVC$RT.cast(__x23, DEVC$RT.type((DDC$collect
ion$.UnmodifiableMapView<dynamic, dynamic> _) { | 453 _queryParameters = new UnmodifiableMapView<String, String>(splitQueryString(
query)); |
| 454 } | |
| 455 ), DEVC$RT.type((Map<String, String> _) { | |
| 456 } | |
| 457 ), "InferableAllocation", """line 969, column 26 of dart:core/uri.dart: """,
__x23 is Map<String, String>, false))(new UnmodifiableMapView(splitQueryString(
query))); | |
| 458 } | 454 } |
| 459 return _queryParameters; | 455 return _queryParameters; |
| 460 } | 456 } |
| 461 static int _makePort(int port, String scheme) { | 457 static int _makePort(int port, String scheme) { |
| 462 if (port != null && port == _defaultPort(scheme)) return null; | 458 if (port != null && port == _defaultPort(scheme)) return null; |
| 463 return port; | 459 return port; |
| 464 } | 460 } |
| 465 static String _makeHost(String host, int start, int end, bool strictIPv6) { | 461 static String _makeHost(String host, int start, int end, bool strictIPv6) { |
| 466 if (host == null) return null; | 462 if (host == null) return null; |
| 467 if (start == end) return ""; | 463 if (start == end) return ""; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 } | 586 } |
| 591 var result; | 587 var result; |
| 592 if (path != null) { | 588 if (path != null) { |
| 593 result = _normalize(path, start, end, DEVC$RT.cast(_pathCharOrSlashTable, DE
VC$RT.type((List<dynamic> _) { | 589 result = _normalize(path, start, end, DEVC$RT.cast(_pathCharOrSlashTable, DE
VC$RT.type((List<dynamic> _) { |
| 594 } | 590 } |
| 595 ), DEVC$RT.type((List<int> _) { | 591 ), DEVC$RT.type((List<int> _) { |
| 596 } | 592 } |
| 597 ), "CompositeCast", """line 1139, column 45 of dart:core/uri.dart: """, _pat
hCharOrSlashTable is List<int>, false)); | 593 ), "CompositeCast", """line 1139, column 45 of dart:core/uri.dart: """, _pat
hCharOrSlashTable is List<int>, false)); |
| 598 } | 594 } |
| 599 else { | 595 else { |
| 600 result = pathSegments.map(((__x29) => DEVC$RT.wrap((String f(dynamic __u24))
{ | 596 result = pathSegments.map(((__x28) => DEVC$RT.wrap((String f(dynamic __u23))
{ |
| 601 String c(dynamic x0) => f(x0); | 597 String c(dynamic x0) => f(x0); |
| 602 return f == null ? null : c; | 598 return f == null ? null : c; |
| 603 } | 599 } |
| 604 , __x29, __t27, __t25, "WrapLiteral", """line 1141, column 33 of dart:core/u
ri.dart: """, __x29 is __t25))((s) => _uriEncode(DEVC$RT.cast(_pathCharTable, DE
VC$RT.type((List<dynamic> _) { | 600 , __x28, __t26, __t24, "WrapLiteral", """line 1141, column 33 of dart:core/u
ri.dart: """, __x28 is __t24))((s) => _uriEncode(DEVC$RT.cast(_pathCharTable, DE
VC$RT.type((List<dynamic> _) { |
| 605 } | 601 } |
| 606 ), DEVC$RT.type((List<int> _) { | 602 ), DEVC$RT.type((List<int> _) { |
| 607 } | 603 } |
| 608 ), "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(
"/"); | 604 ), "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(
"/"); |
| 609 } | 605 } |
| 610 if (result.isEmpty) { | 606 if (result.isEmpty) { |
| 611 if (isFile) return "/"; | 607 if (isFile) return "/"; |
| 612 } | 608 } |
| 613 else if ((isFile || ensureLeadingSlash) && result.codeUnitAt(0) != _SLASH) { | 609 else if ((isFile || ensureLeadingSlash) && result.codeUnitAt(0) != _SLASH) { |
| 614 return "/$result"; | 610 return "/$result"; |
| 615 } | 611 } |
| 616 return DEVC$RT.cast(result, dynamic, String, "DynamicCast", """line 1149, col
umn 12 of dart:core/uri.dart: """, result is String, true); | 612 return DEVC$RT.cast(result, dynamic, String, "DynamicCast", """line 1149, col
umn 12 of dart:core/uri.dart: """, result is String, true); |
| 617 } | 613 } |
| 618 static String _makeQuery(String query, int start, int end, Map<String, String>
queryParameters) { | 614 static String _makeQuery(String query, int start, int end, Map<String, String>
queryParameters) { |
| 619 if (query == null && queryParameters == null) return null; | 615 if (query == null && queryParameters == null) return null; |
| 620 if (query != null && queryParameters != null) { | 616 if (query != null && queryParameters != null) { |
| 621 throw new ArgumentError('Both query and queryParameters specified'); | 617 throw new ArgumentError('Both query and queryParameters specified'); |
| 622 } | 618 } |
| 623 if (query != null) return _normalize(query, start, end, DEVC$RT.cast(_queryCh
arTable, DEVC$RT.type((List<dynamic> _) { | 619 if (query != null) return _normalize(query, start, end, DEVC$RT.cast(_queryCh
arTable, DEVC$RT.type((List<dynamic> _) { |
| 624 } | 620 } |
| 625 ), DEVC$RT.type((List<int> _) { | 621 ), DEVC$RT.type((List<int> _) { |
| 626 } | 622 } |
| 627 ), "CompositeCast", """line 1158, column 61 of dart:core/uri.dart: """, _query
CharTable is List<int>, false)); | 623 ), "CompositeCast", """line 1158, column 61 of dart:core/uri.dart: """, _query
CharTable is List<int>, false)); |
| 628 var result = new StringBuffer(); | 624 var result = new StringBuffer(); |
| 629 var first = true; | 625 var first = true; |
| 630 queryParameters.forEach(((__x38) => DEVC$RT.wrap((dynamic f(dynamic __u30, dy
namic __u31)) { | 626 queryParameters.forEach(((__x37) => DEVC$RT.wrap((dynamic f(dynamic __u29, dy
namic __u30)) { |
| 631 dynamic c(dynamic x0, dynamic x1) => f(x0, x1); | 627 dynamic c(dynamic x0, dynamic x1) => f(x0, x1); |
| 632 return f == null ? null : c; | 628 return f == null ? null : c; |
| 633 } | 629 } |
| 634 , __x38, __t35, __t32, "WrapLiteral", """line 1162, column 29 of dart:core/uri
.dart: """, __x38 is __t32))((key, value) { | 630 , __x37, __t34, __t31, "WrapLiteral", """line 1162, column 29 of dart:core/uri
.dart: """, __x37 is __t31))((key, value) { |
| 635 if (!first) { | 631 if (!first) { |
| 636 result.write("&"); | 632 result.write("&"); |
| 637 } | 633 } |
| 638 first = false; | 634 first = false; |
| 639 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))); | 635 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))); |
| 640 if (value != null && !value.isEmpty) { | 636 if (value != null && !value.isEmpty) { |
| 641 result.write("="); | 637 result.write("="); |
| 642 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))); | 638 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))); |
| 643 } | 639 } |
| 644 } | 640 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 } | 683 } |
| 688 static bool _isUnreservedChar(int ch) { | 684 static bool _isUnreservedChar(int ch) { |
| 689 return ch < 127 && ((_unreservedTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); | 685 return ch < 127 && ((_unreservedTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); |
| 690 } | 686 } |
| 691 static String _escapeChar(char) { | 687 static String _escapeChar(char) { |
| 692 assert (char <= 0x10ffff); const hexDigits = "0123456789ABCDEF"; | 688 assert (char <= 0x10ffff); const hexDigits = "0123456789ABCDEF"; |
| 693 List codeUnits; | 689 List codeUnits; |
| 694 if (char < 0x80) { | 690 if (char < 0x80) { |
| 695 codeUnits = new List(3); | 691 codeUnits = new List(3); |
| 696 codeUnits[0] = _PERCENT; | 692 codeUnits[0] = _PERCENT; |
| 697 codeUnits[1] = hexDigits.codeUnitAt(((__x39) => DEVC$RT.cast(__x39, dynamic
, int, "DynamicCast", """line 1248, column 43 of dart:core/uri.dart: """, __x39
is int, true))(char >> 4)); | 693 codeUnits[1] = hexDigits.codeUnitAt(((__x38) => DEVC$RT.cast(__x38, dynamic
, int, "DynamicCast", """line 1248, column 43 of dart:core/uri.dart: """, __x38
is int, true))(char >> 4)); |
| 698 codeUnits[2] = hexDigits.codeUnitAt(((__x40) => DEVC$RT.cast(__x40, dynamic
, int, "DynamicCast", """line 1249, column 43 of dart:core/uri.dart: """, __x40
is int, true))(char & 0xf)); | 694 codeUnits[2] = hexDigits.codeUnitAt(((__x39) => DEVC$RT.cast(__x39, dynamic
, int, "DynamicCast", """line 1249, column 43 of dart:core/uri.dart: """, __x39
is int, true))(char & 0xf)); |
| 699 } | 695 } |
| 700 else { | 696 else { |
| 701 int flag = 0xc0; | 697 int flag = 0xc0; |
| 702 int encodedBytes = 2; | 698 int encodedBytes = 2; |
| 703 if (char > 0x7ff) { | 699 if (char > 0x7ff) { |
| 704 flag = 0xe0; | 700 flag = 0xe0; |
| 705 encodedBytes = 3; | 701 encodedBytes = 3; |
| 706 if (char > 0xffff) { | 702 if (char > 0xffff) { |
| 707 encodedBytes = 4; | 703 encodedBytes = 4; |
| 708 flag = 0xf0; | 704 flag = 0xf0; |
| 709 } | 705 } |
| 710 } | 706 } |
| 711 codeUnits = new List(3 * encodedBytes); | 707 codeUnits = new List(3 * encodedBytes); |
| 712 int index = 0; | 708 int index = 0; |
| 713 while (--encodedBytes >= 0) { | 709 while (--encodedBytes >= 0) { |
| 714 int byte = ((__x41) => DEVC$RT.cast(__x41, dynamic, int, "DynamicCast", ""
"line 1265, column 20 of dart:core/uri.dart: """, __x41 is int, true))(((char >>
(6 * encodedBytes)) & 0x3f) | flag); | 710 int byte = ((__x40) => DEVC$RT.cast(__x40, dynamic, int, "DynamicCast", ""
"line 1265, column 20 of dart:core/uri.dart: """, __x40 is int, true))(((char >>
(6 * encodedBytes)) & 0x3f) | flag); |
| 715 codeUnits[index] = _PERCENT; | 711 codeUnits[index] = _PERCENT; |
| 716 codeUnits[index + 1] = hexDigits.codeUnitAt(byte >> 4); | 712 codeUnits[index + 1] = hexDigits.codeUnitAt(byte >> 4); |
| 717 codeUnits[index + 2] = hexDigits.codeUnitAt(byte & 0xf); | 713 codeUnits[index + 2] = hexDigits.codeUnitAt(byte & 0xf); |
| 718 index += 3; | 714 index += 3; |
| 719 flag = 0x80; | 715 flag = 0x80; |
| 720 } | 716 } |
| 721 } | 717 } |
| 722 return new String.fromCharCodes(DEVC$RT.cast(codeUnits, DEVC$RT.type((List<dy
namic> _) { | 718 return new String.fromCharCodes(DEVC$RT.cast(codeUnits, DEVC$RT.type((List<dy
namic> _) { |
| 723 } | 719 } |
| 724 ), DEVC$RT.type((Iterable<int> _) { | 720 ), DEVC$RT.type((Iterable<int> _) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 } | 808 } |
| 813 return base.substring(0, baseEnd + 1) + reference.substring(refStart - 3 * ba
ckCount); | 809 return base.substring(0, baseEnd + 1) + reference.substring(refStart - 3 * ba
ckCount); |
| 814 } | 810 } |
| 815 bool _hasDotSegments(String path) { | 811 bool _hasDotSegments(String path) { |
| 816 if (path.length > 0 && path.codeUnitAt(0) == _DOT) return true; | 812 if (path.length > 0 && path.codeUnitAt(0) == _DOT) return true; |
| 817 int index = path.indexOf("/."); | 813 int index = path.indexOf("/."); |
| 818 return index != -1; | 814 return index != -1; |
| 819 } | 815 } |
| 820 String _removeDotSegments(String path) { | 816 String _removeDotSegments(String path) { |
| 821 if (!_hasDotSegments(path)) return path; | 817 if (!_hasDotSegments(path)) return path; |
| 822 List<String> output = ((__x42) => DEVC$RT.cast(__x42, DEVC$RT.type((List<dyna
mic> _) { | 818 List<String> output = <String> []; |
| 823 } | |
| 824 ), DEVC$RT.type((List<String> _) { | |
| 825 } | |
| 826 ), "InferableLiteral", """line 1402, column 27 of dart:core/uri.dart: """, __x
42 is List<String>, false))([]); | |
| 827 bool appendSlash = false; | 819 bool appendSlash = false; |
| 828 for (String segment in path.split("/")) { | 820 for (String segment in path.split("/")) { |
| 829 appendSlash = false; | 821 appendSlash = false; |
| 830 if (segment == "..") { | 822 if (segment == "..") { |
| 831 if (!output.isEmpty && ((output.length != 1) || (output[0] != ""))) output
.removeLast(); | 823 if (!output.isEmpty && ((output.length != 1) || (output[0] != ""))) output
.removeLast(); |
| 832 appendSlash = true; | 824 appendSlash = true; |
| 833 } | 825 } |
| 834 else if ("." == segment) { | 826 else if ("." == segment) { |
| 835 appendSlash = true; | 827 appendSlash = true; |
| 836 } | 828 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 if (reference.path.startsWith("/")) { | 878 if (reference.path.startsWith("/")) { |
| 887 targetPath = _removeDotSegments(reference.path); | 879 targetPath = _removeDotSegments(reference.path); |
| 888 } | 880 } |
| 889 else { | 881 else { |
| 890 targetPath = _removeDotSegments(_merge(this._path, reference.path)); | 882 targetPath = _removeDotSegments(_merge(this._path, reference.path)); |
| 891 } | 883 } |
| 892 if (reference.hasQuery) targetQuery = reference.query; | 884 if (reference.hasQuery) targetQuery = reference.query; |
| 893 } | 885 } |
| 894 targetUserInfo = this._userInfo; | 886 targetUserInfo = this._userInfo; |
| 895 targetHost = this._host; | 887 targetHost = this._host; |
| 896 targetPort = ((__x43) => DEVC$RT.cast(__x43, num, int, "ImplicitCast", ""
"line 1489, column 22 of dart:core/uri.dart: """, __x43 is int, true))(this._por
t); | 888 targetPort = ((__x41) => DEVC$RT.cast(__x41, num, int, "ImplicitCast", ""
"line 1489, column 22 of dart:core/uri.dart: """, __x41 is int, true))(this._por
t); |
| 897 } | 889 } |
| 898 } | 890 } |
| 899 String fragment = reference.hasFragment ? reference.fragment : null; | 891 String fragment = reference.hasFragment ? reference.fragment : null; |
| 900 return new Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort
, targetPath, targetQuery, fragment); | 892 return new Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort
, targetPath, targetQuery, fragment); |
| 901 } | 893 } |
| 902 bool get hasAuthority => _host != null; | 894 bool get hasAuthority => _host != null; |
| 903 bool get hasPort => _port != null; | 895 bool get hasPort => _port != null; |
| 904 bool get hasQuery => _query != null; | 896 bool get hasQuery => _query != null; |
| 905 bool get hasFragment => _fragment != null; | 897 bool get hasFragment => _fragment != null; |
| 906 String get origin { | 898 String get origin { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 } | 983 } |
| 992 return sb.toString(); | 984 return sb.toString(); |
| 993 } | 985 } |
| 994 bool operator ==(other) { | 986 bool operator ==(other) { |
| 995 if (other is! Uri) return false; | 987 if (other is! Uri) return false; |
| 996 Uri uri = DEVC$RT.cast(other, dynamic, Uri, "DynamicCast", """line 1698, colu
mn 15 of dart:core/uri.dart: """, other is Uri, true); | 988 Uri uri = DEVC$RT.cast(other, dynamic, Uri, "DynamicCast", """line 1698, colu
mn 15 of dart:core/uri.dart: """, other is Uri, true); |
| 997 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; | 989 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; |
| 998 } | 990 } |
| 999 int get hashCode { | 991 int get hashCode { |
| 1000 int combine(part, current) { | 992 int combine(part, current) { |
| 1001 return ((__x44) => DEVC$RT.cast(__x44, dynamic, int, "DynamicCast", """line
1714, column 14 of dart:core/uri.dart: """, __x44 is int, true))((current * 31 +
part.hashCode) & 0x3FFFFFFF); | 993 return ((__x42) => DEVC$RT.cast(__x42, dynamic, int, "DynamicCast", """line
1714, column 14 of dart:core/uri.dart: """, __x42 is int, true))((current * 31 +
part.hashCode) & 0x3FFFFFFF); |
| 1002 } | 994 } |
| 1003 return combine(scheme, combine(userInfo, combine(host, combine(port, combine(
path, combine(query, combine(fragment, 1))))))); | 995 return combine(scheme, combine(userInfo, combine(host, combine(port, combine(
path, combine(query, combine(fragment, 1))))))); |
| 1004 } | 996 } |
| 1005 static void _addIfNonEmpty(StringBuffer sb, String test, String first, String s
econd) { | 997 static void _addIfNonEmpty(StringBuffer sb, String test, String first, String s
econd) { |
| 1006 if ("" != test) { | 998 if ("" != test) { |
| 1007 sb.write(first); | 999 sb.write(first); |
| 1008 sb.write(second); | 1000 sb.write(second); |
| 1009 } | 1001 } |
| 1010 } | 1002 } |
| 1011 static String encodeComponent(String component) { | 1003 static String encodeComponent(String component) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1038 ), DEVC$RT.type((List<int> _) { | 1030 ), DEVC$RT.type((List<int> _) { |
| 1039 } | 1031 } |
| 1040 ), "CompositeCast", """line 1832, column 23 of dart:core/uri.dart: """, _encod
eFullTable is List<int>, false), uri); | 1032 ), "CompositeCast", """line 1832, column 23 of dart:core/uri.dart: """, _encod
eFullTable is List<int>, false), uri); |
| 1041 } | 1033 } |
| 1042 static String decodeFull(String uri) { | 1034 static String decodeFull(String uri) { |
| 1043 return _uriDecode(uri); | 1035 return _uriDecode(uri); |
| 1044 } | 1036 } |
| 1045 static Map<String, String> splitQueryString(String query, { | 1037 static Map<String, String> splitQueryString(String query, { |
| 1046 Encoding encoding : UTF8} | 1038 Encoding encoding : UTF8} |
| 1047 ) { | 1039 ) { |
| 1048 return ((__x45) => DEVC$RT.cast(__x45, dynamic, DEVC$RT.type((Map<String, Stri
ng> _) { | 1040 return ((__x43) => DEVC$RT.cast(__x43, dynamic, DEVC$RT.type((Map<String, Stri
ng> _) { |
| 1049 } | 1041 } |
| 1050 ), "CompositeCast", """line 1864, column 12 of dart:core/uri.dart: """, __x45
is Map<String, String>, false))(query.split("&").fold({ | 1042 ), "CompositeCast", """line 1864, column 12 of dart:core/uri.dart: """, __x43
is Map<String, String>, false))(query.split("&").fold({ |
| 1051 } | 1043 } |
| 1052 , ((__x51) => DEVC$RT.wrap((dynamic f(dynamic __u46, dynamic __u47)) { | 1044 , ((__x49) => DEVC$RT.wrap((dynamic f(dynamic __u44, dynamic __u45)) { |
| 1053 dynamic c(dynamic x0, dynamic x1) => f(x0, x1); | 1045 dynamic c(dynamic x0, dynamic x1) => f(x0, x1); |
| 1054 return f == null ? null : c; | 1046 return f == null ? null : c; |
| 1055 } | 1047 } |
| 1056 , __x51, __t35, __t48, "WrapLiteral", """line 1864, column 38 of dart:core/uri
.dart: """, __x51 is __t48))((map, element) { | 1048 , __x49, __t34, __t46, "WrapLiteral", """line 1864, column 38 of dart:core/uri
.dart: """, __x49 is __t46))((map, element) { |
| 1057 int index = ((__x52) => DEVC$RT.cast(__x52, dynamic, int, "DynamicCast", """
line 1865, column 19 of dart:core/uri.dart: """, __x52 is int, true))(element.in
dexOf("=")); | 1049 int index = ((__x50) => DEVC$RT.cast(__x50, dynamic, int, "DynamicCast", """
line 1865, column 19 of dart:core/uri.dart: """, __x50 is int, true))(element.in
dexOf("=")); |
| 1058 if (index == -1) { | 1050 if (index == -1) { |
| 1059 if (element != "") { | 1051 if (element != "") { |
| 1060 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)] = ""; | 1052 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)] = ""; |
| 1061 } | 1053 } |
| 1062 } | 1054 } |
| 1063 else if (index != 0) { | 1055 else if (index != 0) { |
| 1064 var key = element.substring(0, index); | 1056 var key = element.substring(0, index); |
| 1065 var value = element.substring(index + 1); | 1057 var value = element.substring(index + 1); |
| 1066 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); | 1058 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); |
| 1067 } | 1059 } |
| 1068 return map; | 1060 return map; |
| 1069 } | 1061 } |
| 1070 ))); | 1062 ))); |
| 1071 } | 1063 } |
| 1072 static List<int> parseIPv4Address(String host) { | 1064 static List<int> parseIPv4Address(String host) { |
| 1073 void error(String msg) { | 1065 void error(String msg) { |
| 1074 throw new FormatException('Illegal IPv4 address, $msg'); | 1066 throw new FormatException('Illegal IPv4 address, $msg'); |
| 1075 } | 1067 } |
| 1076 var bytes = host.split('.'); | 1068 var bytes = host.split('.'); |
| 1077 if (bytes.length != 4) { | 1069 if (bytes.length != 4) { |
| 1078 error('IPv4 address should contain exactly 4 parts'); | 1070 error('IPv4 address should contain exactly 4 parts'); |
| 1079 } | 1071 } |
| 1080 return ((__x53) => DEVC$RT.cast(__x53, DEVC$RT.type((List<dynamic> _) { | 1072 return ((__x51) => DEVC$RT.cast(__x51, DEVC$RT.type((List<dynamic> _) { |
| 1081 } | 1073 } |
| 1082 ), DEVC$RT.type((List<int> _) { | 1074 ), DEVC$RT.type((List<int> _) { |
| 1083 } | 1075 } |
| 1084 ), "CompositeCast", """line 1896, column 12 of dart:core/uri.dart: """, __x53
is List<int>, false))(bytes.map(((__x55) => DEVC$RT.wrap((dynamic f(dynamic __u5
4)) { | 1076 ), "CompositeCast", """line 1896, column 12 of dart:core/uri.dart: """, __x51
is List<int>, false))(bytes.map(((__x53) => DEVC$RT.wrap((dynamic f(dynamic __u5
2)) { |
| 1085 dynamic c(dynamic x0) => f(x0); | 1077 dynamic c(dynamic x0) => f(x0); |
| 1086 return f == null ? null : c; | 1078 return f == null ? null : c; |
| 1087 } | 1079 } |
| 1088 , __x55, __t16, __t25, "WrapLiteral", """line 1897, column 14 of dart:core/uri
.dart: """, __x55 is __t25))((byteString) { | 1080 , __x53, __t16, __t24, "WrapLiteral", """line 1897, column 14 of dart:core/uri
.dart: """, __x53 is __t24))((byteString) { |
| 1089 int byte = int.parse(DEVC$RT.cast(byteString, dynamic, String, "DynamicCast"
, """line 1898, column 32 of dart:core/uri.dart: """, byteString is String, true
)); | 1081 int byte = int.parse(DEVC$RT.cast(byteString, dynamic, String, "DynamicCast"
, """line 1898, column 32 of dart:core/uri.dart: """, byteString is String, true
)); |
| 1090 if (byte < 0 || byte > 255) { | 1082 if (byte < 0 || byte > 255) { |
| 1091 error('each part must be in the range of `0..255`'); | 1083 error('each part must be in the range of `0..255`'); |
| 1092 } | 1084 } |
| 1093 return byte; | 1085 return byte; |
| 1094 } | 1086 } |
| 1095 )).toList()); | 1087 )).toList()); |
| 1096 } | 1088 } |
| 1097 static List<int> parseIPv6Address(String host, [int start = 0, int end]) { | 1089 static List<int> parseIPv6Address(String host, [int start = 0, int end]) { |
| 1098 if (end == null) end = host.length; | 1090 if (end == null) end = host.length; |
| 1099 void error(String msg, [position]) { | 1091 void error(String msg, [position]) { |
| 1100 throw new FormatException('Illegal IPv6 address, $msg', host, DEVC$RT.cast(p
osition, dynamic, int, "DynamicCast", """line 1933, column 69 of dart:core/uri.d
art: """, position is int, true)); | 1092 throw new FormatException('Illegal IPv6 address, $msg', host, DEVC$RT.cast(p
osition, dynamic, int, "DynamicCast", """line 1933, column 69 of dart:core/uri.d
art: """, position is int, true)); |
| 1101 } | 1093 } |
| 1102 int parseHex(int start, int end) { | 1094 int parseHex(int start, int end) { |
| 1103 if (end - start > 4) { | 1095 if (end - start > 4) { |
| 1104 error('an IPv6 part can only contain a maximum of 4 hex digits', start); | 1096 error('an IPv6 part can only contain a maximum of 4 hex digits', start); |
| 1105 } | 1097 } |
| 1106 int value = int.parse(host.substring(start, end), radix: 16); | 1098 int value = int.parse(host.substring(start, end), radix: 16); |
| 1107 if (value < 0 || value > (1 << 16) - 1) { | 1099 if (value < 0 || value > (1 << 16) - 1) { |
| 1108 error('each part must be in the range of `0x0..0xFFFF`', start); | 1100 error('each part must be in the range of `0x0..0xFFFF`', start); |
| 1109 } | 1101 } |
| 1110 return value; | 1102 return value; |
| 1111 } | 1103 } |
| 1112 if (host.length < 2) error('address is too short'); | 1104 if (host.length < 2) error('address is too short'); |
| 1113 List<int> parts = ((__x56) => DEVC$RT.cast(__x56, DEVC$RT.type((List<dynamic>
_) { | 1105 List<int> parts = <int> []; |
| 1114 } | |
| 1115 ), DEVC$RT.type((List<int> _) { | |
| 1116 } | |
| 1117 ), "InferableLiteral", """line 1946, column 23 of dart:core/uri.dart: """, __x
56 is List<int>, false))([]); | |
| 1118 bool wildcardSeen = false; | 1106 bool wildcardSeen = false; |
| 1119 int partStart = start; | 1107 int partStart = start; |
| 1120 for (int i = start; i < end; i++) { | 1108 for (int i = start; i < end; i++) { |
| 1121 if (host.codeUnitAt(i) == _COLON) { | 1109 if (host.codeUnitAt(i) == _COLON) { |
| 1122 if (i == start) { | 1110 if (i == start) { |
| 1123 i++; | 1111 i++; |
| 1124 if (host.codeUnitAt(i) != _COLON) { | 1112 if (host.codeUnitAt(i) != _COLON) { |
| 1125 error('invalid start colon.', i); | 1113 error('invalid start colon.', i); |
| 1126 } | 1114 } |
| 1127 partStart = i; | 1115 partStart = i; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 static const int _RIGHT_BRACKET = 0x5D; | 1202 static const int _RIGHT_BRACKET = 0x5D; |
| 1215 static const int _LOWER_CASE_A = 0x61; | 1203 static const int _LOWER_CASE_A = 0x61; |
| 1216 static const int _LOWER_CASE_F = 0x66; | 1204 static const int _LOWER_CASE_F = 0x66; |
| 1217 static const int _LOWER_CASE_Z = 0x7A; | 1205 static const int _LOWER_CASE_Z = 0x7A; |
| 1218 static const int _BAR = 0x7C; | 1206 static const int _BAR = 0x7C; |
| 1219 static String _uriEncode(List<int> canonicalTable, String text, { | 1207 static String _uriEncode(List<int> canonicalTable, String text, { |
| 1220 Encoding encoding : UTF8, bool spaceToPlus : false} | 1208 Encoding encoding : UTF8, bool spaceToPlus : false} |
| 1221 ) { | 1209 ) { |
| 1222 byteToHex(byte, buffer) { | 1210 byteToHex(byte, buffer) { |
| 1223 const String hex = '0123456789ABCDEF'; | 1211 const String hex = '0123456789ABCDEF'; |
| 1224 buffer.writeCharCode(hex.codeUnitAt(((__x57) => DEVC$RT.cast(__x57, dynamic
, int, "DynamicCast", """line 2059, column 43 of dart:core/uri.dart: """, __x57
is int, true))(byte >> 4))); | 1212 buffer.writeCharCode(hex.codeUnitAt(((__x54) => DEVC$RT.cast(__x54, dynamic
, int, "DynamicCast", """line 2059, column 43 of dart:core/uri.dart: """, __x54
is int, true))(byte >> 4))); |
| 1225 buffer.writeCharCode(hex.codeUnitAt(((__x58) => DEVC$RT.cast(__x58, dynamic
, int, "DynamicCast", """line 2060, column 43 of dart:core/uri.dart: """, __x58
is int, true))(byte & 0x0f))); | 1213 buffer.writeCharCode(hex.codeUnitAt(((__x55) => DEVC$RT.cast(__x55, dynamic
, int, "DynamicCast", """line 2060, column 43 of dart:core/uri.dart: """, __x55
is int, true))(byte & 0x0f))); |
| 1226 } | 1214 } |
| 1227 StringBuffer result = new StringBuffer(); | 1215 StringBuffer result = new StringBuffer(); |
| 1228 var bytes = encoding.encode(text); | 1216 var bytes = encoding.encode(text); |
| 1229 for (int i = 0; i < bytes.length; i++) { | 1217 for (int i = 0; i < bytes.length; i++) { |
| 1230 int byte = bytes[i]; | 1218 int byte = bytes[i]; |
| 1231 if (byte < 128 && ((canonicalTable[byte >> 4] & (1 << (byte & 0x0f))) != 0)
) { | 1219 if (byte < 128 && ((canonicalTable[byte >> 4] & (1 << (byte & 0x0f))) != 0)
) { |
| 1232 result.writeCharCode(byte); | 1220 result.writeCharCode(byte); |
| 1233 } | 1221 } |
| 1234 else if (spaceToPlus && byte == _SPACE) { | 1222 else if (spaceToPlus && byte == _SPACE) { |
| 1235 result.writeCharCode(_PLUS); | 1223 result.writeCharCode(_PLUS); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 List<int> bytes; | 1259 List<int> bytes; |
| 1272 if (simple) { | 1260 if (simple) { |
| 1273 if (encoding == UTF8 || encoding == LATIN1) { | 1261 if (encoding == UTF8 || encoding == LATIN1) { |
| 1274 return text; | 1262 return text; |
| 1275 } | 1263 } |
| 1276 else { | 1264 else { |
| 1277 bytes = text.codeUnits; | 1265 bytes = text.codeUnits; |
| 1278 } | 1266 } |
| 1279 } | 1267 } |
| 1280 else { | 1268 else { |
| 1281 bytes = ((__x59) => DEVC$RT.cast(__x59, DEVC$RT.type((List<dynamic> _) { | 1269 bytes = new List<int>(); |
| 1282 } | |
| 1283 ), DEVC$RT.type((List<int> _) { | |
| 1284 } | |
| 1285 ), "InferableAllocation", """line 2134, column 15 of dart:core/uri.dart: """
, __x59 is List<int>, false))(new List()); | |
| 1286 for (int i = 0; i < text.length; i++) { | 1270 for (int i = 0; i < text.length; i++) { |
| 1287 var codeUnit = text.codeUnitAt(i); | 1271 var codeUnit = text.codeUnitAt(i); |
| 1288 if (codeUnit > 127) { | 1272 if (codeUnit > 127) { |
| 1289 throw new ArgumentError("Illegal percent encoding in URI"); | 1273 throw new ArgumentError("Illegal percent encoding in URI"); |
| 1290 } | 1274 } |
| 1291 if (codeUnit == _PERCENT) { | 1275 if (codeUnit == _PERCENT) { |
| 1292 if (i + 3 > text.length) { | 1276 if (i + 3 > text.length) { |
| 1293 throw new ArgumentError('Truncated URI'); | 1277 throw new ArgumentError('Truncated URI'); |
| 1294 } | 1278 } |
| 1295 bytes.add(_hexCharPairToByte(text, i + 1)); | 1279 bytes.add(_hexCharPairToByte(text, i + 1)); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1314 static const _subDelimitersTable = const [0x0000, 0x0000, 0x7fd2, 0x2bff, 0xfff
e, 0x87ff, 0xfffe, 0x47ff]; | 1298 static const _subDelimitersTable = const [0x0000, 0x0000, 0x7fd2, 0x2bff, 0xfff
e, 0x87ff, 0xfffe, 0x47ff]; |
| 1315 static const _genDelimitersTable = const [0x0000, 0x0000, 0x8008, 0x8400, 0x000
1, 0x2800, 0x0000, 0x0000]; | 1299 static const _genDelimitersTable = const [0x0000, 0x0000, 0x8008, 0x8400, 0x000
1, 0x2800, 0x0000, 0x0000]; |
| 1316 static const _userinfoTable = const [0x0000, 0x0000, 0x7fd2, 0x2fff, 0xfffe, 0x
87ff, 0xfffe, 0x47ff]; | 1300 static const _userinfoTable = const [0x0000, 0x0000, 0x7fd2, 0x2fff, 0xfffe, 0x
87ff, 0xfffe, 0x47ff]; |
| 1317 static const _regNameTable = const [0x0000, 0x0000, 0x7ff2, 0x2bff, 0xfffe, 0x8
7ff, 0xfffe, 0x47ff]; | 1301 static const _regNameTable = const [0x0000, 0x0000, 0x7ff2, 0x2bff, 0xfffe, 0x8
7ff, 0xfffe, 0x47ff]; |
| 1318 static const _pathCharTable = const [0x0000, 0x0000, 0x7fd2, 0x2fff, 0xffff, 0x
87ff, 0xfffe, 0x47ff]; | 1302 static const _pathCharTable = const [0x0000, 0x0000, 0x7fd2, 0x2fff, 0xffff, 0x
87ff, 0xfffe, 0x47ff]; |
| 1319 static const _pathCharOrSlashTable = const [0x0000, 0x0000, 0xffd2, 0x2fff, 0xf
fff, 0x87ff, 0xfffe, 0x47ff]; | 1303 static const _pathCharOrSlashTable = const [0x0000, 0x0000, 0xffd2, 0x2fff, 0xf
fff, 0x87ff, 0xfffe, 0x47ff]; |
| 1320 static const _queryCharTable = const [0x0000, 0x0000, 0xffd2, 0xafff, 0xffff, 0
x87ff, 0xfffe, 0x47ff]; | 1304 static const _queryCharTable = const [0x0000, 0x0000, 0xffd2, 0xafff, 0xffff, 0
x87ff, 0xfffe, 0x47ff]; |
| 1321 } | 1305 } |
| 1322 typedef void __t14(String __u15); | 1306 typedef void __t14(String __u15); |
| 1323 typedef dynamic __t16(dynamic __u17); | 1307 typedef dynamic __t16(dynamic __u17); |
| 1324 typedef dynamic __t25(String __u26); | 1308 typedef dynamic __t24(String __u25); |
| 1325 typedef String __t27(dynamic __u28); | 1309 typedef String __t26(dynamic __u27); |
| 1326 typedef void __t32(String __u33, String __u34); | 1310 typedef void __t31(String __u32, String __u33); |
| 1327 typedef dynamic __t35(dynamic __u36, dynamic __u37); | 1311 typedef dynamic __t34(dynamic __u35, dynamic __u36); |
| 1328 typedef dynamic __t48(dynamic __u49, String __u50); | 1312 typedef dynamic __t46(dynamic __u47, String __u48); |
| OLD | NEW |