| OLD | NEW |
| 1 var core; | 1 var core; |
| 2 (function(exports) { | 2 (function(exports) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 class Object { | 4 class Object { |
| 5 constructor() { | 5 constructor() { |
| 6 let name = this.constructor.name; | 6 let name = this.constructor.name; |
| 7 let init = this[name]; | 7 let init = this[name]; |
| 8 let result = void 0; | 8 let result = void 0; |
| 9 if (init) | 9 if (init) |
| 10 result = init.apply(this, arguments); | 10 result = init.apply(this, arguments); |
| 11 return result === void 0 ? this : result; | 11 return result === void 0 ? this : result; |
| 12 } | 12 } |
| 13 ['=='](other) { | 13 ['=='](other) { |
| 14 return identical(this, other); | 14 return identical(this, other); |
| 15 } | 15 } |
| 16 get hashCode() { | 16 get hashCode() { |
| 17 return _js_helper.Primitives.objectHashCode(this); | 17 return _js_helper.Primitives.objectHashCode(this); |
| 18 } | 18 } |
| 19 toString() { | 19 toString() { |
| 20 return _js_helper.Primitives.objectToString(this); | 20 return _js_helper.Primitives.objectToString(this); |
| 21 } | 21 } |
| 22 noSuchMethod(invocation) { | 22 noSuchMethod(invocation) { |
| 23 throw new NoSuchMethodError(this, invocation.memberName, invocation.positi
onalArguments, invocation.namedArguments); | 23 throw new NoSuchMethodError(this, invocation.memberName, invocation.positi
onalArguments, invocation.namedArguments); |
| 24 } | 24 } |
| 25 get runtimeType() { | 25 get runtimeType() { |
| 26 return _js_helper.getRuntimeType(this); | 26 return dart.realRuntimeType(this); |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 class JsName extends Object { | 29 class JsName extends Object { |
| 30 JsName(opts) { | 30 JsName(opts) { |
| 31 let name = opts && 'name' in opts ? opts.name : null; | 31 let name = opts && 'name' in opts ? opts.name : null; |
| 32 this.name = name; | 32 this.name = name; |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 class JsPeerInterface extends Object { | 35 class JsPeerInterface extends Object { |
| 36 JsPeerInterface(opts) { | 36 JsPeerInterface(opts) { |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 } | 481 } |
| 482 get inMicroseconds() { | 482 get inMicroseconds() { |
| 483 return this[_duration]; | 483 return this[_duration]; |
| 484 } | 484 } |
| 485 ['=='](other) { | 485 ['=='](other) { |
| 486 if (!dart.is(other, Duration)) | 486 if (!dart.is(other, Duration)) |
| 487 return false; | 487 return false; |
| 488 return dart.equals(this[_duration], dart.dload(other, _duration)); | 488 return dart.equals(this[_duration], dart.dload(other, _duration)); |
| 489 } | 489 } |
| 490 get hashCode() { | 490 get hashCode() { |
| 491 return this[_duration].hashCode; | 491 return dart.hashCode(this[_duration]); |
| 492 } | 492 } |
| 493 compareTo(other) { | 493 compareTo(other) { |
| 494 return this[_duration].compareTo(other[_duration]); | 494 return this[_duration].compareTo(other[_duration]); |
| 495 } | 495 } |
| 496 toString() { | 496 toString() { |
| 497 // Function sixDigits: (int) → String | 497 // Function sixDigits: (int) → String |
| 498 function sixDigits(n) { | 498 function sixDigits(n) { |
| 499 if (dart.notNull(n) >= 100000) | 499 if (dart.notNull(n) >= 100000) |
| 500 return `${n}`; | 500 return `${n}`; |
| 501 if (dart.notNull(n) >= 10000) | 501 if (dart.notNull(n) >= 10000) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notN
ull(Duration.HOURS_PER_DAY); | 550 Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notN
ull(Duration.HOURS_PER_DAY); |
| 551 Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notN
ull(Duration.HOURS_PER_DAY); | 551 Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notN
ull(Duration.HOURS_PER_DAY); |
| 552 Duration.ZERO = dart.const(new Duration({seconds: 0})); | 552 Duration.ZERO = dart.const(new Duration({seconds: 0})); |
| 553 let _stringToSafeString = dart.JsSymbol('_stringToSafeString'); | 553 let _stringToSafeString = dart.JsSymbol('_stringToSafeString'); |
| 554 let _objectToString = dart.JsSymbol('_objectToString'); | 554 let _objectToString = dart.JsSymbol('_objectToString'); |
| 555 class Error extends Object { | 555 class Error extends Object { |
| 556 Error() { | 556 Error() { |
| 557 } | 557 } |
| 558 static safeToString(object) { | 558 static safeToString(object) { |
| 559 if (dart.is(object, num) || typeof object == 'boolean' || dart.notNull(nul
l == object)) { | 559 if (dart.is(object, num) || typeof object == 'boolean' || dart.notNull(nul
l == object)) { |
| 560 return object.toString(); | 560 return dart.toString(object); |
| 561 } | 561 } |
| 562 if (typeof object == 'string') { | 562 if (typeof object == 'string') { |
| 563 return Error[_stringToSafeString](object); | 563 return Error[_stringToSafeString](object); |
| 564 } | 564 } |
| 565 return Error[_objectToString](object); | 565 return Error[_objectToString](object); |
| 566 } | 566 } |
| 567 static [_stringToSafeString](string) { | 567 static [_stringToSafeString](string) { |
| 568 return _js_helper.jsonEncodeNative(string); | 568 return _js_helper.jsonEncodeNative(string); |
| 569 } | 569 } |
| 570 static [_objectToString](object) { | 570 static [_objectToString](object) { |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 } | 807 } |
| 808 sb.write(_symbolToString(key)); | 808 sb.write(_symbolToString(key)); |
| 809 sb.write(": "); | 809 sb.write(": "); |
| 810 sb.write(Error.safeToString(value)); | 810 sb.write(Error.safeToString(value)); |
| 811 i = dart.notNull(i) + 1; | 811 i = dart.notNull(i) + 1; |
| 812 }); | 812 }); |
| 813 } | 813 } |
| 814 if (this[_existingArgumentNames] == null) { | 814 if (this[_existingArgumentNames] == null) { |
| 815 return `NoSuchMethodError : method not found: '${this[_memberName]}'\n`
+ `Receiver: ${Error.safeToString(this[_receiver])}\n` + `Arguments: [${sb}]`; | 815 return `NoSuchMethodError : method not found: '${this[_memberName]}'\n`
+ `Receiver: ${Error.safeToString(this[_receiver])}\n` + `Arguments: [${sb}]`; |
| 816 } else { | 816 } else { |
| 817 let actualParameters = sb.toString(); | 817 let actualParameters = dart.toString(sb); |
| 818 sb = new StringBuffer(); | 818 sb = new StringBuffer(); |
| 819 for (let i = 0; dart.notNull(i) < dart.notNull(this[_existingArgumentNam
es][$length]); i = dart.notNull(i) + 1) { | 819 for (let i = 0; dart.notNull(i) < dart.notNull(this[_existingArgumentNam
es][$length]); i = dart.notNull(i) + 1) { |
| 820 if (dart.notNull(i) > 0) { | 820 if (dart.notNull(i) > 0) { |
| 821 sb.write(", "); | 821 sb.write(", "); |
| 822 } | 822 } |
| 823 sb.write(this[_existingArgumentNames][$get](i)); | 823 sb.write(this[_existingArgumentNames][$get](i)); |
| 824 } | 824 } |
| 825 let formalParameters = sb.toString(); | 825 let formalParameters = dart.toString(sb); |
| 826 return "NoSuchMethodError: incorrect number of arguments passed to " + `
method named '${this[_memberName]}'\n` + `Receiver: ${Error.safeToString(this[_r
eceiver])}\n` + `Tried calling: ${this[_memberName]}(${actualParameters})\n` + `
Found: ${this[_memberName]}(${formalParameters})`; | 826 return "NoSuchMethodError: incorrect number of arguments passed to " + `
method named '${this[_memberName]}'\n` + `Receiver: ${Error.safeToString(this[_r
eceiver])}\n` + `Tried calling: ${this[_memberName]}(${actualParameters})\n` + `
Found: ${this[_memberName]}(${formalParameters})`; |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 } | 829 } |
| 830 class UnsupportedError extends Error { | 830 class UnsupportedError extends Error { |
| 831 UnsupportedError(message) { | 831 UnsupportedError(message) { |
| 832 this.message = message; | 832 this.message = message; |
| 833 super.Error(); | 833 super.Error(); |
| 834 } | 834 } |
| 835 toString() { | 835 toString() { |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 generator = null; | 1101 generator = null; |
| 1102 if (dart.notNull(count) <= 0) | 1102 if (dart.notNull(count) <= 0) |
| 1103 return new (_internal.EmptyIterable$(E))(); | 1103 return new (_internal.EmptyIterable$(E))(); |
| 1104 return new (exports._GeneratorIterable$(E))(count, generator); | 1104 return new (exports._GeneratorIterable$(E))(count, generator); |
| 1105 } | 1105 } |
| 1106 [$join](separator) { | 1106 [$join](separator) { |
| 1107 if (separator === void 0) | 1107 if (separator === void 0) |
| 1108 separator = ""; | 1108 separator = ""; |
| 1109 let buffer = new StringBuffer(); | 1109 let buffer = new StringBuffer(); |
| 1110 buffer.writeAll(this, separator); | 1110 buffer.writeAll(this, separator); |
| 1111 return buffer.toString(); | 1111 return dart.toString(buffer); |
| 1112 } | 1112 } |
| 1113 [dart.JsSymbol.iterator]() { | 1113 [dart.JsSymbol.iterator]() { |
| 1114 var iterator = this.iterator; | 1114 var iterator = this.iterator; |
| 1115 return { | 1115 return { |
| 1116 next() { | 1116 next() { |
| 1117 var done = iterator.moveNext(); | 1117 var done = iterator.moveNext(); |
| 1118 return {done: done, current: done ? void 0 : iterator.current}; | 1118 return {done: done, current: done ? void 0 : iterator.current}; |
| 1119 } | 1119 } |
| 1120 }; | 1120 }; |
| 1121 } | 1121 } |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2096 let _encodeFullTable = dart.JsSymbol('_encodeFullTable'); | 2096 let _encodeFullTable = dart.JsSymbol('_encodeFullTable'); |
| 2097 let _SPACE = dart.JsSymbol('_SPACE'); | 2097 let _SPACE = dart.JsSymbol('_SPACE'); |
| 2098 let _PLUS = dart.JsSymbol('_PLUS'); | 2098 let _PLUS = dart.JsSymbol('_PLUS'); |
| 2099 let _hexCharPairToByte = dart.JsSymbol('_hexCharPairToByte'); | 2099 let _hexCharPairToByte = dart.JsSymbol('_hexCharPairToByte'); |
| 2100 class Uri extends Object { | 2100 class Uri extends Object { |
| 2101 get authority() { | 2101 get authority() { |
| 2102 if (!dart.notNull(this.hasAuthority)) | 2102 if (!dart.notNull(this.hasAuthority)) |
| 2103 return ""; | 2103 return ""; |
| 2104 let sb = new StringBuffer(); | 2104 let sb = new StringBuffer(); |
| 2105 this[_writeAuthority](sb); | 2105 this[_writeAuthority](sb); |
| 2106 return sb.toString(); | 2106 return dart.toString(sb); |
| 2107 } | 2107 } |
| 2108 get userInfo() { | 2108 get userInfo() { |
| 2109 return this[_userInfo]; | 2109 return this[_userInfo]; |
| 2110 } | 2110 } |
| 2111 get host() { | 2111 get host() { |
| 2112 if (this[_host] == null) | 2112 if (this[_host] == null) |
| 2113 return ""; | 2113 return ""; |
| 2114 if (this[_host].startsWith('[')) { | 2114 if (this[_host].startsWith('[')) { |
| 2115 return this[_host].substring(1, dart.notNull(this[_host].length) - 1); | 2115 return this[_host].substring(1, dart.notNull(this[_host].length) - 1); |
| 2116 } | 2116 } |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2658 } | 2658 } |
| 2659 } | 2659 } |
| 2660 if (buffer == null) | 2660 if (buffer == null) |
| 2661 return host.substring(start, end); | 2661 return host.substring(start, end); |
| 2662 if (dart.notNull(sectionStart) < dart.notNull(end)) { | 2662 if (dart.notNull(sectionStart) < dart.notNull(end)) { |
| 2663 let slice = host.substring(sectionStart, end); | 2663 let slice = host.substring(sectionStart, end); |
| 2664 if (!dart.notNull(isNormalized)) | 2664 if (!dart.notNull(isNormalized)) |
| 2665 slice = slice.toLowerCase(); | 2665 slice = slice.toLowerCase(); |
| 2666 buffer.write(slice); | 2666 buffer.write(slice); |
| 2667 } | 2667 } |
| 2668 return buffer.toString(); | 2668 return dart.toString(buffer); |
| 2669 } | 2669 } |
| 2670 static [_makeScheme](scheme, end) { | 2670 static [_makeScheme](scheme, end) { |
| 2671 if (end == 0) | 2671 if (end == 0) |
| 2672 return ""; | 2672 return ""; |
| 2673 let firstCodeUnit = scheme.codeUnitAt(0); | 2673 let firstCodeUnit = scheme.codeUnitAt(0); |
| 2674 if (!dart.notNull(Uri[_isAlphabeticCharacter](firstCodeUnit))) { | 2674 if (!dart.notNull(Uri[_isAlphabeticCharacter](firstCodeUnit))) { |
| 2675 Uri[_fail](scheme, 0, "Scheme not starting with alphabetic character"); | 2675 Uri[_fail](scheme, 0, "Scheme not starting with alphabetic character"); |
| 2676 } | 2676 } |
| 2677 let allLowercase = dart.notNull(firstCodeUnit) >= dart.notNull(Uri[_LOWER_
CASE_A]); | 2677 let allLowercase = dart.notNull(firstCodeUnit) >= dart.notNull(Uri[_LOWER_
CASE_A]); |
| 2678 for (let i = 0; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) +
1) { | 2678 for (let i = 0; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) +
1) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2728 if (!dart.notNull(first)) { | 2728 if (!dart.notNull(first)) { |
| 2729 result.write("&"); | 2729 result.write("&"); |
| 2730 } | 2730 } |
| 2731 first = false; | 2731 first = false; |
| 2732 result.write(Uri.encodeQueryComponent(dart.as(key, String))); | 2732 result.write(Uri.encodeQueryComponent(dart.as(key, String))); |
| 2733 if (dart.notNull(value != null) && dart.notNull(dart.dsend(dart.dload(va
lue, 'isEmpty'), '!'))) { | 2733 if (dart.notNull(value != null) && dart.notNull(dart.dsend(dart.dload(va
lue, 'isEmpty'), '!'))) { |
| 2734 result.write("="); | 2734 result.write("="); |
| 2735 result.write(Uri.encodeQueryComponent(dart.as(value, String))); | 2735 result.write(Uri.encodeQueryComponent(dart.as(value, String))); |
| 2736 } | 2736 } |
| 2737 }); | 2737 }); |
| 2738 return result.toString(); | 2738 return dart.toString(result); |
| 2739 } | 2739 } |
| 2740 static [_makeFragment](fragment, start, end) { | 2740 static [_makeFragment](fragment, start, end) { |
| 2741 if (fragment == null) | 2741 if (fragment == null) |
| 2742 return null; | 2742 return null; |
| 2743 return Uri[_normalize](fragment, start, end, dart.as(Uri[_queryCharTable],
List$(int))); | 2743 return Uri[_normalize](fragment, start, end, dart.as(Uri[_queryCharTable],
List$(int))); |
| 2744 } | 2744 } |
| 2745 static [_stringOrNullLength](s) { | 2745 static [_stringOrNullLength](s) { |
| 2746 return s == null ? 0 : s.length; | 2746 return s == null ? 0 : s.length; |
| 2747 } | 2747 } |
| 2748 static [_isHexDigit](char) { | 2748 static [_isHexDigit](char) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2861 index = dart.notNull(index) + dart.notNull(sourceLength); | 2861 index = dart.notNull(index) + dart.notNull(sourceLength); |
| 2862 sectionStart = index; | 2862 sectionStart = index; |
| 2863 } | 2863 } |
| 2864 } | 2864 } |
| 2865 if (buffer == null) { | 2865 if (buffer == null) { |
| 2866 return component.substring(start, end); | 2866 return component.substring(start, end); |
| 2867 } | 2867 } |
| 2868 if (dart.notNull(sectionStart) < dart.notNull(end)) { | 2868 if (dart.notNull(sectionStart) < dart.notNull(end)) { |
| 2869 buffer.write(component.substring(sectionStart, end)); | 2869 buffer.write(component.substring(sectionStart, end)); |
| 2870 } | 2870 } |
| 2871 return buffer.toString(); | 2871 return dart.toString(buffer); |
| 2872 } | 2872 } |
| 2873 static [_isSchemeCharacter](ch) { | 2873 static [_isSchemeCharacter](ch) { |
| 2874 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Uri[
_schemeTable][$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)),
0)); | 2874 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Uri[
_schemeTable][$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)),
0)); |
| 2875 } | 2875 } |
| 2876 static [_isGeneralDelimiter](ch) { | 2876 static [_isGeneralDelimiter](ch) { |
| 2877 return dart.notNull(ch) <= dart.notNull(Uri[_RIGHT_BRACKET]) && dart.notNu
ll(!dart.equals(dart.dsend(Uri[_genDelimitersTable][$get](dart.notNull(ch) >> 4)
, '&', 1 << (dart.notNull(ch) & 15)), 0)); | 2877 return dart.notNull(ch) <= dart.notNull(Uri[_RIGHT_BRACKET]) && dart.notNu
ll(!dart.equals(dart.dsend(Uri[_genDelimitersTable][$get](dart.notNull(ch) >> 4)
, '&', 1 << (dart.notNull(ch) & 15)), 0)); |
| 2878 } | 2878 } |
| 2879 get isAbsolute() { | 2879 get isAbsolute() { |
| 2880 return this.scheme != "" && this.fragment == ""; | 2880 return this.scheme != "" && this.fragment == ""; |
| 2881 } | 2881 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3025 } | 3025 } |
| 3026 [_toFilePath]() { | 3026 [_toFilePath]() { |
| 3027 if (this.host != "") { | 3027 if (this.host != "") { |
| 3028 throw new UnsupportedError("Cannot extract a non-Windows file path from
a file URI " + "with an authority"); | 3028 throw new UnsupportedError("Cannot extract a non-Windows file path from
a file URI " + "with an authority"); |
| 3029 } | 3029 } |
| 3030 Uri[_checkNonWindowsPathReservedCharacters](this.pathSegments, false); | 3030 Uri[_checkNonWindowsPathReservedCharacters](this.pathSegments, false); |
| 3031 let result = new StringBuffer(); | 3031 let result = new StringBuffer(); |
| 3032 if (this[_isPathAbsolute]) | 3032 if (this[_isPathAbsolute]) |
| 3033 result.write("/"); | 3033 result.write("/"); |
| 3034 result.writeAll(this.pathSegments, "/"); | 3034 result.writeAll(this.pathSegments, "/"); |
| 3035 return result.toString(); | 3035 return dart.toString(result); |
| 3036 } | 3036 } |
| 3037 [_toWindowsFilePath]() { | 3037 [_toWindowsFilePath]() { |
| 3038 let hasDriveLetter = false; | 3038 let hasDriveLetter = false; |
| 3039 let segments = this.pathSegments; | 3039 let segments = this.pathSegments; |
| 3040 if (dart.notNull(segments[$length]) > 0 && segments[$get](0).length == 2 &
& segments[$get](0).codeUnitAt(1) == Uri[_COLON]) { | 3040 if (dart.notNull(segments[$length]) > 0 && segments[$get](0).length == 2 &
& segments[$get](0).codeUnitAt(1) == Uri[_COLON]) { |
| 3041 Uri[_checkWindowsDriveLetter](segments[$get](0).codeUnitAt(0), false); | 3041 Uri[_checkWindowsDriveLetter](segments[$get](0).codeUnitAt(0), false); |
| 3042 Uri[_checkWindowsPathReservedCharacters](segments, false, 1); | 3042 Uri[_checkWindowsPathReservedCharacters](segments, false, 1); |
| 3043 hasDriveLetter = true; | 3043 hasDriveLetter = true; |
| 3044 } else { | 3044 } else { |
| 3045 Uri[_checkWindowsPathReservedCharacters](segments, false); | 3045 Uri[_checkWindowsPathReservedCharacters](segments, false); |
| 3046 } | 3046 } |
| 3047 let result = new StringBuffer(); | 3047 let result = new StringBuffer(); |
| 3048 if (dart.notNull(this[_isPathAbsolute]) && !dart.notNull(hasDriveLetter)) | 3048 if (dart.notNull(this[_isPathAbsolute]) && !dart.notNull(hasDriveLetter)) |
| 3049 result.write("\\"); | 3049 result.write("\\"); |
| 3050 if (this.host != "") { | 3050 if (this.host != "") { |
| 3051 result.write("\\"); | 3051 result.write("\\"); |
| 3052 result.write(this.host); | 3052 result.write(this.host); |
| 3053 result.write("\\"); | 3053 result.write("\\"); |
| 3054 } | 3054 } |
| 3055 result.writeAll(segments, "\\"); | 3055 result.writeAll(segments, "\\"); |
| 3056 if (dart.notNull(hasDriveLetter) && segments[$length] == 1) | 3056 if (dart.notNull(hasDriveLetter) && segments[$length] == 1) |
| 3057 result.write("\\"); | 3057 result.write("\\"); |
| 3058 return result.toString(); | 3058 return dart.toString(result); |
| 3059 } | 3059 } |
| 3060 get [_isPathAbsolute]() { | 3060 get [_isPathAbsolute]() { |
| 3061 if (this.path == null || dart.notNull(this.path.isEmpty)) | 3061 if (this.path == null || dart.notNull(this.path.isEmpty)) |
| 3062 return false; | 3062 return false; |
| 3063 return this.path.startsWith('/'); | 3063 return this.path.startsWith('/'); |
| 3064 } | 3064 } |
| 3065 [_writeAuthority](ss) { | 3065 [_writeAuthority](ss) { |
| 3066 if (this[_userInfo].isNotEmpty) { | 3066 if (this[_userInfo].isNotEmpty) { |
| 3067 ss.write(this[_userInfo]); | 3067 ss.write(this[_userInfo]); |
| 3068 ss.write("@"); | 3068 ss.write("@"); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3083 } | 3083 } |
| 3084 sb.write(this.path); | 3084 sb.write(this.path); |
| 3085 if (this[_query] != null) { | 3085 if (this[_query] != null) { |
| 3086 sb.write("?"); | 3086 sb.write("?"); |
| 3087 sb.write(this[_query]); | 3087 sb.write(this[_query]); |
| 3088 } | 3088 } |
| 3089 if (this[_fragment] != null) { | 3089 if (this[_fragment] != null) { |
| 3090 sb.write("#"); | 3090 sb.write("#"); |
| 3091 sb.write(this[_fragment]); | 3091 sb.write(this[_fragment]); |
| 3092 } | 3092 } |
| 3093 return sb.toString(); | 3093 return dart.toString(sb); |
| 3094 } | 3094 } |
| 3095 ['=='](other) { | 3095 ['=='](other) { |
| 3096 if (!dart.is(other, Uri)) | 3096 if (!dart.is(other, Uri)) |
| 3097 return false; | 3097 return false; |
| 3098 let uri = dart.as(other, Uri); | 3098 let uri = dart.as(other, Uri); |
| 3099 return this.scheme == uri.scheme && this.hasAuthority == uri.hasAuthority
&& this.userInfo == uri.userInfo && this.host == uri.host && this.port == uri.po
rt && this.path == uri.path && this.hasQuery == uri.hasQuery && this.query == ur
i.query && this.hasFragment == uri.hasFragment && this.fragment == uri.fragment; | 3099 return this.scheme == uri.scheme && this.hasAuthority == uri.hasAuthority
&& this.userInfo == uri.userInfo && this.host == uri.host && this.port == uri.po
rt && this.path == uri.path && this.hasQuery == uri.hasQuery && this.query == ur
i.query && this.hasFragment == uri.hasFragment && this.fragment == uri.fragment; |
| 3100 } | 3100 } |
| 3101 get hashCode() { | 3101 get hashCode() { |
| 3102 // Function combine: (dynamic, dynamic) → int | 3102 // Function combine: (dynamic, dynamic) → int |
| 3103 function combine(part, current) { | 3103 function combine(part, current) { |
| 3104 return dart.as(dart.dsend(dart.dsend(dart.dsend(current, '*', 31), '+',
part.hashCode), '&', 1073741823), int); | 3104 return dart.as(dart.dsend(dart.dsend(dart.dsend(current, '*', 31), '+',
dart.hashCode(part)), '&', 1073741823), int); |
| 3105 } | 3105 } |
| 3106 return combine(this.scheme, combine(this.userInfo, combine(this.host, comb
ine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1))
))))); | 3106 return combine(this.scheme, combine(this.userInfo, combine(this.host, comb
ine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1))
))))); |
| 3107 } | 3107 } |
| 3108 static [_addIfNonEmpty](sb, test, first, second) { | 3108 static [_addIfNonEmpty](sb, test, first, second) { |
| 3109 if ("" != test) { | 3109 if ("" != test) { |
| 3110 sb.write(first); | 3110 sb.write(first); |
| 3111 sb.write(second); | 3111 sb.write(second); |
| 3112 } | 3112 } |
| 3113 } | 3113 } |
| 3114 static encodeComponent(component) { | 3114 static encodeComponent(component) { |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3276 let byte = bytes[$get](i); | 3276 let byte = bytes[$get](i); |
| 3277 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[$get](dart.
notNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) != 0) { | 3277 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[$get](dart.
notNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) != 0) { |
| 3278 result.writeCharCode(byte); | 3278 result.writeCharCode(byte); |
| 3279 } else if (dart.notNull(spaceToPlus) && byte == Uri[_SPACE]) { | 3279 } else if (dart.notNull(spaceToPlus) && byte == Uri[_SPACE]) { |
| 3280 result.writeCharCode(Uri[_PLUS]); | 3280 result.writeCharCode(Uri[_PLUS]); |
| 3281 } else { | 3281 } else { |
| 3282 result.writeCharCode(Uri[_PERCENT]); | 3282 result.writeCharCode(Uri[_PERCENT]); |
| 3283 byteToHex(byte, result); | 3283 byteToHex(byte, result); |
| 3284 } | 3284 } |
| 3285 } | 3285 } |
| 3286 return result.toString(); | 3286 return dart.toString(result); |
| 3287 } | 3287 } |
| 3288 static [_hexCharPairToByte](s, pos) { | 3288 static [_hexCharPairToByte](s, pos) { |
| 3289 let byte = 0; | 3289 let byte = 0; |
| 3290 for (let i = 0; dart.notNull(i) < 2; i = dart.notNull(i) + 1) { | 3290 for (let i = 0; dart.notNull(i) < 2; i = dart.notNull(i) + 1) { |
| 3291 let charCode = s.codeUnitAt(dart.notNull(pos) + dart.notNull(i)); | 3291 let charCode = s.codeUnitAt(dart.notNull(pos) + dart.notNull(i)); |
| 3292 if (48 <= dart.notNull(charCode) && dart.notNull(charCode) <= 57) { | 3292 if (48 <= dart.notNull(charCode) && dart.notNull(charCode) <= 57) { |
| 3293 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 48; | 3293 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 48; |
| 3294 } else { | 3294 } else { |
| 3295 charCode = dart.notNull(charCode) | 32; | 3295 charCode = dart.notNull(charCode) | 32; |
| 3296 if (97 <= dart.notNull(charCode) && dart.notNull(charCode) <= 102) { | 3296 if (97 <= dart.notNull(charCode) && dart.notNull(charCode) <= 102) { |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3525 exports.StackTrace = StackTrace; | 3525 exports.StackTrace = StackTrace; |
| 3526 exports.Stopwatch = Stopwatch; | 3526 exports.Stopwatch = Stopwatch; |
| 3527 exports.String = String; | 3527 exports.String = String; |
| 3528 exports.RuneIterator = RuneIterator; | 3528 exports.RuneIterator = RuneIterator; |
| 3529 exports.StringBuffer = StringBuffer; | 3529 exports.StringBuffer = StringBuffer; |
| 3530 exports.StringSink = StringSink; | 3530 exports.StringSink = StringSink; |
| 3531 exports.Symbol = Symbol; | 3531 exports.Symbol = Symbol; |
| 3532 exports.Type = Type; | 3532 exports.Type = Type; |
| 3533 exports.Uri = Uri; | 3533 exports.Uri = Uri; |
| 3534 })(core || (core = {})); | 3534 })(core || (core = {})); |
| OLD | NEW |