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

Side by Side Diff: test/dart_codegen/expect/core/uri.dart

Issue 961493003: don't run dart gen on JS patch code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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 | « test/dart_codegen/expect/core/string_buffer.dart ('k') | test/dart_codegen/expect/math/math » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of dart.core; 1 part of dart.core;
2 2
3 class Uri { 3 class Uri {
4 final String _host; 4 final String _host;
5 num _port; 5 num _port;
6 String _path; 6 String _path;
7 final String scheme; 7 final String scheme;
8 String get authority { 8 String get authority {
9 if (!hasAuthority) return ""; 9 if (!hasAuthority) return "";
10 var sb = new StringBuffer(); 10 var sb = new StringBuffer();
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 return new Uri( 279 return new Uri(
280 scheme: scheme, 280 scheme: scheme,
281 userInfo: userInfo, 281 userInfo: userInfo,
282 host: host, 282 host: host,
283 port: port, 283 port: port,
284 pathSegments: unencodedPath.split("/"), 284 pathSegments: unencodedPath.split("/"),
285 queryParameters: queryParameters); 285 queryParameters: queryParameters);
286 } 286 }
287 factory Uri.file(String path, {bool windows}) { 287 factory Uri.file(String path, {bool windows}) {
288 windows = windows == null ? Uri._isWindows : windows; 288 windows = windows == null ? Uri._isWindows : windows;
289 return ((__x41) => DDC$RT.cast(__x41, dynamic, Uri, "CastGeneral", 289 return ((__x10) => DDC$RT.cast(__x10, dynamic, Uri, "CastGeneral",
290 """line 698, column 12 of dart:core/uri.dart: """, __x41 is Uri, 290 """line 698, column 12 of dart:core/uri.dart: """, __x10 is Uri,
291 true))(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path)); 291 true))(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path));
292 } 292 }
293 static Uri get base { 293 external static Uri get base;
294 String uri = ((__x42) => DDC$RT.cast(__x42, dynamic, String, "CastGeneral", 294 external static bool get _isWindows;
295 """line 711, column 18 of dart:core/uri.dart: """, __x42 is String,
296 true))(Primitives.currentUri());
297 if (uri != null) return Uri.parse(uri);
298 throw new UnsupportedError("'Uri.base' is not supported");
299 }
300 static bool get _isWindows => false;
301 static _checkNonWindowsPathReservedCharacters( 295 static _checkNonWindowsPathReservedCharacters(
302 List<String> segments, bool argumentError) { 296 List<String> segments, bool argumentError) {
303 segments.forEach((segment) { 297 segments.forEach((segment) {
304 if (segment.contains("/")) { 298 if (segment.contains("/")) {
305 if (argumentError) { 299 if (argumentError) {
306 throw new ArgumentError("Illegal path character $segment"); 300 throw new ArgumentError("Illegal path character $segment");
307 } else { 301 } else {
308 throw new UnsupportedError("Illegal path character $segment"); 302 throw new UnsupportedError("Illegal path character $segment");
309 } 303 }
310 } 304 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 397 }
404 bool isFile = (scheme == "file"); 398 bool isFile = (scheme == "file");
405 if (userInfo != null) { 399 if (userInfo != null) {
406 userInfo = _makeUserInfo(userInfo, 0, userInfo.length); 400 userInfo = _makeUserInfo(userInfo, 0, userInfo.length);
407 } else { 401 } else {
408 userInfo = this.userInfo; 402 userInfo = this.userInfo;
409 } 403 }
410 if (port != null) { 404 if (port != null) {
411 port = _makePort(port, scheme); 405 port = _makePort(port, scheme);
412 } else { 406 } else {
413 port = ((__x43) => DDC$RT.cast(__x43, num, int, "CastGeneral", 407 port = ((__x11) => DDC$RT.cast(__x11, num, int, "CastGeneral",
414 """line 893, column 14 of dart:core/uri.dart: """, __x43 is int, 408 """line 889, column 14 of dart:core/uri.dart: """, __x11 is int,
415 true))(this._port); 409 true))(this._port);
416 if (schemeChanged) { 410 if (schemeChanged) {
417 port = _makePort(port, scheme); 411 port = _makePort(port, scheme);
418 } 412 }
419 } 413 }
420 if (host != null) { 414 if (host != null) {
421 host = _makeHost(host, 0, host.length, false); 415 host = _makeHost(host, 0, host.length, false);
422 } else if (this.hasAuthority) { 416 } else if (this.hasAuthority) {
423 host = this.host; 417 host = this.host;
424 } else if (userInfo.isNotEmpty || port != null || isFile) { 418 } else if (userInfo.isNotEmpty || port != null || isFile) {
(...skipping 21 matching lines...) Expand all
446 fragment = this.fragment; 440 fragment = this.fragment;
447 } 441 }
448 return new Uri._internal( 442 return new Uri._internal(
449 scheme, userInfo, host, port, path, query, fragment); 443 scheme, userInfo, host, port, path, query, fragment);
450 } 444 }
451 List<String> get pathSegments { 445 List<String> get pathSegments {
452 if (_pathSegments == null) { 446 if (_pathSegments == null) {
453 var pathToSplit = !path.isEmpty && path.codeUnitAt(0) == _SLASH 447 var pathToSplit = !path.isEmpty && path.codeUnitAt(0) == _SLASH
454 ? path.substring(1) 448 ? path.substring(1)
455 : path; 449 : path;
456 _pathSegments = ((__x44) => DDC$RT.cast(__x44, 450 _pathSegments = ((__x12) => DDC$RT.cast(__x12,
457 DDC$RT.type((DDC$collection$.UnmodifiableListView<dynamic> _) {}), 451 DDC$RT.type((DDC$collection$.UnmodifiableListView<dynamic> _) {}),
458 DDC$RT.type((List<String> _) {}), "CastExact", 452 DDC$RT.type((List<String> _) {}), "CastExact",
459 """line 949, column 23 of dart:core/uri.dart: """, 453 """line 945, column 23 of dart:core/uri.dart: """,
460 __x44 is List<String>, false))(new UnmodifiableListView( 454 __x12 is List<String>, false))(new UnmodifiableListView(
461 pathToSplit == "" 455 pathToSplit == ""
462 ? const <String>[] 456 ? const <String>[]
463 : pathToSplit 457 : pathToSplit
464 .split("/") 458 .split("/")
465 .map(Uri.decodeComponent) 459 .map(Uri.decodeComponent)
466 .toList(growable: false))); 460 .toList(growable: false)));
467 } 461 }
468 return _pathSegments; 462 return _pathSegments;
469 } 463 }
470 Map<String, String> get queryParameters { 464 Map<String, String> get queryParameters {
471 if (_queryParameters == null) { 465 if (_queryParameters == null) {
472 _queryParameters = ((__x45) => DDC$RT.cast(__x45, DDC$RT.type( 466 _queryParameters = ((__x13) => DDC$RT.cast(__x13, DDC$RT.type(
473 (DDC$collection$.UnmodifiableMapView<dynamic, dynamic> _) {}), 467 (DDC$collection$.UnmodifiableMapView<dynamic, dynamic> _) {}),
474 DDC$RT.type((Map<String, String> _) {}), "CastExact", 468 DDC$RT.type((Map<String, String> _) {}), "CastExact",
475 """line 973, column 26 of dart:core/uri.dart: """, 469 """line 969, column 26 of dart:core/uri.dart: """,
476 __x45 is Map<String, String>, 470 __x13 is Map<String, String>,
477 false))(new UnmodifiableMapView(splitQueryString(query))); 471 false))(new UnmodifiableMapView(splitQueryString(query)));
478 } 472 }
479 return _queryParameters; 473 return _queryParameters;
480 } 474 }
481 static int _makePort(int port, String scheme) { 475 static int _makePort(int port, String scheme) {
482 if (port != null && port == _defaultPort(scheme)) return ((__x46) => DDC$RT 476 if (port != null && port == _defaultPort(scheme)) return ((__x14) => DDC$RT
483 .cast(__x46, Null, int, "CastLiteral", 477 .cast(__x14, Null, int, "CastLiteral",
484 """line 980, column 62 of dart:core/uri.dart: """, __x46 is int, 478 """line 976, column 62 of dart:core/uri.dart: """, __x14 is int,
485 true))(null); 479 true))(null);
486 return port; 480 return port;
487 } 481 }
488 static String _makeHost(String host, int start, int end, bool strictIPv6) { 482 static String _makeHost(String host, int start, int end, bool strictIPv6) {
489 if (host == null) return null; 483 if (host == null) return null;
490 if (start == end) return ""; 484 if (start == end) return "";
491 if (host.codeUnitAt(start) == _LEFT_BRACKET) { 485 if (host.codeUnitAt(start) == _LEFT_BRACKET) {
492 if (host.codeUnitAt(end - 1) != _RIGHT_BRACKET) { 486 if (host.codeUnitAt(end - 1) != _RIGHT_BRACKET) {
493 _fail(host, start, 'Missing end `]` to match `[` in host'); 487 _fail(host, start, 'Missing end `]` to match `[` in host');
494 } 488 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } 585 }
592 } 586 }
593 scheme = scheme.substring(0, end); 587 scheme = scheme.substring(0, end);
594 if (!allLowercase) scheme = scheme.toLowerCase(); 588 if (!allLowercase) scheme = scheme.toLowerCase();
595 return scheme; 589 return scheme;
596 } 590 }
597 static String _makeUserInfo(String userInfo, int start, int end) { 591 static String _makeUserInfo(String userInfo, int start, int end) {
598 if (userInfo == null) return ""; 592 if (userInfo == null) return "";
599 return _normalize(userInfo, start, end, DDC$RT.cast(_userinfoTable, dynamic, 593 return _normalize(userInfo, start, end, DDC$RT.cast(_userinfoTable, dynamic,
600 DDC$RT.type((List<int> _) {}), "CastGeneral", 594 DDC$RT.type((List<int> _) {}), "CastGeneral",
601 """line 1130, column 45 of dart:core/uri.dart: """, 595 """line 1126, column 45 of dart:core/uri.dart: """,
602 _userinfoTable is List<int>, false)); 596 _userinfoTable is List<int>, false));
603 } 597 }
604 static String _makePath(String path, int start, int end, 598 static String _makePath(String path, int start, int end,
605 Iterable<String> pathSegments, bool ensureLeadingSlash, bool isFile) { 599 Iterable<String> pathSegments, bool ensureLeadingSlash, bool isFile) {
606 if (path == null && pathSegments == null) return isFile ? "/" : ""; 600 if (path == null && pathSegments == null) return isFile ? "/" : "";
607 if (path != null && pathSegments != null) { 601 if (path != null && pathSegments != null) {
608 throw new ArgumentError('Both path and pathSegments specified'); 602 throw new ArgumentError('Both path and pathSegments specified');
609 } 603 }
610 var result; 604 var result;
611 if (path != null) { 605 if (path != null) {
612 result = _normalize(path, start, end, DDC$RT.cast(_pathCharOrSlashTable, 606 result = _normalize(path, start, end, DDC$RT.cast(_pathCharOrSlashTable,
613 dynamic, DDC$RT.type((List<int> _) {}), "CastGeneral", 607 dynamic, DDC$RT.type((List<int> _) {}), "CastGeneral",
614 """line 1143, column 45 of dart:core/uri.dart: """, 608 """line 1139, column 45 of dart:core/uri.dart: """,
615 _pathCharOrSlashTable is List<int>, false)); 609 _pathCharOrSlashTable is List<int>, false));
616 } else { 610 } else {
617 result = pathSegments 611 result = pathSegments
618 .map((s) => _uriEncode(DDC$RT.cast(_pathCharTable, dynamic, 612 .map((s) => _uriEncode(DDC$RT.cast(_pathCharTable, dynamic,
619 DDC$RT.type((List<int> _) {}), "CastGeneral", 613 DDC$RT.type((List<int> _) {}), "CastGeneral",
620 """line 1145, column 51 of dart:core/uri.dart: """, 614 """line 1141, column 51 of dart:core/uri.dart: """,
621 _pathCharTable is List<int>, false), DDC$RT.cast(s, dynamic, 615 _pathCharTable is List<int>, false), DDC$RT.cast(s, dynamic,
622 String, "CastGeneral", 616 String, "CastGeneral",
623 """line 1145, column 67 of dart:core/uri.dart: """, s is String, 617 """line 1141, column 67 of dart:core/uri.dart: """, s is String,
624 true))) 618 true)))
625 .join("/"); 619 .join("/");
626 } 620 }
627 if (result.isEmpty) { 621 if (result.isEmpty) {
628 if (isFile) return "/"; 622 if (isFile) return "/";
629 } else if ((isFile || ensureLeadingSlash) && 623 } else if ((isFile || ensureLeadingSlash) &&
630 result.codeUnitAt(0) != _SLASH) { 624 result.codeUnitAt(0) != _SLASH) {
631 return "/$result"; 625 return "/$result";
632 } 626 }
633 return DDC$RT.cast(result, dynamic, String, "CastGeneral", 627 return DDC$RT.cast(result, dynamic, String, "CastGeneral",
634 """line 1153, column 12 of dart:core/uri.dart: """, result is String, 628 """line 1149, column 12 of dart:core/uri.dart: """, result is String,
635 true); 629 true);
636 } 630 }
637 static String _makeQuery( 631 static String _makeQuery(
638 String query, int start, int end, Map<String, String> queryParameters) { 632 String query, int start, int end, Map<String, String> queryParameters) {
639 if (query == null && queryParameters == null) return null; 633 if (query == null && queryParameters == null) return null;
640 if (query != null && queryParameters != null) { 634 if (query != null && queryParameters != null) {
641 throw new ArgumentError('Both query and queryParameters specified'); 635 throw new ArgumentError('Both query and queryParameters specified');
642 } 636 }
643 if (query != null) return _normalize(query, start, end, DDC$RT.cast( 637 if (query != null) return _normalize(query, start, end, DDC$RT.cast(
644 _queryCharTable, dynamic, DDC$RT.type((List<int> _) {}), "CastGeneral", 638 _queryCharTable, dynamic, DDC$RT.type((List<int> _) {}), "CastGeneral",
645 """line 1162, column 61 of dart:core/uri.dart: """, 639 """line 1158, column 61 of dart:core/uri.dart: """,
646 _queryCharTable is List<int>, false)); 640 _queryCharTable is List<int>, false));
647 var result = new StringBuffer(); 641 var result = new StringBuffer();
648 var first = true; 642 var first = true;
649 queryParameters.forEach((key, value) { 643 queryParameters.forEach((key, value) {
650 if (!first) { 644 if (!first) {
651 result.write("&"); 645 result.write("&");
652 } 646 }
653 first = false; 647 first = false;
654 result.write(Uri.encodeQueryComponent(DDC$RT.cast(key, dynamic, String, 648 result.write(Uri.encodeQueryComponent(DDC$RT.cast(key, dynamic, String,
655 "CastGeneral", """line 1171, column 45 of dart:core/uri.dart: """, 649 "CastGeneral", """line 1167, column 45 of dart:core/uri.dart: """,
656 key is String, true))); 650 key is String, true)));
657 if (value != null && !value.isEmpty) { 651 if (value != null && !value.isEmpty) {
658 result.write("="); 652 result.write("=");
659 result.write(Uri.encodeQueryComponent(DDC$RT.cast(value, dynamic, 653 result.write(Uri.encodeQueryComponent(DDC$RT.cast(value, dynamic,
660 String, "CastGeneral", 654 String, "CastGeneral",
661 """line 1174, column 47 of dart:core/uri.dart: """, value is String, 655 """line 1170, column 47 of dart:core/uri.dart: """, value is String,
662 true))); 656 true)));
663 } 657 }
664 }); 658 });
665 return result.toString(); 659 return result.toString();
666 } 660 }
667 static String _makeFragment(String fragment, int start, int end) { 661 static String _makeFragment(String fragment, int start, int end) {
668 if (fragment == null) return null; 662 if (fragment == null) return null;
669 return _normalize(fragment, start, end, DDC$RT.cast(_queryCharTable, 663 return _normalize(fragment, start, end, DDC$RT.cast(_queryCharTable,
670 dynamic, DDC$RT.type((List<int> _) {}), "CastGeneral", 664 dynamic, DDC$RT.type((List<int> _) {}), "CastGeneral",
671 """line 1182, column 45 of dart:core/uri.dart: """, 665 """line 1178, column 45 of dart:core/uri.dart: """,
672 _queryCharTable is List<int>, false)); 666 _queryCharTable is List<int>, false));
673 } 667 }
674 static int _stringOrNullLength(String s) => (s == null) ? 0 : s.length; 668 static int _stringOrNullLength(String s) => (s == null) ? 0 : s.length;
675 static bool _isHexDigit(int char) { 669 static bool _isHexDigit(int char) {
676 if (_NINE >= char) return _ZERO <= char; 670 if (_NINE >= char) return _ZERO <= char;
677 char |= 0x20; 671 char |= 0x20;
678 return _LOWER_CASE_A <= char && _LOWER_CASE_F >= char; 672 return _LOWER_CASE_A <= char && _LOWER_CASE_F >= char;
679 } 673 }
680 static int _hexValue(int char) { 674 static int _hexValue(int char) {
681 assert(_isHexDigit(char)); 675 assert(_isHexDigit(char));
(...skipping 26 matching lines...) Expand all
708 static bool _isUnreservedChar(int ch) { 702 static bool _isUnreservedChar(int ch) {
709 return ch < 127 && ((_unreservedTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); 703 return ch < 127 && ((_unreservedTable[ch >> 4] & (1 << (ch & 0x0f))) != 0);
710 } 704 }
711 static String _escapeChar(char) { 705 static String _escapeChar(char) {
712 assert(char <= 0x10ffff); 706 assert(char <= 0x10ffff);
713 const hexDigits = "0123456789ABCDEF"; 707 const hexDigits = "0123456789ABCDEF";
714 List codeUnits; 708 List codeUnits;
715 if (char < 0x80) { 709 if (char < 0x80) {
716 codeUnits = new List(3); 710 codeUnits = new List(3);
717 codeUnits[0] = _PERCENT; 711 codeUnits[0] = _PERCENT;
718 codeUnits[1] = hexDigits.codeUnitAt(((__x47) => DDC$RT.cast(__x47, 712 codeUnits[1] = hexDigits.codeUnitAt(((__x15) => DDC$RT.cast(__x15,
719 dynamic, int, "CastGeneral", 713 dynamic, int, "CastGeneral",
720 """line 1252, column 43 of dart:core/uri.dart: """, __x47 is int, 714 """line 1248, column 43 of dart:core/uri.dart: """, __x15 is int,
721 true))(char >> 4)); 715 true))(char >> 4));
722 codeUnits[2] = hexDigits.codeUnitAt(((__x48) => DDC$RT.cast(__x48, 716 codeUnits[2] = hexDigits.codeUnitAt(((__x16) => DDC$RT.cast(__x16,
723 dynamic, int, "CastGeneral", 717 dynamic, int, "CastGeneral",
724 """line 1253, column 43 of dart:core/uri.dart: """, __x48 is int, 718 """line 1249, column 43 of dart:core/uri.dart: """, __x16 is int,
725 true))(char & 0xf)); 719 true))(char & 0xf));
726 } else { 720 } else {
727 int flag = 0xc0; 721 int flag = 0xc0;
728 int encodedBytes = 2; 722 int encodedBytes = 2;
729 if (char > 0x7ff) { 723 if (char > 0x7ff) {
730 flag = 0xe0; 724 flag = 0xe0;
731 encodedBytes = 3; 725 encodedBytes = 3;
732 if (char > 0xffff) { 726 if (char > 0xffff) {
733 encodedBytes = 4; 727 encodedBytes = 4;
734 flag = 0xf0; 728 flag = 0xf0;
735 } 729 }
736 } 730 }
737 codeUnits = new List(3 * encodedBytes); 731 codeUnits = new List(3 * encodedBytes);
738 int index = 0; 732 int index = 0;
739 while (--encodedBytes >= 0) { 733 while (--encodedBytes >= 0) {
740 int byte = ((__x49) => DDC$RT.cast(__x49, dynamic, int, "CastGeneral", 734 int byte = ((__x17) => DDC$RT.cast(__x17, dynamic, int, "CastGeneral",
741 """line 1269, column 20 of dart:core/uri.dart: """, __x49 is int, 735 """line 1265, column 20 of dart:core/uri.dart: """, __x17 is int,
742 true))(((char >> (6 * encodedBytes)) & 0x3f) | flag); 736 true))(((char >> (6 * encodedBytes)) & 0x3f) | flag);
743 codeUnits[index] = _PERCENT; 737 codeUnits[index] = _PERCENT;
744 codeUnits[index + 1] = hexDigits.codeUnitAt(byte >> 4); 738 codeUnits[index + 1] = hexDigits.codeUnitAt(byte >> 4);
745 codeUnits[index + 2] = hexDigits.codeUnitAt(byte & 0xf); 739 codeUnits[index + 2] = hexDigits.codeUnitAt(byte & 0xf);
746 index += 3; 740 index += 3;
747 flag = 0x80; 741 flag = 0x80;
748 } 742 }
749 } 743 }
750 return new String.fromCharCodes(codeUnits); 744 return new String.fromCharCodes(codeUnits);
751 } 745 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 return base.substring(0, baseEnd + 1) + 831 return base.substring(0, baseEnd + 1) +
838 reference.substring(refStart - 3 * backCount); 832 reference.substring(refStart - 3 * backCount);
839 } 833 }
840 bool _hasDotSegments(String path) { 834 bool _hasDotSegments(String path) {
841 if (path.length > 0 && path.codeUnitAt(0) == _DOT) return true; 835 if (path.length > 0 && path.codeUnitAt(0) == _DOT) return true;
842 int index = path.indexOf("/."); 836 int index = path.indexOf("/.");
843 return index != -1; 837 return index != -1;
844 } 838 }
845 String _removeDotSegments(String path) { 839 String _removeDotSegments(String path) {
846 if (!_hasDotSegments(path)) return path; 840 if (!_hasDotSegments(path)) return path;
847 List<String> output = ((__x50) => DDC$RT.cast(__x50, 841 List<String> output = ((__x18) => DDC$RT.cast(__x18,
848 DDC$RT.type((List<dynamic> _) {}), DDC$RT.type((List<String> _) {}), 842 DDC$RT.type((List<dynamic> _) {}), DDC$RT.type((List<String> _) {}),
849 "CastLiteral", """line 1406, column 27 of dart:core/uri.dart: """, 843 "CastLiteral", """line 1402, column 27 of dart:core/uri.dart: """,
850 __x50 is List<String>, false))([]); 844 __x18 is List<String>, false))([]);
851 bool appendSlash = false; 845 bool appendSlash = false;
852 for (String segment in path.split("/")) { 846 for (String segment in path.split("/")) {
853 appendSlash = false; 847 appendSlash = false;
854 if (segment == "..") { 848 if (segment == "..") {
855 if (!output.isEmpty && 849 if (!output.isEmpty &&
856 ((output.length != 1) || (output[0] != ""))) output.removeLast(); 850 ((output.length != 1) || (output[0] != ""))) output.removeLast();
857 appendSlash = true; 851 appendSlash = true;
858 } else if ("." == segment) { 852 } else if ("." == segment) {
859 appendSlash = true; 853 appendSlash = true;
860 } else { 854 } else {
(...skipping 11 matching lines...) Expand all
872 String targetUserInfo = ""; 866 String targetUserInfo = "";
873 String targetHost; 867 String targetHost;
874 int targetPort; 868 int targetPort;
875 String targetPath; 869 String targetPath;
876 String targetQuery; 870 String targetQuery;
877 if (reference.scheme.isNotEmpty) { 871 if (reference.scheme.isNotEmpty) {
878 targetScheme = reference.scheme; 872 targetScheme = reference.scheme;
879 if (reference.hasAuthority) { 873 if (reference.hasAuthority) {
880 targetUserInfo = reference.userInfo; 874 targetUserInfo = reference.userInfo;
881 targetHost = reference.host; 875 targetHost = reference.host;
882 targetPort = ((__x51) => DDC$RT.cast(__x51, dynamic, int, "CastGeneral", 876 targetPort = ((__x19) => DDC$RT.cast(__x19, dynamic, int, "CastGeneral",
883 """line 1460, column 22 of dart:core/uri.dart: """, __x51 is int, 877 """line 1456, column 22 of dart:core/uri.dart: """, __x19 is int,
884 true))(reference.hasPort ? reference.port : null); 878 true))(reference.hasPort ? reference.port : null);
885 } 879 }
886 targetPath = _removeDotSegments(reference.path); 880 targetPath = _removeDotSegments(reference.path);
887 if (reference.hasQuery) { 881 if (reference.hasQuery) {
888 targetQuery = reference.query; 882 targetQuery = reference.query;
889 } 883 }
890 } else { 884 } else {
891 targetScheme = this.scheme; 885 targetScheme = this.scheme;
892 if (reference.hasAuthority) { 886 if (reference.hasAuthority) {
893 targetUserInfo = reference.userInfo; 887 targetUserInfo = reference.userInfo;
894 targetHost = reference.host; 888 targetHost = reference.host;
895 targetPort = _makePort(((__x52) => DDC$RT.cast(__x52, dynamic, int, 889 targetPort = _makePort(((__x20) => DDC$RT.cast(__x20, dynamic, int,
896 "CastGeneral", """line 1471, column 32 of dart:core/uri.dart: """, 890 "CastGeneral", """line 1467, column 32 of dart:core/uri.dart: """,
897 __x52 is int, 891 __x20 is int,
898 true))(reference.hasPort ? reference.port : null), targetScheme); 892 true))(reference.hasPort ? reference.port : null), targetScheme);
899 targetPath = _removeDotSegments(reference.path); 893 targetPath = _removeDotSegments(reference.path);
900 if (reference.hasQuery) targetQuery = reference.query; 894 if (reference.hasQuery) targetQuery = reference.query;
901 } else { 895 } else {
902 if (reference.path == "") { 896 if (reference.path == "") {
903 targetPath = this._path; 897 targetPath = this._path;
904 if (reference.hasQuery) { 898 if (reference.hasQuery) {
905 targetQuery = reference.query; 899 targetQuery = reference.query;
906 } else { 900 } else {
907 targetQuery = this._query; 901 targetQuery = this._query;
908 } 902 }
909 } else { 903 } else {
910 if (reference.path.startsWith("/")) { 904 if (reference.path.startsWith("/")) {
911 targetPath = _removeDotSegments(reference.path); 905 targetPath = _removeDotSegments(reference.path);
912 } else { 906 } else {
913 targetPath = _removeDotSegments(_merge(this._path, reference.path)); 907 targetPath = _removeDotSegments(_merge(this._path, reference.path));
914 } 908 }
915 if (reference.hasQuery) targetQuery = reference.query; 909 if (reference.hasQuery) targetQuery = reference.query;
916 } 910 }
917 targetUserInfo = this._userInfo; 911 targetUserInfo = this._userInfo;
918 targetHost = this._host; 912 targetHost = this._host;
919 targetPort = ((__x53) => DDC$RT.cast(__x53, num, int, "CastGeneral", 913 targetPort = ((__x21) => DDC$RT.cast(__x21, num, int, "CastGeneral",
920 """line 1493, column 22 of dart:core/uri.dart: """, __x53 is int, 914 """line 1489, column 22 of dart:core/uri.dart: """, __x21 is int,
921 true))(this._port); 915 true))(this._port);
922 } 916 }
923 } 917 }
924 String fragment = ((__x54) => DDC$RT.cast(__x54, dynamic, String, 918 String fragment = ((__x22) => DDC$RT.cast(__x22, dynamic, String,
925 "CastGeneral", """line 1496, column 23 of dart:core/uri.dart: """, 919 "CastGeneral", """line 1492, column 23 of dart:core/uri.dart: """,
926 __x54 is String, 920 __x22 is String,
927 true))(reference.hasFragment ? reference.fragment : null); 921 true))(reference.hasFragment ? reference.fragment : null);
928 return new Uri._internal(targetScheme, targetUserInfo, targetHost, 922 return new Uri._internal(targetScheme, targetUserInfo, targetHost,
929 targetPort, targetPath, targetQuery, fragment); 923 targetPort, targetPath, targetQuery, fragment);
930 } 924 }
931 bool get hasAuthority => _host != null; 925 bool get hasAuthority => _host != null;
932 bool get hasPort => _port != null; 926 bool get hasPort => _port != null;
933 bool get hasQuery => _query != null; 927 bool get hasQuery => _query != null;
934 bool get hasFragment => _fragment != null; 928 bool get hasFragment => _fragment != null;
935 String get origin { 929 String get origin {
936 if (scheme == "" || _host == null || _host == "") { 930 if (scheme == "" || _host == null || _host == "") {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 if (_fragment != null) { 1018 if (_fragment != null) {
1025 sb 1019 sb
1026 ..write("#") 1020 ..write("#")
1027 ..write(_fragment); 1021 ..write(_fragment);
1028 } 1022 }
1029 return sb.toString(); 1023 return sb.toString();
1030 } 1024 }
1031 bool operator ==(other) { 1025 bool operator ==(other) {
1032 if (other is! Uri) return false; 1026 if (other is! Uri) return false;
1033 Uri uri = DDC$RT.cast(other, dynamic, Uri, "CastGeneral", 1027 Uri uri = DDC$RT.cast(other, dynamic, Uri, "CastGeneral",
1034 """line 1702, column 15 of dart:core/uri.dart: """, other is Uri, true); 1028 """line 1698, column 15 of dart:core/uri.dart: """, other is Uri, true);
1035 return scheme == uri.scheme && 1029 return scheme == uri.scheme &&
1036 hasAuthority == uri.hasAuthority && 1030 hasAuthority == uri.hasAuthority &&
1037 userInfo == uri.userInfo && 1031 userInfo == uri.userInfo &&
1038 host == uri.host && 1032 host == uri.host &&
1039 port == uri.port && 1033 port == uri.port &&
1040 path == uri.path && 1034 path == uri.path &&
1041 hasQuery == uri.hasQuery && 1035 hasQuery == uri.hasQuery &&
1042 query == uri.query && 1036 query == uri.query &&
1043 hasFragment == uri.hasFragment && 1037 hasFragment == uri.hasFragment &&
1044 fragment == uri.fragment; 1038 fragment == uri.fragment;
1045 } 1039 }
1046 int get hashCode { 1040 int get hashCode {
1047 int combine(part, current) { 1041 int combine(part, current) {
1048 return ((__x55) => DDC$RT.cast(__x55, dynamic, int, "CastGeneral", 1042 return ((__x23) => DDC$RT.cast(__x23, dynamic, int, "CastGeneral",
1049 """line 1718, column 14 of dart:core/uri.dart: """, __x55 is int, 1043 """line 1714, column 14 of dart:core/uri.dart: """, __x23 is int,
1050 true))((current * 31 + part.hashCode) & 0x3FFFFFFF); 1044 true))((current * 31 + part.hashCode) & 0x3FFFFFFF);
1051 } 1045 }
1052 return combine(scheme, combine(userInfo, combine(host, 1046 return combine(scheme, combine(userInfo, combine(host,
1053 combine(port, combine(path, combine(query, combine(fragment, 1))))))); 1047 combine(port, combine(path, combine(query, combine(fragment, 1)))))));
1054 } 1048 }
1055 static void _addIfNonEmpty( 1049 static void _addIfNonEmpty(
1056 StringBuffer sb, String test, String first, String second) { 1050 StringBuffer sb, String test, String first, String second) {
1057 if ("" != test) { 1051 if ("" != test) {
1058 sb.write(first); 1052 sb.write(first);
1059 sb.write(second); 1053 sb.write(second);
1060 } 1054 }
1061 } 1055 }
1062 static String encodeComponent(String component) { 1056 static String encodeComponent(String component) {
1063 return _uriEncode(DDC$RT.cast(_unreserved2396Table, dynamic, 1057 return _uriEncode(DDC$RT.cast(_unreserved2396Table, dynamic,
1064 DDC$RT.type((List<int> _) {}), "CastGeneral", 1058 DDC$RT.type((List<int> _) {}), "CastGeneral",
1065 """line 1753, column 23 of dart:core/uri.dart: """, 1059 """line 1749, column 23 of dart:core/uri.dart: """,
1066 _unreserved2396Table is List<int>, false), component); 1060 _unreserved2396Table is List<int>, false), component);
1067 } 1061 }
1068 static String encodeQueryComponent(String component, 1062 static String encodeQueryComponent(String component,
1069 {Encoding encoding: UTF8}) { 1063 {Encoding encoding: UTF8}) {
1070 return _uriEncode(DDC$RT.cast(_unreservedTable, dynamic, 1064 return _uriEncode(DDC$RT.cast(_unreservedTable, dynamic,
1071 DDC$RT.type((List<int> _) {}), "CastGeneral", 1065 DDC$RT.type((List<int> _) {}), "CastGeneral",
1072 """line 1792, column 9 of dart:core/uri.dart: """, 1066 """line 1788, column 9 of dart:core/uri.dart: """,
1073 _unreservedTable is List<int>, false), component, 1067 _unreservedTable is List<int>, false), component,
1074 encoding: encoding, spaceToPlus: true); 1068 encoding: encoding, spaceToPlus: true);
1075 } 1069 }
1076 static String decodeComponent(String encodedComponent) { 1070 static String decodeComponent(String encodedComponent) {
1077 return _uriDecode(encodedComponent); 1071 return _uriDecode(encodedComponent);
1078 } 1072 }
1079 static String decodeQueryComponent(String encodedComponent, 1073 static String decodeQueryComponent(String encodedComponent,
1080 {Encoding encoding: UTF8}) { 1074 {Encoding encoding: UTF8}) {
1081 return _uriDecode(encodedComponent, plusToSpace: true, encoding: encoding); 1075 return _uriDecode(encodedComponent, plusToSpace: true, encoding: encoding);
1082 } 1076 }
1083 static String encodeFull(String uri) { 1077 static String encodeFull(String uri) {
1084 return _uriEncode(DDC$RT.cast(_encodeFullTable, dynamic, 1078 return _uriEncode(DDC$RT.cast(_encodeFullTable, dynamic,
1085 DDC$RT.type((List<int> _) {}), "CastGeneral", 1079 DDC$RT.type((List<int> _) {}), "CastGeneral",
1086 """line 1836, column 23 of dart:core/uri.dart: """, 1080 """line 1832, column 23 of dart:core/uri.dart: """,
1087 _encodeFullTable is List<int>, false), uri); 1081 _encodeFullTable is List<int>, false), uri);
1088 } 1082 }
1089 static String decodeFull(String uri) { 1083 static String decodeFull(String uri) {
1090 return _uriDecode(uri); 1084 return _uriDecode(uri);
1091 } 1085 }
1092 static Map<String, String> splitQueryString(String query, 1086 static Map<String, String> splitQueryString(String query,
1093 {Encoding encoding: UTF8}) { 1087 {Encoding encoding: UTF8}) {
1094 return ((__x56) => DDC$RT.cast(__x56, dynamic, 1088 return ((__x24) => DDC$RT.cast(__x24, dynamic,
1095 DDC$RT.type((Map<String, String> _) {}), "CastGeneral", 1089 DDC$RT.type((Map<String, String> _) {}), "CastGeneral",
1096 """line 1868, column 12 of dart:core/uri.dart: """, 1090 """line 1864, column 12 of dart:core/uri.dart: """,
1097 __x56 is Map<String, String>, false))(query 1091 __x24 is Map<String, String>, false))(query
1098 .split("&") 1092 .split("&")
1099 .fold({}, (map, element) { 1093 .fold({}, (map, element) {
1100 int index = ((__x57) => DDC$RT.cast(__x57, dynamic, int, "CastGeneral", 1094 int index = ((__x25) => DDC$RT.cast(__x25, dynamic, int, "CastGeneral",
1101 """line 1869, column 19 of dart:core/uri.dart: """, __x57 is int, 1095 """line 1865, column 19 of dart:core/uri.dart: """, __x25 is int,
1102 true))(element.indexOf("=")); 1096 true))(element.indexOf("="));
1103 if (index == -1) { 1097 if (index == -1) {
1104 if (element != "") { 1098 if (element != "") {
1105 map[decodeQueryComponent(DDC$RT.cast(element, dynamic, String, 1099 map[decodeQueryComponent(DDC$RT.cast(element, dynamic, String,
1106 "CastGeneral", """line 1872, column 36 of dart:core/uri.dart: """, 1100 "CastGeneral", """line 1868, column 36 of dart:core/uri.dart: """,
1107 element is String, true), encoding: encoding)] = ""; 1101 element is String, true), encoding: encoding)] = "";
1108 } 1102 }
1109 } else if (index != 0) { 1103 } else if (index != 0) {
1110 var key = element.substring(0, index); 1104 var key = element.substring(0, index);
1111 var value = element.substring(index + 1); 1105 var value = element.substring(index + 1);
1112 map[Uri.decodeQueryComponent(DDC$RT.cast(key, dynamic, String, 1106 map[Uri.decodeQueryComponent(DDC$RT.cast(key, dynamic, String,
1113 "CastGeneral", 1107 "CastGeneral",
1114 """line 1877, column 38 of dart:core/uri.dart: """, 1108 """line 1873, column 38 of dart:core/uri.dart: """,
1115 key is String, true), 1109 key is String, true),
1116 encoding: encoding)] = decodeQueryComponent(DDC$RT.cast(value, 1110 encoding: encoding)] = decodeQueryComponent(DDC$RT.cast(value,
1117 dynamic, String, "CastGeneral", 1111 dynamic, String, "CastGeneral",
1118 """line 1878, column 34 of dart:core/uri.dart: """, 1112 """line 1874, column 34 of dart:core/uri.dart: """,
1119 value is String, true), encoding: encoding); 1113 value is String, true), encoding: encoding);
1120 } 1114 }
1121 return map; 1115 return map;
1122 })); 1116 }));
1123 } 1117 }
1124 static List<int> parseIPv4Address(String host) { 1118 static List<int> parseIPv4Address(String host) {
1125 void error(String msg) { 1119 void error(String msg) {
1126 throw new FormatException('Illegal IPv4 address, $msg'); 1120 throw new FormatException('Illegal IPv4 address, $msg');
1127 } 1121 }
1128 var bytes = host.split('.'); 1122 var bytes = host.split('.');
1129 if (bytes.length != 4) { 1123 if (bytes.length != 4) {
1130 error('IPv4 address should contain exactly 4 parts'); 1124 error('IPv4 address should contain exactly 4 parts');
1131 } 1125 }
1132 return ((__x58) => DDC$RT.cast(__x58, DDC$RT.type((List<dynamic> _) {}), 1126 return ((__x26) => DDC$RT.cast(__x26, DDC$RT.type((List<dynamic> _) {}),
1133 DDC$RT.type((List<int> _) {}), "CastDynamic", 1127 DDC$RT.type((List<int> _) {}), "CastDynamic",
1134 """line 1900, column 12 of dart:core/uri.dart: """, __x58 is List<int>, 1128 """line 1896, column 12 of dart:core/uri.dart: """, __x26 is List<int>,
1135 false))(bytes.map((byteString) { 1129 false))(bytes.map((byteString) {
1136 int byte = int.parse(DDC$RT.cast(byteString, dynamic, String, 1130 int byte = int.parse(DDC$RT.cast(byteString, dynamic, String,
1137 "CastGeneral", """line 1902, column 32 of dart:core/uri.dart: """, 1131 "CastGeneral", """line 1898, column 32 of dart:core/uri.dart: """,
1138 byteString is String, true)); 1132 byteString is String, true));
1139 if (byte < 0 || byte > 255) { 1133 if (byte < 0 || byte > 255) {
1140 error('each part must be in the range of `0..255`'); 1134 error('each part must be in the range of `0..255`');
1141 } 1135 }
1142 return byte; 1136 return byte;
1143 }).toList()); 1137 }).toList());
1144 } 1138 }
1145 static List<int> parseIPv6Address(String host, [int start = 0, int end]) { 1139 static List<int> parseIPv6Address(String host, [int start = 0, int end]) {
1146 if (end == null) end = host.length; 1140 if (end == null) end = host.length;
1147 void error(String msg, [position]) { 1141 void error(String msg, [position]) {
1148 throw new FormatException('Illegal IPv6 address, $msg', host, position); 1142 throw new FormatException('Illegal IPv6 address, $msg', host, position);
1149 } 1143 }
1150 int parseHex(int start, int end) { 1144 int parseHex(int start, int end) {
1151 if (end - start > 4) { 1145 if (end - start > 4) {
1152 error('an IPv6 part can only contain a maximum of 4 hex digits', start); 1146 error('an IPv6 part can only contain a maximum of 4 hex digits', start);
1153 } 1147 }
1154 int value = int.parse(host.substring(start, end), radix: 16); 1148 int value = int.parse(host.substring(start, end), radix: 16);
1155 if (value < 0 || value > (1 << 16) - 1) { 1149 if (value < 0 || value > (1 << 16) - 1) {
1156 error('each part must be in the range of `0x0..0xFFFF`', start); 1150 error('each part must be in the range of `0x0..0xFFFF`', start);
1157 } 1151 }
1158 return value; 1152 return value;
1159 } 1153 }
1160 if (host.length < 2) error('address is too short'); 1154 if (host.length < 2) error('address is too short');
1161 List<int> parts = ((__x59) => DDC$RT.cast(__x59, 1155 List<int> parts = ((__x27) => DDC$RT.cast(__x27,
1162 DDC$RT.type((List<dynamic> _) {}), DDC$RT.type((List<int> _) {}), 1156 DDC$RT.type((List<dynamic> _) {}), DDC$RT.type((List<int> _) {}),
1163 "CastLiteral", """line 1950, column 23 of dart:core/uri.dart: """, 1157 "CastLiteral", """line 1946, column 23 of dart:core/uri.dart: """,
1164 __x59 is List<int>, false))([]); 1158 __x27 is List<int>, false))([]);
1165 bool wildcardSeen = false; 1159 bool wildcardSeen = false;
1166 int partStart = start; 1160 int partStart = start;
1167 for (int i = start; i < end; i++) { 1161 for (int i = start; i < end; i++) {
1168 if (host.codeUnitAt(i) == _COLON) { 1162 if (host.codeUnitAt(i) == _COLON) {
1169 if (i == start) { 1163 if (i == start) {
1170 i++; 1164 i++;
1171 if (host.codeUnitAt(i) != _COLON) { 1165 if (host.codeUnitAt(i) != _COLON) {
1172 error('invalid start colon.', i); 1166 error('invalid start colon.', i);
1173 } 1167 }
1174 partStart = i; 1168 partStart = i;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 index += 2; 1216 index += 2;
1223 } 1217 }
1224 } else { 1218 } else {
1225 bytes[index] = value >> 8; 1219 bytes[index] = value >> 8;
1226 bytes[index + 1] = value & 0xff; 1220 bytes[index + 1] = value & 0xff;
1227 index += 2; 1221 index += 2;
1228 } 1222 }
1229 } 1223 }
1230 return DDC$RT.cast(bytes, DDC$RT.type((List<dynamic> _) {}), 1224 return DDC$RT.cast(bytes, DDC$RT.type((List<dynamic> _) {}),
1231 DDC$RT.type((List<int> _) {}), "CastDynamic", 1225 DDC$RT.type((List<int> _) {}), "CastDynamic",
1232 """line 2022, column 12 of dart:core/uri.dart: """, bytes is List<int>, 1226 """line 2018, column 12 of dart:core/uri.dart: """, bytes is List<int>,
1233 false); 1227 false);
1234 } 1228 }
1235 static const int _SPACE = 0x20; 1229 static const int _SPACE = 0x20;
1236 static const int _DOUBLE_QUOTE = 0x22; 1230 static const int _DOUBLE_QUOTE = 0x22;
1237 static const int _NUMBER_SIGN = 0x23; 1231 static const int _NUMBER_SIGN = 0x23;
1238 static const int _PERCENT = 0x25; 1232 static const int _PERCENT = 0x25;
1239 static const int _ASTERISK = 0x2A; 1233 static const int _ASTERISK = 0x2A;
1240 static const int _PLUS = 0x2B; 1234 static const int _PLUS = 0x2B;
1241 static const int _DOT = 0x2E; 1235 static const int _DOT = 0x2E;
1242 static const int _SLASH = 0x2F; 1236 static const int _SLASH = 0x2F;
(...skipping 11 matching lines...) Expand all
1254 static const int _BACKSLASH = 0x5C; 1248 static const int _BACKSLASH = 0x5C;
1255 static const int _RIGHT_BRACKET = 0x5D; 1249 static const int _RIGHT_BRACKET = 0x5D;
1256 static const int _LOWER_CASE_A = 0x61; 1250 static const int _LOWER_CASE_A = 0x61;
1257 static const int _LOWER_CASE_F = 0x66; 1251 static const int _LOWER_CASE_F = 0x66;
1258 static const int _LOWER_CASE_Z = 0x7A; 1252 static const int _LOWER_CASE_Z = 0x7A;
1259 static const int _BAR = 0x7C; 1253 static const int _BAR = 0x7C;
1260 static String _uriEncode(List<int> canonicalTable, String text, 1254 static String _uriEncode(List<int> canonicalTable, String text,
1261 {Encoding encoding: UTF8, bool spaceToPlus: false}) { 1255 {Encoding encoding: UTF8, bool spaceToPlus: false}) {
1262 byteToHex(byte, buffer) { 1256 byteToHex(byte, buffer) {
1263 const String hex = '0123456789ABCDEF'; 1257 const String hex = '0123456789ABCDEF';
1264 buffer.writeCharCode(hex.codeUnitAt(((__x60) => DDC$RT.cast(__x60, 1258 buffer.writeCharCode(hex.codeUnitAt(((__x28) => DDC$RT.cast(__x28,
1265 dynamic, int, "CastGeneral", 1259 dynamic, int, "CastGeneral",
1266 """line 2063, column 43 of dart:core/uri.dart: """, __x60 is int, 1260 """line 2059, column 43 of dart:core/uri.dart: """, __x28 is int,
1267 true))(byte >> 4))); 1261 true))(byte >> 4)));
1268 buffer.writeCharCode(hex.codeUnitAt(((__x61) => DDC$RT.cast(__x61, 1262 buffer.writeCharCode(hex.codeUnitAt(((__x29) => DDC$RT.cast(__x29,
1269 dynamic, int, "CastGeneral", 1263 dynamic, int, "CastGeneral",
1270 """line 2064, column 43 of dart:core/uri.dart: """, __x61 is int, 1264 """line 2060, column 43 of dart:core/uri.dart: """, __x29 is int,
1271 true))(byte & 0x0f))); 1265 true))(byte & 0x0f)));
1272 } 1266 }
1273 StringBuffer result = new StringBuffer(); 1267 StringBuffer result = new StringBuffer();
1274 var bytes = encoding.encode(text); 1268 var bytes = encoding.encode(text);
1275 for (int i = 0; i < bytes.length; i++) { 1269 for (int i = 0; i < bytes.length; i++) {
1276 int byte = bytes[i]; 1270 int byte = bytes[i];
1277 if (byte < 128 && 1271 if (byte < 128 &&
1278 ((canonicalTable[byte >> 4] & (1 << (byte & 0x0f))) != 0)) { 1272 ((canonicalTable[byte >> 4] & (1 << (byte & 0x0f))) != 0)) {
1279 result.writeCharCode(byte); 1273 result.writeCharCode(byte);
1280 } else if (spaceToPlus && byte == _SPACE) { 1274 } else if (spaceToPlus && byte == _SPACE) {
(...skipping 30 matching lines...) Expand all
1311 simple = codeUnit != _PERCENT && codeUnit != _PLUS; 1305 simple = codeUnit != _PERCENT && codeUnit != _PLUS;
1312 } 1306 }
1313 List<int> bytes; 1307 List<int> bytes;
1314 if (simple) { 1308 if (simple) {
1315 if (encoding == UTF8 || encoding == LATIN1) { 1309 if (encoding == UTF8 || encoding == LATIN1) {
1316 return text; 1310 return text;
1317 } else { 1311 } else {
1318 bytes = text.codeUnits; 1312 bytes = text.codeUnits;
1319 } 1313 }
1320 } else { 1314 } else {
1321 bytes = ((__x62) => DDC$RT.cast(__x62, DDC$RT.type((List<dynamic> _) {}), 1315 bytes = ((__x30) => DDC$RT.cast(__x30, DDC$RT.type((List<dynamic> _) {}),
1322 DDC$RT.type((List<int> _) {}), "CastExact", 1316 DDC$RT.type((List<int> _) {}), "CastExact",
1323 """line 2138, column 15 of dart:core/uri.dart: """, 1317 """line 2134, column 15 of dart:core/uri.dart: """,
1324 __x62 is List<int>, false))(new List()); 1318 __x30 is List<int>, false))(new List());
1325 for (int i = 0; i < text.length; i++) { 1319 for (int i = 0; i < text.length; i++) {
1326 var codeUnit = text.codeUnitAt(i); 1320 var codeUnit = text.codeUnitAt(i);
1327 if (codeUnit > 127) { 1321 if (codeUnit > 127) {
1328 throw new ArgumentError("Illegal percent encoding in URI"); 1322 throw new ArgumentError("Illegal percent encoding in URI");
1329 } 1323 }
1330 if (codeUnit == _PERCENT) { 1324 if (codeUnit == _PERCENT) {
1331 if (i + 3 > text.length) { 1325 if (i + 3 > text.length) {
1332 throw new ArgumentError('Truncated URI'); 1326 throw new ArgumentError('Truncated URI');
1333 } 1327 }
1334 bytes.add(_hexCharPairToByte(text, i + 1)); 1328 bytes.add(_hexCharPairToByte(text, i + 1));
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 0x0000, 1453 0x0000,
1460 0x0000, 1454 0x0000,
1461 0xffd2, 1455 0xffd2,
1462 0xafff, 1456 0xafff,
1463 0xffff, 1457 0xffff,
1464 0x87ff, 1458 0x87ff,
1465 0xfffe, 1459 0xfffe,
1466 0x47ff 1460 0x47ff
1467 ]; 1461 ];
1468 } 1462 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/core/string_buffer.dart ('k') | test/dart_codegen/expect/math/math » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698