| Index: lib/runtime/dart/convert.js
|
| diff --git a/lib/runtime/dart/convert.js b/lib/runtime/dart/convert.js
|
| index 5f9dc9e2af01b25bd848a28c3c6eba1b85f57548..d9bf5ce922c27e9e63bee83024553ec62955709a 100644
|
| --- a/lib/runtime/dart/convert.js
|
| +++ b/lib/runtime/dart/convert.js
|
| @@ -15,11 +15,11 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| encode(input) {
|
| dart.as(input, S);
|
| - return this.encoder.convert(input);
|
| + return dart.dcall(this.encoder.convert, input);
|
| }
|
| decode(encoded) {
|
| dart.as(encoded, T);
|
| - return this.decoder.convert(encoded);
|
| + return dart.dcall(this.decoder.convert, encoded);
|
| }
|
| fuse(other) {
|
| dart.as(other, Codec$(T, dart.dynamic));
|
| @@ -45,15 +45,15 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super.Codec();
|
| }
|
| decodeStream(byteStream) {
|
| - return byteStream.transform(this.decoder).fold(new core.StringBuffer(), dart.fn((buffer, string) => ((() => {
|
| + return dart.as(dart.dcall(dart.dcall(dart.dcall(byteStream.transform, this.decoder).fold, new core.StringBuffer(), dart.fn((buffer, string) => ((() => {
|
| dart.dsend(buffer, 'write', string);
|
| return buffer;
|
| - })()))).then(dart.fn(buffer => dart.toString(buffer), core.String, [dart.dynamic]));
|
| + })()))).then, dart.fn(buffer => dart.dsend(buffer, 'toString'))), async.Future$(core.String));
|
| }
|
| static getByName(name) {
|
| if (name == null)
|
| return null;
|
| - name = name[dartx.toLowerCase]();
|
| + name = dart.dcall(name[dartx.toLowerCase]);
|
| return Encoding._nameToEncoding.get(name);
|
| }
|
| }
|
| @@ -78,9 +78,9 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (allowInvalid == null)
|
| allowInvalid = this[_allowInvalid];
|
| if (dart.notNull(allowInvalid)) {
|
| - return dart.const(new AsciiDecoder({allowInvalid: true})).convert(bytes);
|
| + return dart.dcall(dart.const(new AsciiDecoder({allowInvalid: true})).convert, bytes);
|
| } else {
|
| - return dart.const(new AsciiDecoder({allowInvalid: false})).convert(bytes);
|
| + return dart.dcall(dart.const(new AsciiDecoder({allowInvalid: false})).convert, bytes);
|
| }
|
| }
|
| get encoder() {
|
| @@ -137,14 +137,14 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (end === void 0)
|
| end = null;
|
| let stringLength = string[dartx.length];
|
| - core.RangeError.checkValidRange(start, end, stringLength);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, stringLength);
|
| if (end == null)
|
| end = stringLength;
|
| let length = dart.notNull(end) - dart.notNull(start);
|
| let result = typed_data.Uint8List.new(length);
|
| for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) {
|
| - let codeUnit = string[dartx.codeUnitAt](dart.notNull(start) + dart.notNull(i));
|
| - if ((dart.notNull(codeUnit) & ~dart.notNull(this[_subsetMask])) != 0) {
|
| + let codeUnit = dart.dcall(string[dartx.codeUnitAt], dart.notNull(start) + dart.notNull(i));
|
| + if (!dart.equals(dart.dsend(codeUnit, '&', ~dart.notNull(this[_subsetMask])), 0)) {
|
| dart.throw(new core.ArgumentError("String contains invalid characters."));
|
| }
|
| result[dartx.set](i, codeUnit);
|
| @@ -158,7 +158,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return new _UnicodeSubsetEncoderSink(this[_subsetMask], dart.as(sink, ByteConversionSink));
|
| }
|
| bind(stream) {
|
| - return super.bind(stream);
|
| + return dart.dcall(super.bind, stream);
|
| }
|
| }
|
| dart.setSignature(_UnicodeSubsetEncoder, {
|
| @@ -179,7 +179,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| });
|
| class StringConversionSinkMixin extends core.Object {
|
| add(str) {
|
| - return this.addSlice(str, 0, str[dartx.length], false);
|
| + return dart.dcall(this.addSlice, str, 0, str[dartx.length], false);
|
| }
|
| asUtf8Sink(allowMalformed) {
|
| return new _Utf8ConversionSink(this, allowMalformed);
|
| @@ -204,19 +204,19 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_sink] = sink;
|
| }
|
| close() {
|
| - this[_sink].close();
|
| + dart.dcall(this[_sink].close);
|
| }
|
| addSlice(source, start, end, isLast) {
|
| - core.RangeError.checkValidRange(start, end, source[dartx.length]);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, source[dartx.length]);
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| - let codeUnit = source[dartx.codeUnitAt](i);
|
| + let codeUnit = dart.dcall(source[dartx.codeUnitAt], i);
|
| if ((dart.notNull(codeUnit) & ~dart.notNull(this[_subsetMask])) != 0) {
|
| dart.throw(new core.ArgumentError(`Source contains invalid character with code point: ${codeUnit}.`));
|
| }
|
| }
|
| - this[_sink].add(source[dartx.codeUnits][dartx.sublist](start, end));
|
| + dart.dcall(this[_sink].add, dart.dcall(source[dartx.codeUnits][dartx.sublist], start, end));
|
| if (dart.notNull(isLast)) {
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| }
|
| @@ -240,7 +240,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (end === void 0)
|
| end = null;
|
| let byteCount = bytes[dartx.length];
|
| - core.RangeError.checkValidRange(start, end, byteCount);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, byteCount);
|
| if (end == null)
|
| end = byteCount;
|
| let length = dart.notNull(end) - dart.notNull(start);
|
| @@ -250,7 +250,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (!dart.notNull(this[_allowInvalid])) {
|
| dart.throw(new core.FormatException(`Invalid value in input: ${byte}`));
|
| }
|
| - return this[_convertInvalid](bytes, start, end);
|
| + return dart.dcall(this[_convertInvalid], bytes, start, end);
|
| }
|
| }
|
| return core.String.fromCharCodes(bytes, start, end);
|
| @@ -261,12 +261,12 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let value = bytes[dartx.get](i);
|
| if ((dart.notNull(value) & ~dart.notNull(this[_subsetMask])) != 0)
|
| value = 65533;
|
| - buffer.writeCharCode(value);
|
| + dart.dcall(buffer.writeCharCode, value);
|
| }
|
| - return dart.toString(buffer);
|
| + return dart.dcall(buffer.toString);
|
| }
|
| bind(stream) {
|
| - return super.bind(stream);
|
| + return dart.dcall(super.bind, stream);
|
| }
|
| }
|
| dart.setSignature(_UnicodeSubsetDecoder, {
|
| @@ -290,7 +290,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| stringSink = StringConversionSink.from(sink);
|
| }
|
| if (dart.notNull(this[_allowInvalid])) {
|
| - return new _ErrorHandlingAsciiDecoderSink(stringSink.asUtf8Sink(false));
|
| + return new _ErrorHandlingAsciiDecoderSink(dart.dcall(stringSink.asUtf8Sink, false));
|
| } else {
|
| return new _SimpleAsciiDecoderSink(stringSink);
|
| }
|
| @@ -341,9 +341,9 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super.ByteConversionSink();
|
| }
|
| addSlice(chunk, start, end, isLast) {
|
| - this.add(chunk[dartx.sublist](start, end));
|
| + dart.dcall(this.add, dart.dcall(chunk[dartx.sublist], start, end));
|
| if (dart.notNull(isLast))
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| dart.setSignature(ByteConversionSinkBase, {
|
| @@ -355,25 +355,25 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_utf8Sink] = utf8Sink;
|
| }
|
| close() {
|
| - this[_utf8Sink].close();
|
| + dart.dcall(this[_utf8Sink].close);
|
| }
|
| add(source) {
|
| - this.addSlice(source, 0, source[dartx.length], false);
|
| + dart.dcall(this.addSlice, source, 0, source[dartx.length], false);
|
| }
|
| addSlice(source, start, end, isLast) {
|
| - core.RangeError.checkValidRange(start, end, source[dartx.length]);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, source[dartx.length]);
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| if ((dart.notNull(source[dartx.get](i)) & ~dart.notNull(_ASCII_MASK)) != 0) {
|
| if (dart.notNull(i) > dart.notNull(start))
|
| - this[_utf8Sink].addSlice(source, start, i, false);
|
| - this[_utf8Sink].add(dart.const(dart.list([239, 191, 189], core.int)));
|
| + dart.dcall(this[_utf8Sink].addSlice, source, start, i, false);
|
| + dart.dcall(this[_utf8Sink].add, dart.const(dart.list([239, 191, 189], core.int)));
|
| start = dart.notNull(i) + 1;
|
| }
|
| }
|
| if (dart.notNull(start) < dart.notNull(end)) {
|
| - this[_utf8Sink].addSlice(source, start, end, isLast);
|
| + dart.dcall(this[_utf8Sink].addSlice, source, start, end, isLast);
|
| } else if (dart.notNull(isLast)) {
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| }
|
| @@ -389,7 +389,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_sink] = sink;
|
| }
|
| close() {
|
| - this[_sink].close();
|
| + dart.dcall(this[_sink].close);
|
| }
|
| add(source) {
|
| for (let i = 0; dart.notNull(i) < dart.notNull(source[dartx.length]); i = dart.notNull(i) + 1) {
|
| @@ -397,19 +397,19 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| dart.throw(new core.FormatException("Source contains non-ASCII bytes."));
|
| }
|
| }
|
| - this[_sink].add(core.String.fromCharCodes(source));
|
| + dart.dcall(this[_sink].add, core.String.fromCharCodes(source));
|
| }
|
| addSlice(source, start, end, isLast) {
|
| let length = source[dartx.length];
|
| - core.RangeError.checkValidRange(start, end, length);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, length);
|
| if (dart.notNull(start) < dart.notNull(end)) {
|
| if (start != 0 || end != length) {
|
| - source = source[dartx.sublist](start, end);
|
| + source = dart.dcall(source[dartx.sublist], start, end);
|
| }
|
| - this.add(source);
|
| + dart.dcall(this.add, source);
|
| }
|
| if (dart.notNull(isLast))
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| dart.setSignature(_SimpleAsciiDecoderSink, {
|
| @@ -424,10 +424,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_sink] = sink;
|
| }
|
| add(chunk) {
|
| - return this[_sink].add(chunk);
|
| + return dart.dcall(this[_sink].add, chunk);
|
| }
|
| close() {
|
| - return this[_sink].close();
|
| + return dart.dcall(this[_sink].close);
|
| }
|
| }
|
| dart.setSignature(_ByteAdapterSink, {
|
| @@ -442,7 +442,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let _bufferIndex = Symbol('_bufferIndex');
|
| class _ByteCallbackSink extends ByteConversionSinkBase {
|
| _ByteCallbackSink(callback) {
|
| - this[_buffer] = typed_data.Uint8List.new(_ByteCallbackSink._INITIAL_BUFFER_SIZE);
|
| + this[_buffer] = typed_data.Uint8List.new(dart.as(_ByteCallbackSink._INITIAL_BUFFER_SIZE, core.int));
|
| this[_callback] = callback;
|
| this[_bufferIndex] = 0;
|
| }
|
| @@ -450,12 +450,12 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let freeCount = dart.notNull(this[_buffer][dartx.length]) - dart.notNull(this[_bufferIndex]);
|
| if (dart.notNull(chunk[dartx.length]) > dart.notNull(freeCount)) {
|
| let oldLength = this[_buffer][dartx.length];
|
| - let newLength = dart.notNull(_ByteCallbackSink._roundToPowerOf2(dart.notNull(chunk[dartx.length]) + dart.notNull(oldLength))) * 2;
|
| + let newLength = dart.notNull(dart.dcall(_ByteCallbackSink._roundToPowerOf2, dart.notNull(chunk[dartx.length]) + dart.notNull(oldLength))) * 2;
|
| let grown = typed_data.Uint8List.new(newLength);
|
| - grown[dartx.setRange](0, this[_buffer][dartx.length], this[_buffer]);
|
| + dart.dcall(grown[dartx.setRange], 0, this[_buffer][dartx.length], this[_buffer]);
|
| this[_buffer] = grown;
|
| }
|
| - this[_buffer][dartx.setRange](this[_bufferIndex], dart.notNull(this[_bufferIndex]) + dart.notNull(chunk[dartx.length]), chunk);
|
| + dart.dcall(this[_buffer][dartx.setRange], this[_bufferIndex], dart.notNull(this[_bufferIndex]) + dart.notNull(chunk[dartx.length]), chunk);
|
| this[_bufferIndex] = dart.notNull(this[_bufferIndex]) + dart.notNull(chunk[dartx.length]);
|
| }
|
| static _roundToPowerOf2(v) {
|
| @@ -470,7 +470,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return v;
|
| }
|
| close() {
|
| - this[_callback](this[_buffer][dartx.sublist](0, this[_bufferIndex]));
|
| + dart.dcall(this[_callback], dart.dcall(this[_buffer][dartx.sublist], 0, this[_bufferIndex]));
|
| }
|
| }
|
| dart.setSignature(_ByteCallbackSink, {
|
| @@ -498,10 +498,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| add(chunk) {
|
| dart.as(chunk, T);
|
| - this[_accumulated][dartx.add](chunk);
|
| + dart.dcall(this[_accumulated][dartx.add], chunk);
|
| }
|
| close() {
|
| - this[_callback](this[_accumulated]);
|
| + dart.dcall(this[_callback], this[_accumulated]);
|
| }
|
| }
|
| dart.setSignature(_SimpleCallbackSink, {
|
| @@ -521,10 +521,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| add(data) {
|
| dart.as(data, T);
|
| - return this[_sink].add(data);
|
| + return dart.dcall(this[_sink].add, data);
|
| }
|
| close() {
|
| - return this[_sink].close();
|
| + return dart.dcall(this[_sink].close);
|
| }
|
| }
|
| _EventSinkAdapter[dart.implements] = () => [ChunkedConversionSink$(T)];
|
| @@ -544,19 +544,19 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| class _ConverterStreamEventSink extends core.Object {
|
| _ConverterStreamEventSink(converter, sink) {
|
| this[_eventSink] = sink;
|
| - this[_chunkedSink] = converter.startChunkedConversion(sink);
|
| + this[_chunkedSink] = dart.dcall(converter.startChunkedConversion, sink);
|
| }
|
| add(o) {
|
| dart.as(o, S);
|
| - return this[_chunkedSink].add(o);
|
| + return dart.dcall(this[_chunkedSink].add, o);
|
| }
|
| addError(error, stackTrace) {
|
| if (stackTrace === void 0)
|
| stackTrace = null;
|
| - this[_eventSink].addError(error, stackTrace);
|
| + dart.dcall(this[_eventSink].addError, error, stackTrace);
|
| }
|
| close() {
|
| - return this[_chunkedSink].close();
|
| + return dart.dcall(this[_chunkedSink].close);
|
| }
|
| }
|
| _ConverterStreamEventSink[dart.implements] = () => [async.EventSink$(S)];
|
| @@ -576,10 +576,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let _FusedCodec$ = dart.generic(function(S, M, T) {
|
| class _FusedCodec extends Codec$(S, T) {
|
| get encoder() {
|
| - return dart.as(this[_first].encoder.fuse(this[_second].encoder), Converter$(S, T));
|
| + return dart.as(dart.dcall(this[_first].encoder.fuse, this[_second].encoder), Converter$(S, T));
|
| }
|
| get decoder() {
|
| - return dart.as(this[_second].decoder.fuse(this[_first].decoder), Converter$(T, S));
|
| + return dart.as(dart.dcall(this[_second].decoder.fuse, this[_first].decoder), Converter$(T, S));
|
| }
|
| _FusedCodec(first, second) {
|
| this[_first] = first;
|
| @@ -625,11 +625,11 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| convert(input) {
|
| dart.as(input, S);
|
| - return dart.as(this[_second].convert(this[_first].convert(input)), T);
|
| + return dart.as(dart.dcall(this[_second].convert, dart.dcall(this[_first].convert, input)), T);
|
| }
|
| startChunkedConversion(sink) {
|
| dart.as(sink, core.Sink$(T));
|
| - return this[_first].startChunkedConversion(this[_second].startChunkedConversion(sink));
|
| + return dart.dcall(this[_first].startChunkedConversion, dart.dcall(this[_second].startChunkedConversion, sink));
|
| }
|
| }
|
| dart.setSignature(_FusedConverter, {
|
| @@ -675,8 +675,8 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super.Converter();
|
| }
|
| convert(text) {
|
| - let val = this[_convert](text, 0, text[dartx.length]);
|
| - return val == null ? text : val;
|
| + let val = dart.dcall(this[_convert], text, 0, text[dartx.length]);
|
| + return val == null ? text : dart.as(val, core.String);
|
| }
|
| [_convert](text, start, end) {
|
| let result = null;
|
| @@ -727,13 +727,13 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| if (replace != null) {
|
| if (result == null)
|
| - result = new core.StringBuffer(text[dartx.substring](start, i));
|
| - result.write(replace);
|
| + result = new core.StringBuffer(dart.dcall(text[dartx.substring], start, i));
|
| + dart.dcall(result.write, replace);
|
| } else if (result != null) {
|
| - result.write(ch);
|
| + dart.dcall(result.write, ch);
|
| }
|
| }
|
| - return result != null ? dart.toString(result) : null;
|
| + return result != null ? dart.dcall(result.toString) : null;
|
| }
|
| startChunkedConversion(sink) {
|
| if (!dart.is(sink, StringConversionSink)) {
|
| @@ -760,17 +760,17 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_sink] = sink;
|
| }
|
| addSlice(chunk, start, end, isLast) {
|
| - let val = this[_escape][_convert](chunk, start, end);
|
| + let val = dart.dcall(this[_escape][_convert], chunk, start, end);
|
| if (val == null) {
|
| - this[_sink].addSlice(chunk, start, end, isLast);
|
| + dart.dcall(this[_sink].addSlice, chunk, start, end, isLast);
|
| } else {
|
| - this[_sink].add(val);
|
| + dart.dcall(this[_sink].add, val);
|
| if (dart.notNull(isLast))
|
| - this[_sink].close();
|
| + dart.dcall(this[_sink].close);
|
| }
|
| }
|
| close() {
|
| - return this[_sink].close();
|
| + return dart.dcall(this[_sink].close);
|
| }
|
| }
|
| dart.setSignature(_HtmlEscapeSink, {
|
| @@ -827,16 +827,16 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (reviver == null)
|
| reviver = this[_reviver];
|
| if (reviver == null)
|
| - return this.decoder.convert(source);
|
| - return new JsonDecoder(reviver).convert(source);
|
| + return dart.dcall(this.decoder.convert, source);
|
| + return dart.dcall(new JsonDecoder(reviver).convert, source);
|
| }
|
| encode(value, opts) {
|
| let toEncodable = opts && 'toEncodable' in opts ? opts.toEncodable : null;
|
| if (toEncodable == null)
|
| toEncodable = this[_toEncodable$];
|
| if (toEncodable == null)
|
| - return this.encoder.convert(value);
|
| - return new JsonEncoder(dart.as(toEncodable, __CastType0)).convert(value);
|
| + return dart.dcall(this.encoder.convert, value);
|
| + return dart.dcall(new JsonEncoder(dart.as(toEncodable, __CastType0)).convert, value);
|
| }
|
| get encoder() {
|
| if (this[_toEncodable$] == null)
|
| @@ -879,24 +879,24 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super.Converter();
|
| }
|
| convert(object) {
|
| - return _JsonStringStringifier.stringify(object, dart.as(this[_toEncodable$], __CastType2), this.indent);
|
| + return dart.dcall(_JsonStringStringifier.stringify, object, this[_toEncodable$], this.indent);
|
| }
|
| startChunkedConversion(sink) {
|
| if (!dart.is(sink, StringConversionSink)) {
|
| sink = StringConversionSink.from(sink);
|
| } else if (dart.is(sink, _Utf8EncoderSink)) {
|
| - return new _JsonUtf8EncoderSink(sink[_sink], this[_toEncodable$], JsonUtf8Encoder._utf8Encode(this.indent), JsonUtf8Encoder.DEFAULT_BUFFER_SIZE);
|
| + return new _JsonUtf8EncoderSink(sink[_sink], this[_toEncodable$], dart.dcall(JsonUtf8Encoder._utf8Encode, this.indent), JsonUtf8Encoder.DEFAULT_BUFFER_SIZE);
|
| }
|
| return new _JsonEncoderSink(dart.as(sink, StringConversionSink), this[_toEncodable$], this.indent);
|
| }
|
| bind(stream) {
|
| - return super.bind(stream);
|
| + return dart.dcall(super.bind, stream);
|
| }
|
| fuse(other) {
|
| if (dart.is(other, Utf8Encoder)) {
|
| - return new JsonUtf8Encoder(this.indent, dart.as(this[_toEncodable$], __CastType4));
|
| + return new JsonUtf8Encoder(this.indent, dart.as(this[_toEncodable$], __CastType2));
|
| }
|
| - return super.fuse(other);
|
| + return dart.dcall(super.fuse, other);
|
| }
|
| }
|
| dart.defineNamedConstructor(JsonEncoder, 'withIndent');
|
| @@ -922,7 +922,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| toEncodable = null;
|
| if (bufferSize === void 0)
|
| bufferSize = JsonUtf8Encoder.DEFAULT_BUFFER_SIZE;
|
| - this[_indent] = JsonUtf8Encoder._utf8Encode(indent);
|
| + this[_indent] = dart.dcall(JsonUtf8Encoder._utf8Encode, indent);
|
| this[_toEncodable$] = toEncodable;
|
| this[_bufferSize] = bufferSize;
|
| super.Converter();
|
| @@ -934,12 +934,12 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return typed_data.Uint8List.new(0);
|
| checkAscii: {
|
| for (let i = 0; dart.notNull(i) < dart.notNull(string[dartx.length]); i = dart.notNull(i) + 1) {
|
| - if (dart.notNull(string[dartx.codeUnitAt](i)) >= 128)
|
| + if (dart.notNull(dart.dcall(string[dartx.codeUnitAt], i)) >= 128)
|
| break checkAscii;
|
| }
|
| return string[dartx.codeUnits];
|
| }
|
| - return UTF8.encode(string);
|
| + return dart.dcall(UTF8.encode, string);
|
| }
|
| convert(object) {
|
| let bytes = dart.list([], core.List$(core.int));
|
| @@ -948,10 +948,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let length = dart.notNull(end) - dart.notNull(start);
|
| chunk = typed_data.Uint8List.view(chunk.buffer, dart.notNull(chunk.offsetInBytes) + dart.notNull(start), length);
|
| }
|
| - bytes[dartx.add](chunk);
|
| + dart.dcall(bytes[dartx.add], chunk);
|
| }
|
| dart.fn(addChunk, dart.void, [typed_data.Uint8List, core.int, core.int]);
|
| - _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable$], dart.functionType(dart.dynamic, [core.Object])), this[_bufferSize], addChunk);
|
| + dart.dcall(_JsonUtf8Stringifier.stringify, object, this[_indent], this[_toEncodable$], this[_bufferSize], addChunk);
|
| if (bytes[dartx.length] == 1)
|
| return bytes[dartx.get](0);
|
| let length = 0;
|
| @@ -961,8 +961,8 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let result = typed_data.Uint8List.new(length);
|
| for (let i = 0, offset = 0; dart.notNull(i) < dart.notNull(bytes[dartx.length]); i = dart.notNull(i) + 1) {
|
| let byteList = bytes[dartx.get](i);
|
| - let end = dart.notNull(offset) + dart.notNull(byteList[dartx.length]);
|
| - result.setRange(offset, end, byteList);
|
| + let end = dart.notNull(offset) + dart.notNull(dart.as(dart.dload(byteList, 'length'), core.num));
|
| + dart.dcall(result.setRange, offset, end, byteList);
|
| offset = end;
|
| }
|
| return result;
|
| @@ -977,10 +977,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return new _JsonUtf8EncoderSink(byteSink, this[_toEncodable$], this[_indent], this[_bufferSize]);
|
| }
|
| bind(stream) {
|
| - return super.bind(stream);
|
| + return dart.dcall(super.bind, stream);
|
| }
|
| fuse(other) {
|
| - return super.fuse(other);
|
| + return dart.dcall(super.fuse, other);
|
| }
|
| }
|
| dart.setSignature(JsonUtf8Encoder, {
|
| @@ -1009,9 +1009,9 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| dart.throw(new core.StateError("Only one call to add allowed"));
|
| }
|
| this[_isDone] = true;
|
| - let stringSink = this[_sink].asStringSink();
|
| - _JsonStringStringifier.printOn(o, stringSink, dart.as(this[_toEncodable$], dart.functionType(dart.dynamic, [dart.dynamic])), this[_indent]);
|
| - stringSink.close();
|
| + let stringSink = dart.dcall(this[_sink].asStringSink);
|
| + dart.dcall(_JsonStringStringifier.printOn, o, stringSink, this[_toEncodable$], this[_indent]);
|
| + dart.dcall(stringSink.close);
|
| }
|
| close() {}
|
| }
|
| @@ -1033,20 +1033,20 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super.ChunkedConversionSink();
|
| }
|
| [_addChunk](chunk, start, end) {
|
| - this[_sink].addSlice(chunk, start, end, false);
|
| + dart.dcall(this[_sink].addSlice, chunk, start, end, false);
|
| }
|
| add(object) {
|
| if (dart.notNull(this[_isDone])) {
|
| dart.throw(new core.StateError("Only one call to add allowed"));
|
| }
|
| this[_isDone] = true;
|
| - _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable$], dart.functionType(dart.dynamic, [core.Object])), this[_bufferSize], dart.bind(this, _addChunk));
|
| - this[_sink].close();
|
| + dart.dcall(_JsonUtf8Stringifier.stringify, object, this[_indent], this[_toEncodable$], this[_bufferSize], dart.bind(this, _addChunk));
|
| + dart.dcall(this[_sink].close);
|
| }
|
| close() {
|
| if (!dart.notNull(this[_isDone])) {
|
| this[_isDone] = true;
|
| - this[_sink].close();
|
| + dart.dcall(this[_sink].close);
|
| }
|
| }
|
| }
|
| @@ -1066,13 +1066,13 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super.Converter();
|
| }
|
| convert(input) {
|
| - return _parseJson(input, this[_reviver]);
|
| + return dart.dcall(_parseJson, input, this[_reviver]);
|
| }
|
| startChunkedConversion(sink) {
|
| return new _JsonDecoderSink(this[_reviver], sink);
|
| }
|
| bind(stream) {
|
| - return super.bind(stream);
|
| + return dart.dcall(super.bind, stream);
|
| }
|
| }
|
| dart.setSignature(JsonDecoder, {
|
| @@ -1090,13 +1090,13 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| try {
|
| parsed = JSON.parse(source);
|
| } catch (e) {
|
| - dart.throw(new core.FormatException(String(e)));
|
| + dart.throw(new core.FormatException(dart.as(String(e), core.String)));
|
| }
|
|
|
| if (reviver == null) {
|
| - return _convertJsonToDartLazy(parsed);
|
| + return dart.dcall(_convertJsonToDartLazy, parsed);
|
| } else {
|
| - return _convertJsonToDart(parsed, reviver);
|
| + return dart.dcall(_convertJsonToDart, parsed, reviver);
|
| }
|
| }
|
| dart.fn(_parseJson, dart.dynamic, [core.String, dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic])]);
|
| @@ -1119,87 +1119,87 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let offset = 0;
|
| let length = s[dartx.length];
|
| for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) {
|
| - let charCode = s[dartx.codeUnitAt](i);
|
| + let charCode = dart.dcall(s[dartx.codeUnitAt], i);
|
| if (dart.notNull(charCode) > dart.notNull(_JsonStringifier.BACKSLASH))
|
| continue;
|
| if (dart.notNull(charCode) < 32) {
|
| if (dart.notNull(i) > dart.notNull(offset))
|
| - this.writeStringSlice(s, offset, i);
|
| + dart.dcall(this.writeStringSlice, s, offset, i);
|
| offset = dart.notNull(i) + 1;
|
| - this.writeCharCode(_JsonStringifier.BACKSLASH);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.BACKSLASH);
|
| switch (charCode) {
|
| case _JsonStringifier.BACKSPACE:
|
| {
|
| - this.writeCharCode(_JsonStringifier.CHAR_b);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.CHAR_b);
|
| break;
|
| }
|
| case _JsonStringifier.TAB:
|
| {
|
| - this.writeCharCode(_JsonStringifier.CHAR_t);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.CHAR_t);
|
| break;
|
| }
|
| case _JsonStringifier.NEWLINE:
|
| {
|
| - this.writeCharCode(_JsonStringifier.CHAR_n);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.CHAR_n);
|
| break;
|
| }
|
| case _JsonStringifier.FORM_FEED:
|
| {
|
| - this.writeCharCode(_JsonStringifier.CHAR_f);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.CHAR_f);
|
| break;
|
| }
|
| case _JsonStringifier.CARRIAGE_RETURN:
|
| {
|
| - this.writeCharCode(_JsonStringifier.CHAR_r);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.CHAR_r);
|
| break;
|
| }
|
| default:
|
| {
|
| - this.writeCharCode(_JsonStringifier.CHAR_u);
|
| - this.writeCharCode(_JsonStringifier.CHAR_0);
|
| - this.writeCharCode(_JsonStringifier.CHAR_0);
|
| - this.writeCharCode(_JsonStringifier.hexDigit(dart.notNull(charCode) >> 4 & 15));
|
| - this.writeCharCode(_JsonStringifier.hexDigit(dart.notNull(charCode) & 15));
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.CHAR_u);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.CHAR_0);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.CHAR_0);
|
| + dart.dcall(this.writeCharCode, dart.dcall(_JsonStringifier.hexDigit, dart.notNull(charCode) >> 4 & 15));
|
| + dart.dcall(this.writeCharCode, dart.dcall(_JsonStringifier.hexDigit, dart.notNull(charCode) & 15));
|
| break;
|
| }
|
| }
|
| } else if (charCode == _JsonStringifier.QUOTE || charCode == _JsonStringifier.BACKSLASH) {
|
| if (dart.notNull(i) > dart.notNull(offset))
|
| - this.writeStringSlice(s, offset, i);
|
| + dart.dcall(this.writeStringSlice, s, offset, i);
|
| offset = dart.notNull(i) + 1;
|
| - this.writeCharCode(_JsonStringifier.BACKSLASH);
|
| - this.writeCharCode(charCode);
|
| + dart.dcall(this.writeCharCode, _JsonStringifier.BACKSLASH);
|
| + dart.dcall(this.writeCharCode, charCode);
|
| }
|
| }
|
| if (offset == 0) {
|
| - this.writeString(s);
|
| + dart.dcall(this.writeString, s);
|
| } else if (dart.notNull(offset) < dart.notNull(length)) {
|
| - this.writeStringSlice(s, offset, length);
|
| + dart.dcall(this.writeStringSlice, s, offset, length);
|
| }
|
| }
|
| [_checkCycle](object) {
|
| for (let i = 0; dart.notNull(i) < dart.notNull(this[_seen][dartx.length]); i = dart.notNull(i) + 1) {
|
| - if (dart.notNull(core.identical(object, this[_seen][dartx.get](i)))) {
|
| + if (dart.notNull(dart.dcall(core.identical, object, this[_seen][dartx.get](i)))) {
|
| dart.throw(new JsonCyclicError(object));
|
| }
|
| }
|
| - this[_seen][dartx.add](object);
|
| + dart.dcall(this[_seen][dartx.add], object);
|
| }
|
| [_removeSeen](object) {
|
| dart.assert(!dart.notNull(this[_seen][dartx.isEmpty]));
|
| - dart.assert(core.identical(this[_seen][dartx.last], object));
|
| - this[_seen][dartx.removeLast]();
|
| + dart.assert(dart.dcall(core.identical, this[_seen][dartx.last], object));
|
| + dart.dcall(this[_seen][dartx.removeLast]);
|
| }
|
| writeObject(object) {
|
| - if (dart.notNull(this.writeJsonValue(object)))
|
| + if (dart.notNull(dart.dcall(this.writeJsonValue, object)))
|
| return;
|
| - this[_checkCycle](object);
|
| + dart.dcall(this[_checkCycle], object);
|
| try {
|
| let customJson = dart.dcall(this[_toEncodable$], object);
|
| - if (!dart.notNull(this.writeJsonValue(customJson))) {
|
| + if (!dart.notNull(dart.dcall(this.writeJsonValue, customJson))) {
|
| dart.throw(new JsonUnsupportedObjectError(object));
|
| }
|
| - this[_removeSeen](object);
|
| + dart.dcall(this[_removeSeen], object);
|
| } catch (e) {
|
| dart.throw(new JsonUnsupportedObjectError(object, {cause: e}));
|
| }
|
| @@ -1209,58 +1209,58 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (dart.is(object, core.num)) {
|
| if (!dart.notNull(dart.as(dart.dload(object, 'isFinite'), core.bool)))
|
| return false;
|
| - this.writeNumber(dart.as(object, core.num));
|
| + dart.dcall(this.writeNumber, object);
|
| return true;
|
| - } else if (dart.notNull(core.identical(object, true))) {
|
| - this.writeString('true');
|
| + } else if (dart.notNull(dart.dcall(core.identical, object, true))) {
|
| + dart.dcall(this.writeString, 'true');
|
| return true;
|
| - } else if (dart.notNull(core.identical(object, false))) {
|
| - this.writeString('false');
|
| + } else if (dart.notNull(dart.dcall(core.identical, object, false))) {
|
| + dart.dcall(this.writeString, 'false');
|
| return true;
|
| } else if (object == null) {
|
| - this.writeString('null');
|
| + dart.dcall(this.writeString, 'null');
|
| return true;
|
| } else if (typeof object == 'string') {
|
| - this.writeString('"');
|
| - this.writeStringContent(dart.as(object, core.String));
|
| - this.writeString('"');
|
| + dart.dcall(this.writeString, '"');
|
| + dart.dcall(this.writeStringContent, object);
|
| + dart.dcall(this.writeString, '"');
|
| return true;
|
| } else if (dart.is(object, core.List)) {
|
| - this[_checkCycle](object);
|
| - this.writeList(dart.as(object, core.List));
|
| - this[_removeSeen](object);
|
| + dart.dcall(this[_checkCycle], object);
|
| + dart.dcall(this.writeList, object);
|
| + dart.dcall(this[_removeSeen], object);
|
| return true;
|
| } else if (dart.is(object, core.Map)) {
|
| - this[_checkCycle](object);
|
| - this.writeMap(dart.as(object, core.Map$(core.String, core.Object)));
|
| - this[_removeSeen](object);
|
| + dart.dcall(this[_checkCycle], object);
|
| + dart.dcall(this.writeMap, object);
|
| + dart.dcall(this[_removeSeen], object);
|
| return true;
|
| } else {
|
| return false;
|
| }
|
| }
|
| writeList(list) {
|
| - this.writeString('[');
|
| + dart.dcall(this.writeString, '[');
|
| if (dart.notNull(list[dartx.length]) > 0) {
|
| - this.writeObject(list[dartx.get](0));
|
| + dart.dcall(this.writeObject, list[dartx.get](0));
|
| for (let i = 1; dart.notNull(i) < dart.notNull(list[dartx.length]); i = dart.notNull(i) + 1) {
|
| - this.writeString(',');
|
| - this.writeObject(list[dartx.get](i));
|
| + dart.dcall(this.writeString, ',');
|
| + dart.dcall(this.writeObject, list[dartx.get](i));
|
| }
|
| }
|
| - this.writeString(']');
|
| + dart.dcall(this.writeString, ']');
|
| }
|
| writeMap(map) {
|
| - this.writeString('{');
|
| + dart.dcall(this.writeString, '{');
|
| let separator = '"';
|
| - map.forEach(dart.fn(((key, value) => {
|
| - this.writeString(separator);
|
| + dart.dcall(map.forEach, dart.fn(((key, value) => {
|
| + dart.dcall(this.writeString, separator);
|
| separator = ',"';
|
| - this.writeStringContent(key);
|
| - this.writeString('":');
|
| - this.writeObject(value);
|
| + dart.dcall(this.writeStringContent, key);
|
| + dart.dcall(this.writeString, '":');
|
| + dart.dcall(this.writeObject, value);
|
| }).bind(this), dart.dynamic, [core.String, dart.dynamic]));
|
| - this.writeString('}');
|
| + dart.dcall(this.writeString, '}');
|
| }
|
| }
|
| dart.setSignature(_JsonStringifier, {
|
| @@ -1298,45 +1298,45 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| writeList(list) {
|
| if (dart.notNull(list[dartx.isEmpty])) {
|
| - this.writeString('[]');
|
| + dart.dcall(this.writeString, '[]');
|
| } else {
|
| - this.writeString('[\n');
|
| + dart.dcall(this.writeString, '[\n');
|
| this[_indentLevel] = dart.notNull(this[_indentLevel]) + 1;
|
| - this.writeIndentation(this[_indentLevel]);
|
| - this.writeObject(list[dartx.get](0));
|
| + dart.dcall(this.writeIndentation, this[_indentLevel]);
|
| + dart.dcall(this.writeObject, list[dartx.get](0));
|
| for (let i = 1; dart.notNull(i) < dart.notNull(list[dartx.length]); i = dart.notNull(i) + 1) {
|
| - this.writeString(',\n');
|
| - this.writeIndentation(this[_indentLevel]);
|
| - this.writeObject(list[dartx.get](i));
|
| + dart.dcall(this.writeString, ',\n');
|
| + dart.dcall(this.writeIndentation, this[_indentLevel]);
|
| + dart.dcall(this.writeObject, list[dartx.get](i));
|
| }
|
| - this.writeString('\n');
|
| + dart.dcall(this.writeString, '\n');
|
| this[_indentLevel] = dart.notNull(this[_indentLevel]) - 1;
|
| - this.writeIndentation(this[_indentLevel]);
|
| - this.writeString(']');
|
| + dart.dcall(this.writeIndentation, this[_indentLevel]);
|
| + dart.dcall(this.writeString, ']');
|
| }
|
| }
|
| writeMap(map) {
|
| if (dart.notNull(map.isEmpty)) {
|
| - this.writeString('{}');
|
| + dart.dcall(this.writeString, '{}');
|
| } else {
|
| - this.writeString('{\n');
|
| + dart.dcall(this.writeString, '{\n');
|
| this[_indentLevel] = dart.notNull(this[_indentLevel]) + 1;
|
| let first = true;
|
| - map.forEach(dart.fn(((key, value) => {
|
| + dart.dcall(map.forEach, dart.fn(((key, value) => {
|
| if (!dart.notNull(first)) {
|
| - this.writeString(",\n");
|
| + dart.dcall(this.writeString, ",\n");
|
| }
|
| - this.writeIndentation(this[_indentLevel]);
|
| - this.writeString('"');
|
| - this.writeStringContent(key);
|
| - this.writeString('": ');
|
| - this.writeObject(value);
|
| + dart.dcall(this.writeIndentation, this[_indentLevel]);
|
| + dart.dcall(this.writeString, '"');
|
| + dart.dcall(this.writeStringContent, key);
|
| + dart.dcall(this.writeString, '": ');
|
| + dart.dcall(this.writeObject, value);
|
| first = false;
|
| }).bind(this), dart.dynamic, [core.String, core.Object]));
|
| - this.writeString('\n');
|
| + dart.dcall(this.writeString, '\n');
|
| this[_indentLevel] = dart.notNull(this[_indentLevel]) - 1;
|
| - this.writeIndentation(this[_indentLevel]);
|
| - this.writeString('}');
|
| + dart.dcall(this.writeIndentation, this[_indentLevel]);
|
| + dart.dcall(this.writeString, '}');
|
| }
|
| }
|
| }
|
| @@ -1354,8 +1354,8 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| static stringify(object, toEncodable, indent) {
|
| let output = new core.StringBuffer();
|
| - _JsonStringStringifier.printOn(object, output, toEncodable, indent);
|
| - return dart.toString(output);
|
| + dart.dcall(_JsonStringStringifier.printOn, object, output, toEncodable, indent);
|
| + return dart.dcall(output.toString);
|
| }
|
| static printOn(object, output, toEncodable, indent) {
|
| let stringifier = null;
|
| @@ -1367,16 +1367,16 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| dart.dsend(stringifier, 'writeObject', object);
|
| }
|
| writeNumber(number) {
|
| - this[_sink].write(dart.toString(number));
|
| + dart.dcall(this[_sink].write, dart.dcall(number.toString));
|
| }
|
| writeString(string) {
|
| - this[_sink].write(string);
|
| + dart.dcall(this[_sink].write, string);
|
| }
|
| writeStringSlice(string, start, end) {
|
| - this[_sink].write(string[dartx.substring](start, end));
|
| + dart.dcall(this[_sink].write, dart.dcall(string[dartx.substring], start, end));
|
| }
|
| writeCharCode(charCode) {
|
| - this[_sink].writeCharCode(charCode);
|
| + dart.dcall(this[_sink].writeCharCode, charCode);
|
| }
|
| }
|
| dart.setSignature(_JsonStringStringifier, {
|
| @@ -1400,7 +1400,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| writeIndentation(count) {
|
| for (let i = 0; dart.notNull(i) < dart.notNull(count); i = dart.notNull(i) + 1)
|
| - this.writeString(this[_indent]);
|
| + dart.dcall(this.writeString, this[_indent]);
|
| }
|
| }
|
| dart.setSignature(_JsonStringStringifierPretty, {
|
| @@ -1422,8 +1422,8 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| } else {
|
| stringifier = new _JsonUtf8Stringifier(toEncodableFunction, bufferSize, addChunk);
|
| }
|
| - stringifier.writeObject(object);
|
| - stringifier.flush();
|
| + dart.dcall(stringifier.writeObject, object);
|
| + dart.dcall(stringifier.flush);
|
| }
|
| flush() {
|
| if (dart.notNull(this.index) > 0) {
|
| @@ -1433,64 +1433,64 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this.index = 0;
|
| }
|
| writeNumber(number) {
|
| - this.writeAsciiString(dart.toString(number));
|
| + dart.dcall(this.writeAsciiString, dart.dcall(number.toString));
|
| }
|
| writeAsciiString(string) {
|
| for (let i = 0; dart.notNull(i) < dart.notNull(string[dartx.length]); i = dart.notNull(i) + 1) {
|
| - let char = string[dartx.codeUnitAt](i);
|
| + let char = dart.dcall(string[dartx.codeUnitAt], i);
|
| dart.assert(dart.notNull(char) <= 127);
|
| - this.writeByte(char);
|
| + dart.dcall(this.writeByte, char);
|
| }
|
| }
|
| writeString(string) {
|
| - this.writeStringSlice(string, 0, string[dartx.length]);
|
| + dart.dcall(this.writeStringSlice, string, 0, string[dartx.length]);
|
| }
|
| writeStringSlice(string, start, end) {
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| - let char = string[dartx.codeUnitAt](i);
|
| + let char = dart.dcall(string[dartx.codeUnitAt], i);
|
| if (dart.notNull(char) <= 127) {
|
| - this.writeByte(char);
|
| + dart.dcall(this.writeByte, char);
|
| } else {
|
| if ((dart.notNull(char) & 64512) == 55296 && dart.notNull(i) + 1 < dart.notNull(end)) {
|
| - let nextChar = string[dartx.codeUnitAt](dart.notNull(i) + 1);
|
| + let nextChar = dart.dcall(string[dartx.codeUnitAt], dart.notNull(i) + 1);
|
| if ((dart.notNull(nextChar) & 64512) == 56320) {
|
| char = 65536 + ((dart.notNull(char) & 1023) << 10) + (dart.notNull(nextChar) & 1023);
|
| - this.writeFourByteCharCode(char);
|
| + dart.dcall(this.writeFourByteCharCode, char);
|
| i = dart.notNull(i) + 1;
|
| continue;
|
| }
|
| }
|
| - this.writeMultiByteCharCode(char);
|
| + dart.dcall(this.writeMultiByteCharCode, char);
|
| }
|
| }
|
| }
|
| writeCharCode(charCode) {
|
| if (dart.notNull(charCode) <= 127) {
|
| - this.writeByte(charCode);
|
| + dart.dcall(this.writeByte, charCode);
|
| return;
|
| }
|
| - this.writeMultiByteCharCode(charCode);
|
| + dart.dcall(this.writeMultiByteCharCode, charCode);
|
| }
|
| writeMultiByteCharCode(charCode) {
|
| if (dart.notNull(charCode) <= 2047) {
|
| - this.writeByte(192 | dart.notNull(charCode) >> 6);
|
| - this.writeByte(128 | dart.notNull(charCode) & 63);
|
| + dart.dcall(this.writeByte, 192 | dart.notNull(charCode) >> 6);
|
| + dart.dcall(this.writeByte, 128 | dart.notNull(charCode) & 63);
|
| return;
|
| }
|
| if (dart.notNull(charCode) <= 65535) {
|
| - this.writeByte(224 | dart.notNull(charCode) >> 12);
|
| - this.writeByte(128 | dart.notNull(charCode) >> 6 & 63);
|
| - this.writeByte(128 | dart.notNull(charCode) & 63);
|
| + dart.dcall(this.writeByte, 224 | dart.notNull(charCode) >> 12);
|
| + dart.dcall(this.writeByte, 128 | dart.notNull(charCode) >> 6 & 63);
|
| + dart.dcall(this.writeByte, 128 | dart.notNull(charCode) & 63);
|
| return;
|
| }
|
| - this.writeFourByteCharCode(charCode);
|
| + dart.dcall(this.writeFourByteCharCode, charCode);
|
| }
|
| writeFourByteCharCode(charCode) {
|
| dart.assert(dart.notNull(charCode) <= 1114111);
|
| - this.writeByte(240 | dart.notNull(charCode) >> 18);
|
| - this.writeByte(128 | dart.notNull(charCode) >> 12 & 63);
|
| - this.writeByte(128 | dart.notNull(charCode) >> 6 & 63);
|
| - this.writeByte(128 | dart.notNull(charCode) & 63);
|
| + dart.dcall(this.writeByte, 240 | dart.notNull(charCode) >> 18);
|
| + dart.dcall(this.writeByte, 128 | dart.notNull(charCode) >> 12 & 63);
|
| + dart.dcall(this.writeByte, 128 | dart.notNull(charCode) >> 6 & 63);
|
| + dart.dcall(this.writeByte, 128 | dart.notNull(charCode) & 63);
|
| }
|
| writeByte(byte) {
|
| dart.assert(dart.notNull(byte) <= 255);
|
| @@ -1533,7 +1533,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (indentLength == 1) {
|
| let char = indent[dartx.get](0);
|
| while (dart.notNull(count) > 0) {
|
| - this.writeByte(char);
|
| + dart.dcall(this.writeByte, char);
|
| count = dart.notNull(count) - 1;
|
| }
|
| return;
|
| @@ -1542,11 +1542,11 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| count = dart.notNull(count) - 1;
|
| let end = dart.notNull(this.index) + dart.notNull(indentLength);
|
| if (dart.notNull(end) <= dart.notNull(this.buffer.length)) {
|
| - this.buffer.setRange(this.index, end, indent);
|
| + dart.dcall(this.buffer.setRange, this.index, end, indent);
|
| this.index = end;
|
| } else {
|
| for (let i = 0; dart.notNull(i) < dart.notNull(indentLength); i = dart.notNull(i) + 1) {
|
| - this.writeByte(indent[dartx.get](i));
|
| + dart.dcall(this.writeByte, indent[dartx.get](i));
|
| }
|
| }
|
| }
|
| @@ -1557,8 +1557,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| methods: () => ({writeIndentation: [dart.void, [core.int]]})
|
| });
|
| let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.Object, [core.Object]));
|
| - let __CastType2 = dart.typedef('__CastType2', () => dart.functionType(dart.dynamic, [dart.dynamic]));
|
| - let __CastType4 = dart.typedef('__CastType4', () => dart.functionType(dart.dynamic, [core.Object]));
|
| + let __CastType2 = dart.typedef('__CastType2', () => dart.functionType(dart.dynamic, [core.Object]));
|
| class Latin1Codec extends Encoding {
|
| Latin1Codec(opts) {
|
| let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : false;
|
| @@ -1573,9 +1572,9 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (allowInvalid == null)
|
| allowInvalid = this[_allowInvalid];
|
| if (dart.notNull(allowInvalid)) {
|
| - return dart.const(new Latin1Decoder({allowInvalid: true})).convert(bytes);
|
| + return dart.dcall(dart.const(new Latin1Decoder({allowInvalid: true})).convert, bytes);
|
| } else {
|
| - return dart.const(new Latin1Decoder({allowInvalid: false})).convert(bytes);
|
| + return dart.dcall(dart.const(new Latin1Decoder({allowInvalid: false})).convert, bytes);
|
| }
|
| }
|
| get encoder() {
|
| @@ -1626,18 +1625,18 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_sink] = sink;
|
| }
|
| close() {
|
| - this[_sink].close();
|
| + dart.dcall(this[_sink].close);
|
| }
|
| add(source) {
|
| - this.addSlice(source, 0, source[dartx.length], false);
|
| + dart.dcall(this.addSlice, source, 0, source[dartx.length], false);
|
| }
|
| [_addSliceToSink](source, start, end, isLast) {
|
| - this[_sink].add(core.String.fromCharCodes(source, start, end));
|
| + dart.dcall(this[_sink].add, core.String.fromCharCodes(source, start, end));
|
| if (dart.notNull(isLast))
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| addSlice(source, start, end, isLast) {
|
| - core.RangeError.checkValidRange(start, end, source[dartx.length]);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, source[dartx.length]);
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| let char = source[dartx.get](i);
|
| if (dart.notNull(char) > dart.notNull(_LATIN1_MASK) || dart.notNull(char) < 0) {
|
| @@ -1645,10 +1644,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| }
|
| if (dart.notNull(start) < dart.notNull(end)) {
|
| - this[_addSliceToSink](source, start, end, isLast);
|
| + dart.dcall(this[_addSliceToSink], source, start, end, isLast);
|
| }
|
| if (dart.notNull(isLast)) {
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| }
|
| @@ -1665,21 +1664,21 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super._Latin1DecoderSink(sink);
|
| }
|
| addSlice(source, start, end, isLast) {
|
| - core.RangeError.checkValidRange(start, end, source[dartx.length]);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, source[dartx.length]);
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| let char = source[dartx.get](i);
|
| if (dart.notNull(char) > dart.notNull(_LATIN1_MASK) || dart.notNull(char) < 0) {
|
| if (dart.notNull(i) > dart.notNull(start))
|
| - this[_addSliceToSink](source, start, i, false);
|
| - this[_addSliceToSink](dart.const(dart.list([65533], core.int)), 0, 1, false);
|
| + dart.dcall(this[_addSliceToSink], source, start, i, false);
|
| + dart.dcall(this[_addSliceToSink], dart.const([65533]), 0, 1, false);
|
| start = dart.notNull(i) + 1;
|
| }
|
| }
|
| if (dart.notNull(start) < dart.notNull(end)) {
|
| - this[_addSliceToSink](source, start, end, isLast);
|
| + dart.dcall(this[_addSliceToSink], source, start, end, isLast);
|
| }
|
| if (dart.notNull(isLast)) {
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| }
|
| @@ -1692,8 +1691,8 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| convert(data) {
|
| let lines = core.List$(core.String).new();
|
| - _LineSplitterSink._addSlice(data, 0, data[dartx.length], true, dart.bind(lines, dartx.add));
|
| - return lines;
|
| + dart.dcall(_LineSplitterSink._addSlice, data, 0, data[dartx.length], true, dart.dload(lines, 'add'));
|
| + return dart.as(lines, core.List$(core.String));
|
| }
|
| startChunkedConversion(sink) {
|
| if (!dart.is(sink, StringConversionSink)) {
|
| @@ -1717,48 +1716,48 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| addSlice(chunk, start, end, isLast) {
|
| if (this[_carry] != null) {
|
| - chunk = dart.notNull(this[_carry]) + dart.notNull(chunk[dartx.substring](start, end));
|
| + chunk = dart.notNull(this[_carry]) + dart.notNull(dart.dcall(chunk[dartx.substring], start, end));
|
| start = 0;
|
| end = chunk[dartx.length];
|
| this[_carry] = null;
|
| }
|
| - this[_carry] = _LineSplitterSink._addSlice(chunk, start, end, isLast, dart.bind(this[_sink], 'add'));
|
| + this[_carry] = dart.dcall(_LineSplitterSink._addSlice, chunk, start, end, isLast, dart.bind(this[_sink], 'add'));
|
| if (dart.notNull(isLast))
|
| - this[_sink].close();
|
| + dart.dcall(this[_sink].close);
|
| }
|
| close() {
|
| - this.addSlice('', 0, 0, true);
|
| + dart.dcall(this.addSlice, '', 0, 0, true);
|
| }
|
| static _addSlice(chunk, start, end, isLast, adder) {
|
| let pos = start;
|
| while (dart.notNull(pos) < dart.notNull(end)) {
|
| let skip = 0;
|
| - let char = chunk[dartx.codeUnitAt](pos);
|
| + let char = dart.dcall(chunk[dartx.codeUnitAt], pos);
|
| if (char == _LineSplitterSink._LF) {
|
| skip = 1;
|
| } else if (char == _LineSplitterSink._CR) {
|
| skip = 1;
|
| if (dart.notNull(pos) + 1 < dart.notNull(end)) {
|
| - if (chunk[dartx.codeUnitAt](dart.notNull(pos) + 1) == _LineSplitterSink._LF) {
|
| + if (dart.dcall(chunk[dartx.codeUnitAt], dart.notNull(pos) + 1) == _LineSplitterSink._LF) {
|
| skip = 2;
|
| }
|
| } else if (!dart.notNull(isLast)) {
|
| - return chunk[dartx.substring](start, end);
|
| + return dart.dcall(chunk[dartx.substring], start, end);
|
| }
|
| }
|
| if (dart.notNull(skip) > 0) {
|
| - adder(chunk[dartx.substring](start, pos));
|
| + adder(dart.dcall(chunk[dartx.substring], start, pos));
|
| start = pos = dart.notNull(pos) + dart.notNull(skip);
|
| } else {
|
| pos = dart.notNull(pos) + 1;
|
| }
|
| }
|
| if (pos != start) {
|
| - let carry = chunk[dartx.substring](start, pos);
|
| + let carry = dart.dcall(chunk[dartx.substring], start, pos);
|
| if (dart.notNull(isLast)) {
|
| - adder(carry);
|
| + adder(dart.as(carry, core.String));
|
| } else {
|
| - return carry;
|
| + return dart.as(carry, core.String);
|
| }
|
| }
|
| return null;
|
| @@ -1812,23 +1811,23 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_callback] = callback;
|
| }
|
| close() {
|
| - return this[_callback]();
|
| + return dart.dcall(this[_callback]);
|
| }
|
| writeCharCode(charCode) {
|
| - return this[_sink].writeCharCode(charCode);
|
| + return dart.dcall(this[_sink].writeCharCode, charCode);
|
| }
|
| write(o) {
|
| - return this[_sink].write(o);
|
| + return dart.dcall(this[_sink].write, o);
|
| }
|
| writeln(o) {
|
| if (o === void 0)
|
| o = "";
|
| - return this[_sink].writeln(o);
|
| + return dart.dcall(this[_sink].writeln, o);
|
| }
|
| writeAll(objects, separator) {
|
| if (separator === void 0)
|
| separator = "";
|
| - return this[_sink].writeAll(objects, separator);
|
| + return dart.dcall(this[_sink].writeAll, objects, separator);
|
| }
|
| }
|
| _ClosableStringSink[dart.implements] = () => [ClosableStringSink];
|
| @@ -1850,51 +1849,51 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| close() {
|
| if (dart.notNull(this[_buffer].isNotEmpty))
|
| - this[_flush]();
|
| - this[_chunkedSink].close();
|
| + dart.dcall(this[_flush]);
|
| + dart.dcall(this[_chunkedSink].close);
|
| }
|
| writeCharCode(charCode) {
|
| - this[_buffer].writeCharCode(charCode);
|
| - if (dart.notNull(this[_buffer].length) > dart.notNull(_StringConversionSinkAsStringSinkAdapter._MIN_STRING_SIZE))
|
| - this[_flush]();
|
| + dart.dcall(this[_buffer].writeCharCode, charCode);
|
| + if (dart.notNull(this[_buffer].length) > dart.notNull(dart.as(_StringConversionSinkAsStringSinkAdapter._MIN_STRING_SIZE, core.num)))
|
| + dart.dcall(this[_flush]);
|
| }
|
| write(o) {
|
| if (dart.notNull(this[_buffer].isNotEmpty))
|
| - this[_flush]();
|
| - let str = dart.toString(o);
|
| - this[_chunkedSink].add(dart.toString(o));
|
| + dart.dcall(this[_flush]);
|
| + let str = dart.dcall(o.toString);
|
| + dart.dcall(this[_chunkedSink].add, dart.dcall(o.toString));
|
| }
|
| writeln(o) {
|
| if (o === void 0)
|
| o = "";
|
| - this[_buffer].writeln(o);
|
| - if (dart.notNull(this[_buffer].length) > dart.notNull(_StringConversionSinkAsStringSinkAdapter._MIN_STRING_SIZE))
|
| - this[_flush]();
|
| + dart.dcall(this[_buffer].writeln, o);
|
| + if (dart.notNull(this[_buffer].length) > dart.notNull(dart.as(_StringConversionSinkAsStringSinkAdapter._MIN_STRING_SIZE, core.num)))
|
| + dart.dcall(this[_flush]);
|
| }
|
| writeAll(objects, separator) {
|
| if (separator === void 0)
|
| separator = "";
|
| if (dart.notNull(this[_buffer].isNotEmpty))
|
| - this[_flush]();
|
| + dart.dcall(this[_flush]);
|
| let iterator = objects[dartx.iterator];
|
| - if (!dart.notNull(iterator.moveNext()))
|
| + if (!dart.notNull(dart.dcall(iterator.moveNext)))
|
| return;
|
| if (dart.notNull(separator[dartx.isEmpty])) {
|
| do {
|
| - this[_chunkedSink].add(dart.toString(iterator.current));
|
| - } while (dart.notNull(iterator.moveNext()));
|
| + dart.dcall(this[_chunkedSink].add, dart.dsend(iterator.current, 'toString'));
|
| + } while (dart.notNull(dart.dcall(iterator.moveNext)));
|
| } else {
|
| - this[_chunkedSink].add(dart.toString(iterator.current));
|
| - while (dart.notNull(iterator.moveNext())) {
|
| - this.write(separator);
|
| - this[_chunkedSink].add(dart.toString(iterator.current));
|
| + dart.dcall(this[_chunkedSink].add, dart.dsend(iterator.current, 'toString'));
|
| + while (dart.notNull(dart.dcall(iterator.moveNext))) {
|
| + dart.dcall(this.write, separator);
|
| + dart.dcall(this[_chunkedSink].add, dart.dsend(iterator.current, 'toString'));
|
| }
|
| }
|
| }
|
| [_flush]() {
|
| - let accumulated = dart.toString(this[_buffer]);
|
| - this[_buffer].clear();
|
| - this[_chunkedSink].add(accumulated);
|
| + let accumulated = dart.dcall(this[_buffer].toString);
|
| + dart.dcall(this[_buffer].clear);
|
| + dart.dcall(this[_chunkedSink].add, accumulated);
|
| }
|
| }
|
| _StringConversionSinkAsStringSinkAdapter[dart.implements] = () => [ClosableStringSink];
|
| @@ -1919,16 +1918,16 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| addSlice(str, start, end, isLast) {
|
| if (start != 0 || end != str[dartx.length]) {
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| - this[_stringSink].writeCharCode(str[dartx.codeUnitAt](i));
|
| + dart.dcall(this[_stringSink].writeCharCode, dart.dcall(str[dartx.codeUnitAt], i));
|
| }
|
| } else {
|
| - this[_stringSink].write(str);
|
| + dart.dcall(this[_stringSink].write, str);
|
| }
|
| if (dart.notNull(isLast))
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| add(str) {
|
| - return this[_stringSink].write(str);
|
| + return dart.dcall(this[_stringSink].write, str);
|
| }
|
| asUtf8Sink(allowMalformed) {
|
| return new _Utf8StringSinkAdapter(this, this[_stringSink], allowMalformed);
|
| @@ -1951,9 +1950,9 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| close() {
|
| let buffer = dart.as(this[_stringSink], core.StringBuffer);
|
| - let accumulated = dart.toString(buffer);
|
| - buffer.clear();
|
| - this[_callback](accumulated);
|
| + let accumulated = dart.dcall(buffer.toString);
|
| + dart.dcall(buffer.clear);
|
| + dart.dcall(this[_callback], accumulated);
|
| }
|
| asUtf8Sink(allowMalformed) {
|
| return new _Utf8StringSinkAdapter(this, this[_stringSink], allowMalformed);
|
| @@ -1967,19 +1966,19 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_sink] = sink;
|
| }
|
| add(str) {
|
| - return this[_sink].add(str);
|
| + return dart.dcall(this[_sink].add, str);
|
| }
|
| addSlice(str, start, end, isLast) {
|
| if (start == 0 && end == str[dartx.length]) {
|
| - this.add(str);
|
| + dart.dcall(this.add, str);
|
| } else {
|
| - this.add(str[dartx.substring](start, end));
|
| + dart.dcall(this.add, dart.dcall(str[dartx.substring], start, end));
|
| }
|
| if (dart.notNull(isLast))
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| close() {
|
| - return this[_sink].close();
|
| + return dart.dcall(this[_sink].close);
|
| }
|
| }
|
| dart.setSignature(_StringAdapterSink, {
|
| @@ -1997,17 +1996,17 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super.ByteConversionSink();
|
| }
|
| close() {
|
| - this[_decoder].close();
|
| + dart.dcall(this[_decoder].close);
|
| if (this[_sink] != null)
|
| - this[_sink].close();
|
| + dart.dcall(this[_sink].close);
|
| }
|
| add(chunk) {
|
| - this.addSlice(chunk, 0, chunk[dartx.length], false);
|
| + dart.dcall(this.addSlice, chunk, 0, chunk[dartx.length], false);
|
| }
|
| addSlice(codeUnits, startIndex, endIndex, isLast) {
|
| - this[_decoder].convert(codeUnits, startIndex, endIndex);
|
| + dart.dcall(this[_decoder].convert, codeUnits, startIndex, endIndex);
|
| if (dart.notNull(isLast))
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| dart.setSignature(_Utf8StringSinkAdapter, {
|
| @@ -2029,28 +2028,28 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super.ByteConversionSink();
|
| }
|
| close() {
|
| - this[_decoder].close();
|
| + dart.dcall(this[_decoder].close);
|
| if (dart.notNull(this[_buffer].isNotEmpty)) {
|
| - let accumulated = dart.toString(this[_buffer]);
|
| - this[_buffer].clear();
|
| - this[_chunkedSink].addSlice(accumulated, 0, accumulated[dartx.length], true);
|
| + let accumulated = dart.dcall(this[_buffer].toString);
|
| + dart.dcall(this[_buffer].clear);
|
| + dart.dcall(this[_chunkedSink].addSlice, accumulated, 0, accumulated[dartx.length], true);
|
| } else {
|
| - this[_chunkedSink].close();
|
| + dart.dcall(this[_chunkedSink].close);
|
| }
|
| }
|
| add(chunk) {
|
| - this.addSlice(chunk, 0, chunk[dartx.length], false);
|
| + dart.dcall(this.addSlice, chunk, 0, chunk[dartx.length], false);
|
| }
|
| addSlice(chunk, startIndex, endIndex, isLast) {
|
| - this[_decoder].convert(chunk, startIndex, endIndex);
|
| + dart.dcall(this[_decoder].convert, chunk, startIndex, endIndex);
|
| if (dart.notNull(this[_buffer].isNotEmpty)) {
|
| - let accumulated = dart.toString(this[_buffer]);
|
| - this[_chunkedSink].addSlice(accumulated, 0, accumulated[dartx.length], isLast);
|
| - this[_buffer].clear();
|
| + let accumulated = dart.dcall(this[_buffer].toString);
|
| + dart.dcall(this[_chunkedSink].addSlice, accumulated, 0, accumulated[dartx.length], isLast);
|
| + dart.dcall(this[_buffer].clear);
|
| return;
|
| }
|
| if (dart.notNull(isLast))
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| dart.defineNamedConstructor(_Utf8ConversionSink, '_');
|
| @@ -2081,7 +2080,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let allowMalformed = opts && 'allowMalformed' in opts ? opts.allowMalformed : null;
|
| if (allowMalformed == null)
|
| allowMalformed = this[_allowMalformed];
|
| - return new Utf8Decoder({allowMalformed: allowMalformed}).convert(codeUnits);
|
| + return dart.dcall(new Utf8Decoder({allowMalformed: allowMalformed}).convert, codeUnits);
|
| }
|
| get encoder() {
|
| return new Utf8Encoder();
|
| @@ -2107,22 +2106,22 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (end === void 0)
|
| end = null;
|
| let stringLength = string[dartx.length];
|
| - core.RangeError.checkValidRange(start, end, stringLength);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, stringLength);
|
| if (end == null)
|
| end = stringLength;
|
| let length = dart.notNull(end) - dart.notNull(start);
|
| if (length == 0)
|
| return typed_data.Uint8List.new(0);
|
| let encoder = new _Utf8Encoder.withBufferSize(dart.notNull(length) * 3);
|
| - let endPosition = encoder[_fillBuffer](string, start, end);
|
| + let endPosition = dart.dcall(encoder[_fillBuffer], string, start, end);
|
| dart.assert(dart.notNull(endPosition) >= dart.notNull(end) - 1);
|
| if (endPosition != end) {
|
| - let lastCodeUnit = string[dartx.codeUnitAt](dart.notNull(end) - 1);
|
| - dart.assert(_isLeadSurrogate(lastCodeUnit));
|
| - let wasCombined = encoder[_writeSurrogate](lastCodeUnit, 0);
|
| + let lastCodeUnit = dart.dcall(string[dartx.codeUnitAt], dart.notNull(end) - 1);
|
| + dart.assert(dart.dcall(_isLeadSurrogate, lastCodeUnit));
|
| + let wasCombined = dart.dcall(encoder[_writeSurrogate], lastCodeUnit, 0);
|
| dart.assert(!dart.notNull(wasCombined));
|
| }
|
| - return encoder[_buffer][dartx.sublist](0, encoder[_bufferIndex]);
|
| + return dart.dcall(encoder[_buffer][dartx.sublist], 0, encoder[_bufferIndex]);
|
| }
|
| startChunkedConversion(sink) {
|
| if (!dart.is(sink, ByteConversionSink)) {
|
| @@ -2131,7 +2130,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return new _Utf8EncoderSink(dart.as(sink, ByteConversionSink));
|
| }
|
| bind(stream) {
|
| - return super.bind(stream);
|
| + return dart.dcall(super.bind, stream);
|
| }
|
| }
|
| dart.setSignature(Utf8Encoder, {
|
| @@ -2144,10 +2143,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| });
|
| class _Utf8Encoder extends core.Object {
|
| _Utf8Encoder() {
|
| - this.withBufferSize(_Utf8Encoder._DEFAULT_BYTE_BUFFER_SIZE);
|
| + this.withBufferSize(dart.as(_Utf8Encoder._DEFAULT_BYTE_BUFFER_SIZE, core.int));
|
| }
|
| withBufferSize(bufferSize) {
|
| - this[_buffer] = _Utf8Encoder._createBuffer(bufferSize);
|
| + this[_buffer] = dart.dcall(_Utf8Encoder._createBuffer, bufferSize);
|
| this[_carry] = 0;
|
| this[_bufferIndex] = 0;
|
| }
|
| @@ -2155,8 +2154,8 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return typed_data.Uint8List.new(size);
|
| }
|
| [_writeSurrogate](leadingSurrogate, nextCodeUnit) {
|
| - if (dart.notNull(_isTailSurrogate(nextCodeUnit))) {
|
| - let rune = _combineSurrogatePair(leadingSurrogate, nextCodeUnit);
|
| + if (dart.notNull(dart.dcall(_isTailSurrogate, nextCodeUnit))) {
|
| + let rune = dart.dcall(_combineSurrogatePair, leadingSurrogate, nextCodeUnit);
|
| dart.assert(dart.notNull(rune) > dart.notNull(_THREE_BYTE_LIMIT));
|
| dart.assert(dart.notNull(rune) <= dart.notNull(_FOUR_BYTE_LIMIT));
|
| this[_buffer][dartx.set]((() => {
|
| @@ -2200,12 +2199,12 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| }
|
| [_fillBuffer](str, start, end) {
|
| - if (start != end && dart.notNull(_isLeadSurrogate(str[dartx.codeUnitAt](dart.notNull(end) - 1)))) {
|
| + if (start != end && dart.notNull(dart.dcall(_isLeadSurrogate, dart.dcall(str[dartx.codeUnitAt], dart.notNull(end) - 1)))) {
|
| end = dart.notNull(end) - 1;
|
| }
|
| let stringIndex = null;
|
| for (stringIndex = start; dart.notNull(stringIndex) < dart.notNull(end); stringIndex = dart.notNull(stringIndex) + 1) {
|
| - let codeUnit = str[dartx.codeUnitAt](stringIndex);
|
| + let codeUnit = dart.dcall(str[dartx.codeUnitAt], stringIndex);
|
| if (dart.notNull(codeUnit) <= dart.notNull(_ONE_BYTE_LIMIT)) {
|
| if (dart.notNull(this[_bufferIndex]) >= dart.notNull(this[_buffer][dartx.length]))
|
| break;
|
| @@ -2214,11 +2213,11 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_bufferIndex] = dart.notNull(x) + 1;
|
| return x;
|
| }).bind(this)(), codeUnit);
|
| - } else if (dart.notNull(_isLeadSurrogate(codeUnit))) {
|
| + } else if (dart.notNull(dart.dcall(_isLeadSurrogate, codeUnit))) {
|
| if (dart.notNull(this[_bufferIndex]) + 3 >= dart.notNull(this[_buffer][dartx.length]))
|
| break;
|
| - let nextCodeUnit = str[dartx.codeUnitAt](dart.notNull(stringIndex) + 1);
|
| - let wasCombined = this[_writeSurrogate](codeUnit, nextCodeUnit);
|
| + let nextCodeUnit = dart.dcall(str[dartx.codeUnitAt], dart.notNull(stringIndex) + 1);
|
| + let wasCombined = dart.dcall(this[_writeSurrogate], codeUnit, nextCodeUnit);
|
| if (dart.notNull(wasCombined)) {
|
| stringIndex = dart.notNull(stringIndex) + 1;
|
| }
|
| @@ -2283,10 +2282,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| close() {
|
| if (this[_carry] != 0) {
|
| - this.addSlice("", 0, 0, true);
|
| + dart.dcall(this.addSlice, "", 0, 0, true);
|
| return;
|
| }
|
| - this[_sink].close();
|
| + dart.dcall(this[_sink].close);
|
| }
|
| addSlice(str, start, end, isLast) {
|
| this[_bufferIndex] = 0;
|
| @@ -2296,11 +2295,11 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (this[_carry] != 0) {
|
| let nextCodeUnit = 0;
|
| if (start != end) {
|
| - nextCodeUnit = str[dartx.codeUnitAt](start);
|
| + nextCodeUnit = dart.dcall(str[dartx.codeUnitAt], start);
|
| } else {
|
| dart.assert(isLast);
|
| }
|
| - let wasCombined = this[_writeSurrogate](this[_carry], nextCodeUnit);
|
| + let wasCombined = dart.dcall(this[_writeSurrogate], this[_carry], nextCodeUnit);
|
| dart.assert(!dart.notNull(wasCombined) || start != end);
|
| if (dart.notNull(wasCombined)) {
|
| start = dart.notNull(start) + 1;
|
| @@ -2308,22 +2307,22 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| this[_carry] = 0;
|
| }
|
| do {
|
| - start = this[_fillBuffer](str, start, end);
|
| + start = dart.dcall(this[_fillBuffer], str, start, end);
|
| let isLastSlice = dart.notNull(isLast) && start == end;
|
| - if (start == dart.notNull(end) - 1 && dart.notNull(_isLeadSurrogate(str[dartx.codeUnitAt](start)))) {
|
| + if (start == dart.notNull(end) - 1 && dart.notNull(dart.dcall(_isLeadSurrogate, dart.dcall(str[dartx.codeUnitAt], start)))) {
|
| if (dart.notNull(isLast) && dart.notNull(this[_bufferIndex]) < dart.notNull(this[_buffer][dartx.length]) - 3) {
|
| - let hasBeenCombined = this[_writeSurrogate](str[dartx.codeUnitAt](start), 0);
|
| + let hasBeenCombined = dart.dcall(this[_writeSurrogate], dart.dcall(str[dartx.codeUnitAt], start), 0);
|
| dart.assert(!dart.notNull(hasBeenCombined));
|
| } else {
|
| - this[_carry] = str[dartx.codeUnitAt](start);
|
| + this[_carry] = dart.dcall(str[dartx.codeUnitAt], start);
|
| }
|
| start = dart.notNull(start) + 1;
|
| }
|
| - this[_sink].addSlice(this[_buffer], 0, this[_bufferIndex], isLastSlice);
|
| + dart.dcall(this[_sink].addSlice, this[_buffer], 0, this[_bufferIndex], isLastSlice);
|
| this[_bufferIndex] = 0;
|
| } while (dart.notNull(start) < dart.notNull(end));
|
| if (dart.notNull(isLast))
|
| - this.close();
|
| + dart.dcall(this.close);
|
| }
|
| }
|
| dart.setSignature(_Utf8EncoderSink, {
|
| @@ -2345,14 +2344,14 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (end === void 0)
|
| end = null;
|
| let length = codeUnits[dartx.length];
|
| - core.RangeError.checkValidRange(start, end, length);
|
| + dart.dcall(core.RangeError.checkValidRange, start, end, length);
|
| if (end == null)
|
| end = length;
|
| let buffer = new core.StringBuffer();
|
| let decoder = new _Utf8Decoder(buffer, this[_allowMalformed]);
|
| - decoder.convert(codeUnits, start, end);
|
| - decoder.close();
|
| - return dart.toString(buffer);
|
| + dart.dcall(decoder.convert, codeUnits, start, end);
|
| + dart.dcall(decoder.close);
|
| + return dart.dcall(buffer.toString);
|
| }
|
| startChunkedConversion(sink) {
|
| let stringSink = null;
|
| @@ -2361,13 +2360,13 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| } else {
|
| stringSink = StringConversionSink.from(sink);
|
| }
|
| - return stringSink.asUtf8Sink(this[_allowMalformed]);
|
| + return dart.dcall(stringSink.asUtf8Sink, this[_allowMalformed]);
|
| }
|
| bind(stream) {
|
| - return super.bind(stream);
|
| + return dart.dcall(super.bind, stream);
|
| }
|
| fuse(next) {
|
| - return super.fuse(next);
|
| + return dart.dcall(super.fuse, next);
|
| }
|
| }
|
| dart.setSignature(Utf8Decoder, {
|
| @@ -2421,14 +2420,14 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return dart.notNull(this[_expectedUnits]) > 0;
|
| }
|
| close() {
|
| - this.flush();
|
| + dart.dcall(this.flush);
|
| }
|
| flush() {
|
| if (dart.notNull(this.hasPartialInput)) {
|
| if (!dart.notNull(this[_allowMalformed])) {
|
| dart.throw(new core.FormatException("Unfinished UTF-8 octet sequence"));
|
| }
|
| - this[_stringSink].writeCharCode(UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| + dart.dcall(this[_stringSink].writeCharCode, UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| this[_value] = 0;
|
| this[_expectedUnits] = 0;
|
| this[_extraUnits] = 0;
|
| @@ -2444,18 +2443,18 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| function scanOneByteCharacters(units, from) {
|
| let to = endIndex;
|
| let mask = _ONE_BYTE_LIMIT;
|
| - for (let i = from; dart.notNull(i) < dart.notNull(to); i = dart.notNull(i) + 1) {
|
| + for (let i = from; dart.notNull(dart.as(dart.dsend(i, '<', to), core.bool)); i = dart.dsend(i, '+', 1)) {
|
| let unit = dart.dindex(units, i);
|
| if (!dart.equals(dart.dsend(unit, '&', mask), unit))
|
| - return dart.notNull(i) - dart.notNull(from);
|
| + return dart.as(dart.dsend(i, '-', from), core.int);
|
| }
|
| - return dart.notNull(to) - dart.notNull(from);
|
| + return dart.as(dart.dsend(to, '-', from), core.int);
|
| }
|
| dart.fn(scanOneByteCharacters, core.int, [dart.dynamic, core.int]);
|
| let addSingleBytes = (function(from, to) {
|
| dart.assert(dart.notNull(from) >= dart.notNull(startIndex) && dart.notNull(from) <= dart.notNull(endIndex));
|
| dart.assert(dart.notNull(to) >= dart.notNull(startIndex) && dart.notNull(to) <= dart.notNull(endIndex));
|
| - this[_stringSink].write(core.String.fromCharCodes(codeUnits, from, to));
|
| + dart.dcall(this[_stringSink].write, core.String.fromCharCodes(codeUnits, from, to));
|
| }).bind(this);
|
| dart.fn(addSingleBytes, dart.void, [core.int, core.int]);
|
| let i = startIndex;
|
| @@ -2471,10 +2470,10 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if ((dart.notNull(unit) & 192) != 128) {
|
| expectedUnits = 0;
|
| if (!dart.notNull(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException(`Bad UTF-8 encoding 0x${unit[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException(`Bad UTF-8 encoding 0x${dart.dcall(unit[dartx.toRadixString], 16)}`));
|
| }
|
| this[_isFirstCharacter] = false;
|
| - this[_stringSink].writeCharCode(UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| + dart.dcall(this[_stringSink].writeCharCode, UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| break multibyte;
|
| } else {
|
| value = dart.notNull(value) << 6 | dart.notNull(unit) & 63;
|
| @@ -2484,27 +2483,27 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| } while (dart.notNull(expectedUnits) > 0);
|
| if (dart.notNull(value) <= dart.notNull(_Utf8Decoder._LIMITS[dartx.get](dart.notNull(extraUnits) - 1))) {
|
| if (!dart.notNull(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException(`Overlong encoding of 0x${value[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException(`Overlong encoding of 0x${dart.dcall(value[dartx.toRadixString], 16)}`));
|
| }
|
| expectedUnits = extraUnits = 0;
|
| value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
|
| }
|
| if (dart.notNull(value) > dart.notNull(_FOUR_BYTE_LIMIT)) {
|
| if (!dart.notNull(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException("Character outside valid Unicode range: " + `0x${value[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException("Character outside valid Unicode range: " + `0x${dart.dcall(value[dartx.toRadixString], 16)}`));
|
| }
|
| value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
|
| }
|
| if (!dart.notNull(this[_isFirstCharacter]) || value != UNICODE_BOM_CHARACTER_RUNE) {
|
| - this[_stringSink].writeCharCode(value);
|
| + dart.dcall(this[_stringSink].writeCharCode, value);
|
| }
|
| this[_isFirstCharacter] = false;
|
| }
|
| while (dart.notNull(i) < dart.notNull(endIndex)) {
|
| - let oneBytes = scanOneByteCharacters(codeUnits, i);
|
| + let oneBytes = dart.dcall(scanOneByteCharacters, codeUnits, i);
|
| if (dart.notNull(oneBytes) > 0) {
|
| this[_isFirstCharacter] = false;
|
| - addSingleBytes(i, dart.notNull(i) + dart.notNull(oneBytes));
|
| + dart.dcall(addSingleBytes, i, dart.notNull(i) + dart.notNull(oneBytes));
|
| i = dart.notNull(i) + dart.notNull(oneBytes);
|
| if (i == endIndex)
|
| break;
|
| @@ -2516,9 +2515,9 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| })());
|
| if (dart.notNull(unit) < 0) {
|
| if (!dart.notNull(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException(`Negative UTF-8 code unit: -0x${(-dart.notNull(unit))[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException(`Negative UTF-8 code unit: -0x${dart.dcall((-dart.notNull(unit))[dartx.toRadixString], 16)}`));
|
| }
|
| - this[_stringSink].writeCharCode(UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| + dart.dcall(this[_stringSink].writeCharCode, UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| } else {
|
| dart.assert(dart.notNull(unit) > dart.notNull(_ONE_BYTE_LIMIT));
|
| if ((dart.notNull(unit) & 224) == 192) {
|
| @@ -2537,12 +2536,12 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| continue loop;
|
| }
|
| if (!dart.notNull(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException(`Bad UTF-8 encoding 0x${unit[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException(`Bad UTF-8 encoding 0x${dart.dcall(unit[dartx.toRadixString], 16)}`));
|
| }
|
| value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
|
| expectedUnits = extraUnits = 0;
|
| this[_isFirstCharacter] = false;
|
| - this[_stringSink].writeCharCode(value);
|
| + dart.dcall(this[_stringSink].writeCharCode, value);
|
| }
|
| }
|
| break loop;
|
| @@ -2569,43 +2568,43 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| function _convertJsonToDart(json, reviver) {
|
| dart.assert(reviver != null);
|
| function walk(e) {
|
| - if (e == null || typeof e != "object") {
|
| + if (dart.notNull(dart.as(e == null, core.bool)) || dart.notNull(dart.as(typeof e != "object", core.bool))) {
|
| return e;
|
| }
|
| - if (Object.getPrototypeOf(e) === Array.prototype) {
|
| - for (let i = 0; dart.notNull(i) < e.length; i = dart.notNull(i) + 1) {
|
| + if (dart.notNull(dart.as(Object.getPrototypeOf(e) === Array.prototype, core.bool))) {
|
| + for (let i = 0; dart.notNull(i) < dart.notNull(dart.as(e.length, core.num)); i = dart.notNull(i) + 1) {
|
| let item = e[i];
|
| - e[i] = dart.dcall(reviver, i, walk(item));
|
| + e[i] = dart.dcall(reviver, i, dart.dcall(walk, item));
|
| }
|
| return e;
|
| }
|
| let map = new _JsonMap(e);
|
| let processed = map[_processed];
|
| - let keys = map[_computeKeys]();
|
| + let keys = dart.dcall(map[_computeKeys]);
|
| for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = dart.notNull(i) + 1) {
|
| let key = keys[dartx.get](i);
|
| - let revived = dart.dcall(reviver, key, walk(e[key]));
|
| + let revived = dart.dcall(reviver, key, dart.dcall(walk, e[key]));
|
| processed[key] = revived;
|
| }
|
| map[_original] = processed;
|
| return map;
|
| }
|
| dart.fn(walk);
|
| - return dart.dcall(reviver, null, walk(json));
|
| + return dart.dcall(reviver, null, dart.dcall(walk, json));
|
| }
|
| dart.fn(_convertJsonToDart, dart.dynamic, [dart.dynamic, dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic])]);
|
| function _convertJsonToDartLazy(object) {
|
| if (object == null)
|
| return null;
|
| - if (typeof object != "object") {
|
| + if (dart.notNull(dart.as(typeof object != "object", core.bool))) {
|
| return object;
|
| }
|
| - if (Object.getPrototypeOf(object) !== Array.prototype) {
|
| + if (dart.notNull(dart.as(Object.getPrototypeOf(object) !== Array.prototype, core.bool))) {
|
| return new _JsonMap(object);
|
| }
|
| - for (let i = 0; dart.notNull(i) < object.length; i = dart.notNull(i) + 1) {
|
| + for (let i = 0; dart.notNull(i) < dart.notNull(dart.as(object.length, core.num)); i = dart.notNull(i) + 1) {
|
| let item = object[i];
|
| - object[i] = _convertJsonToDartLazy(item);
|
| + object[i] = dart.dcall(_convertJsonToDartLazy, item);
|
| }
|
| return object;
|
| }
|
| @@ -2617,7 +2616,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| let _upgrade = Symbol('_upgrade');
|
| class _JsonMap extends core.Object {
|
| _JsonMap(original) {
|
| - this[_processed] = _JsonMap._newJavaScriptObject();
|
| + this[_processed] = dart.dcall(_JsonMap._newJavaScriptObject);
|
| this[_original] = original;
|
| this[_data] = null;
|
| }
|
| @@ -2627,14 +2626,14 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| } else if (!(typeof key == 'string')) {
|
| return null;
|
| } else {
|
| - let result = _JsonMap._getProperty(this[_processed], dart.as(key, core.String));
|
| - if (dart.notNull(_JsonMap._isUnprocessed(result)))
|
| - result = this[_process](dart.as(key, core.String));
|
| + let result = dart.dcall(_JsonMap._getProperty, this[_processed], key);
|
| + if (dart.notNull(dart.dcall(_JsonMap._isUnprocessed, result)))
|
| + result = dart.dcall(this[_process], key);
|
| return result;
|
| }
|
| }
|
| get length() {
|
| - return dart.notNull(this[_isUpgraded]) ? this[_upgradedMap].length : this[_computeKeys]()[dartx.length];
|
| + return dart.notNull(this[_isUpgraded]) ? this[_upgradedMap].length : dart.dcall(this[_computeKeys])[dartx.length];
|
| }
|
| get isEmpty() {
|
| return this.length == 0;
|
| @@ -2650,32 +2649,32 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| get values() {
|
| if (dart.notNull(this[_isUpgraded]))
|
| return this[_upgradedMap].values;
|
| - return _internal.MappedIterable.new(this[_computeKeys](), dart.fn((each => this.get(each)).bind(this)));
|
| + return _internal.MappedIterable.new(dart.dcall(this[_computeKeys]), dart.fn((each => this.get(each)).bind(this)));
|
| }
|
| set(key, value) {
|
| if (dart.notNull(this[_isUpgraded])) {
|
| this[_upgradedMap].set(key, value);
|
| - } else if (dart.notNull(this.containsKey(key))) {
|
| + } else if (dart.notNull(dart.dcall(this.containsKey, key))) {
|
| let processed = this[_processed];
|
| - _JsonMap._setProperty(processed, dart.as(key, core.String), value);
|
| + dart.dcall(_JsonMap._setProperty, processed, key, value);
|
| let original = this[_original];
|
| - if (!dart.notNull(core.identical(original, processed))) {
|
| - _JsonMap._setProperty(original, dart.as(key, core.String), null);
|
| + if (!dart.notNull(dart.dcall(core.identical, original, processed))) {
|
| + dart.dcall(_JsonMap._setProperty, original, key, null);
|
| }
|
| } else {
|
| - this[_upgrade]().set(key, value);
|
| + dart.dcall(this[_upgrade]).set(key, value);
|
| }
|
| return value;
|
| }
|
| addAll(other) {
|
| - other.forEach(dart.fn(((key, value) => {
|
| + dart.dcall(other.forEach, dart.fn(((key, value) => {
|
| this.set(key, value);
|
| }).bind(this)));
|
| }
|
| containsValue(value) {
|
| if (dart.notNull(this[_isUpgraded]))
|
| - return this[_upgradedMap].containsValue(value);
|
| - let keys = this[_computeKeys]();
|
| + return dart.dcall(this[_upgradedMap].containsValue, value);
|
| + let keys = dart.dcall(this[_computeKeys]);
|
| for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = dart.notNull(i) + 1) {
|
| let key = keys[dartx.get](i);
|
| if (dart.equals(this.get(key), value))
|
| @@ -2685,26 +2684,26 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| containsKey(key) {
|
| if (dart.notNull(this[_isUpgraded]))
|
| - return this[_upgradedMap].containsKey(key);
|
| + return dart.dcall(this[_upgradedMap].containsKey, key);
|
| if (!(typeof key == 'string'))
|
| return false;
|
| - return _JsonMap._hasProperty(this[_original], dart.as(key, core.String));
|
| + return dart.dcall(_JsonMap._hasProperty, this[_original], key);
|
| }
|
| putIfAbsent(key, ifAbsent) {
|
| - if (dart.notNull(this.containsKey(key)))
|
| + if (dart.notNull(dart.dcall(this.containsKey, key)))
|
| return this.get(key);
|
| let value = ifAbsent();
|
| this.set(key, value);
|
| return value;
|
| }
|
| remove(key) {
|
| - if (!dart.notNull(this[_isUpgraded]) && !dart.notNull(this.containsKey(key)))
|
| + if (!dart.notNull(this[_isUpgraded]) && !dart.notNull(dart.dcall(this.containsKey, key)))
|
| return null;
|
| - return this[_upgrade]().remove(key);
|
| + return dart.dcall(dart.dcall(this[_upgrade]).remove, key);
|
| }
|
| clear() {
|
| if (dart.notNull(this[_isUpgraded])) {
|
| - this[_upgradedMap].clear();
|
| + dart.dcall(this[_upgradedMap].clear);
|
| } else {
|
| if (this[_data] != null) {
|
| dart.dsend(this[_data], 'clear');
|
| @@ -2715,23 +2714,23 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| }
|
| forEach(f) {
|
| if (dart.notNull(this[_isUpgraded]))
|
| - return this[_upgradedMap].forEach(f);
|
| - let keys = this[_computeKeys]();
|
| + return dart.dcall(this[_upgradedMap].forEach, f);
|
| + let keys = dart.dcall(this[_computeKeys]);
|
| for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = dart.notNull(i) + 1) {
|
| let key = keys[dartx.get](i);
|
| - let value = _JsonMap._getProperty(this[_processed], key);
|
| - if (dart.notNull(_JsonMap._isUnprocessed(value))) {
|
| - value = _convertJsonToDartLazy(_JsonMap._getProperty(this[_original], key));
|
| - _JsonMap._setProperty(this[_processed], key, value);
|
| + let value = dart.dcall(_JsonMap._getProperty, this[_processed], key);
|
| + if (dart.notNull(dart.dcall(_JsonMap._isUnprocessed, value))) {
|
| + value = dart.dcall(_convertJsonToDartLazy, dart.dcall(_JsonMap._getProperty, this[_original], key));
|
| + dart.dcall(_JsonMap._setProperty, this[_processed], key, value);
|
| }
|
| dart.dcall(f, key, value);
|
| - if (!dart.notNull(core.identical(keys, this[_data]))) {
|
| + if (!dart.notNull(dart.dcall(core.identical, keys, this[_data]))) {
|
| dart.throw(new core.ConcurrentModificationError(this));
|
| }
|
| }
|
| }
|
| toString() {
|
| - return collection.Maps.mapToString(this);
|
| + return dart.dcall(collection.Maps.mapToString, this);
|
| }
|
| get [_isUpgraded]() {
|
| return this[_processed] == null;
|
| @@ -2744,7 +2743,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| dart.assert(!dart.notNull(this[_isUpgraded]));
|
| let keys = dart.as(this[_data], core.List);
|
| if (keys == null) {
|
| - keys = this[_data] = _JsonMap._getPropertyNames(this[_original]);
|
| + keys = this[_data] = dart.dcall(_JsonMap._getPropertyNames, this[_original]);
|
| }
|
| return dart.as(keys, core.List$(core.String));
|
| }
|
| @@ -2752,15 +2751,15 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| if (dart.notNull(this[_isUpgraded]))
|
| return this[_upgradedMap];
|
| let result = dart.map();
|
| - let keys = this[_computeKeys]();
|
| + let keys = dart.dcall(this[_computeKeys]);
|
| for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = dart.notNull(i) + 1) {
|
| let key = keys[dartx.get](i);
|
| result.set(key, this.get(key));
|
| }
|
| if (dart.notNull(keys[dartx.isEmpty])) {
|
| - keys[dartx.add](null);
|
| + dart.dcall(keys[dartx.add], null);
|
| } else {
|
| - keys[dartx.clear]();
|
| + dart.dcall(keys[dartx.clear]);
|
| }
|
| this[_original] = this[_processed] = null;
|
| this[_data] = result;
|
| @@ -2768,13 +2767,13 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return result;
|
| }
|
| [_process](key) {
|
| - if (!dart.notNull(_JsonMap._hasProperty(this[_original], key)))
|
| + if (!dart.notNull(dart.dcall(_JsonMap._hasProperty, this[_original], key)))
|
| return null;
|
| - let result = _convertJsonToDartLazy(_JsonMap._getProperty(this[_original], key));
|
| - return _JsonMap._setProperty(this[_processed], key, result);
|
| + let result = dart.dcall(_convertJsonToDartLazy, dart.dcall(_JsonMap._getProperty, this[_original], key));
|
| + return dart.dcall(_JsonMap._setProperty, this[_processed], key, result);
|
| }
|
| static _hasProperty(object, key) {
|
| - return Object.prototype.hasOwnProperty.call(object, key);
|
| + return dart.as(Object.prototype.hasOwnProperty.call(object, key), core.bool);
|
| }
|
| static _getProperty(object, key) {
|
| return object[key];
|
| @@ -2786,7 +2785,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return dart.as(Object.keys(object), core.List);
|
| }
|
| static _isUnprocessed(object) {
|
| - return typeof object == "undefined";
|
| + return dart.as(typeof object == "undefined", core.bool);
|
| }
|
| static _newJavaScriptObject() {
|
| return Object.create(null);
|
| @@ -2797,7 +2796,7 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| constructors: () => ({_JsonMap: [_JsonMap, [dart.dynamic]]}),
|
| methods: () => ({
|
| get: [dart.dynamic, [core.Object]],
|
| - set: [dart.void, [dart.dynamic, dart.dynamic]],
|
| + set: [dart.dynamic, [dart.dynamic, dart.dynamic]],
|
| addAll: [dart.void, [core.Map]],
|
| containsValue: [core.bool, [core.Object]],
|
| containsKey: [core.bool, [core.Object]],
|
| @@ -2829,13 +2828,13 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| return this[_parent].length;
|
| }
|
| elementAt(index) {
|
| - return dart.notNull(this[_parent][_isUpgraded]) ? dart.as(this[_parent].keys[dartx.elementAt](index), core.String) : this[_parent][_computeKeys]()[dartx.get](index);
|
| + return dart.notNull(this[_parent][_isUpgraded]) ? dart.as(dart.dcall(this[_parent].keys[dartx.elementAt], index), core.String) : dart.dcall(this[_parent][_computeKeys])[dartx.get](index);
|
| }
|
| get iterator() {
|
| - return dart.notNull(this[_parent][_isUpgraded]) ? this[_parent].keys[dartx.iterator] : this[_parent][_computeKeys]()[dartx.iterator];
|
| + return dart.notNull(this[_parent][_isUpgraded]) ? this[_parent].keys[dartx.iterator] : dart.dcall(this[_parent][_computeKeys])[dartx.iterator];
|
| }
|
| contains(key) {
|
| - return this[_parent].containsKey(key);
|
| + return dart.dcall(this[_parent].containsKey, key);
|
| }
|
| }
|
| dart.setSignature(_JsonMapKeyIterable, {
|
| @@ -2850,13 +2849,13 @@ dart_library.library('dart/convert', null, /* Imports */[
|
| super._StringSinkConversionSink(new core.StringBuffer());
|
| }
|
| close() {
|
| - super.close();
|
| + dart.dcall(super.close);
|
| let buffer = dart.as(this[_stringSink], core.StringBuffer);
|
| - let accumulated = dart.toString(buffer);
|
| - buffer.clear();
|
| - let decoded = _parseJson(accumulated, this[_reviver]);
|
| - this[_sink].add(decoded);
|
| - this[_sink].close();
|
| + let accumulated = dart.dcall(buffer.toString);
|
| + dart.dcall(buffer.clear);
|
| + let decoded = dart.dcall(_parseJson, accumulated, this[_reviver]);
|
| + dart.dcall(this[_sink].add, decoded);
|
| + dart.dcall(this[_sink].close);
|
| }
|
| }
|
| dart.setSignature(_JsonDecoderSink, {
|
|
|