| OLD | NEW |
| 1 var convert = dart.defineLibrary(convert, {}); | 1 var convert = dart.defineLibrary(convert, {}); |
| 2 var core = dart.import(core); | 2 var core = dart.import(core); |
| 3 var async = dart.import(async); | 3 var async = dart.import(async); |
| 4 var typed_data = dart.import(typed_data); | 4 var typed_data = dart.import(typed_data); |
| 5 var _internal = dart.import(_internal); | 5 var _internal = dart.import(_internal); |
| 6 var collection = dart.import(collection); | 6 var collection = dart.import(collection); |
| 7 (function(exports, core, async, typed_data, _internal, collection) { | 7 (function(exports, core, async, typed_data, _internal, collection) { |
| 8 'use strict'; | 8 'use strict'; |
| 9 let Codec$ = dart.generic(function(S, T) { | 9 let Codec$ = dart.generic(function(S, T) { |
| 10 class Codec extends core.Object { | 10 class Codec extends core.Object { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 get encoder() { | 83 get encoder() { |
| 84 return dart.const(new AsciiEncoder()); | 84 return dart.const(new AsciiEncoder()); |
| 85 } | 85 } |
| 86 get decoder() { | 86 get decoder() { |
| 87 return this[_allowInvalid] ? dart.const(new AsciiDecoder({allowInvalid: tr
ue})) : dart.const(new AsciiDecoder({allowInvalid: false})); | 87 return this[_allowInvalid] ? dart.const(new AsciiDecoder({allowInvalid: tr
ue})) : dart.const(new AsciiDecoder({allowInvalid: false})); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 dart.setSignature(AsciiCodec, { | 90 dart.setSignature(AsciiCodec, { |
| 91 constructors: () => ({AsciiCodec: [AsciiCodec, [], {llowInvali: core.bool}]}
), | 91 constructors: () => ({AsciiCodec: [AsciiCodec, [], {allowInvalid: core.bool}
]}), |
| 92 methods: () => ({decode: [core.String, [core.List$(core.int)], {llowInvali:
core.bool}]}) | 92 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowInvalid
: core.bool}]}) |
| 93 }); | 93 }); |
| 94 let ASCII = dart.const(new AsciiCodec()); | 94 let ASCII = dart.const(new AsciiCodec()); |
| 95 let _ASCII_MASK = 127; | 95 let _ASCII_MASK = 127; |
| 96 let Converter$ = dart.generic(function(S, T) { | 96 let Converter$ = dart.generic(function(S, T) { |
| 97 class Converter extends core.Object { | 97 class Converter extends core.Object { |
| 98 Converter() { | 98 Converter() { |
| 99 } | 99 } |
| 100 fuse(other) { | 100 fuse(other) { |
| 101 dart.as(other, Converter$(T, core.Object)); | 101 dart.as(other, Converter$(T, core.Object)); |
| 102 return new (_FusedConverter$(S, T, core.Object))(this, other); | 102 return new (_FusedConverter$(S, T, core.Object))(this, other); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 stringSink = new StringConversionSink.from(sink); | 287 stringSink = new StringConversionSink.from(sink); |
| 288 } | 288 } |
| 289 if (this[_allowInvalid]) { | 289 if (this[_allowInvalid]) { |
| 290 return new _ErrorHandlingAsciiDecoderSink(stringSink.asUtf8Sink(false)); | 290 return new _ErrorHandlingAsciiDecoderSink(stringSink.asUtf8Sink(false)); |
| 291 } else { | 291 } else { |
| 292 return new _SimpleAsciiDecoderSink(stringSink); | 292 return new _SimpleAsciiDecoderSink(stringSink); |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 dart.setSignature(AsciiDecoder, { | 296 dart.setSignature(AsciiDecoder, { |
| 297 constructors: () => ({AsciiDecoder: [AsciiDecoder, [], {llowInvali: core.boo
l}]}), | 297 constructors: () => ({AsciiDecoder: [AsciiDecoder, [], {allowInvalid: core.b
ool}]}), |
| 298 methods: () => ({startChunkedConversion: [ByteConversionSink, [core.Sink$(co
re.String)]]}) | 298 methods: () => ({startChunkedConversion: [ByteConversionSink, [core.Sink$(co
re.String)]]}) |
| 299 }); | 299 }); |
| 300 let ChunkedConversionSink$ = dart.generic(function(T) { | 300 let ChunkedConversionSink$ = dart.generic(function(T) { |
| 301 class ChunkedConversionSink extends core.Object { | 301 class ChunkedConversionSink extends core.Object { |
| 302 ChunkedConversionSink() { | 302 ChunkedConversionSink() { |
| 303 } | 303 } |
| 304 withCallback(callback) { | 304 withCallback(callback) { |
| 305 return new _SimpleCallbackSink(callback); | 305 return new _SimpleCallbackSink(callback); |
| 306 } | 306 } |
| 307 } | 307 } |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 } | 789 } |
| 790 toString() { | 790 toString() { |
| 791 if (this.cause != null) { | 791 if (this.cause != null) { |
| 792 return "Converting object to an encodable object failed."; | 792 return "Converting object to an encodable object failed."; |
| 793 } else { | 793 } else { |
| 794 return "Converting object did not return an encodable object."; | 794 return "Converting object did not return an encodable object."; |
| 795 } | 795 } |
| 796 } | 796 } |
| 797 } | 797 } |
| 798 dart.setSignature(JsonUnsupportedObjectError, { | 798 dart.setSignature(JsonUnsupportedObjectError, { |
| 799 constructors: () => ({JsonUnsupportedObjectError: [JsonUnsupportedObjectErro
r, [core.Object], {aus: core.Object}]}) | 799 constructors: () => ({JsonUnsupportedObjectError: [JsonUnsupportedObjectErro
r, [core.Object], {cause: core.Object}]}) |
| 800 }); | 800 }); |
| 801 class JsonCyclicError extends JsonUnsupportedObjectError { | 801 class JsonCyclicError extends JsonUnsupportedObjectError { |
| 802 JsonCyclicError(object) { | 802 JsonCyclicError(object) { |
| 803 super.JsonUnsupportedObjectError(object); | 803 super.JsonUnsupportedObjectError(object); |
| 804 } | 804 } |
| 805 toString() { | 805 toString() { |
| 806 return "Cyclic error in JSON stringify"; | 806 return "Cyclic error in JSON stringify"; |
| 807 } | 807 } |
| 808 } | 808 } |
| 809 dart.setSignature(JsonCyclicError, { | 809 dart.setSignature(JsonCyclicError, { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 } | 845 } |
| 846 get decoder() { | 846 get decoder() { |
| 847 if (this[_reviver] == null) | 847 if (this[_reviver] == null) |
| 848 return dart.const(new JsonDecoder()); | 848 return dart.const(new JsonDecoder()); |
| 849 return new JsonDecoder(this[_reviver]); | 849 return new JsonDecoder(this[_reviver]); |
| 850 } | 850 } |
| 851 } | 851 } |
| 852 dart.defineNamedConstructor(JsonCodec, 'withReviver'); | 852 dart.defineNamedConstructor(JsonCodec, 'withReviver'); |
| 853 dart.setSignature(JsonCodec, { | 853 dart.setSignature(JsonCodec, { |
| 854 constructors: () => ({ | 854 constructors: () => ({ |
| 855 JsonCodec: [JsonCodec, [], {evive: dart.functionType(core.Object, [dart.bo
ttom, dart.bottom]), oEncodabl: dart.functionType(core.Object, [dart.bottom])}], | 855 JsonCodec: [JsonCodec, [], {reviver: dart.functionType(core.Object, [dart.
bottom, dart.bottom]), toEncodable: dart.functionType(core.Object, [dart.bottom]
)}], |
| 856 withReviver: [JsonCodec, [dart.functionType(core.Object, [dart.bottom, dar
t.bottom])]] | 856 withReviver: [JsonCodec, [dart.functionType(core.Object, [dart.bottom, dar
t.bottom])]] |
| 857 }), | 857 }), |
| 858 methods: () => ({ | 858 methods: () => ({ |
| 859 decode: [core.Object, [core.String], {evive: dart.functionType(core.Object
, [dart.bottom, dart.bottom])}], | 859 decode: [core.Object, [core.String], {reviver: dart.functionType(core.Obje
ct, [dart.bottom, dart.bottom])}], |
| 860 encode: [core.String, [core.Object], {oEncodabl: dart.functionType(core.Ob
ject, [dart.bottom])}] | 860 encode: [core.String, [core.Object], {toEncodable: dart.functionType(core.
Object, [dart.bottom])}] |
| 861 }) | 861 }) |
| 862 }); | 862 }); |
| 863 let JSON = dart.const(new JsonCodec()); | 863 let JSON = dart.const(new JsonCodec()); |
| 864 let _Reviver = dart.typedef('_Reviver', () => dart.functionType(core.Object, [
dart.bottom, dart.bottom])); | 864 let _Reviver = dart.typedef('_Reviver', () => dart.functionType(core.Object, [
dart.bottom, dart.bottom])); |
| 865 let _ToEncodable = dart.typedef('_ToEncodable', () => dart.functionType(core.O
bject, [dart.bottom])); | 865 let _ToEncodable = dart.typedef('_ToEncodable', () => dart.functionType(core.O
bject, [dart.bottom])); |
| 866 class JsonEncoder extends Converter$(core.Object, core.String) { | 866 class JsonEncoder extends Converter$(core.Object, core.String) { |
| 867 JsonEncoder(toEncodable) { | 867 JsonEncoder(toEncodable) { |
| 868 if (toEncodable === void 0) | 868 if (toEncodable === void 0) |
| 869 toEncodable = null; | 869 toEncodable = null; |
| 870 this.indent = null; | 870 this.indent = null; |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1579 } | 1579 } |
| 1580 } | 1580 } |
| 1581 get encoder() { | 1581 get encoder() { |
| 1582 return dart.const(new Latin1Encoder()); | 1582 return dart.const(new Latin1Encoder()); |
| 1583 } | 1583 } |
| 1584 get decoder() { | 1584 get decoder() { |
| 1585 return this[_allowInvalid] ? dart.const(new Latin1Decoder({allowInvalid: t
rue})) : dart.const(new Latin1Decoder({allowInvalid: false})); | 1585 return this[_allowInvalid] ? dart.const(new Latin1Decoder({allowInvalid: t
rue})) : dart.const(new Latin1Decoder({allowInvalid: false})); |
| 1586 } | 1586 } |
| 1587 } | 1587 } |
| 1588 dart.setSignature(Latin1Codec, { | 1588 dart.setSignature(Latin1Codec, { |
| 1589 constructors: () => ({Latin1Codec: [Latin1Codec, [], {llowInvali: core.bool}
]}), | 1589 constructors: () => ({Latin1Codec: [Latin1Codec, [], {allowInvalid: core.boo
l}]}), |
| 1590 methods: () => ({decode: [core.String, [core.List$(core.int)], {llowInvali:
core.bool}]}) | 1590 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowInvalid
: core.bool}]}) |
| 1591 }); | 1591 }); |
| 1592 let LATIN1 = dart.const(new Latin1Codec()); | 1592 let LATIN1 = dart.const(new Latin1Codec()); |
| 1593 let _LATIN1_MASK = 255; | 1593 let _LATIN1_MASK = 255; |
| 1594 class Latin1Encoder extends _UnicodeSubsetEncoder { | 1594 class Latin1Encoder extends _UnicodeSubsetEncoder { |
| 1595 Latin1Encoder() { | 1595 Latin1Encoder() { |
| 1596 super._UnicodeSubsetEncoder(_LATIN1_MASK); | 1596 super._UnicodeSubsetEncoder(_LATIN1_MASK); |
| 1597 } | 1597 } |
| 1598 } | 1598 } |
| 1599 dart.setSignature(Latin1Encoder, { | 1599 dart.setSignature(Latin1Encoder, { |
| 1600 constructors: () => ({Latin1Encoder: [Latin1Encoder, []]}) | 1600 constructors: () => ({Latin1Encoder: [Latin1Encoder, []]}) |
| 1601 }); | 1601 }); |
| 1602 class Latin1Decoder extends _UnicodeSubsetDecoder { | 1602 class Latin1Decoder extends _UnicodeSubsetDecoder { |
| 1603 Latin1Decoder(opts) { | 1603 Latin1Decoder(opts) { |
| 1604 let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : fa
lse; | 1604 let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : fa
lse; |
| 1605 super._UnicodeSubsetDecoder(allowInvalid, _LATIN1_MASK); | 1605 super._UnicodeSubsetDecoder(allowInvalid, _LATIN1_MASK); |
| 1606 } | 1606 } |
| 1607 startChunkedConversion(sink) { | 1607 startChunkedConversion(sink) { |
| 1608 let stringSink = null; | 1608 let stringSink = null; |
| 1609 if (dart.is(sink, StringConversionSink)) { | 1609 if (dart.is(sink, StringConversionSink)) { |
| 1610 stringSink = sink; | 1610 stringSink = sink; |
| 1611 } else { | 1611 } else { |
| 1612 stringSink = new StringConversionSink.from(sink); | 1612 stringSink = new StringConversionSink.from(sink); |
| 1613 } | 1613 } |
| 1614 if (!dart.notNull(this[_allowInvalid])) | 1614 if (!dart.notNull(this[_allowInvalid])) |
| 1615 return new _Latin1DecoderSink(stringSink); | 1615 return new _Latin1DecoderSink(stringSink); |
| 1616 return new _Latin1AllowInvalidDecoderSink(stringSink); | 1616 return new _Latin1AllowInvalidDecoderSink(stringSink); |
| 1617 } | 1617 } |
| 1618 } | 1618 } |
| 1619 dart.setSignature(Latin1Decoder, { | 1619 dart.setSignature(Latin1Decoder, { |
| 1620 constructors: () => ({Latin1Decoder: [Latin1Decoder, [], {llowInvali: core.b
ool}]}), | 1620 constructors: () => ({Latin1Decoder: [Latin1Decoder, [], {allowInvalid: core
.bool}]}), |
| 1621 methods: () => ({startChunkedConversion: [ByteConversionSink, [core.Sink$(co
re.String)]]}) | 1621 methods: () => ({startChunkedConversion: [ByteConversionSink, [core.Sink$(co
re.String)]]}) |
| 1622 }); | 1622 }); |
| 1623 let _addSliceToSink = Symbol('_addSliceToSink'); | 1623 let _addSliceToSink = Symbol('_addSliceToSink'); |
| 1624 class _Latin1DecoderSink extends ByteConversionSinkBase { | 1624 class _Latin1DecoderSink extends ByteConversionSinkBase { |
| 1625 _Latin1DecoderSink(sink) { | 1625 _Latin1DecoderSink(sink) { |
| 1626 this[_sink] = sink; | 1626 this[_sink] = sink; |
| 1627 } | 1627 } |
| 1628 close() { | 1628 close() { |
| 1629 this[_sink].close(); | 1629 this[_sink].close(); |
| 1630 } | 1630 } |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2088 return new Utf8Decoder({allowMalformed: allowMalformed}).convert(codeUnits
); | 2088 return new Utf8Decoder({allowMalformed: allowMalformed}).convert(codeUnits
); |
| 2089 } | 2089 } |
| 2090 get encoder() { | 2090 get encoder() { |
| 2091 return new Utf8Encoder(); | 2091 return new Utf8Encoder(); |
| 2092 } | 2092 } |
| 2093 get decoder() { | 2093 get decoder() { |
| 2094 return new Utf8Decoder({allowMalformed: this[_allowMalformed]}); | 2094 return new Utf8Decoder({allowMalformed: this[_allowMalformed]}); |
| 2095 } | 2095 } |
| 2096 } | 2096 } |
| 2097 dart.setSignature(Utf8Codec, { | 2097 dart.setSignature(Utf8Codec, { |
| 2098 constructors: () => ({Utf8Codec: [Utf8Codec, [], {llowMalforme: core.bool}]}
), | 2098 constructors: () => ({Utf8Codec: [Utf8Codec, [], {allowMalformed: core.bool}
]}), |
| 2099 methods: () => ({decode: [core.String, [core.List$(core.int)], {llowMalforme
: core.bool}]}) | 2099 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowMalform
ed: core.bool}]}) |
| 2100 }); | 2100 }); |
| 2101 let UTF8 = dart.const(new Utf8Codec()); | 2101 let UTF8 = dart.const(new Utf8Codec()); |
| 2102 let _fillBuffer = Symbol('_fillBuffer'); | 2102 let _fillBuffer = Symbol('_fillBuffer'); |
| 2103 let _writeSurrogate = Symbol('_writeSurrogate'); | 2103 let _writeSurrogate = Symbol('_writeSurrogate'); |
| 2104 class Utf8Encoder extends Converter$(core.String, core.List$(core.int)) { | 2104 class Utf8Encoder extends Converter$(core.String, core.List$(core.int)) { |
| 2105 Utf8Encoder() { | 2105 Utf8Encoder() { |
| 2106 super.Converter(); | 2106 super.Converter(); |
| 2107 } | 2107 } |
| 2108 convert(string, start, end) { | 2108 convert(string, start, end) { |
| 2109 if (start === void 0) | 2109 if (start === void 0) |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2368 return stringSink.asUtf8Sink(this[_allowMalformed]); | 2368 return stringSink.asUtf8Sink(this[_allowMalformed]); |
| 2369 } | 2369 } |
| 2370 bind(stream) { | 2370 bind(stream) { |
| 2371 return super.bind(stream); | 2371 return super.bind(stream); |
| 2372 } | 2372 } |
| 2373 fuse(next) { | 2373 fuse(next) { |
| 2374 return super.fuse(next); | 2374 return super.fuse(next); |
| 2375 } | 2375 } |
| 2376 } | 2376 } |
| 2377 dart.setSignature(Utf8Decoder, { | 2377 dart.setSignature(Utf8Decoder, { |
| 2378 constructors: () => ({Utf8Decoder: [Utf8Decoder, [], {llowMalforme: core.boo
l}]}), | 2378 constructors: () => ({Utf8Decoder: [Utf8Decoder, [], {allowMalformed: core.b
ool}]}), |
| 2379 methods: () => ({ | 2379 methods: () => ({ |
| 2380 convert: [core.String, [core.List$(core.int)], [core.int, core.int]], | 2380 convert: [core.String, [core.List$(core.int)], [core.int, core.int]], |
| 2381 startChunkedConversion: [ByteConversionSink, [core.Sink$(core.String)]], | 2381 startChunkedConversion: [ByteConversionSink, [core.Sink$(core.String)]], |
| 2382 bind: [async.Stream$(core.String), [async.Stream$(core.List$(core.int))]], | 2382 bind: [async.Stream$(core.String), [async.Stream$(core.List$(core.int))]], |
| 2383 fuse: [Converter$(core.List$(core.int), core.Object), [Converter$(core.Str
ing, core.Object)]] | 2383 fuse: [Converter$(core.List$(core.int), core.Object), [Converter$(core.Str
ing, core.Object)]] |
| 2384 }) | 2384 }) |
| 2385 }); | 2385 }); |
| 2386 let _ONE_BYTE_LIMIT = 127; | 2386 let _ONE_BYTE_LIMIT = 127; |
| 2387 let _TWO_BYTE_LIMIT = 2047; | 2387 let _TWO_BYTE_LIMIT = 2047; |
| 2388 let _THREE_BYTE_LIMIT = 65535; | 2388 let _THREE_BYTE_LIMIT = 65535; |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2897 exports.LineSplitter = LineSplitter; | 2897 exports.LineSplitter = LineSplitter; |
| 2898 exports.StringConversionSink = StringConversionSink; | 2898 exports.StringConversionSink = StringConversionSink; |
| 2899 exports.ClosableStringSink = ClosableStringSink; | 2899 exports.ClosableStringSink = ClosableStringSink; |
| 2900 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; | 2900 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; |
| 2901 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; | 2901 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; |
| 2902 exports.Utf8Codec = Utf8Codec; | 2902 exports.Utf8Codec = Utf8Codec; |
| 2903 exports.UTF8 = UTF8; | 2903 exports.UTF8 = UTF8; |
| 2904 exports.Utf8Encoder = Utf8Encoder; | 2904 exports.Utf8Encoder = Utf8Encoder; |
| 2905 exports.Utf8Decoder = Utf8Decoder; | 2905 exports.Utf8Decoder = Utf8Decoder; |
| 2906 })(convert, core, async, typed_data, _internal, collection); | 2906 })(convert, core, async, typed_data, _internal, collection); |
| OLD | NEW |