| Index: test/dart_codegen/expect/convert/json.dart
|
| diff --git a/test/dart_codegen/expect/convert/json.dart b/test/dart_codegen/expect/convert/json.dart
|
| index 36fa36bdbe5f982016a04d6dc6493ae8e113b62c..aa4ebcb5bb6398d9a63094d80b28c342d78d65d7 100644
|
| --- a/test/dart_codegen/expect/convert/json.dart
|
| +++ b/test/dart_codegen/expect/convert/json.dart
|
| @@ -37,11 +37,11 @@ toEncodable(var object)}
|
| ) {
|
| if (toEncodable == null) toEncodable = _toEncodable;
|
| if (toEncodable == null) return encoder.convert(value);
|
| - return new JsonEncoder(DEVC$RT.cast(toEncodable, __CastType8, __CastType6, "CompositeCast", """line 142, column 28 of dart:convert/json.dart: """, toEncodable is __CastType6, false)).convert(value);
|
| + return new JsonEncoder(DEVC$RT.cast(toEncodable, __CastType6, __CastType4, "CompositeCast", """line 142, column 28 of dart:convert/json.dart: """, toEncodable is __CastType4, false)).convert(value);
|
| }
|
| JsonEncoder get encoder {
|
| if (_toEncodable == null) return const JsonEncoder();
|
| - return new JsonEncoder(DEVC$RT.cast(_toEncodable, _ToEncodable, __CastType6, "CompositeCast", """line 147, column 28 of dart:convert/json.dart: """, _toEncodable is __CastType6, false));
|
| + return new JsonEncoder(DEVC$RT.cast(_toEncodable, _ToEncodable, __CastType4, "CompositeCast", """line 147, column 28 of dart:convert/json.dart: """, _toEncodable is __CastType4, false));
|
| }
|
| JsonDecoder get decoder {
|
| if (_reviver == null) return const JsonDecoder();
|
| @@ -52,7 +52,7 @@ if (_reviver == null) return const JsonDecoder();
|
| final Function _toEncodable;
|
| const JsonEncoder([Object toEncodable(Object nonSerializable)]) : this.indent = null, this._toEncodable = toEncodable;
|
| const JsonEncoder.withIndent(this.indent, [Object toEncodable(Object nonSerializable)]) : this._toEncodable = toEncodable;
|
| - String convert(Object object) => _JsonStringStringifier.stringify(object, DEVC$RT.cast(_toEncodable, Function, __CastType8, "ImplicitCast", """line 243, column 48 of dart:convert/json.dart: """, _toEncodable is __CastType8, true), indent);
|
| + String convert(Object object) => _JsonStringStringifier.stringify(object, DEVC$RT.cast(_toEncodable, Function, __CastType6, "ImplicitCast", """line 243, column 48 of dart:convert/json.dart: """, _toEncodable is __CastType6, true), indent);
|
| ChunkedConversionSink<Object> startChunkedConversion(Sink<String> sink) {
|
| if (sink is! StringConversionSink) {
|
| sink = new StringConversionSink.from(sink);
|
| @@ -64,14 +64,10 @@ return new _JsonUtf8EncoderSink(sink._sink, _toEncodable, JsonUtf8Encoder._utf8E
|
| }
|
| ), StringConversionSink, "ImplicitCast", """line 262, column 33 of dart:convert/json.dart: """, sink is StringConversionSink, true), _toEncodable, indent);
|
| }
|
| - Stream<String> bind(Stream<Object> stream) => ((__x10) => DEVC$RT.cast(__x10, DEVC$RT.type((DDC$async$.Stream<dynamic> _) {
|
| -}
|
| -), DEVC$RT.type((DDC$async$.Stream<String> _) {
|
| -}
|
| -), "CompositeCast", """line 266, column 49 of dart:convert/json.dart: """, __x10 is DDC$async$.Stream<String>, false))(super.bind(stream));
|
| + Stream<String> bind(Stream<Object> stream) => super.bind(stream);
|
| Converter<Object, dynamic> fuse(Converter<String, dynamic> other) {
|
| if (other is Utf8Encoder) {
|
| -return new JsonUtf8Encoder(indent, DEVC$RT.cast(_toEncodable, Function, __CastType11, "CompositeCast", """line 270, column 42 of dart:convert/json.dart: """, _toEncodable is __CastType11, false));
|
| +return new JsonUtf8Encoder(indent, DEVC$RT.cast(_toEncodable, Function, __CastType8, "CompositeCast", """line 270, column 42 of dart:convert/json.dart: """, _toEncodable is __CastType8, false));
|
| }
|
| return super.fuse(other);
|
| }
|
| @@ -101,7 +97,7 @@ int length = end - start;
|
| }
|
| bytes.add(chunk);
|
| }
|
| - _JsonUtf8Stringifier.stringify(object, _indent, DEVC$RT.cast(_toEncodable, Function, __CastType11, "CompositeCast", """line 352, column 36 of dart:convert/json.dart: """, _toEncodable is __CastType11, false), _bufferSize, addChunk);
|
| + _JsonUtf8Stringifier.stringify(object, _indent, DEVC$RT.cast(_toEncodable, Function, __CastType8, "CompositeCast", """line 352, column 36 of dart:convert/json.dart: """, _toEncodable is __CastType8, false), _bufferSize, addChunk);
|
| if (bytes.length == 1) return bytes[0];
|
| int length = 0;
|
| for (int i = 0; i < bytes.length; i++) {
|
| @@ -127,11 +123,7 @@ byteSink = new ByteConversionSink.from(sink);
|
| return new _JsonUtf8EncoderSink(byteSink, _toEncodable, _indent, _bufferSize);
|
| }
|
| Stream<List<int>> bind(Stream<Object> stream) {
|
| -return ((__x13) => DEVC$RT.cast(__x13, DEVC$RT.type((DDC$async$.Stream<dynamic> _) {
|
| -}
|
| -), DEVC$RT.type((DDC$async$.Stream<List<int>> _) {
|
| -}
|
| -), "CompositeCast", """line 391, column 12 of dart:convert/json.dart: """, __x13 is DDC$async$.Stream<List<int>>, false))(super.bind(stream));
|
| +return super.bind(stream);
|
| }
|
| Converter<Object, dynamic> fuse(Converter<List<int>, dynamic> other) {
|
| return super.fuse(other);
|
| @@ -148,7 +140,7 @@ throw new StateError("Only one call to add allowed");
|
| }
|
| _isDone = true;
|
| ClosableStringSink stringSink = _sink.asStringSink();
|
| - _JsonStringStringifier.printOn(o, stringSink, DEVC$RT.cast(_toEncodable, Function, __CastType8, "ImplicitCast", """line 425, column 51 of dart:convert/json.dart: """, _toEncodable is __CastType8, true), _indent);
|
| + _JsonStringStringifier.printOn(o, stringSink, DEVC$RT.cast(_toEncodable, Function, __CastType6, "ImplicitCast", """line 425, column 51 of dart:convert/json.dart: """, _toEncodable is __CastType6, true), _indent);
|
| stringSink.close();
|
| }
|
| void close() {
|
| @@ -168,7 +160,7 @@ if (_isDone) {
|
| throw new StateError("Only one call to add allowed");
|
| }
|
| _isDone = true;
|
| - _JsonUtf8Stringifier.stringify(object, _indent, DEVC$RT.cast(_toEncodable, Function, __CastType11, "CompositeCast", """line 455, column 53 of dart:convert/json.dart: """, _toEncodable is __CastType11, false), _bufferSize, _addChunk);
|
| + _JsonUtf8Stringifier.stringify(object, _indent, DEVC$RT.cast(_toEncodable, Function, __CastType8, "CompositeCast", """line 455, column 53 of dart:convert/json.dart: """, _toEncodable is __CastType8, false), _bufferSize, _addChunk);
|
| _sink.close();
|
| }
|
| void close() {
|
| @@ -202,7 +194,7 @@ _isDone = true;
|
| static const int CHAR_u = 0x75;
|
| final List _seen = new List();
|
| final Function _toEncodable;
|
| - _JsonStringifier(Object _toEncodable(Object o)) : _toEncodable = ((__x14) => DEVC$RT.cast(__x14, dynamic, Function, "DynamicCast", """line 547, column 24 of dart:convert/json.dart: """, __x14 is Function, true))((_toEncodable != null) ? _toEncodable : _defaultToEncodable);
|
| + _JsonStringifier(Object _toEncodable(Object o)) : _toEncodable = ((__x10) => DEVC$RT.cast(__x10, dynamic, Function, "DynamicCast", """line 547, column 24 of dart:convert/json.dart: """, __x10 is Function, true))((_toEncodable != null) ? _toEncodable : _defaultToEncodable);
|
| void writeString(String characters);
|
| void writeStringSlice(String characters, int start, int end);
|
| void writeCharCode(int charCode);
|
| @@ -393,7 +385,7 @@ writeString(",\n");
|
| }
|
| }
|
| class _JsonStringStringifier extends _JsonStringifier {final StringSink _sink;
|
| - _JsonStringStringifier(this._sink, _toEncodable) : super(DEVC$RT.cast(_toEncodable, dynamic, __CastType6, "CompositeCast", """line 798, column 60 of dart:convert/json.dart: """, _toEncodable is __CastType6, false));
|
| + _JsonStringStringifier(this._sink, _toEncodable) : super(DEVC$RT.cast(_toEncodable, dynamic, __CastType4, "CompositeCast", """line 798, column 60 of dart:convert/json.dart: """, _toEncodable is __CastType4, false));
|
| static String stringify(object, toEncodable(object), String indent) {
|
| StringBuffer output = new StringBuffer();
|
| printOn(object, output, toEncodable, indent);
|
| @@ -432,7 +424,7 @@ for (int i = 0; i < count; i++) writeString(_indent);
|
| final Function addChunk;
|
| Uint8List buffer;
|
| int index = 0;
|
| - _JsonUtf8Stringifier(toEncodable, int bufferSize, this.addChunk) : super(DEVC$RT.cast(toEncodable, dynamic, __CastType6, "CompositeCast", """line 874, column 15 of dart:convert/json.dart: """, toEncodable is __CastType6, false)), this.bufferSize = bufferSize, buffer = new Uint8List(bufferSize);
|
| + _JsonUtf8Stringifier(toEncodable, int bufferSize, this.addChunk) : this.bufferSize = bufferSize, buffer = new Uint8List(bufferSize), super(DEVC$RT.cast(toEncodable, dynamic, __CastType4, "CompositeCast", """line 876, column 15 of dart:convert/json.dart: """, toEncodable is __CastType4, false));
|
| static void stringify(Object object, List<int> indent, toEncodableFunction(Object o), int bufferSize, void addChunk(Uint8List chunk, int start, int end)) {
|
| _JsonUtf8Stringifier stringifier;
|
| if (indent != null) {
|
| @@ -517,7 +509,7 @@ addChunk(buffer, 0, index);
|
| }
|
| }
|
| class _JsonUtf8StringifierPretty extends _JsonUtf8Stringifier with _JsonPrettyPrintMixin {final List<int> indent;
|
| - _JsonUtf8StringifierPretty(toEncodableFunction, this.indent, bufferSize, addChunk) : super(toEncodableFunction, DEVC$RT.cast(bufferSize, dynamic, int, "DynamicCast", """line 1012, column 36 of dart:convert/json.dart: """, bufferSize is int, true), DEVC$RT.cast(addChunk, dynamic, Function, "DynamicCast", """line 1012, column 48 of dart:convert/json.dart: """, addChunk is Function, true));
|
| + _JsonUtf8StringifierPretty(toEncodableFunction, this.indent, bufferSize, addChunk) : super(toEncodableFunction, DEVC$RT.cast(bufferSize, dynamic, int, "DynamicCast", """line 1013, column 36 of dart:convert/json.dart: """, bufferSize is int, true), DEVC$RT.cast(addChunk, dynamic, Function, "DynamicCast", """line 1013, column 48 of dart:convert/json.dart: """, addChunk is Function, true));
|
| void writeIndentation(int count) {
|
| List<int> indent = this.indent;
|
| int indentLength = indent.length;
|
| @@ -543,6 +535,6 @@ writeByte(indent[i]);
|
| }
|
| }
|
| }
|
| - typedef Object __CastType6(Object __u7);
|
| - typedef dynamic __CastType8(dynamic __u9);
|
| - typedef dynamic __CastType11(Object __u12);
|
| + typedef Object __CastType4(Object __u5);
|
| + typedef dynamic __CastType6(dynamic __u7);
|
| + typedef dynamic __CastType8(Object __u9);
|
|
|