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

Side by Side Diff: test/dart_codegen/expect/convert/json.dart

Issue 1070453002: Refactor reifier to make it less dart_codegen specific. (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Address comments, rebase Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 part of dart.convert; 1 part of dart.convert;
2 class JsonUnsupportedObjectError extends Error {final unsupportedObject; 2 class JsonUnsupportedObjectError extends Error {final unsupportedObject;
3 final cause; 3 final cause;
4 JsonUnsupportedObjectError(this.unsupportedObject, { 4 JsonUnsupportedObjectError(this.unsupportedObject, {
5 this.cause} 5 this.cause}
6 ); 6 );
7 String toString() { 7 String toString() {
8 if (cause != null) { 8 if (cause != null) {
9 return "Converting object to an encodable object failed."; 9 return "Converting object to an encodable object failed.";
10 } 10 }
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 String encode(Object value, { 35 String encode(Object value, {
36 toEncodable(var object)} 36 toEncodable(var object)}
37 ) { 37 ) {
38 if (toEncodable == null) toEncodable = _toEncodable; 38 if (toEncodable == null) toEncodable = _toEncodable;
39 if (toEncodable == null) return encoder.convert(value); 39 if (toEncodable == null) return encoder.convert(value);
40 return new JsonEncoder(DEVC$RT.cast(toEncodable, __t8, __t6, "CompositeCast", " ""line 142, column 28 of dart:convert/json.dart: """, toEncodable is __t6, false )).convert(value); 40 return new JsonEncoder(DEVC$RT.cast(toEncodable, __t8, __t6, "CompositeCast", " ""line 142, column 28 of dart:convert/json.dart: """, toEncodable is __t6, false )).convert(value);
41 } 41 }
42 JsonEncoder get encoder { 42 JsonEncoder get encoder {
43 if (_toEncodable == null) return const JsonEncoder(); 43 if (_toEncodable == null) return const JsonEncoder();
44 return new JsonEncoder(DEVC$RT.cast(_toEncodable, __t8, __t6, "CompositeCast", """line 147, column 28 of dart:convert/json.dart: """, _toEncodable is __t6, fal se)); 44 return new JsonEncoder(DEVC$RT.cast(_toEncodable, _ToEncodable, __t6, "Composit eCast", """line 147, column 28 of dart:convert/json.dart: """, _toEncodable is _ _t6, false));
45 } 45 }
46 JsonDecoder get decoder { 46 JsonDecoder get decoder {
47 if (_reviver == null) return const JsonDecoder(); 47 if (_reviver == null) return const JsonDecoder();
48 return new JsonDecoder(_reviver); 48 return new JsonDecoder(_reviver);
49 } 49 }
50 } 50 }
51 class JsonEncoder extends Converter<Object, String> {final String indent; 51 class JsonEncoder extends Converter<Object, String> {final String indent;
52 final Function _toEncodable; 52 final Function _toEncodable;
53 const JsonEncoder([Object toEncodable(Object nonSerializable)]) : this.indent = null, this._toEncodable = toEncodable; 53 const JsonEncoder([Object toEncodable(Object nonSerializable)]) : this.indent = null, this._toEncodable = toEncodable;
54 const JsonEncoder.withIndent(this.indent, [Object toEncodable(Object nonSeriali zable)]) : this._toEncodable = toEncodable; 54 const JsonEncoder.withIndent(this.indent, [Object toEncodable(Object nonSeriali zable)]) : this._toEncodable = toEncodable;
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 for (int i = 0; i < indentLength; i++) { 539 for (int i = 0; i < indentLength; i++) {
540 writeByte(indent[i]); 540 writeByte(indent[i]);
541 } 541 }
542 } 542 }
543 } 543 }
544 } 544 }
545 } 545 }
546 typedef Object __t6(Object __u7); 546 typedef Object __t6(Object __u7);
547 typedef dynamic __t8(dynamic __u9); 547 typedef dynamic __t8(dynamic __u9);
548 typedef dynamic __t11(Object __u12); 548 typedef dynamic __t11(Object __u12);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/collection/splay_tree.dart ('k') | test/dart_codegen/expect/core/iterable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698