| OLD | NEW |
| 1 var core; | 1 var core; |
| 2 (function(core) { | 2 (function(core) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 // Function _symbolToString: (Symbol) → String | 4 // Function _symbolToString: (Symbol) → String |
| 5 function _symbolToString(symbol) { | 5 function _symbolToString(symbol) { |
| 6 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol)); | 6 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol)); |
| 7 } | 7 } |
| 8 // Function _symbolMapToStringMap: (Map<Symbol, dynamic>) → dynamic | 8 // Function _symbolMapToStringMap: (Map<Symbol, dynamic>) → dynamic |
| 9 function _symbolMapToStringMap(map) { | 9 function _symbolMapToStringMap(map) { |
| 10 if (map === null) | 10 if (map === null) |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 subtract(duration) { | 248 subtract(duration) { |
| 249 let ms = this.millisecondsSinceEpoch; | 249 let ms = this.millisecondsSinceEpoch; |
| 250 return new DateTime.fromMillisecondsSinceEpoch(ms - duration.inMillisecond
s, {isUtc: this.isUtc}); | 250 return new DateTime.fromMillisecondsSinceEpoch(ms - duration.inMillisecond
s, {isUtc: this.isUtc}); |
| 251 } | 251 } |
| 252 difference(other) { | 252 difference(other) { |
| 253 let ms = this.millisecondsSinceEpoch; | 253 let ms = this.millisecondsSinceEpoch; |
| 254 let otherMs = other.millisecondsSinceEpoch; | 254 let otherMs = other.millisecondsSinceEpoch; |
| 255 return new Duration({milliseconds: ms - otherMs}); | 255 return new Duration({milliseconds: ms - otherMs}); |
| 256 } | 256 } |
| 257 DateTime$_internal(year, month, day, hour, minute, second, millisecond, isUt
c) { | 257 DateTime$_internal(year, month, day, hour, minute, second, millisecond, isUt
c) { |
| 258 this.isUtc = typeof isUtc == boolean ? isUtc : dart.throw_(new ArgumentErr
or(isUtc)); | 258 this.isUtc = dart.as(typeof isUtc == boolean ? isUtc : dart.throw_(new Arg
umentError(isUtc)), bool); |
| 259 this.millisecondsSinceEpoch = dart.dinvokef(/* Unimplemented unknown name
*/checkInt, dart.dinvoke(/* Unimplemented unknown name */Primitives, 'valueFromD
ecomposedDate', year, month, day, hour, minute, second, millisecond, isUtc)); | 259 this.millisecondsSinceEpoch = dart.as(dart.dinvokef(/* Unimplemented unkno
wn name */checkInt, dart.dinvoke(/* Unimplemented unknown name */Primitives, 'va
lueFromDecomposedDate', year, month, day, hour, minute, second, millisecond, isU
tc)), int); |
| 260 } | 260 } |
| 261 DateTime$_now() { | 261 DateTime$_now() { |
| 262 this.isUtc = false; | 262 this.isUtc = false; |
| 263 this.millisecondsSinceEpoch = dart.dinvoke(/* Unimplemented unknown name *
/Primitives, 'dateNow'); | 263 this.millisecondsSinceEpoch = dart.as(dart.dinvoke(/* Unimplemented unknow
n name */Primitives, 'dateNow'), int); |
| 264 } | 264 } |
| 265 static _brokenDownDateToMillisecondsSinceEpoch(year, month, day, hour, minut
e, second, millisecond, isUtc) { | 265 static _brokenDownDateToMillisecondsSinceEpoch(year, month, day, hour, minut
e, second, millisecond, isUtc) { |
| 266 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'v
alueFromDecomposedDate', year, month, day, hour, minute, second, millisecond, is
Utc), int); | 266 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'v
alueFromDecomposedDate', year, month, day, hour, minute, second, millisecond, is
Utc), int); |
| 267 } | 267 } |
| 268 get timeZoneName() { | 268 get timeZoneName() { |
| 269 if (this.isUtc) | 269 if (this.isUtc) |
| 270 return "UTC"; | 270 return "UTC"; |
| 271 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'g
etTimeZoneName', this), String); | 271 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'g
etTimeZoneName', this), String); |
| 272 } | 272 } |
| 273 get timeZoneOffset() { | 273 get timeZoneOffset() { |
| 274 if (this.isUtc) | 274 if (this.isUtc) |
| 275 return new Duration(); | 275 return new Duration(); |
| 276 return new Duration({minutes: dart.dinvoke(/* Unimplemented unknown name *
/Primitives, 'getTimeZoneOffsetInMinutes', this)}); | 276 return new Duration({minutes: dart.as(dart.dinvoke(/* Unimplemented unknow
n name */Primitives, 'getTimeZoneOffsetInMinutes', this), int)}); |
| 277 } | 277 } |
| 278 get year() { | 278 get year() { |
| 279 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'g
etYear', this), int); | 279 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'g
etYear', this), int); |
| 280 } | 280 } |
| 281 get month() { | 281 get month() { |
| 282 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'g
etMonth', this), int); | 282 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'g
etMonth', this), int); |
| 283 } | 283 } |
| 284 get day() { | 284 get day() { |
| 285 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'g
etDay', this), int); | 285 return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'g
etDay', this), int); |
| 286 } | 286 } |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 endName = "end"; | 607 endName = "end"; |
| 608 throw new RangeError.range(end, start, length, endName, message); | 608 throw new RangeError.range(end, start, length, endName, message); |
| 609 } | 609 } |
| 610 } | 610 } |
| 611 static checkNotNegative(value, name, message) { | 611 static checkNotNegative(value, name, message) { |
| 612 if (name === void 0) | 612 if (name === void 0) |
| 613 name = null; | 613 name = null; |
| 614 if (message === void 0) | 614 if (message === void 0) |
| 615 message = null; | 615 message = null; |
| 616 if (value < 0) | 616 if (value < 0) |
| 617 throw new RangeError.range(value, 0, null, name, message); | 617 throw new RangeError.range(value, 0, dart.as(null, int), name, message); |
| 618 } | 618 } |
| 619 toString() { | 619 toString() { |
| 620 if (!dart.notNull(this._hasValue)) | 620 if (!dart.notNull(this._hasValue)) |
| 621 return `RangeError: ${this.message}`; | 621 return `RangeError: ${this.message}`; |
| 622 let value = Error.safeToString(this.invalidValue); | 622 let value = Error.safeToString(this.invalidValue); |
| 623 let explanation = ""; | 623 let explanation = ""; |
| 624 if (this.start === null) { | 624 if (this.start === null) { |
| 625 if (this.end !== null) { | 625 if (this.end !== null) { |
| 626 explanation = `: Not less than or equal to ${this.end}`; | 626 explanation = `: Not less than or equal to ${this.end}`; |
| 627 } | 627 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 642 dart.defineNamedConstructor(RangeError, 'index'); | 642 dart.defineNamedConstructor(RangeError, 'index'); |
| 643 class IndexError extends ArgumentError { | 643 class IndexError extends ArgumentError { |
| 644 IndexError(invalidValue, indexable, name, message, length) { | 644 IndexError(invalidValue, indexable, name, message, length) { |
| 645 if (name === void 0) | 645 if (name === void 0) |
| 646 name = null; | 646 name = null; |
| 647 if (message === void 0) | 647 if (message === void 0) |
| 648 message = null; | 648 message = null; |
| 649 if (length === void 0) | 649 if (length === void 0) |
| 650 length = null; | 650 length = null; |
| 651 this.indexable = indexable; | 651 this.indexable = indexable; |
| 652 this.length = length !== null ? length : dart.dload(indexable, 'length'); | 652 this.length = dart.as(length !== null ? length : dart.dload(indexable, 'le
ngth'), int); |
| 653 super.ArgumentError$value(invalidValue, name, message !== null ? message :
"Index out of range"); | 653 super.ArgumentError$value(invalidValue, name, message !== null ? message :
"Index out of range"); |
| 654 } | 654 } |
| 655 get start() { | 655 get start() { |
| 656 return 0; | 656 return 0; |
| 657 } | 657 } |
| 658 get end() { | 658 get end() { |
| 659 return this.length - 1; | 659 return this.length - 1; |
| 660 } | 660 } |
| 661 toString() { | 661 toString() { |
| 662 dart.assert(this._hasValue); | 662 dart.assert(this._hasValue); |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 } | 1025 } |
| 1026 dart.defineNamedConstructor(Iterable, 'generate'); | 1026 dart.defineNamedConstructor(Iterable, 'generate'); |
| 1027 return Iterable; | 1027 return Iterable; |
| 1028 }); | 1028 }); |
| 1029 let Iterable = Iterable$(dynamic); | 1029 let Iterable = Iterable$(dynamic); |
| 1030 let _GeneratorIterable$ = dart.generic(function(E) { | 1030 let _GeneratorIterable$ = dart.generic(function(E) { |
| 1031 class _GeneratorIterable extends collection.IterableBase$(E) { | 1031 class _GeneratorIterable extends collection.IterableBase$(E) { |
| 1032 _GeneratorIterable(_end, generator) { | 1032 _GeneratorIterable(_end, generator) { |
| 1033 this._end = _end; | 1033 this._end = _end; |
| 1034 this._start = 0; | 1034 this._start = 0; |
| 1035 this._generator = generator !== null ? generator : _id; | 1035 this._generator = dart.as(generator !== null ? generator : _id, _Generat
or); |
| 1036 super.IterableBase(); | 1036 super.IterableBase(); |
| 1037 } | 1037 } |
| 1038 _GeneratorIterable$slice(_start, _end, _generator) { | 1038 _GeneratorIterable$slice(_start, _end, _generator) { |
| 1039 this._start = _start; | 1039 this._start = _start; |
| 1040 this._end = _end; | 1040 this._end = _end; |
| 1041 this._generator = _generator; | 1041 this._generator = _generator; |
| 1042 super.IterableBase(); | 1042 super.IterableBase(); |
| 1043 } | 1043 } |
| 1044 get iterator() { | 1044 get iterator() { |
| 1045 return new _GeneratorIterator(this._start, this._end, this._generator); | 1045 return new _GeneratorIterator(this._start, this._end, this._generator); |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1885 for (; hostEnd < authority.length; hostEnd++) { | 1885 for (; hostEnd < authority.length; hostEnd++) { |
| 1886 if (authority.codeUnitAt(hostEnd) === _COLON) { | 1886 if (authority.codeUnitAt(hostEnd) === _COLON) { |
| 1887 let portString = authority.substring(hostEnd + 1); | 1887 let portString = authority.substring(hostEnd + 1); |
| 1888 if (portString.isNotEmpty) | 1888 if (portString.isNotEmpty) |
| 1889 port = int.parse(portString); | 1889 port = int.parse(portString); |
| 1890 break; | 1890 break; |
| 1891 } | 1891 } |
| 1892 } | 1892 } |
| 1893 host = authority.substring(hostStart, hostEnd); | 1893 host = authority.substring(hostStart, hostEnd); |
| 1894 } | 1894 } |
| 1895 return new Uri({scheme: scheme, userInfo: userInfo, host: host, port: port
, pathSegments: unencodedPath.split("/"), queryParameters: queryParameters}); | 1895 return new Uri({scheme: scheme, userInfo: userInfo, host: dart.as(host, St
ring), port: dart.as(port, int), pathSegments: unencodedPath.split("/"), queryPa
rameters: queryParameters}); |
| 1896 } | 1896 } |
| 1897 Uri$file(path, opt$) { | 1897 Uri$file(path, opt$) { |
| 1898 let windows = opt$.windows === void 0 ? null : opt$.windows; | 1898 let windows = opt$.windows === void 0 ? null : opt$.windows; |
| 1899 windows = windows === null ? Uri._isWindows : windows; | 1899 windows = windows === null ? Uri._isWindows : windows; |
| 1900 return dart.as(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path), U
ri); | 1900 return dart.as(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path), U
ri); |
| 1901 } | 1901 } |
| 1902 static get base() { | 1902 static get base() { |
| 1903 let uri = dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives,
'currentUri'), String); | 1903 let uri = dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives,
'currentUri'), String); |
| 1904 if (uri !== null) | 1904 if (uri !== null) |
| 1905 return Uri.parse(uri); | 1905 return Uri.parse(uri); |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 let index = 0; | 2307 let index = 0; |
| 2308 while (--encodedBytes >= 0) { | 2308 while (--encodedBytes >= 0) { |
| 2309 let byte = dart.as(dart.dbinary(dart.dbinary(dart.dbinary(char, '>>',
6 * encodedBytes), '&', 63), '|', flag), int); | 2309 let byte = dart.as(dart.dbinary(dart.dbinary(dart.dbinary(char, '>>',
6 * encodedBytes), '&', 63), '|', flag), int); |
| 2310 codeUnits.set(index, _PERCENT); | 2310 codeUnits.set(index, _PERCENT); |
| 2311 codeUnits.set(index + 1, hexDigits.codeUnitAt(byte >> 4)); | 2311 codeUnits.set(index + 1, hexDigits.codeUnitAt(byte >> 4)); |
| 2312 codeUnits.set(index + 2, hexDigits.codeUnitAt(byte & 15)); | 2312 codeUnits.set(index + 2, hexDigits.codeUnitAt(byte & 15)); |
| 2313 index = 3; | 2313 index = 3; |
| 2314 flag = 128; | 2314 flag = 128; |
| 2315 } | 2315 } |
| 2316 } | 2316 } |
| 2317 return new String.fromCharCodes(codeUnits); | 2317 return new String.fromCharCodes(dart.as(codeUnits, Iterable$(int))); |
| 2318 } | 2318 } |
| 2319 static _normalize(component, start, end, charTable) { | 2319 static _normalize(component, start, end, charTable) { |
| 2320 let buffer = null; | 2320 let buffer = null; |
| 2321 let sectionStart = start; | 2321 let sectionStart = start; |
| 2322 let index = start; | 2322 let index = start; |
| 2323 while (index < end) { | 2323 while (index < end) { |
| 2324 let char = component.codeUnitAt(index); | 2324 let char = component.codeUnitAt(index); |
| 2325 if (dart.notNull(char < 127) && dart.notNull((charTable.get(char >> 4) &
1 << (char & 15)) !== 0)) { | 2325 if (dart.notNull(char < 127) && dart.notNull((charTable.get(char >> 4) &
1 << (char & 15)) !== 0)) { |
| 2326 index++; | 2326 index++; |
| 2327 } else { | 2327 } else { |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2668 if (start === void 0) | 2668 if (start === void 0) |
| 2669 start = 0; | 2669 start = 0; |
| 2670 if (end === void 0) | 2670 if (end === void 0) |
| 2671 end = null; | 2671 end = null; |
| 2672 if (end === null) | 2672 if (end === null) |
| 2673 end = host.length; | 2673 end = host.length; |
| 2674 // Function error: (String, [dynamic]) → void | 2674 // Function error: (String, [dynamic]) → void |
| 2675 function error(msg, position) { | 2675 function error(msg, position) { |
| 2676 if (position === void 0) | 2676 if (position === void 0) |
| 2677 position = null; | 2677 position = null; |
| 2678 throw new FormatException(`Illegal IPv6 address, ${msg}`, host, position
); | 2678 throw new FormatException(`Illegal IPv6 address, ${msg}`, host, dart.as(
position, int)); |
| 2679 } | 2679 } |
| 2680 // Function parseHex: (int, int) → int | 2680 // Function parseHex: (int, int) → int |
| 2681 function parseHex(start, end) { | 2681 function parseHex(start, end) { |
| 2682 if (end - start > 4) { | 2682 if (end - start > 4) { |
| 2683 error('an IPv6 part can only contain a maximum of 4 hex digits', start
); | 2683 error('an IPv6 part can only contain a maximum of 4 hex digits', start
); |
| 2684 } | 2684 } |
| 2685 let value = int.parse(host.substring(start, end), {radix: 16}); | 2685 let value = int.parse(host.substring(start, end), {radix: 16}); |
| 2686 if (dart.notNull(value < 0) || dart.notNull(value > (1 << 16) - 1)) { | 2686 if (dart.notNull(value < 0) || dart.notNull(value > (1 << 16) - 1)) { |
| 2687 error('each part must be in the range of `0x0..0xFFFF`', start); | 2687 error('each part must be in the range of `0x0..0xFFFF`', start); |
| 2688 } | 2688 } |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2948 core.Stopwatch = Stopwatch; | 2948 core.Stopwatch = Stopwatch; |
| 2949 core.String = String; | 2949 core.String = String; |
| 2950 core.Runes = Runes; | 2950 core.Runes = Runes; |
| 2951 core.RuneIterator = RuneIterator; | 2951 core.RuneIterator = RuneIterator; |
| 2952 core.StringBuffer = StringBuffer; | 2952 core.StringBuffer = StringBuffer; |
| 2953 core.StringSink = StringSink; | 2953 core.StringSink = StringSink; |
| 2954 core.Symbol = Symbol; | 2954 core.Symbol = Symbol; |
| 2955 core.Type = Type; | 2955 core.Type = Type; |
| 2956 core.Uri = Uri; | 2956 core.Uri = Uri; |
| 2957 })(core || (core = {})); | 2957 })(core || (core = {})); |
| OLD | NEW |