| OLD | NEW |
| 1 dart_library.library('dart/convert', null, /* Imports */[ | 1 dart_library.library('dart/convert', null, /* Imports */[ |
| 2 "dart/_runtime", | 2 "dart/_runtime", |
| 3 'dart/core', | 3 'dart/core', |
| 4 'dart/async', | 4 'dart/async', |
| 5 'dart/typed_data', | 5 'dart/typed_data', |
| 6 'dart/_internal', | 6 'dart/_internal', |
| 7 'dart/collection' | 7 'dart/collection' |
| 8 ], /* Lazy imports */[ | 8 ], /* Lazy imports */[ |
| 9 ], function(exports, dart, core, async, typed_data, _internal, collection) { | 9 ], function(exports, dart, core, async, typed_data, _internal, collection) { |
| 10 'use strict'; | 10 'use strict'; |
| 11 let dartx = dart.dartx; | 11 let dartx = dart.dartx; |
| 12 let Codec$ = dart.generic(function(S, T) { | 12 const Codec$ = dart.generic(function(S, T) { |
| 13 class Codec extends core.Object { | 13 class Codec extends core.Object { |
| 14 Codec() { | 14 Codec() { |
| 15 } | 15 } |
| 16 encode(input) { | 16 encode(input) { |
| 17 dart.as(input, S); | 17 dart.as(input, S); |
| 18 return this.encoder.convert(input); | 18 return this.encoder.convert(input); |
| 19 } | 19 } |
| 20 decode(encoded) { | 20 decode(encoded) { |
| 21 dart.as(encoded, T); | 21 dart.as(encoded, T); |
| 22 return this.decoder.convert(encoded); | 22 return this.decoder.convert(encoded); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 name = name[dartx.toLowerCase](); | 56 name = name[dartx.toLowerCase](); |
| 57 return Encoding._nameToEncoding.get(name); | 57 return Encoding._nameToEncoding.get(name); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 dart.setSignature(Encoding, { | 60 dart.setSignature(Encoding, { |
| 61 constructors: () => ({Encoding: [Encoding, []]}), | 61 constructors: () => ({Encoding: [Encoding, []]}), |
| 62 methods: () => ({decodeStream: [async.Future$(core.String), [async.Stream$(c
ore.List$(core.int))]]}), | 62 methods: () => ({decodeStream: [async.Future$(core.String), [async.Stream$(c
ore.List$(core.int))]]}), |
| 63 statics: () => ({getByName: [Encoding, [core.String]]}), | 63 statics: () => ({getByName: [Encoding, [core.String]]}), |
| 64 names: ['getByName'] | 64 names: ['getByName'] |
| 65 }); | 65 }); |
| 66 let _allowInvalid = Symbol('_allowInvalid'); | 66 const _allowInvalid = Symbol('_allowInvalid'); |
| 67 class AsciiCodec extends Encoding { | 67 class AsciiCodec extends Encoding { |
| 68 AsciiCodec(opts) { | 68 AsciiCodec(opts) { |
| 69 let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : fa
lse; | 69 let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : fa
lse; |
| 70 this[_allowInvalid] = allowInvalid; | 70 this[_allowInvalid] = allowInvalid; |
| 71 super.Encoding(); | 71 super.Encoding(); |
| 72 } | 72 } |
| 73 get name() { | 73 get name() { |
| 74 return "us-ascii"; | 74 return "us-ascii"; |
| 75 } | 75 } |
| 76 decode(bytes, opts) { | 76 decode(bytes, opts) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 87 return dart.const(new AsciiEncoder()); | 87 return dart.const(new AsciiEncoder()); |
| 88 } | 88 } |
| 89 get decoder() { | 89 get decoder() { |
| 90 return dart.notNull(this[_allowInvalid]) ? dart.const(new AsciiDecoder({al
lowInvalid: true})) : dart.const(new AsciiDecoder({allowInvalid: false})); | 90 return dart.notNull(this[_allowInvalid]) ? dart.const(new AsciiDecoder({al
lowInvalid: true})) : dart.const(new AsciiDecoder({allowInvalid: false})); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 dart.setSignature(AsciiCodec, { | 93 dart.setSignature(AsciiCodec, { |
| 94 constructors: () => ({AsciiCodec: [AsciiCodec, [], {allowInvalid: core.bool}
]}), | 94 constructors: () => ({AsciiCodec: [AsciiCodec, [], {allowInvalid: core.bool}
]}), |
| 95 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowInvalid
: core.bool}]}) | 95 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowInvalid
: core.bool}]}) |
| 96 }); | 96 }); |
| 97 let ASCII = dart.const(new AsciiCodec()); | 97 const ASCII = dart.const(new AsciiCodec()); |
| 98 let _ASCII_MASK = 127; | 98 const _ASCII_MASK = 127; |
| 99 let Converter$ = dart.generic(function(S, T) { | 99 const Converter$ = dart.generic(function(S, T) { |
| 100 class Converter extends core.Object { | 100 class Converter extends core.Object { |
| 101 Converter() { | 101 Converter() { |
| 102 } | 102 } |
| 103 fuse(other) { | 103 fuse(other) { |
| 104 dart.as(other, Converter$(T, dart.dynamic)); | 104 dart.as(other, Converter$(T, dart.dynamic)); |
| 105 return new (_FusedConverter$(S, T, dart.dynamic))(this, other); | 105 return new (_FusedConverter$(S, T, dart.dynamic))(this, other); |
| 106 } | 106 } |
| 107 startChunkedConversion(sink) { | 107 startChunkedConversion(sink) { |
| 108 dart.as(sink, core.Sink$(T)); | 108 dart.as(sink, core.Sink$(T)); |
| 109 dart.throw(new core.UnsupportedError(`This converter does not support ch
unked conversions: ${this}`)); | 109 dart.throw(new core.UnsupportedError(`This converter does not support ch
unked conversions: ${this}`)); |
| 110 } | 110 } |
| 111 bind(source) { | 111 bind(source) { |
| 112 dart.as(source, async.Stream$(S)); | 112 dart.as(source, async.Stream$(S)); |
| 113 return async.Stream$(T).eventTransformed(source, dart.fn((sink => new _C
onverterStreamEventSink(this, sink)).bind(this), _ConverterStreamEventSink, [asy
nc.EventSink])); | 113 return async.Stream$(T).eventTransformed(source, dart.fn((sink => new _C
onverterStreamEventSink(this, sink)).bind(this), _ConverterStreamEventSink, [asy
nc.EventSink])); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 Converter[dart.implements] = () => [async.StreamTransformer$(S, T)]; | 116 Converter[dart.implements] = () => [async.StreamTransformer$(S, T)]; |
| 117 dart.setSignature(Converter, { | 117 dart.setSignature(Converter, { |
| 118 constructors: () => ({Converter: [Converter$(S, T), []]}), | 118 constructors: () => ({Converter: [Converter$(S, T), []]}), |
| 119 methods: () => ({ | 119 methods: () => ({ |
| 120 fuse: [Converter$(S, dart.dynamic), [Converter$(T, dart.dynamic)]], | 120 fuse: [Converter$(S, dart.dynamic), [Converter$(T, dart.dynamic)]], |
| 121 startChunkedConversion: [ChunkedConversionSink, [core.Sink$(T)]], | 121 startChunkedConversion: [ChunkedConversionSink, [core.Sink$(T)]], |
| 122 bind: [async.Stream$(T), [async.Stream$(S)]] | 122 bind: [async.Stream$(T), [async.Stream$(S)]] |
| 123 }) | 123 }) |
| 124 }); | 124 }); |
| 125 return Converter; | 125 return Converter; |
| 126 }); | 126 }); |
| 127 let Converter = Converter$(); | 127 let Converter = Converter$(); |
| 128 let _subsetMask = Symbol('_subsetMask'); | 128 const _subsetMask = Symbol('_subsetMask'); |
| 129 class _UnicodeSubsetEncoder extends Converter$(core.String, core.List$(core.in
t)) { | 129 class _UnicodeSubsetEncoder extends Converter$(core.String, core.List$(core.in
t)) { |
| 130 _UnicodeSubsetEncoder(subsetMask) { | 130 _UnicodeSubsetEncoder(subsetMask) { |
| 131 this[_subsetMask] = subsetMask; | 131 this[_subsetMask] = subsetMask; |
| 132 super.Converter(); | 132 super.Converter(); |
| 133 } | 133 } |
| 134 convert(string, start, end) { | 134 convert(string, start, end) { |
| 135 if (start === void 0) | 135 if (start === void 0) |
| 136 start = 0; | 136 start = 0; |
| 137 if (end === void 0) | 137 if (end === void 0) |
| 138 end = null; | 138 end = null; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 190 } |
| 191 StringConversionSinkMixin[dart.implements] = () => [StringConversionSink]; | 191 StringConversionSinkMixin[dart.implements] = () => [StringConversionSink]; |
| 192 dart.setSignature(StringConversionSinkMixin, { | 192 dart.setSignature(StringConversionSinkMixin, { |
| 193 methods: () => ({ | 193 methods: () => ({ |
| 194 add: [dart.void, [core.String]], | 194 add: [dart.void, [core.String]], |
| 195 asUtf8Sink: [ByteConversionSink, [core.bool]], | 195 asUtf8Sink: [ByteConversionSink, [core.bool]], |
| 196 asStringSink: [ClosableStringSink, []] | 196 asStringSink: [ClosableStringSink, []] |
| 197 }) | 197 }) |
| 198 }); | 198 }); |
| 199 class StringConversionSinkBase extends StringConversionSinkMixin {} | 199 class StringConversionSinkBase extends StringConversionSinkMixin {} |
| 200 let _sink = Symbol('_sink'); | 200 const _sink = Symbol('_sink'); |
| 201 class _UnicodeSubsetEncoderSink extends StringConversionSinkBase { | 201 class _UnicodeSubsetEncoderSink extends StringConversionSinkBase { |
| 202 _UnicodeSubsetEncoderSink(subsetMask, sink) { | 202 _UnicodeSubsetEncoderSink(subsetMask, sink) { |
| 203 this[_subsetMask] = subsetMask; | 203 this[_subsetMask] = subsetMask; |
| 204 this[_sink] = sink; | 204 this[_sink] = sink; |
| 205 } | 205 } |
| 206 close() { | 206 close() { |
| 207 this[_sink].close(); | 207 this[_sink].close(); |
| 208 } | 208 } |
| 209 addSlice(source, start, end, isLast) { | 209 addSlice(source, start, end, isLast) { |
| 210 core.RangeError.checkValidRange(start, end, source[dartx.length]); | 210 core.RangeError.checkValidRange(start, end, source[dartx.length]); |
| 211 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(
i) + 1) { | 211 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(
i) + 1) { |
| 212 let codeUnit = source[dartx.codeUnitAt](i); | 212 let codeUnit = source[dartx.codeUnitAt](i); |
| 213 if ((dart.notNull(codeUnit) & ~dart.notNull(this[_subsetMask])) != 0) { | 213 if ((dart.notNull(codeUnit) & ~dart.notNull(this[_subsetMask])) != 0) { |
| 214 dart.throw(new core.ArgumentError(`Source contains invalid character w
ith code point: ${codeUnit}.`)); | 214 dart.throw(new core.ArgumentError(`Source contains invalid character w
ith code point: ${codeUnit}.`)); |
| 215 } | 215 } |
| 216 } | 216 } |
| 217 this[_sink].add(source[dartx.codeUnits][dartx.sublist](start, end)); | 217 this[_sink].add(source[dartx.codeUnits][dartx.sublist](start, end)); |
| 218 if (dart.notNull(isLast)) { | 218 if (dart.notNull(isLast)) { |
| 219 this.close(); | 219 this.close(); |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 dart.setSignature(_UnicodeSubsetEncoderSink, { | 223 dart.setSignature(_UnicodeSubsetEncoderSink, { |
| 224 constructors: () => ({_UnicodeSubsetEncoderSink: [_UnicodeSubsetEncoderSink,
[core.int, ByteConversionSink]]}), | 224 constructors: () => ({_UnicodeSubsetEncoderSink: [_UnicodeSubsetEncoderSink,
[core.int, ByteConversionSink]]}), |
| 225 methods: () => ({ | 225 methods: () => ({ |
| 226 close: [dart.void, []], | 226 close: [dart.void, []], |
| 227 addSlice: [dart.void, [core.String, core.int, core.int, core.bool]] | 227 addSlice: [dart.void, [core.String, core.int, core.int, core.bool]] |
| 228 }) | 228 }) |
| 229 }); | 229 }); |
| 230 let _convertInvalid = Symbol('_convertInvalid'); | 230 const _convertInvalid = Symbol('_convertInvalid'); |
| 231 class _UnicodeSubsetDecoder extends Converter$(core.List$(core.int), core.Stri
ng) { | 231 class _UnicodeSubsetDecoder extends Converter$(core.List$(core.int), core.Stri
ng) { |
| 232 _UnicodeSubsetDecoder(allowInvalid, subsetMask) { | 232 _UnicodeSubsetDecoder(allowInvalid, subsetMask) { |
| 233 this[_allowInvalid] = allowInvalid; | 233 this[_allowInvalid] = allowInvalid; |
| 234 this[_subsetMask] = subsetMask; | 234 this[_subsetMask] = subsetMask; |
| 235 super.Converter(); | 235 super.Converter(); |
| 236 } | 236 } |
| 237 convert(bytes, start, end) { | 237 convert(bytes, start, end) { |
| 238 if (start === void 0) | 238 if (start === void 0) |
| 239 start = 0; | 239 start = 0; |
| 240 if (end === void 0) | 240 if (end === void 0) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 return new _ErrorHandlingAsciiDecoderSink(stringSink.asUtf8Sink(false)); | 293 return new _ErrorHandlingAsciiDecoderSink(stringSink.asUtf8Sink(false)); |
| 294 } else { | 294 } else { |
| 295 return new _SimpleAsciiDecoderSink(stringSink); | 295 return new _SimpleAsciiDecoderSink(stringSink); |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 } | 298 } |
| 299 dart.setSignature(AsciiDecoder, { | 299 dart.setSignature(AsciiDecoder, { |
| 300 constructors: () => ({AsciiDecoder: [AsciiDecoder, [], {allowInvalid: core.b
ool}]}), | 300 constructors: () => ({AsciiDecoder: [AsciiDecoder, [], {allowInvalid: core.b
ool}]}), |
| 301 methods: () => ({startChunkedConversion: [ByteConversionSink, [core.Sink$(co
re.String)]]}) | 301 methods: () => ({startChunkedConversion: [ByteConversionSink, [core.Sink$(co
re.String)]]}) |
| 302 }); | 302 }); |
| 303 let ChunkedConversionSink$ = dart.generic(function(T) { | 303 const ChunkedConversionSink$ = dart.generic(function(T) { |
| 304 class ChunkedConversionSink extends core.Object { | 304 class ChunkedConversionSink extends core.Object { |
| 305 ChunkedConversionSink() { | 305 ChunkedConversionSink() { |
| 306 } | 306 } |
| 307 static withCallback(callback) { | 307 static withCallback(callback) { |
| 308 return new _SimpleCallbackSink(callback); | 308 return new _SimpleCallbackSink(callback); |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 ChunkedConversionSink[dart.implements] = () => [core.Sink$(T)]; | 311 ChunkedConversionSink[dart.implements] = () => [core.Sink$(T)]; |
| 312 dart.setSignature(ChunkedConversionSink, { | 312 dart.setSignature(ChunkedConversionSink, { |
| 313 constructors: () => ({ | 313 constructors: () => ({ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 342 } | 342 } |
| 343 addSlice(chunk, start, end, isLast) { | 343 addSlice(chunk, start, end, isLast) { |
| 344 this.add(chunk[dartx.sublist](start, end)); | 344 this.add(chunk[dartx.sublist](start, end)); |
| 345 if (dart.notNull(isLast)) | 345 if (dart.notNull(isLast)) |
| 346 this.close(); | 346 this.close(); |
| 347 } | 347 } |
| 348 } | 348 } |
| 349 dart.setSignature(ByteConversionSinkBase, { | 349 dart.setSignature(ByteConversionSinkBase, { |
| 350 methods: () => ({addSlice: [dart.void, [core.List$(core.int), core.int, core
.int, core.bool]]}) | 350 methods: () => ({addSlice: [dart.void, [core.List$(core.int), core.int, core
.int, core.bool]]}) |
| 351 }); | 351 }); |
| 352 let _utf8Sink = Symbol('_utf8Sink'); | 352 const _utf8Sink = Symbol('_utf8Sink'); |
| 353 class _ErrorHandlingAsciiDecoderSink extends ByteConversionSinkBase { | 353 class _ErrorHandlingAsciiDecoderSink extends ByteConversionSinkBase { |
| 354 _ErrorHandlingAsciiDecoderSink(utf8Sink) { | 354 _ErrorHandlingAsciiDecoderSink(utf8Sink) { |
| 355 this[_utf8Sink] = utf8Sink; | 355 this[_utf8Sink] = utf8Sink; |
| 356 } | 356 } |
| 357 close() { | 357 close() { |
| 358 this[_utf8Sink].close(); | 358 this[_utf8Sink].close(); |
| 359 } | 359 } |
| 360 add(source) { | 360 add(source) { |
| 361 this.addSlice(source, 0, source[dartx.length], false); | 361 this.addSlice(source, 0, source[dartx.length], false); |
| 362 } | 362 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 return this[_sink].close(); | 430 return this[_sink].close(); |
| 431 } | 431 } |
| 432 } | 432 } |
| 433 dart.setSignature(_ByteAdapterSink, { | 433 dart.setSignature(_ByteAdapterSink, { |
| 434 constructors: () => ({_ByteAdapterSink: [_ByteAdapterSink, [core.Sink$(core.
List$(core.int))]]}), | 434 constructors: () => ({_ByteAdapterSink: [_ByteAdapterSink, [core.Sink$(core.
List$(core.int))]]}), |
| 435 methods: () => ({ | 435 methods: () => ({ |
| 436 add: [dart.void, [core.List$(core.int)]], | 436 add: [dart.void, [core.List$(core.int)]], |
| 437 close: [dart.void, []] | 437 close: [dart.void, []] |
| 438 }) | 438 }) |
| 439 }); | 439 }); |
| 440 let _buffer = Symbol('_buffer'); | 440 const _buffer = Symbol('_buffer'); |
| 441 let _callback = Symbol('_callback'); | 441 const _callback = Symbol('_callback'); |
| 442 let _bufferIndex = Symbol('_bufferIndex'); | 442 const _bufferIndex = Symbol('_bufferIndex'); |
| 443 class _ByteCallbackSink extends ByteConversionSinkBase { | 443 class _ByteCallbackSink extends ByteConversionSinkBase { |
| 444 _ByteCallbackSink(callback) { | 444 _ByteCallbackSink(callback) { |
| 445 this[_buffer] = typed_data.Uint8List.new(_ByteCallbackSink._INITIAL_BUFFER
_SIZE); | 445 this[_buffer] = typed_data.Uint8List.new(_ByteCallbackSink._INITIAL_BUFFER
_SIZE); |
| 446 this[_callback] = callback; | 446 this[_callback] = callback; |
| 447 this[_bufferIndex] = 0; | 447 this[_bufferIndex] = 0; |
| 448 } | 448 } |
| 449 add(chunk) { | 449 add(chunk) { |
| 450 let freeCount = dart.notNull(this[_buffer][dartx.length]) - dart.notNull(t
his[_bufferIndex]); | 450 let freeCount = dart.notNull(this[_buffer][dartx.length]) - dart.notNull(t
his[_bufferIndex]); |
| 451 if (dart.notNull(chunk[dartx.length]) > dart.notNull(freeCount)) { | 451 if (dart.notNull(chunk[dartx.length]) > dart.notNull(freeCount)) { |
| 452 let oldLength = this[_buffer][dartx.length]; | 452 let oldLength = this[_buffer][dartx.length]; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 476 dart.setSignature(_ByteCallbackSink, { | 476 dart.setSignature(_ByteCallbackSink, { |
| 477 constructors: () => ({_ByteCallbackSink: [_ByteCallbackSink, [dart.functionT
ype(dart.void, [core.List$(core.int)])]]}), | 477 constructors: () => ({_ByteCallbackSink: [_ByteCallbackSink, [dart.functionT
ype(dart.void, [core.List$(core.int)])]]}), |
| 478 methods: () => ({ | 478 methods: () => ({ |
| 479 add: [dart.void, [core.Iterable$(core.int)]], | 479 add: [dart.void, [core.Iterable$(core.int)]], |
| 480 close: [dart.void, []] | 480 close: [dart.void, []] |
| 481 }), | 481 }), |
| 482 statics: () => ({_roundToPowerOf2: [core.int, [core.int]]}), | 482 statics: () => ({_roundToPowerOf2: [core.int, [core.int]]}), |
| 483 names: ['_roundToPowerOf2'] | 483 names: ['_roundToPowerOf2'] |
| 484 }); | 484 }); |
| 485 _ByteCallbackSink._INITIAL_BUFFER_SIZE = 1024; | 485 _ByteCallbackSink._INITIAL_BUFFER_SIZE = 1024; |
| 486 let _ChunkedConversionCallback$ = dart.generic(function(T) { | 486 const _ChunkedConversionCallback$ = dart.generic(function(T) { |
| 487 let _ChunkedConversionCallback = dart.typedef('_ChunkedConversionCallback',
() => dart.functionType(dart.void, [T])); | 487 const _ChunkedConversionCallback = dart.typedef('_ChunkedConversionCallback'
, () => dart.functionType(dart.void, [T])); |
| 488 return _ChunkedConversionCallback; | 488 return _ChunkedConversionCallback; |
| 489 }); | 489 }); |
| 490 let _ChunkedConversionCallback = _ChunkedConversionCallback$(); | 490 let _ChunkedConversionCallback = _ChunkedConversionCallback$(); |
| 491 let _accumulated = Symbol('_accumulated'); | 491 const _accumulated = Symbol('_accumulated'); |
| 492 let _SimpleCallbackSink$ = dart.generic(function(T) { | 492 const _SimpleCallbackSink$ = dart.generic(function(T) { |
| 493 class _SimpleCallbackSink extends ChunkedConversionSink$(T) { | 493 class _SimpleCallbackSink extends ChunkedConversionSink$(T) { |
| 494 _SimpleCallbackSink(callback) { | 494 _SimpleCallbackSink(callback) { |
| 495 this[_accumulated] = dart.list([], T); | 495 this[_accumulated] = dart.list([], T); |
| 496 this[_callback] = callback; | 496 this[_callback] = callback; |
| 497 super.ChunkedConversionSink(); | 497 super.ChunkedConversionSink(); |
| 498 } | 498 } |
| 499 add(chunk) { | 499 add(chunk) { |
| 500 dart.as(chunk, T); | 500 dart.as(chunk, T); |
| 501 this[_accumulated][dartx.add](chunk); | 501 this[_accumulated][dartx.add](chunk); |
| 502 } | 502 } |
| 503 close() { | 503 close() { |
| 504 this[_callback](this[_accumulated]); | 504 this[_callback](this[_accumulated]); |
| 505 } | 505 } |
| 506 } | 506 } |
| 507 dart.setSignature(_SimpleCallbackSink, { | 507 dart.setSignature(_SimpleCallbackSink, { |
| 508 constructors: () => ({_SimpleCallbackSink: [_SimpleCallbackSink$(T), [_Chu
nkedConversionCallback$(core.List$(T))]]}), | 508 constructors: () => ({_SimpleCallbackSink: [_SimpleCallbackSink$(T), [_Chu
nkedConversionCallback$(core.List$(T))]]}), |
| 509 methods: () => ({ | 509 methods: () => ({ |
| 510 add: [dart.void, [T]], | 510 add: [dart.void, [T]], |
| 511 close: [dart.void, []] | 511 close: [dart.void, []] |
| 512 }) | 512 }) |
| 513 }); | 513 }); |
| 514 return _SimpleCallbackSink; | 514 return _SimpleCallbackSink; |
| 515 }); | 515 }); |
| 516 let _SimpleCallbackSink = _SimpleCallbackSink$(); | 516 let _SimpleCallbackSink = _SimpleCallbackSink$(); |
| 517 let _EventSinkAdapter$ = dart.generic(function(T) { | 517 const _EventSinkAdapter$ = dart.generic(function(T) { |
| 518 class _EventSinkAdapter extends core.Object { | 518 class _EventSinkAdapter extends core.Object { |
| 519 _EventSinkAdapter(sink) { | 519 _EventSinkAdapter(sink) { |
| 520 this[_sink] = sink; | 520 this[_sink] = sink; |
| 521 } | 521 } |
| 522 add(data) { | 522 add(data) { |
| 523 dart.as(data, T); | 523 dart.as(data, T); |
| 524 return this[_sink].add(data); | 524 return this[_sink].add(data); |
| 525 } | 525 } |
| 526 close() { | 526 close() { |
| 527 return this[_sink].close(); | 527 return this[_sink].close(); |
| 528 } | 528 } |
| 529 } | 529 } |
| 530 _EventSinkAdapter[dart.implements] = () => [ChunkedConversionSink$(T)]; | 530 _EventSinkAdapter[dart.implements] = () => [ChunkedConversionSink$(T)]; |
| 531 dart.setSignature(_EventSinkAdapter, { | 531 dart.setSignature(_EventSinkAdapter, { |
| 532 constructors: () => ({_EventSinkAdapter: [_EventSinkAdapter$(T), [async.Ev
entSink$(T)]]}), | 532 constructors: () => ({_EventSinkAdapter: [_EventSinkAdapter$(T), [async.Ev
entSink$(T)]]}), |
| 533 methods: () => ({ | 533 methods: () => ({ |
| 534 add: [dart.void, [T]], | 534 add: [dart.void, [T]], |
| 535 close: [dart.void, []] | 535 close: [dart.void, []] |
| 536 }) | 536 }) |
| 537 }); | 537 }); |
| 538 return _EventSinkAdapter; | 538 return _EventSinkAdapter; |
| 539 }); | 539 }); |
| 540 let _EventSinkAdapter = _EventSinkAdapter$(); | 540 let _EventSinkAdapter = _EventSinkAdapter$(); |
| 541 let _eventSink = Symbol('_eventSink'); | 541 const _eventSink = Symbol('_eventSink'); |
| 542 let _chunkedSink = Symbol('_chunkedSink'); | 542 const _chunkedSink = Symbol('_chunkedSink'); |
| 543 let _ConverterStreamEventSink$ = dart.generic(function(S, T) { | 543 const _ConverterStreamEventSink$ = dart.generic(function(S, T) { |
| 544 class _ConverterStreamEventSink extends core.Object { | 544 class _ConverterStreamEventSink extends core.Object { |
| 545 _ConverterStreamEventSink(converter, sink) { | 545 _ConverterStreamEventSink(converter, sink) { |
| 546 this[_eventSink] = sink; | 546 this[_eventSink] = sink; |
| 547 this[_chunkedSink] = converter.startChunkedConversion(sink); | 547 this[_chunkedSink] = converter.startChunkedConversion(sink); |
| 548 } | 548 } |
| 549 add(o) { | 549 add(o) { |
| 550 dart.as(o, S); | 550 dart.as(o, S); |
| 551 return this[_chunkedSink].add(o); | 551 return this[_chunkedSink].add(o); |
| 552 } | 552 } |
| 553 addError(error, stackTrace) { | 553 addError(error, stackTrace) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 564 constructors: () => ({_ConverterStreamEventSink: [_ConverterStreamEventSin
k$(S, T), [Converter, async.EventSink$(T)]]}), | 564 constructors: () => ({_ConverterStreamEventSink: [_ConverterStreamEventSin
k$(S, T), [Converter, async.EventSink$(T)]]}), |
| 565 methods: () => ({ | 565 methods: () => ({ |
| 566 add: [dart.void, [S]], | 566 add: [dart.void, [S]], |
| 567 addError: [dart.void, [core.Object], [core.StackTrace]], | 567 addError: [dart.void, [core.Object], [core.StackTrace]], |
| 568 close: [dart.void, []] | 568 close: [dart.void, []] |
| 569 }) | 569 }) |
| 570 }); | 570 }); |
| 571 return _ConverterStreamEventSink; | 571 return _ConverterStreamEventSink; |
| 572 }); | 572 }); |
| 573 let _ConverterStreamEventSink = _ConverterStreamEventSink$(); | 573 let _ConverterStreamEventSink = _ConverterStreamEventSink$(); |
| 574 let _first = Symbol('_first'); | 574 const _first = Symbol('_first'); |
| 575 let _second = Symbol('_second'); | 575 const _second = Symbol('_second'); |
| 576 let _FusedCodec$ = dart.generic(function(S, M, T) { | 576 const _FusedCodec$ = dart.generic(function(S, M, T) { |
| 577 class _FusedCodec extends Codec$(S, T) { | 577 class _FusedCodec extends Codec$(S, T) { |
| 578 get encoder() { | 578 get encoder() { |
| 579 return dart.as(this[_first].encoder.fuse(this[_second].encoder), Convert
er$(S, T)); | 579 return dart.as(this[_first].encoder.fuse(this[_second].encoder), Convert
er$(S, T)); |
| 580 } | 580 } |
| 581 get decoder() { | 581 get decoder() { |
| 582 return dart.as(this[_second].decoder.fuse(this[_first].decoder), Convert
er$(T, S)); | 582 return dart.as(this[_second].decoder.fuse(this[_first].decoder), Convert
er$(T, S)); |
| 583 } | 583 } |
| 584 _FusedCodec(first, second) { | 584 _FusedCodec(first, second) { |
| 585 this[_first] = first; | 585 this[_first] = first; |
| 586 this[_second] = second; | 586 this[_second] = second; |
| 587 super.Codec(); | 587 super.Codec(); |
| 588 } | 588 } |
| 589 } | 589 } |
| 590 dart.setSignature(_FusedCodec, { | 590 dart.setSignature(_FusedCodec, { |
| 591 constructors: () => ({_FusedCodec: [_FusedCodec$(S, M, T), [Codec$(S, M),
Codec$(M, T)]]}) | 591 constructors: () => ({_FusedCodec: [_FusedCodec$(S, M, T), [Codec$(S, M),
Codec$(M, T)]]}) |
| 592 }); | 592 }); |
| 593 return _FusedCodec; | 593 return _FusedCodec; |
| 594 }); | 594 }); |
| 595 let _FusedCodec = _FusedCodec$(); | 595 let _FusedCodec = _FusedCodec$(); |
| 596 let _codec = Symbol('_codec'); | 596 const _codec = Symbol('_codec'); |
| 597 let _InvertedCodec$ = dart.generic(function(T, S) { | 597 const _InvertedCodec$ = dart.generic(function(T, S) { |
| 598 class _InvertedCodec extends Codec$(T, S) { | 598 class _InvertedCodec extends Codec$(T, S) { |
| 599 _InvertedCodec(codec) { | 599 _InvertedCodec(codec) { |
| 600 this[_codec] = codec; | 600 this[_codec] = codec; |
| 601 super.Codec(); | 601 super.Codec(); |
| 602 } | 602 } |
| 603 get encoder() { | 603 get encoder() { |
| 604 return this[_codec].decoder; | 604 return this[_codec].decoder; |
| 605 } | 605 } |
| 606 get decoder() { | 606 get decoder() { |
| 607 return this[_codec].encoder; | 607 return this[_codec].encoder; |
| 608 } | 608 } |
| 609 get inverted() { | 609 get inverted() { |
| 610 return this[_codec]; | 610 return this[_codec]; |
| 611 } | 611 } |
| 612 } | 612 } |
| 613 dart.setSignature(_InvertedCodec, { | 613 dart.setSignature(_InvertedCodec, { |
| 614 constructors: () => ({_InvertedCodec: [_InvertedCodec$(T, S), [Codec$(S, T
)]]}) | 614 constructors: () => ({_InvertedCodec: [_InvertedCodec$(T, S), [Codec$(S, T
)]]}) |
| 615 }); | 615 }); |
| 616 return _InvertedCodec; | 616 return _InvertedCodec; |
| 617 }); | 617 }); |
| 618 let _InvertedCodec = _InvertedCodec$(); | 618 let _InvertedCodec = _InvertedCodec$(); |
| 619 let _FusedConverter$ = dart.generic(function(S, M, T) { | 619 const _FusedConverter$ = dart.generic(function(S, M, T) { |
| 620 class _FusedConverter extends Converter$(S, T) { | 620 class _FusedConverter extends Converter$(S, T) { |
| 621 _FusedConverter(first, second) { | 621 _FusedConverter(first, second) { |
| 622 this[_first] = first; | 622 this[_first] = first; |
| 623 this[_second] = second; | 623 this[_second] = second; |
| 624 super.Converter(); | 624 super.Converter(); |
| 625 } | 625 } |
| 626 convert(input) { | 626 convert(input) { |
| 627 dart.as(input, S); | 627 dart.as(input, S); |
| 628 return dart.as(this[_second].convert(this[_first].convert(input)), T); | 628 return dart.as(this[_second].convert(this[_first].convert(input)), T); |
| 629 } | 629 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 641 }); | 641 }); |
| 642 return _FusedConverter; | 642 return _FusedConverter; |
| 643 }); | 643 }); |
| 644 let _FusedConverter = _FusedConverter$(); | 644 let _FusedConverter = _FusedConverter$(); |
| 645 dart.defineLazyProperties(Encoding, { | 645 dart.defineLazyProperties(Encoding, { |
| 646 get _nameToEncoding() { | 646 get _nameToEncoding() { |
| 647 return dart.map({"iso_8859-1:1987": LATIN1, "iso-ir-100": LATIN1, "iso_885
9-1": LATIN1, "iso-8859-1": LATIN1, latin1: LATIN1, l1: LATIN1, ibm819: LATIN1,
cp819: LATIN1, csisolatin1: LATIN1, "iso-ir-6": ASCII, "ansi_x3.4-1968": ASCII,
"ansi_x3.4-1986": ASCII, "iso_646.irv:1991": ASCII, "iso646-us": ASCII, "us-asci
i": ASCII, us: ASCII, ibm367: ASCII, cp367: ASCII, csascii: ASCII, ascii: ASCII,
csutf8: UTF8, "utf-8": UTF8}); | 647 return dart.map({"iso_8859-1:1987": LATIN1, "iso-ir-100": LATIN1, "iso_885
9-1": LATIN1, "iso-8859-1": LATIN1, latin1: LATIN1, l1: LATIN1, ibm819: LATIN1,
cp819: LATIN1, csisolatin1: LATIN1, "iso-ir-6": ASCII, "ansi_x3.4-1968": ASCII,
"ansi_x3.4-1986": ASCII, "iso_646.irv:1991": ASCII, "iso646-us": ASCII, "us-asci
i": ASCII, us: ASCII, ibm367: ASCII, cp367: ASCII, csascii: ASCII, ascii: ASCII,
csutf8: UTF8, "utf-8": UTF8}); |
| 648 }, | 648 }, |
| 649 set _nameToEncoding(_) {} | 649 set _nameToEncoding(_) {} |
| 650 }); | 650 }); |
| 651 let _name = Symbol('_name'); | 651 const _name = Symbol('_name'); |
| 652 class HtmlEscapeMode extends core.Object { | 652 class HtmlEscapeMode extends core.Object { |
| 653 _(name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) { | 653 _(name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) { |
| 654 this[_name] = name; | 654 this[_name] = name; |
| 655 this.escapeLtGt = escapeLtGt; | 655 this.escapeLtGt = escapeLtGt; |
| 656 this.escapeQuot = escapeQuot; | 656 this.escapeQuot = escapeQuot; |
| 657 this.escapeApos = escapeApos; | 657 this.escapeApos = escapeApos; |
| 658 this.escapeSlash = escapeSlash; | 658 this.escapeSlash = escapeSlash; |
| 659 } | 659 } |
| 660 toString() { | 660 toString() { |
| 661 return this[_name]; | 661 return this[_name]; |
| 662 } | 662 } |
| 663 } | 663 } |
| 664 dart.defineNamedConstructor(HtmlEscapeMode, '_'); | 664 dart.defineNamedConstructor(HtmlEscapeMode, '_'); |
| 665 dart.setSignature(HtmlEscapeMode, { | 665 dart.setSignature(HtmlEscapeMode, { |
| 666 constructors: () => ({_: [HtmlEscapeMode, [core.String, core.bool, core.bool
, core.bool, core.bool]]}) | 666 constructors: () => ({_: [HtmlEscapeMode, [core.String, core.bool, core.bool
, core.bool, core.bool]]}) |
| 667 }); | 667 }); |
| 668 HtmlEscapeMode.UNKNOWN = dart.const(new HtmlEscapeMode._('unknown', true, true
, true, true)); | 668 HtmlEscapeMode.UNKNOWN = dart.const(new HtmlEscapeMode._('unknown', true, true
, true, true)); |
| 669 let _convert = Symbol('_convert'); | 669 const _convert = Symbol('_convert'); |
| 670 class HtmlEscape extends Converter$(core.String, core.String) { | 670 class HtmlEscape extends Converter$(core.String, core.String) { |
| 671 HtmlEscape(mode) { | 671 HtmlEscape(mode) { |
| 672 if (mode === void 0) | 672 if (mode === void 0) |
| 673 mode = HtmlEscapeMode.UNKNOWN; | 673 mode = HtmlEscapeMode.UNKNOWN; |
| 674 this.mode = mode; | 674 this.mode = mode; |
| 675 super.Converter(); | 675 super.Converter(); |
| 676 } | 676 } |
| 677 convert(text) { | 677 convert(text) { |
| 678 let val = this[_convert](text, 0, text[dartx.length]); | 678 let val = this[_convert](text, 0, text[dartx.length]); |
| 679 return val == null ? text : val; | 679 return val == null ? text : val; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 } | 743 } |
| 744 } | 744 } |
| 745 dart.setSignature(HtmlEscape, { | 745 dart.setSignature(HtmlEscape, { |
| 746 constructors: () => ({HtmlEscape: [HtmlEscape, [], [HtmlEscapeMode]]}), | 746 constructors: () => ({HtmlEscape: [HtmlEscape, [], [HtmlEscapeMode]]}), |
| 747 methods: () => ({ | 747 methods: () => ({ |
| 748 convert: [core.String, [core.String]], | 748 convert: [core.String, [core.String]], |
| 749 [_convert]: [core.String, [core.String, core.int, core.int]], | 749 [_convert]: [core.String, [core.String, core.int, core.int]], |
| 750 startChunkedConversion: [StringConversionSink, [core.Sink$(core.String)]] | 750 startChunkedConversion: [StringConversionSink, [core.Sink$(core.String)]] |
| 751 }) | 751 }) |
| 752 }); | 752 }); |
| 753 let HTML_ESCAPE = dart.const(new HtmlEscape()); | 753 const HTML_ESCAPE = dart.const(new HtmlEscape()); |
| 754 HtmlEscapeMode.ATTRIBUTE = dart.const(new HtmlEscapeMode._('attribute', false,
true, false, false)); | 754 HtmlEscapeMode.ATTRIBUTE = dart.const(new HtmlEscapeMode._('attribute', false,
true, false, false)); |
| 755 HtmlEscapeMode.ELEMENT = dart.const(new HtmlEscapeMode._('element', true, fals
e, false, true)); | 755 HtmlEscapeMode.ELEMENT = dart.const(new HtmlEscapeMode._('element', true, fals
e, false, true)); |
| 756 let _escape = Symbol('_escape'); | 756 const _escape = Symbol('_escape'); |
| 757 class _HtmlEscapeSink extends StringConversionSinkBase { | 757 class _HtmlEscapeSink extends StringConversionSinkBase { |
| 758 _HtmlEscapeSink(escape, sink) { | 758 _HtmlEscapeSink(escape, sink) { |
| 759 this[_escape] = escape; | 759 this[_escape] = escape; |
| 760 this[_sink] = sink; | 760 this[_sink] = sink; |
| 761 } | 761 } |
| 762 addSlice(chunk, start, end, isLast) { | 762 addSlice(chunk, start, end, isLast) { |
| 763 let val = this[_escape][_convert](chunk, start, end); | 763 let val = this[_escape][_convert](chunk, start, end); |
| 764 if (val == null) { | 764 if (val == null) { |
| 765 this[_sink].addSlice(chunk, start, end, isLast); | 765 this[_sink].addSlice(chunk, start, end, isLast); |
| 766 } else { | 766 } else { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, { |
| 810 constructors: () => ({JsonCyclicError: [JsonCyclicError, [core.Object]]}) | 810 constructors: () => ({JsonCyclicError: [JsonCyclicError, [core.Object]]}) |
| 811 }); | 811 }); |
| 812 let _reviver = Symbol('_reviver'); | 812 const _reviver = Symbol('_reviver'); |
| 813 let _toEncodable$ = Symbol('_toEncodable'); | 813 const _toEncodable$ = Symbol('_toEncodable'); |
| 814 class JsonCodec extends Codec$(core.Object, core.String) { | 814 class JsonCodec extends Codec$(core.Object, core.String) { |
| 815 JsonCodec(opts) { | 815 JsonCodec(opts) { |
| 816 let reviver = opts && 'reviver' in opts ? opts.reviver : null; | 816 let reviver = opts && 'reviver' in opts ? opts.reviver : null; |
| 817 let toEncodable = opts && 'toEncodable' in opts ? opts.toEncodable : null; | 817 let toEncodable = opts && 'toEncodable' in opts ? opts.toEncodable : null; |
| 818 this[_reviver] = reviver; | 818 this[_reviver] = reviver; |
| 819 this[_toEncodable$] = toEncodable; | 819 this[_toEncodable$] = toEncodable; |
| 820 super.Codec(); | 820 super.Codec(); |
| 821 } | 821 } |
| 822 withReviver(reviver) { | 822 withReviver(reviver) { |
| 823 this.JsonCodec({reviver: reviver}); | 823 this.JsonCodec({reviver: reviver}); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 853 dart.setSignature(JsonCodec, { | 853 dart.setSignature(JsonCodec, { |
| 854 constructors: () => ({ | 854 constructors: () => ({ |
| 855 JsonCodec: [JsonCodec, [], {reviver: dart.functionType(dart.dynamic, [dart
.dynamic, dart.dynamic]), toEncodable: dart.functionType(dart.dynamic, [dart.dyn
amic])}], | 855 JsonCodec: [JsonCodec, [], {reviver: dart.functionType(dart.dynamic, [dart
.dynamic, dart.dynamic]), toEncodable: dart.functionType(dart.dynamic, [dart.dyn
amic])}], |
| 856 withReviver: [JsonCodec, [dart.functionType(dart.dynamic, [dart.dynamic, d
art.dynamic])]] | 856 withReviver: [JsonCodec, [dart.functionType(dart.dynamic, [dart.dynamic, d
art.dynamic])]] |
| 857 }), | 857 }), |
| 858 methods: () => ({ | 858 methods: () => ({ |
| 859 decode: [dart.dynamic, [core.String], {reviver: dart.functionType(dart.dyn
amic, [dart.dynamic, dart.dynamic])}], | 859 decode: [dart.dynamic, [core.String], {reviver: dart.functionType(dart.dyn
amic, [dart.dynamic, dart.dynamic])}], |
| 860 encode: [core.String, [core.Object], {toEncodable: dart.functionType(dart.
dynamic, [dart.dynamic])}] | 860 encode: [core.String, [core.Object], {toEncodable: dart.functionType(dart.
dynamic, [dart.dynamic])}] |
| 861 }) | 861 }) |
| 862 }); | 862 }); |
| 863 let JSON = dart.const(new JsonCodec()); | 863 const JSON = dart.const(new JsonCodec()); |
| 864 let _Reviver = dart.typedef('_Reviver', () => dart.functionType(dart.dynamic,
[dart.dynamic, dart.dynamic])); | 864 const _Reviver = dart.typedef('_Reviver', () => dart.functionType(dart.dynamic
, [dart.dynamic, dart.dynamic])); |
| 865 let _ToEncodable = dart.typedef('_ToEncodable', () => dart.functionType(dart.d
ynamic, [dart.dynamic])); | 865 const _ToEncodable = dart.typedef('_ToEncodable', () => dart.functionType(dart
.dynamic, [dart.dynamic])); |
| 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; |
| 871 this[_toEncodable$] = toEncodable; | 871 this[_toEncodable$] = toEncodable; |
| 872 super.Converter(); | 872 super.Converter(); |
| 873 } | 873 } |
| 874 withIndent(indent, toEncodable) { | 874 withIndent(indent, toEncodable) { |
| 875 if (toEncodable === void 0) | 875 if (toEncodable === void 0) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 905 JsonEncoder: [JsonEncoder, [], [dart.functionType(core.Object, [core.Objec
t])]], | 905 JsonEncoder: [JsonEncoder, [], [dart.functionType(core.Object, [core.Objec
t])]], |
| 906 withIndent: [JsonEncoder, [core.String], [dart.functionType(core.Object, [
core.Object])]] | 906 withIndent: [JsonEncoder, [core.String], [dart.functionType(core.Object, [
core.Object])]] |
| 907 }), | 907 }), |
| 908 methods: () => ({ | 908 methods: () => ({ |
| 909 convert: [core.String, [core.Object]], | 909 convert: [core.String, [core.Object]], |
| 910 startChunkedConversion: [ChunkedConversionSink$(core.Object), [core.Sink$(
core.String)]], | 910 startChunkedConversion: [ChunkedConversionSink$(core.Object), [core.Sink$(
core.String)]], |
| 911 bind: [async.Stream$(core.String), [async.Stream$(core.Object)]], | 911 bind: [async.Stream$(core.String), [async.Stream$(core.Object)]], |
| 912 fuse: [Converter$(core.Object, dart.dynamic), [Converter$(core.String, dar
t.dynamic)]] | 912 fuse: [Converter$(core.Object, dart.dynamic), [Converter$(core.String, dar
t.dynamic)]] |
| 913 }) | 913 }) |
| 914 }); | 914 }); |
| 915 let _indent = Symbol('_indent'); | 915 const _indent = Symbol('_indent'); |
| 916 let _bufferSize = Symbol('_bufferSize'); | 916 const _bufferSize = Symbol('_bufferSize'); |
| 917 class JsonUtf8Encoder extends Converter$(core.Object, core.List$(core.int)) { | 917 class JsonUtf8Encoder extends Converter$(core.Object, core.List$(core.int)) { |
| 918 JsonUtf8Encoder(indent, toEncodable, bufferSize) { | 918 JsonUtf8Encoder(indent, toEncodable, bufferSize) { |
| 919 if (indent === void 0) | 919 if (indent === void 0) |
| 920 indent = null; | 920 indent = null; |
| 921 if (toEncodable === void 0) | 921 if (toEncodable === void 0) |
| 922 toEncodable = null; | 922 toEncodable = null; |
| 923 if (bufferSize === void 0) | 923 if (bufferSize === void 0) |
| 924 bufferSize = JsonUtf8Encoder.DEFAULT_BUFFER_SIZE; | 924 bufferSize = JsonUtf8Encoder.DEFAULT_BUFFER_SIZE; |
| 925 this[_indent] = JsonUtf8Encoder._utf8Encode(indent); | 925 this[_indent] = JsonUtf8Encoder._utf8Encode(indent); |
| 926 this[_toEncodable$] = toEncodable; | 926 this[_toEncodable$] = toEncodable; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 methods: () => ({ | 988 methods: () => ({ |
| 989 convert: [core.List$(core.int), [core.Object]], | 989 convert: [core.List$(core.int), [core.Object]], |
| 990 startChunkedConversion: [ChunkedConversionSink$(core.Object), [core.Sink$(
core.List$(core.int))]], | 990 startChunkedConversion: [ChunkedConversionSink$(core.Object), [core.Sink$(
core.List$(core.int))]], |
| 991 bind: [async.Stream$(core.List$(core.int)), [async.Stream$(core.Object)]], | 991 bind: [async.Stream$(core.List$(core.int)), [async.Stream$(core.Object)]], |
| 992 fuse: [Converter$(core.Object, dart.dynamic), [Converter$(core.List$(core.
int), dart.dynamic)]] | 992 fuse: [Converter$(core.Object, dart.dynamic), [Converter$(core.List$(core.
int), dart.dynamic)]] |
| 993 }), | 993 }), |
| 994 statics: () => ({_utf8Encode: [core.List$(core.int), [core.String]]}), | 994 statics: () => ({_utf8Encode: [core.List$(core.int), [core.String]]}), |
| 995 names: ['_utf8Encode'] | 995 names: ['_utf8Encode'] |
| 996 }); | 996 }); |
| 997 JsonUtf8Encoder.DEFAULT_BUFFER_SIZE = 256; | 997 JsonUtf8Encoder.DEFAULT_BUFFER_SIZE = 256; |
| 998 let _isDone = Symbol('_isDone'); | 998 const _isDone = Symbol('_isDone'); |
| 999 class _JsonEncoderSink extends ChunkedConversionSink$(core.Object) { | 999 class _JsonEncoderSink extends ChunkedConversionSink$(core.Object) { |
| 1000 _JsonEncoderSink(sink, toEncodable, indent) { | 1000 _JsonEncoderSink(sink, toEncodable, indent) { |
| 1001 this[_sink] = sink; | 1001 this[_sink] = sink; |
| 1002 this[_toEncodable$] = toEncodable; | 1002 this[_toEncodable$] = toEncodable; |
| 1003 this[_indent] = indent; | 1003 this[_indent] = indent; |
| 1004 this[_isDone] = false; | 1004 this[_isDone] = false; |
| 1005 super.ChunkedConversionSink(); | 1005 super.ChunkedConversionSink(); |
| 1006 } | 1006 } |
| 1007 add(o) { | 1007 add(o) { |
| 1008 if (dart.notNull(this[_isDone])) { | 1008 if (dart.notNull(this[_isDone])) { |
| 1009 dart.throw(new core.StateError("Only one call to add allowed")); | 1009 dart.throw(new core.StateError("Only one call to add allowed")); |
| 1010 } | 1010 } |
| 1011 this[_isDone] = true; | 1011 this[_isDone] = true; |
| 1012 let stringSink = this[_sink].asStringSink(); | 1012 let stringSink = this[_sink].asStringSink(); |
| 1013 _JsonStringStringifier.printOn(o, stringSink, dart.as(this[_toEncodable$],
dart.functionType(dart.dynamic, [dart.dynamic])), this[_indent]); | 1013 _JsonStringStringifier.printOn(o, stringSink, dart.as(this[_toEncodable$],
dart.functionType(dart.dynamic, [dart.dynamic])), this[_indent]); |
| 1014 stringSink.close(); | 1014 stringSink.close(); |
| 1015 } | 1015 } |
| 1016 close() {} | 1016 close() {} |
| 1017 } | 1017 } |
| 1018 dart.setSignature(_JsonEncoderSink, { | 1018 dart.setSignature(_JsonEncoderSink, { |
| 1019 constructors: () => ({_JsonEncoderSink: [_JsonEncoderSink, [StringConversion
Sink, core.Function, core.String]]}), | 1019 constructors: () => ({_JsonEncoderSink: [_JsonEncoderSink, [StringConversion
Sink, core.Function, core.String]]}), |
| 1020 methods: () => ({ | 1020 methods: () => ({ |
| 1021 add: [dart.void, [core.Object]], | 1021 add: [dart.void, [core.Object]], |
| 1022 close: [dart.void, []] | 1022 close: [dart.void, []] |
| 1023 }) | 1023 }) |
| 1024 }); | 1024 }); |
| 1025 let _addChunk = Symbol('_addChunk'); | 1025 const _addChunk = Symbol('_addChunk'); |
| 1026 class _JsonUtf8EncoderSink extends ChunkedConversionSink$(core.Object) { | 1026 class _JsonUtf8EncoderSink extends ChunkedConversionSink$(core.Object) { |
| 1027 _JsonUtf8EncoderSink(sink, toEncodable, indent, bufferSize) { | 1027 _JsonUtf8EncoderSink(sink, toEncodable, indent, bufferSize) { |
| 1028 this[_sink] = sink; | 1028 this[_sink] = sink; |
| 1029 this[_toEncodable$] = toEncodable; | 1029 this[_toEncodable$] = toEncodable; |
| 1030 this[_indent] = indent; | 1030 this[_indent] = indent; |
| 1031 this[_bufferSize] = bufferSize; | 1031 this[_bufferSize] = bufferSize; |
| 1032 this[_isDone] = false; | 1032 this[_isDone] = false; |
| 1033 super.ChunkedConversionSink(); | 1033 super.ChunkedConversionSink(); |
| 1034 } | 1034 } |
| 1035 [_addChunk](chunk, start, end) { | 1035 [_addChunk](chunk, start, end) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 return _convertJsonToDartLazy(parsed); | 1097 return _convertJsonToDartLazy(parsed); |
| 1098 } else { | 1098 } else { |
| 1099 return _convertJsonToDart(parsed, reviver); | 1099 return _convertJsonToDart(parsed, reviver); |
| 1100 } | 1100 } |
| 1101 } | 1101 } |
| 1102 dart.fn(_parseJson, dart.dynamic, [core.String, dart.functionType(dart.dynamic
, [dart.dynamic, dart.dynamic])]); | 1102 dart.fn(_parseJson, dart.dynamic, [core.String, dart.functionType(dart.dynamic
, [dart.dynamic, dart.dynamic])]); |
| 1103 function _defaultToEncodable(object) { | 1103 function _defaultToEncodable(object) { |
| 1104 return dart.dsend(object, 'toJson'); | 1104 return dart.dsend(object, 'toJson'); |
| 1105 } | 1105 } |
| 1106 dart.fn(_defaultToEncodable, core.Object, [dart.dynamic]); | 1106 dart.fn(_defaultToEncodable, core.Object, [dart.dynamic]); |
| 1107 let _seen = Symbol('_seen'); | 1107 const _seen = Symbol('_seen'); |
| 1108 let _checkCycle = Symbol('_checkCycle'); | 1108 const _checkCycle = Symbol('_checkCycle'); |
| 1109 let _removeSeen = Symbol('_removeSeen'); | 1109 const _removeSeen = Symbol('_removeSeen'); |
| 1110 class _JsonStringifier extends core.Object { | 1110 class _JsonStringifier extends core.Object { |
| 1111 _JsonStringifier(_toEncodable) { | 1111 _JsonStringifier(_toEncodable) { |
| 1112 this[_seen] = core.List.new(); | 1112 this[_seen] = core.List.new(); |
| 1113 this[_toEncodable$] = _toEncodable != null ? _toEncodable : _defaultToEnco
dable; | 1113 this[_toEncodable$] = _toEncodable != null ? _toEncodable : _defaultToEnco
dable; |
| 1114 } | 1114 } |
| 1115 static hexDigit(x) { | 1115 static hexDigit(x) { |
| 1116 return dart.notNull(x) < 10 ? 48 + dart.notNull(x) : 87 + dart.notNull(x); | 1116 return dart.notNull(x) < 10 ? 48 + dart.notNull(x) : 87 + dart.notNull(x); |
| 1117 } | 1117 } |
| 1118 writeStringContent(s) { | 1118 writeStringContent(s) { |
| 1119 let offset = 0; | 1119 let offset = 0; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1284 _JsonStringifier.FORM_FEED = 12; | 1284 _JsonStringifier.FORM_FEED = 12; |
| 1285 _JsonStringifier.QUOTE = 34; | 1285 _JsonStringifier.QUOTE = 34; |
| 1286 _JsonStringifier.CHAR_0 = 48; | 1286 _JsonStringifier.CHAR_0 = 48; |
| 1287 _JsonStringifier.BACKSLASH = 92; | 1287 _JsonStringifier.BACKSLASH = 92; |
| 1288 _JsonStringifier.CHAR_b = 98; | 1288 _JsonStringifier.CHAR_b = 98; |
| 1289 _JsonStringifier.CHAR_f = 102; | 1289 _JsonStringifier.CHAR_f = 102; |
| 1290 _JsonStringifier.CHAR_n = 110; | 1290 _JsonStringifier.CHAR_n = 110; |
| 1291 _JsonStringifier.CHAR_r = 114; | 1291 _JsonStringifier.CHAR_r = 114; |
| 1292 _JsonStringifier.CHAR_t = 116; | 1292 _JsonStringifier.CHAR_t = 116; |
| 1293 _JsonStringifier.CHAR_u = 117; | 1293 _JsonStringifier.CHAR_u = 117; |
| 1294 let _indentLevel = Symbol('_indentLevel'); | 1294 const _indentLevel = Symbol('_indentLevel'); |
| 1295 class _JsonPrettyPrintMixin extends core.Object { | 1295 class _JsonPrettyPrintMixin extends core.Object { |
| 1296 _JsonPrettyPrintMixin() { | 1296 _JsonPrettyPrintMixin() { |
| 1297 this[_indentLevel] = 0; | 1297 this[_indentLevel] = 0; |
| 1298 } | 1298 } |
| 1299 writeList(list) { | 1299 writeList(list) { |
| 1300 if (dart.notNull(list[dartx.isEmpty])) { | 1300 if (dart.notNull(list[dartx.isEmpty])) { |
| 1301 this.writeString('[]'); | 1301 this.writeString('[]'); |
| 1302 } else { | 1302 } else { |
| 1303 this.writeString('[\n'); | 1303 this.writeString('[\n'); |
| 1304 this[_indentLevel] = dart.notNull(this[_indentLevel]) + 1; | 1304 this[_indentLevel] = dart.notNull(this[_indentLevel]) + 1; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 this.writeByte(indent[dartx.get](i)); | 1549 this.writeByte(indent[dartx.get](i)); |
| 1550 } | 1550 } |
| 1551 } | 1551 } |
| 1552 } | 1552 } |
| 1553 } | 1553 } |
| 1554 } | 1554 } |
| 1555 dart.setSignature(_JsonUtf8StringifierPretty, { | 1555 dart.setSignature(_JsonUtf8StringifierPretty, { |
| 1556 constructors: () => ({_JsonUtf8StringifierPretty: [_JsonUtf8StringifierPrett
y, [dart.dynamic, core.List$(core.int), dart.dynamic, dart.dynamic]]}), | 1556 constructors: () => ({_JsonUtf8StringifierPretty: [_JsonUtf8StringifierPrett
y, [dart.dynamic, core.List$(core.int), dart.dynamic, dart.dynamic]]}), |
| 1557 methods: () => ({writeIndentation: [dart.void, [core.int]]}) | 1557 methods: () => ({writeIndentation: [dart.void, [core.int]]}) |
| 1558 }); | 1558 }); |
| 1559 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.Obj
ect, [core.Object])); | 1559 const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.O
bject, [core.Object])); |
| 1560 let __CastType2 = dart.typedef('__CastType2', () => dart.functionType(dart.dyn
amic, [dart.dynamic])); | 1560 const __CastType2 = dart.typedef('__CastType2', () => dart.functionType(dart.d
ynamic, [dart.dynamic])); |
| 1561 let __CastType4 = dart.typedef('__CastType4', () => dart.functionType(dart.dyn
amic, [core.Object])); | 1561 const __CastType4 = dart.typedef('__CastType4', () => dart.functionType(dart.d
ynamic, [core.Object])); |
| 1562 class Latin1Codec extends Encoding { | 1562 class Latin1Codec extends Encoding { |
| 1563 Latin1Codec(opts) { | 1563 Latin1Codec(opts) { |
| 1564 let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : fa
lse; | 1564 let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : fa
lse; |
| 1565 this[_allowInvalid] = allowInvalid; | 1565 this[_allowInvalid] = allowInvalid; |
| 1566 super.Encoding(); | 1566 super.Encoding(); |
| 1567 } | 1567 } |
| 1568 get name() { | 1568 get name() { |
| 1569 return "iso-8859-1"; | 1569 return "iso-8859-1"; |
| 1570 } | 1570 } |
| 1571 decode(bytes, opts) { | 1571 decode(bytes, opts) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1582 return dart.const(new Latin1Encoder()); | 1582 return dart.const(new Latin1Encoder()); |
| 1583 } | 1583 } |
| 1584 get decoder() { | 1584 get decoder() { |
| 1585 return dart.notNull(this[_allowInvalid]) ? dart.const(new Latin1Decoder({a
llowInvalid: true})) : dart.const(new Latin1Decoder({allowInvalid: false})); | 1585 return dart.notNull(this[_allowInvalid]) ? dart.const(new Latin1Decoder({a
llowInvalid: true})) : dart.const(new Latin1Decoder({allowInvalid: false})); |
| 1586 } | 1586 } |
| 1587 } | 1587 } |
| 1588 dart.setSignature(Latin1Codec, { | 1588 dart.setSignature(Latin1Codec, { |
| 1589 constructors: () => ({Latin1Codec: [Latin1Codec, [], {allowInvalid: core.boo
l}]}), | 1589 constructors: () => ({Latin1Codec: [Latin1Codec, [], {allowInvalid: core.boo
l}]}), |
| 1590 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowInvalid
: core.bool}]}) | 1590 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowInvalid
: core.bool}]}) |
| 1591 }); | 1591 }); |
| 1592 let LATIN1 = dart.const(new Latin1Codec()); | 1592 const LATIN1 = dart.const(new Latin1Codec()); |
| 1593 let _LATIN1_MASK = 255; | 1593 const _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 = StringConversionSink.from(sink); | 1612 stringSink = 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, [], {allowInvalid: core
.bool}]}), | 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 const _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 } |
| 1631 add(source) { | 1631 add(source) { |
| 1632 this.addSlice(source, 0, source[dartx.length], false); | 1632 this.addSlice(source, 0, source[dartx.length], false); |
| 1633 } | 1633 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 return new _LineSplitterSink(dart.as(sink, StringConversionSink)); | 1702 return new _LineSplitterSink(dart.as(sink, StringConversionSink)); |
| 1703 } | 1703 } |
| 1704 } | 1704 } |
| 1705 dart.setSignature(LineSplitter, { | 1705 dart.setSignature(LineSplitter, { |
| 1706 constructors: () => ({LineSplitter: [LineSplitter, []]}), | 1706 constructors: () => ({LineSplitter: [LineSplitter, []]}), |
| 1707 methods: () => ({ | 1707 methods: () => ({ |
| 1708 convert: [core.List$(core.String), [core.String]], | 1708 convert: [core.List$(core.String), [core.String]], |
| 1709 startChunkedConversion: [StringConversionSink, [core.Sink]] | 1709 startChunkedConversion: [StringConversionSink, [core.Sink]] |
| 1710 }) | 1710 }) |
| 1711 }); | 1711 }); |
| 1712 let _carry = Symbol('_carry'); | 1712 const _carry = Symbol('_carry'); |
| 1713 class _LineSplitterSink extends StringConversionSinkBase { | 1713 class _LineSplitterSink extends StringConversionSinkBase { |
| 1714 _LineSplitterSink(sink) { | 1714 _LineSplitterSink(sink) { |
| 1715 this[_sink] = sink; | 1715 this[_sink] = sink; |
| 1716 this[_carry] = null; | 1716 this[_carry] = null; |
| 1717 } | 1717 } |
| 1718 addSlice(chunk, start, end, isLast) { | 1718 addSlice(chunk, start, end, isLast) { |
| 1719 if (this[_carry] != null) { | 1719 if (this[_carry] != null) { |
| 1720 chunk = dart.notNull(this[_carry]) + dart.notNull(chunk[dartx.substring]
(start, end)); | 1720 chunk = dart.notNull(this[_carry]) + dart.notNull(chunk[dartx.substring]
(start, end)); |
| 1721 start = 0; | 1721 start = 0; |
| 1722 end = chunk[dartx.length]; | 1722 end = chunk[dartx.length]; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1798 }) | 1798 }) |
| 1799 }); | 1799 }); |
| 1800 class ClosableStringSink extends core.StringSink { | 1800 class ClosableStringSink extends core.StringSink { |
| 1801 static fromStringSink(sink, onClose) { | 1801 static fromStringSink(sink, onClose) { |
| 1802 return new _ClosableStringSink(sink, onClose); | 1802 return new _ClosableStringSink(sink, onClose); |
| 1803 } | 1803 } |
| 1804 } | 1804 } |
| 1805 dart.setSignature(ClosableStringSink, { | 1805 dart.setSignature(ClosableStringSink, { |
| 1806 constructors: () => ({fromStringSink: [ClosableStringSink, [core.StringSink,
dart.functionType(dart.void, [])]]}) | 1806 constructors: () => ({fromStringSink: [ClosableStringSink, [core.StringSink,
dart.functionType(dart.void, [])]]}) |
| 1807 }); | 1807 }); |
| 1808 let _StringSinkCloseCallback = dart.typedef('_StringSinkCloseCallback', () =>
dart.functionType(dart.void, [])); | 1808 const _StringSinkCloseCallback = dart.typedef('_StringSinkCloseCallback', () =
> dart.functionType(dart.void, [])); |
| 1809 class _ClosableStringSink extends core.Object { | 1809 class _ClosableStringSink extends core.Object { |
| 1810 _ClosableStringSink(sink, callback) { | 1810 _ClosableStringSink(sink, callback) { |
| 1811 this[_sink] = sink; | 1811 this[_sink] = sink; |
| 1812 this[_callback] = callback; | 1812 this[_callback] = callback; |
| 1813 } | 1813 } |
| 1814 close() { | 1814 close() { |
| 1815 return this[_callback](); | 1815 return this[_callback](); |
| 1816 } | 1816 } |
| 1817 writeCharCode(charCode) { | 1817 writeCharCode(charCode) { |
| 1818 return this[_sink].writeCharCode(charCode); | 1818 return this[_sink].writeCharCode(charCode); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1835 dart.setSignature(_ClosableStringSink, { | 1835 dart.setSignature(_ClosableStringSink, { |
| 1836 constructors: () => ({_ClosableStringSink: [_ClosableStringSink, [core.Strin
gSink, _StringSinkCloseCallback]]}), | 1836 constructors: () => ({_ClosableStringSink: [_ClosableStringSink, [core.Strin
gSink, _StringSinkCloseCallback]]}), |
| 1837 methods: () => ({ | 1837 methods: () => ({ |
| 1838 close: [dart.void, []], | 1838 close: [dart.void, []], |
| 1839 writeCharCode: [dart.void, [core.int]], | 1839 writeCharCode: [dart.void, [core.int]], |
| 1840 write: [dart.void, [core.Object]], | 1840 write: [dart.void, [core.Object]], |
| 1841 writeln: [dart.void, [], [core.Object]], | 1841 writeln: [dart.void, [], [core.Object]], |
| 1842 writeAll: [dart.void, [core.Iterable], [core.String]] | 1842 writeAll: [dart.void, [core.Iterable], [core.String]] |
| 1843 }) | 1843 }) |
| 1844 }); | 1844 }); |
| 1845 let _flush = Symbol('_flush'); | 1845 const _flush = Symbol('_flush'); |
| 1846 class _StringConversionSinkAsStringSinkAdapter extends core.Object { | 1846 class _StringConversionSinkAsStringSinkAdapter extends core.Object { |
| 1847 _StringConversionSinkAsStringSinkAdapter(chunkedSink) { | 1847 _StringConversionSinkAsStringSinkAdapter(chunkedSink) { |
| 1848 this[_chunkedSink] = chunkedSink; | 1848 this[_chunkedSink] = chunkedSink; |
| 1849 this[_buffer] = new core.StringBuffer(); | 1849 this[_buffer] = new core.StringBuffer(); |
| 1850 } | 1850 } |
| 1851 close() { | 1851 close() { |
| 1852 if (dart.notNull(this[_buffer].isNotEmpty)) | 1852 if (dart.notNull(this[_buffer].isNotEmpty)) |
| 1853 this[_flush](); | 1853 this[_flush](); |
| 1854 this[_chunkedSink].close(); | 1854 this[_chunkedSink].close(); |
| 1855 } | 1855 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1903 methods: () => ({ | 1903 methods: () => ({ |
| 1904 close: [dart.void, []], | 1904 close: [dart.void, []], |
| 1905 writeCharCode: [dart.void, [core.int]], | 1905 writeCharCode: [dart.void, [core.int]], |
| 1906 write: [dart.void, [core.Object]], | 1906 write: [dart.void, [core.Object]], |
| 1907 writeln: [dart.void, [], [core.Object]], | 1907 writeln: [dart.void, [], [core.Object]], |
| 1908 writeAll: [dart.void, [core.Iterable], [core.String]], | 1908 writeAll: [dart.void, [core.Iterable], [core.String]], |
| 1909 [_flush]: [dart.void, []] | 1909 [_flush]: [dart.void, []] |
| 1910 }) | 1910 }) |
| 1911 }); | 1911 }); |
| 1912 _StringConversionSinkAsStringSinkAdapter._MIN_STRING_SIZE = 16; | 1912 _StringConversionSinkAsStringSinkAdapter._MIN_STRING_SIZE = 16; |
| 1913 let _stringSink = Symbol('_stringSink'); | 1913 const _stringSink = Symbol('_stringSink'); |
| 1914 class _StringSinkConversionSink extends StringConversionSinkBase { | 1914 class _StringSinkConversionSink extends StringConversionSinkBase { |
| 1915 _StringSinkConversionSink(stringSink) { | 1915 _StringSinkConversionSink(stringSink) { |
| 1916 this[_stringSink] = stringSink; | 1916 this[_stringSink] = stringSink; |
| 1917 } | 1917 } |
| 1918 close() {} | 1918 close() {} |
| 1919 addSlice(str, start, end, isLast) { | 1919 addSlice(str, start, end, isLast) { |
| 1920 if (start != 0 || end != str[dartx.length]) { | 1920 if (start != 0 || end != str[dartx.length]) { |
| 1921 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { | 1921 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { |
| 1922 this[_stringSink].writeCharCode(str[dartx.codeUnitAt](i)); | 1922 this[_stringSink].writeCharCode(str[dartx.codeUnitAt](i)); |
| 1923 } | 1923 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1982 return this[_sink].close(); | 1982 return this[_sink].close(); |
| 1983 } | 1983 } |
| 1984 } | 1984 } |
| 1985 dart.setSignature(_StringAdapterSink, { | 1985 dart.setSignature(_StringAdapterSink, { |
| 1986 constructors: () => ({_StringAdapterSink: [_StringAdapterSink, [core.Sink$(c
ore.String)]]}), | 1986 constructors: () => ({_StringAdapterSink: [_StringAdapterSink, [core.Sink$(c
ore.String)]]}), |
| 1987 methods: () => ({ | 1987 methods: () => ({ |
| 1988 addSlice: [dart.void, [core.String, core.int, core.int, core.bool]], | 1988 addSlice: [dart.void, [core.String, core.int, core.int, core.bool]], |
| 1989 close: [dart.void, []] | 1989 close: [dart.void, []] |
| 1990 }) | 1990 }) |
| 1991 }); | 1991 }); |
| 1992 let _decoder = Symbol('_decoder'); | 1992 const _decoder = Symbol('_decoder'); |
| 1993 class _Utf8StringSinkAdapter extends ByteConversionSink { | 1993 class _Utf8StringSinkAdapter extends ByteConversionSink { |
| 1994 _Utf8StringSinkAdapter(sink, stringSink, allowMalformed) { | 1994 _Utf8StringSinkAdapter(sink, stringSink, allowMalformed) { |
| 1995 this[_sink] = sink; | 1995 this[_sink] = sink; |
| 1996 this[_decoder] = new _Utf8Decoder(stringSink, allowMalformed); | 1996 this[_decoder] = new _Utf8Decoder(stringSink, allowMalformed); |
| 1997 super.ByteConversionSink(); | 1997 super.ByteConversionSink(); |
| 1998 } | 1998 } |
| 1999 close() { | 1999 close() { |
| 2000 this[_decoder].close(); | 2000 this[_decoder].close(); |
| 2001 if (this[_sink] != null) | 2001 if (this[_sink] != null) |
| 2002 this[_sink].close(); | 2002 this[_sink].close(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 constructors: () => ({ | 2058 constructors: () => ({ |
| 2059 _Utf8ConversionSink: [_Utf8ConversionSink, [StringConversionSink, core.boo
l]], | 2059 _Utf8ConversionSink: [_Utf8ConversionSink, [StringConversionSink, core.boo
l]], |
| 2060 _: [_Utf8ConversionSink, [StringConversionSink, core.StringBuffer, core.bo
ol]] | 2060 _: [_Utf8ConversionSink, [StringConversionSink, core.StringBuffer, core.bo
ol]] |
| 2061 }), | 2061 }), |
| 2062 methods: () => ({ | 2062 methods: () => ({ |
| 2063 close: [dart.void, []], | 2063 close: [dart.void, []], |
| 2064 add: [dart.void, [core.List$(core.int)]], | 2064 add: [dart.void, [core.List$(core.int)]], |
| 2065 addSlice: [dart.void, [core.List$(core.int), core.int, core.int, core.bool
]] | 2065 addSlice: [dart.void, [core.List$(core.int), core.int, core.int, core.bool
]] |
| 2066 }) | 2066 }) |
| 2067 }); | 2067 }); |
| 2068 let UNICODE_REPLACEMENT_CHARACTER_RUNE = 65533; | 2068 const UNICODE_REPLACEMENT_CHARACTER_RUNE = 65533; |
| 2069 let UNICODE_BOM_CHARACTER_RUNE = 65279; | 2069 const UNICODE_BOM_CHARACTER_RUNE = 65279; |
| 2070 let _allowMalformed = Symbol('_allowMalformed'); | 2070 const _allowMalformed = Symbol('_allowMalformed'); |
| 2071 class Utf8Codec extends Encoding { | 2071 class Utf8Codec extends Encoding { |
| 2072 Utf8Codec(opts) { | 2072 Utf8Codec(opts) { |
| 2073 let allowMalformed = opts && 'allowMalformed' in opts ? opts.allowMalforme
d : false; | 2073 let allowMalformed = opts && 'allowMalformed' in opts ? opts.allowMalforme
d : false; |
| 2074 this[_allowMalformed] = allowMalformed; | 2074 this[_allowMalformed] = allowMalformed; |
| 2075 super.Encoding(); | 2075 super.Encoding(); |
| 2076 } | 2076 } |
| 2077 get name() { | 2077 get name() { |
| 2078 return "utf-8"; | 2078 return "utf-8"; |
| 2079 } | 2079 } |
| 2080 decode(codeUnits, opts) { | 2080 decode(codeUnits, opts) { |
| 2081 let allowMalformed = opts && 'allowMalformed' in opts ? opts.allowMalforme
d : null; | 2081 let allowMalformed = opts && 'allowMalformed' in opts ? opts.allowMalforme
d : null; |
| 2082 if (allowMalformed == null) | 2082 if (allowMalformed == null) |
| 2083 allowMalformed = this[_allowMalformed]; | 2083 allowMalformed = this[_allowMalformed]; |
| 2084 return new Utf8Decoder({allowMalformed: allowMalformed}).convert(codeUnits
); | 2084 return new Utf8Decoder({allowMalformed: allowMalformed}).convert(codeUnits
); |
| 2085 } | 2085 } |
| 2086 get encoder() { | 2086 get encoder() { |
| 2087 return new Utf8Encoder(); | 2087 return new Utf8Encoder(); |
| 2088 } | 2088 } |
| 2089 get decoder() { | 2089 get decoder() { |
| 2090 return new Utf8Decoder({allowMalformed: this[_allowMalformed]}); | 2090 return new Utf8Decoder({allowMalformed: this[_allowMalformed]}); |
| 2091 } | 2091 } |
| 2092 } | 2092 } |
| 2093 dart.setSignature(Utf8Codec, { | 2093 dart.setSignature(Utf8Codec, { |
| 2094 constructors: () => ({Utf8Codec: [Utf8Codec, [], {allowMalformed: core.bool}
]}), | 2094 constructors: () => ({Utf8Codec: [Utf8Codec, [], {allowMalformed: core.bool}
]}), |
| 2095 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowMalform
ed: core.bool}]}) | 2095 methods: () => ({decode: [core.String, [core.List$(core.int)], {allowMalform
ed: core.bool}]}) |
| 2096 }); | 2096 }); |
| 2097 let UTF8 = dart.const(new Utf8Codec()); | 2097 const UTF8 = dart.const(new Utf8Codec()); |
| 2098 let _fillBuffer = Symbol('_fillBuffer'); | 2098 const _fillBuffer = Symbol('_fillBuffer'); |
| 2099 let _writeSurrogate = Symbol('_writeSurrogate'); | 2099 const _writeSurrogate = Symbol('_writeSurrogate'); |
| 2100 class Utf8Encoder extends Converter$(core.String, core.List$(core.int)) { | 2100 class Utf8Encoder extends Converter$(core.String, core.List$(core.int)) { |
| 2101 Utf8Encoder() { | 2101 Utf8Encoder() { |
| 2102 super.Converter(); | 2102 super.Converter(); |
| 2103 } | 2103 } |
| 2104 convert(string, start, end) { | 2104 convert(string, start, end) { |
| 2105 if (start === void 0) | 2105 if (start === void 0) |
| 2106 start = 0; | 2106 start = 0; |
| 2107 if (end === void 0) | 2107 if (end === void 0) |
| 2108 end = null; | 2108 end = null; |
| 2109 let stringLength = string[dartx.length]; | 2109 let stringLength = string[dartx.length]; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2372 } | 2372 } |
| 2373 dart.setSignature(Utf8Decoder, { | 2373 dart.setSignature(Utf8Decoder, { |
| 2374 constructors: () => ({Utf8Decoder: [Utf8Decoder, [], {allowMalformed: core.b
ool}]}), | 2374 constructors: () => ({Utf8Decoder: [Utf8Decoder, [], {allowMalformed: core.b
ool}]}), |
| 2375 methods: () => ({ | 2375 methods: () => ({ |
| 2376 convert: [core.String, [core.List$(core.int)], [core.int, core.int]], | 2376 convert: [core.String, [core.List$(core.int)], [core.int, core.int]], |
| 2377 startChunkedConversion: [ByteConversionSink, [core.Sink$(core.String)]], | 2377 startChunkedConversion: [ByteConversionSink, [core.Sink$(core.String)]], |
| 2378 bind: [async.Stream$(core.String), [async.Stream$(core.List$(core.int))]], | 2378 bind: [async.Stream$(core.String), [async.Stream$(core.List$(core.int))]], |
| 2379 fuse: [Converter$(core.List$(core.int), dart.dynamic), [Converter$(core.St
ring, dart.dynamic)]] | 2379 fuse: [Converter$(core.List$(core.int), dart.dynamic), [Converter$(core.St
ring, dart.dynamic)]] |
| 2380 }) | 2380 }) |
| 2381 }); | 2381 }); |
| 2382 let _ONE_BYTE_LIMIT = 127; | 2382 const _ONE_BYTE_LIMIT = 127; |
| 2383 let _TWO_BYTE_LIMIT = 2047; | 2383 const _TWO_BYTE_LIMIT = 2047; |
| 2384 let _THREE_BYTE_LIMIT = 65535; | 2384 const _THREE_BYTE_LIMIT = 65535; |
| 2385 let _FOUR_BYTE_LIMIT = 1114111; | 2385 const _FOUR_BYTE_LIMIT = 1114111; |
| 2386 let _SURROGATE_MASK = 63488; | 2386 const _SURROGATE_MASK = 63488; |
| 2387 let _SURROGATE_TAG_MASK = 64512; | 2387 const _SURROGATE_TAG_MASK = 64512; |
| 2388 let _SURROGATE_VALUE_MASK = 1023; | 2388 const _SURROGATE_VALUE_MASK = 1023; |
| 2389 let _LEAD_SURROGATE_MIN = 55296; | 2389 const _LEAD_SURROGATE_MIN = 55296; |
| 2390 let _TAIL_SURROGATE_MIN = 56320; | 2390 const _TAIL_SURROGATE_MIN = 56320; |
| 2391 function _isSurrogate(codeUnit) { | 2391 function _isSurrogate(codeUnit) { |
| 2392 return (dart.notNull(codeUnit) & dart.notNull(_SURROGATE_MASK)) == _LEAD_SUR
ROGATE_MIN; | 2392 return (dart.notNull(codeUnit) & dart.notNull(_SURROGATE_MASK)) == _LEAD_SUR
ROGATE_MIN; |
| 2393 } | 2393 } |
| 2394 dart.fn(_isSurrogate, core.bool, [core.int]); | 2394 dart.fn(_isSurrogate, core.bool, [core.int]); |
| 2395 function _isLeadSurrogate(codeUnit) { | 2395 function _isLeadSurrogate(codeUnit) { |
| 2396 return (dart.notNull(codeUnit) & dart.notNull(_SURROGATE_TAG_MASK)) == _LEAD
_SURROGATE_MIN; | 2396 return (dart.notNull(codeUnit) & dart.notNull(_SURROGATE_TAG_MASK)) == _LEAD
_SURROGATE_MIN; |
| 2397 } | 2397 } |
| 2398 dart.fn(_isLeadSurrogate, core.bool, [core.int]); | 2398 dart.fn(_isLeadSurrogate, core.bool, [core.int]); |
| 2399 function _isTailSurrogate(codeUnit) { | 2399 function _isTailSurrogate(codeUnit) { |
| 2400 return (dart.notNull(codeUnit) & dart.notNull(_SURROGATE_TAG_MASK)) == _TAIL
_SURROGATE_MIN; | 2400 return (dart.notNull(codeUnit) & dart.notNull(_SURROGATE_TAG_MASK)) == _TAIL
_SURROGATE_MIN; |
| 2401 } | 2401 } |
| 2402 dart.fn(_isTailSurrogate, core.bool, [core.int]); | 2402 dart.fn(_isTailSurrogate, core.bool, [core.int]); |
| 2403 function _combineSurrogatePair(lead, tail) { | 2403 function _combineSurrogatePair(lead, tail) { |
| 2404 return 65536 + ((dart.notNull(lead) & dart.notNull(_SURROGATE_VALUE_MASK)) <
< 10) | dart.notNull(tail) & dart.notNull(_SURROGATE_VALUE_MASK); | 2404 return 65536 + ((dart.notNull(lead) & dart.notNull(_SURROGATE_VALUE_MASK)) <
< 10) | dart.notNull(tail) & dart.notNull(_SURROGATE_VALUE_MASK); |
| 2405 } | 2405 } |
| 2406 dart.fn(_combineSurrogatePair, core.int, [core.int, core.int]); | 2406 dart.fn(_combineSurrogatePair, core.int, [core.int, core.int]); |
| 2407 let _isFirstCharacter = Symbol('_isFirstCharacter'); | 2407 const _isFirstCharacter = Symbol('_isFirstCharacter'); |
| 2408 let _value = Symbol('_value'); | 2408 const _value = Symbol('_value'); |
| 2409 let _expectedUnits = Symbol('_expectedUnits'); | 2409 const _expectedUnits = Symbol('_expectedUnits'); |
| 2410 let _extraUnits = Symbol('_extraUnits'); | 2410 const _extraUnits = Symbol('_extraUnits'); |
| 2411 class _Utf8Decoder extends core.Object { | 2411 class _Utf8Decoder extends core.Object { |
| 2412 _Utf8Decoder(stringSink, allowMalformed) { | 2412 _Utf8Decoder(stringSink, allowMalformed) { |
| 2413 this[_stringSink] = stringSink; | 2413 this[_stringSink] = stringSink; |
| 2414 this[_allowMalformed] = allowMalformed; | 2414 this[_allowMalformed] = allowMalformed; |
| 2415 this[_isFirstCharacter] = true; | 2415 this[_isFirstCharacter] = true; |
| 2416 this[_value] = 0; | 2416 this[_value] = 0; |
| 2417 this[_expectedUnits] = 0; | 2417 this[_expectedUnits] = 0; |
| 2418 this[_extraUnits] = 0; | 2418 this[_extraUnits] = 0; |
| 2419 } | 2419 } |
| 2420 get hasPartialInput() { | 2420 get hasPartialInput() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2445 let to = endIndex; | 2445 let to = endIndex; |
| 2446 let mask = _ONE_BYTE_LIMIT; | 2446 let mask = _ONE_BYTE_LIMIT; |
| 2447 for (let i = from; dart.notNull(i) < dart.notNull(to); i = dart.notNull(
i) + 1) { | 2447 for (let i = from; dart.notNull(i) < dart.notNull(to); i = dart.notNull(
i) + 1) { |
| 2448 let unit = dart.dindex(units, i); | 2448 let unit = dart.dindex(units, i); |
| 2449 if (!dart.equals(dart.dsend(unit, '&', mask), unit)) | 2449 if (!dart.equals(dart.dsend(unit, '&', mask), unit)) |
| 2450 return dart.notNull(i) - dart.notNull(from); | 2450 return dart.notNull(i) - dart.notNull(from); |
| 2451 } | 2451 } |
| 2452 return dart.notNull(to) - dart.notNull(from); | 2452 return dart.notNull(to) - dart.notNull(from); |
| 2453 } | 2453 } |
| 2454 dart.fn(scanOneByteCharacters, core.int, [dart.dynamic, core.int]); | 2454 dart.fn(scanOneByteCharacters, core.int, [dart.dynamic, core.int]); |
| 2455 let addSingleBytes = (function(from, to) { | 2455 const addSingleBytes = (function(from, to) { |
| 2456 dart.assert(dart.notNull(from) >= dart.notNull(startIndex) && dart.notNu
ll(from) <= dart.notNull(endIndex)); | 2456 dart.assert(dart.notNull(from) >= dart.notNull(startIndex) && dart.notNu
ll(from) <= dart.notNull(endIndex)); |
| 2457 dart.assert(dart.notNull(to) >= dart.notNull(startIndex) && dart.notNull
(to) <= dart.notNull(endIndex)); | 2457 dart.assert(dart.notNull(to) >= dart.notNull(startIndex) && dart.notNull
(to) <= dart.notNull(endIndex)); |
| 2458 this[_stringSink].write(core.String.fromCharCodes(codeUnits, from, to)); | 2458 this[_stringSink].write(core.String.fromCharCodes(codeUnits, from, to)); |
| 2459 }).bind(this); | 2459 }).bind(this); |
| 2460 dart.fn(addSingleBytes, dart.void, [core.int, core.int]); | 2460 dart.fn(addSingleBytes, dart.void, [core.int, core.int]); |
| 2461 let i = startIndex; | 2461 let i = startIndex; |
| 2462 loop: | 2462 loop: |
| 2463 while (true) { | 2463 while (true) { |
| 2464 multibyte: | 2464 multibyte: |
| 2465 if (dart.notNull(expectedUnits) > 0) { | 2465 if (dart.notNull(expectedUnits) > 0) { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2556 } | 2556 } |
| 2557 dart.setSignature(_Utf8Decoder, { | 2557 dart.setSignature(_Utf8Decoder, { |
| 2558 constructors: () => ({_Utf8Decoder: [_Utf8Decoder, [core.StringSink, core.bo
ol]]}), | 2558 constructors: () => ({_Utf8Decoder: [_Utf8Decoder, [core.StringSink, core.bo
ol]]}), |
| 2559 methods: () => ({ | 2559 methods: () => ({ |
| 2560 close: [dart.void, []], | 2560 close: [dart.void, []], |
| 2561 flush: [dart.void, []], | 2561 flush: [dart.void, []], |
| 2562 convert: [dart.void, [core.List$(core.int), core.int, core.int]] | 2562 convert: [dart.void, [core.List$(core.int), core.int, core.int]] |
| 2563 }) | 2563 }) |
| 2564 }); | 2564 }); |
| 2565 _Utf8Decoder._LIMITS = dart.const(dart.list([_ONE_BYTE_LIMIT, _TWO_BYTE_LIMIT,
_THREE_BYTE_LIMIT, _FOUR_BYTE_LIMIT], core.int)); | 2565 _Utf8Decoder._LIMITS = dart.const(dart.list([_ONE_BYTE_LIMIT, _TWO_BYTE_LIMIT,
_THREE_BYTE_LIMIT, _FOUR_BYTE_LIMIT], core.int)); |
| 2566 let _processed = Symbol('_processed'); | 2566 const _processed = Symbol('_processed'); |
| 2567 let _computeKeys = Symbol('_computeKeys'); | 2567 const _computeKeys = Symbol('_computeKeys'); |
| 2568 let _original = Symbol('_original'); | 2568 const _original = Symbol('_original'); |
| 2569 function _convertJsonToDart(json, reviver) { | 2569 function _convertJsonToDart(json, reviver) { |
| 2570 dart.assert(reviver != null); | 2570 dart.assert(reviver != null); |
| 2571 function walk(e) { | 2571 function walk(e) { |
| 2572 if (e == null || typeof e != "object") { | 2572 if (e == null || typeof e != "object") { |
| 2573 return e; | 2573 return e; |
| 2574 } | 2574 } |
| 2575 if (Object.getPrototypeOf(e) === Array.prototype) { | 2575 if (Object.getPrototypeOf(e) === Array.prototype) { |
| 2576 for (let i = 0; dart.notNull(i) < e.length; i = dart.notNull(i) + 1) { | 2576 for (let i = 0; dart.notNull(i) < e.length; i = dart.notNull(i) + 1) { |
| 2577 let item = e[i]; | 2577 let item = e[i]; |
| 2578 e[i] = dart.dcall(reviver, i, walk(item)); | 2578 e[i] = dart.dcall(reviver, i, walk(item)); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2603 if (Object.getPrototypeOf(object) !== Array.prototype) { | 2603 if (Object.getPrototypeOf(object) !== Array.prototype) { |
| 2604 return new _JsonMap(object); | 2604 return new _JsonMap(object); |
| 2605 } | 2605 } |
| 2606 for (let i = 0; dart.notNull(i) < object.length; i = dart.notNull(i) + 1) { | 2606 for (let i = 0; dart.notNull(i) < object.length; i = dart.notNull(i) + 1) { |
| 2607 let item = object[i]; | 2607 let item = object[i]; |
| 2608 object[i] = _convertJsonToDartLazy(item); | 2608 object[i] = _convertJsonToDartLazy(item); |
| 2609 } | 2609 } |
| 2610 return object; | 2610 return object; |
| 2611 } | 2611 } |
| 2612 dart.fn(_convertJsonToDartLazy); | 2612 dart.fn(_convertJsonToDartLazy); |
| 2613 let _data = Symbol('_data'); | 2613 const _data = Symbol('_data'); |
| 2614 let _isUpgraded = Symbol('_isUpgraded'); | 2614 const _isUpgraded = Symbol('_isUpgraded'); |
| 2615 let _upgradedMap = Symbol('_upgradedMap'); | 2615 const _upgradedMap = Symbol('_upgradedMap'); |
| 2616 let _process = Symbol('_process'); | 2616 const _process = Symbol('_process'); |
| 2617 let _upgrade = Symbol('_upgrade'); | 2617 const _upgrade = Symbol('_upgrade'); |
| 2618 class _JsonMap extends core.Object { | 2618 class _JsonMap extends core.Object { |
| 2619 _JsonMap(original) { | 2619 _JsonMap(original) { |
| 2620 this[_processed] = _JsonMap._newJavaScriptObject(); | 2620 this[_processed] = _JsonMap._newJavaScriptObject(); |
| 2621 this[_original] = original; | 2621 this[_original] = original; |
| 2622 this[_data] = null; | 2622 this[_data] = null; |
| 2623 } | 2623 } |
| 2624 get(key) { | 2624 get(key) { |
| 2625 if (dart.notNull(this[_isUpgraded])) { | 2625 if (dart.notNull(this[_isUpgraded])) { |
| 2626 return this[_upgradedMap].get(key); | 2626 return this[_upgradedMap].get(key); |
| 2627 } else if (!(typeof key == 'string')) { | 2627 } else if (!(typeof key == 'string')) { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2812 statics: () => ({ | 2812 statics: () => ({ |
| 2813 _hasProperty: [core.bool, [dart.dynamic, core.String]], | 2813 _hasProperty: [core.bool, [dart.dynamic, core.String]], |
| 2814 _getProperty: [dart.dynamic, [dart.dynamic, core.String]], | 2814 _getProperty: [dart.dynamic, [dart.dynamic, core.String]], |
| 2815 _setProperty: [dart.dynamic, [dart.dynamic, core.String, dart.dynamic]], | 2815 _setProperty: [dart.dynamic, [dart.dynamic, core.String, dart.dynamic]], |
| 2816 _getPropertyNames: [core.List, [dart.dynamic]], | 2816 _getPropertyNames: [core.List, [dart.dynamic]], |
| 2817 _isUnprocessed: [core.bool, [dart.dynamic]], | 2817 _isUnprocessed: [core.bool, [dart.dynamic]], |
| 2818 _newJavaScriptObject: [dart.dynamic, []] | 2818 _newJavaScriptObject: [dart.dynamic, []] |
| 2819 }), | 2819 }), |
| 2820 names: ['_hasProperty', '_getProperty', '_setProperty', '_getPropertyNames',
'_isUnprocessed', '_newJavaScriptObject'] | 2820 names: ['_hasProperty', '_getProperty', '_setProperty', '_getPropertyNames',
'_isUnprocessed', '_newJavaScriptObject'] |
| 2821 }); | 2821 }); |
| 2822 let _parent = Symbol('_parent'); | 2822 const _parent = Symbol('_parent'); |
| 2823 class _JsonMapKeyIterable extends _internal.ListIterable { | 2823 class _JsonMapKeyIterable extends _internal.ListIterable { |
| 2824 _JsonMapKeyIterable(parent) { | 2824 _JsonMapKeyIterable(parent) { |
| 2825 this[_parent] = parent; | 2825 this[_parent] = parent; |
| 2826 super.ListIterable(); | 2826 super.ListIterable(); |
| 2827 } | 2827 } |
| 2828 get length() { | 2828 get length() { |
| 2829 return this[_parent].length; | 2829 return this[_parent].length; |
| 2830 } | 2830 } |
| 2831 elementAt(index) { | 2831 elementAt(index) { |
| 2832 return dart.notNull(this[_parent][_isUpgraded]) ? dart.as(this[_parent].ke
ys[dartx.elementAt](index), core.String) : this[_parent][_computeKeys]()[dartx.g
et](index); | 2832 return dart.notNull(this[_parent][_isUpgraded]) ? dart.as(this[_parent].ke
ys[dartx.elementAt](index), core.String) : this[_parent][_computeKeys]()[dartx.g
et](index); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2895 exports.LineSplitter = LineSplitter; | 2895 exports.LineSplitter = LineSplitter; |
| 2896 exports.StringConversionSink = StringConversionSink; | 2896 exports.StringConversionSink = StringConversionSink; |
| 2897 exports.ClosableStringSink = ClosableStringSink; | 2897 exports.ClosableStringSink = ClosableStringSink; |
| 2898 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; | 2898 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; |
| 2899 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; | 2899 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; |
| 2900 exports.Utf8Codec = Utf8Codec; | 2900 exports.Utf8Codec = Utf8Codec; |
| 2901 exports.UTF8 = UTF8; | 2901 exports.UTF8 = UTF8; |
| 2902 exports.Utf8Encoder = Utf8Encoder; | 2902 exports.Utf8Encoder = Utf8Encoder; |
| 2903 exports.Utf8Decoder = Utf8Decoder; | 2903 exports.Utf8Decoder = Utf8Decoder; |
| 2904 }); | 2904 }); |
| OLD | NEW |