Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: test/dart_codegen/expect/convert/json.dart

Issue 997143003: Fix for conditional expressions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Add test case Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/dart_codegen/expect/convert/html_escape.dart ('k') | test/dart_codegen/expect/convert/latin1.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83011de930a00eca000b5d5c7dd6a68be7b3cfef..58378156a92763e828ed2095d26537ed965df75c 100644
--- a/test/dart_codegen/expect/convert/json.dart
+++ b/test/dart_codegen/expect/convert/json.dart
@@ -37,19 +37,19 @@ toEncodable(var object)}
) {
if (toEncodable == null) toEncodable = _toEncodable;
if (toEncodable == null) return encoder.convert(value);
- return new JsonEncoder(DEVC$RT.wrap((dynamic f(dynamic __u7)) {
+ return new JsonEncoder(DEVC$RT.wrap((dynamic f(dynamic __u6)) {
dynamic c(dynamic x0) => f(x0);
return f == null ? null : c;
}
-, toEncodable, __t10, __t8, "Wrap", """line 142, column 28 of dart:convert/json.dart: """, toEncodable is __t8)).convert(value);
+, toEncodable, __t9, __t7, "Wrap", """line 142, column 28 of dart:convert/json.dart: """, toEncodable is __t7)).convert(value);
}
JsonEncoder get encoder {
if (_toEncodable == null) return const JsonEncoder();
- return new JsonEncoder(DEVC$RT.wrap((dynamic f(dynamic __u12)) {
+ return new JsonEncoder(DEVC$RT.wrap((dynamic f(dynamic __u11)) {
dynamic c(dynamic x0) => f(x0);
return f == null ? null : c;
}
-, _toEncodable, __t10, __t8, "Wrap", """line 147, column 28 of dart:convert/json.dart: """, _toEncodable is __t8));
+, _toEncodable, __t9, __t7, "Wrap", """line 147, column 28 of dart:convert/json.dart: """, _toEncodable is __t7));
}
JsonDecoder get decoder {
if (_reviver == null) return const JsonDecoder();
@@ -60,7 +60,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, __t10, "CastGeneral", """line 243, column 48 of dart:convert/json.dart: """, _toEncodable is __t10, false), indent);
+ String convert(Object object) => _JsonStringStringifier.stringify(object, DEVC$RT.cast(_toEncodable, Function, __t9, "CastGeneral", """line 243, column 48 of dart:convert/json.dart: """, _toEncodable is __t9, false), indent);
ChunkedConversionSink<Object> startChunkedConversion(Sink<String> sink) {
if (sink is! StringConversionSink) {
sink = new StringConversionSink.from(sink);
@@ -72,14 +72,14 @@ return new _JsonUtf8EncoderSink(sink._sink, _toEncodable, JsonUtf8Encoder._utf8E
}
), StringConversionSink, "CastGeneral", """line 262, column 33 of dart:convert/json.dart: """, sink is StringConversionSink, true), _toEncodable, indent);
}
- Stream<String> bind(Stream<Object> stream) => ((__x13) => DEVC$RT.cast(__x13, DEVC$RT.type((DDC$async$.Stream<dynamic> _) {
+ Stream<String> bind(Stream<Object> stream) => ((__x12) => DEVC$RT.cast(__x12, DEVC$RT.type((DDC$async$.Stream<dynamic> _) {
}
), DEVC$RT.type((DDC$async$.Stream<String> _) {
}
-), "CastDynamic", """line 266, column 49 of dart:convert/json.dart: """, __x13 is DDC$async$.Stream<String>, false))(super.bind(stream));
+), "CastDynamic", """line 266, column 49 of dart:convert/json.dart: """, __x12 is DDC$async$.Stream<String>, false))(super.bind(stream));
Converter<Object, dynamic> fuse(Converter<String, dynamic> other) {
if (other is Utf8Encoder) {
-return new JsonUtf8Encoder(indent, DEVC$RT.cast(_toEncodable, Function, __t14, "CastGeneral", """line 270, column 42 of dart:convert/json.dart: """, _toEncodable is __t14, false));
+return new JsonUtf8Encoder(indent, DEVC$RT.cast(_toEncodable, Function, __t13, "CastGeneral", """line 270, column 42 of dart:convert/json.dart: """, _toEncodable is __t13, false));
}
return super.fuse(other);
}
@@ -101,11 +101,11 @@ if (string.codeUnitAt(i) >= 0x80) break checkAscii;
return UTF8.encode(string);
}
List<int> convert(Object object) {
-List<List<int>> bytes = ((__x16) => DEVC$RT.cast(__x16, DEVC$RT.type((List<dynamic> _) {
+List<List<int>> bytes = ((__x15) => DEVC$RT.cast(__x15, DEVC$RT.type((List<dynamic> _) {
}
), DEVC$RT.type((List<List<int>> _) {
}
-), "CastLiteral", """line 338, column 29 of dart:convert/json.dart: """, __x16 is List<List<int>>, false))([]);
+), "CastLiteral", """line 338, column 29 of dart:convert/json.dart: """, __x15 is List<List<int>>, false))([]);
void addChunk(Uint8List chunk, int start, int end) {
if (start > 0 || end < chunk.length) {
int length = end - start;
@@ -113,7 +113,7 @@ int length = end - start;
}
bytes.add(chunk);
}
- _JsonUtf8Stringifier.stringify(object, _indent, DEVC$RT.cast(_toEncodable, Function, __t14, "CastGeneral", """line 352, column 36 of dart:convert/json.dart: """, _toEncodable is __t14, false), _bufferSize, addChunk);
+ _JsonUtf8Stringifier.stringify(object, _indent, DEVC$RT.cast(_toEncodable, Function, __t13, "CastGeneral", """line 352, column 36 of dart:convert/json.dart: """, _toEncodable is __t13, false), _bufferSize, addChunk);
if (bytes.length == 1) return bytes[0];
int length = 0;
for (int i = 0; i < bytes.length; i++) {
@@ -139,11 +139,11 @@ byteSink = new ByteConversionSink.from(sink);
return new _JsonUtf8EncoderSink(byteSink, _toEncodable, _indent, _bufferSize);
}
Stream<List<int>> bind(Stream<Object> stream) {
-return ((__x17) => DEVC$RT.cast(__x17, DEVC$RT.type((DDC$async$.Stream<dynamic> _) {
+return ((__x16) => DEVC$RT.cast(__x16, DEVC$RT.type((DDC$async$.Stream<dynamic> _) {
}
), DEVC$RT.type((DDC$async$.Stream<List<int>> _) {
}
-), "CastDynamic", """line 391, column 12 of dart:convert/json.dart: """, __x17 is DDC$async$.Stream<List<int>>, false))(super.bind(stream));
+), "CastDynamic", """line 391, column 12 of dart:convert/json.dart: """, __x16 is DDC$async$.Stream<List<int>>, false))(super.bind(stream));
}
Converter<Object, dynamic> fuse(Converter<List<int>, dynamic> other) {
return super.fuse(other);
@@ -160,7 +160,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, __t10, "CastGeneral", """line 425, column 51 of dart:convert/json.dart: """, _toEncodable is __t10, false), _indent);
+ _JsonStringStringifier.printOn(o, stringSink, DEVC$RT.cast(_toEncodable, Function, __t9, "CastGeneral", """line 425, column 51 of dart:convert/json.dart: """, _toEncodable is __t9, false), _indent);
stringSink.close();
}
void close() {
@@ -180,7 +180,7 @@ if (_isDone) {
throw new StateError("Only one call to add allowed");
}
_isDone = true;
- _JsonUtf8Stringifier.stringify(object, _indent, DEVC$RT.cast(_toEncodable, Function, __t14, "CastGeneral", """line 455, column 53 of dart:convert/json.dart: """, _toEncodable is __t14, false), _bufferSize, _addChunk);
+ _JsonUtf8Stringifier.stringify(object, _indent, DEVC$RT.cast(_toEncodable, Function, __t13, "CastGeneral", """line 455, column 53 of dart:convert/json.dart: """, _toEncodable is __t13, false), _bufferSize, _addChunk);
_sink.close();
}
void close() {
@@ -194,11 +194,11 @@ _isDone = true;
const JsonDecoder([reviver(var key, var value)]) : this._reviver = reviver;
dynamic convert(String input) => _parseJson(input, _reviver);
external StringConversionSink startChunkedConversion(Sink<Object> sink);
- Stream<Object> bind(Stream<String> stream) => ((__x18) => DEVC$RT.cast(__x18, DEVC$RT.type((DDC$async$.Stream<dynamic> _) {
+ Stream<Object> bind(Stream<String> stream) => ((__x17) => DEVC$RT.cast(__x17, DEVC$RT.type((DDC$async$.Stream<dynamic> _) {
}
), DEVC$RT.type((DDC$async$.Stream<Object> _) {
}
-), "CastDynamic", """line 507, column 49 of dart:convert/json.dart: """, __x18 is DDC$async$.Stream<Object>, false))(super.bind(stream));
+), "CastDynamic", """line 507, column 49 of dart:convert/json.dart: """, __x17 is DDC$async$.Stream<Object>, false))(super.bind(stream));
}
external _parseJson(String source, reviver(key, value)) ;
Object _defaultToEncodable(object) => object.toJson();
@@ -218,7 +218,7 @@ _isDone = true;
static const int CHAR_u = 0x75;
final List _seen = new List();
final Function _toEncodable;
- _JsonStringifier(Object _toEncodable(Object o)) : _toEncodable = ((__x19) => DEVC$RT.cast(__x19, dynamic, Function, "CastGeneral", """line 547, column 24 of dart:convert/json.dart: """, __x19 is Function, true))((_toEncodable != null) ? _toEncodable : _defaultToEncodable);
+ _JsonStringifier(Object _toEncodable(Object o)) : _toEncodable = ((__x18) => DEVC$RT.cast(__x18, dynamic, Function, "CastGeneral", """line 547, column 24 of dart:convert/json.dart: """, __x18 is Function, true))((_toEncodable != null) ? _toEncodable : _defaultToEncodable);
void writeString(String characters);
void writeStringSlice(String characters, int start, int end);
void writeCharCode(int charCode);
@@ -389,11 +389,11 @@ writeString('{}');
writeString('{\n');
_indentLevel++;
bool first = true;
- map.forEach(((__x28) => DEVC$RT.wrap((dynamic f(String __u20, Object __u21)) {
+ map.forEach(((__x27) => DEVC$RT.wrap((dynamic f(String __u19, Object __u20)) {
dynamic c(String x0, Object x1) => f(DEVC$RT.cast(x0, dynamic, String, "CastParam", """line 773, column 19 of dart:convert/json.dart: """, x0 is String, true), x1);
return f == null ? null : c;
}
-, __x28, __t25, __t22, "WrapLiteral", """line 773, column 19 of dart:convert/json.dart: """, __x28 is __t22))((String key, Object value) {
+, __x27, __t24, __t21, "WrapLiteral", """line 773, column 19 of dart:convert/json.dart: """, __x27 is __t21))((String key, Object value) {
if (!first) {
writeString(",\n");
}
@@ -413,7 +413,7 @@ writeString(",\n");
}
}
class _JsonStringStringifier extends _JsonStringifier {final StringSink _sink;
- _JsonStringStringifier(this._sink, _toEncodable) : super(DEVC$RT.cast(_toEncodable, dynamic, __t8, "CastGeneral", """line 798, column 60 of dart:convert/json.dart: """, _toEncodable is __t8, false));
+ _JsonStringStringifier(this._sink, _toEncodable) : super(DEVC$RT.cast(_toEncodable, dynamic, __t7, "CastGeneral", """line 798, column 60 of dart:convert/json.dart: """, _toEncodable is __t7, false));
static String stringify(object, toEncodable(object), String indent) {
StringBuffer output = new StringBuffer();
printOn(object, output, toEncodable, indent);
@@ -452,7 +452,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, __t8, "CastGeneral", """line 874, column 15 of dart:convert/json.dart: """, toEncodable is __t8, false)), this.bufferSize = bufferSize, buffer = new Uint8List(bufferSize);
+ _JsonUtf8Stringifier(toEncodable, int bufferSize, this.addChunk) : super(DEVC$RT.cast(toEncodable, dynamic, __t7, "CastGeneral", """line 874, column 15 of dart:convert/json.dart: """, toEncodable is __t7, false)), this.bufferSize = bufferSize, buffer = new Uint8List(bufferSize);
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) {
@@ -563,8 +563,8 @@ writeByte(indent[i]);
}
}
}
- typedef Object __t8(Object __u9);
- typedef dynamic __t10(dynamic __u11);
- typedef dynamic __t14(Object __u15);
- typedef void __t22(dynamic __u23, dynamic __u24);
- typedef dynamic __t25(String __u26, Object __u27);
+ typedef Object __t7(Object __u8);
+ typedef dynamic __t9(dynamic __u10);
+ typedef dynamic __t13(Object __u14);
+ typedef void __t21(dynamic __u22, dynamic __u23);
+ typedef dynamic __t24(String __u25, Object __u26);
« no previous file with comments | « test/dart_codegen/expect/convert/html_escape.dart ('k') | test/dart_codegen/expect/convert/latin1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698