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

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

Issue 1148283010: Remove dart backend (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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
(Empty)
1 part of dart.convert;
2 abstract class Codec<S, T> {const Codec();
3 T encode(S input) => encoder.convert(input);
4 S decode(T encoded) => decoder.convert(encoded);
5 Converter<S, T> get encoder;
6 Converter<T, S> get decoder;
7 Codec<S, dynamic> fuse(Codec<T, dynamic> other) {
8 return new _FusedCodec<S, T, dynamic>(this, other);
9 }
10 Codec<T, S> get inverted => new _InvertedCodec<T, S>(this);
11 }
12 class _FusedCodec<S, M, T> extends Codec<S, T> {final Codec<S, M> _first;
13 final Codec<M, T> _second;
14 Converter<S, T> get encoder => ((__x0) => DEVC$RT.cast(__x0, DEVC$RT.type((Conv erter<S, dynamic> _) {
15 }
16 ), DEVC$RT.type((Converter<S, T> _) {
17 }
18 ), "CompositeCast", """line 87, column 34 of dart:convert/codec.dart: """, __x0 is Converter<S, T>, false))(_first.encoder.fuse(_second.encoder));
19 Converter<T, S> get decoder => ((__x1) => DEVC$RT.cast(__x1, DEVC$RT.type((Conv erter<T, dynamic> _) {
20 }
21 ), DEVC$RT.type((Converter<T, S> _) {
22 }
23 ), "CompositeCast", """line 88, column 34 of dart:convert/codec.dart: """, __x1 is Converter<T, S>, false))(_second.decoder.fuse(_first.decoder));
24 _FusedCodec(this._first, this._second);
25 }
26 class _InvertedCodec<T, S> extends Codec<T, S> {final Codec<S, T> _codec;
27 _InvertedCodec(Codec<S, T> codec) : _codec = codec;
28 Converter<T, S> get encoder => _codec.decoder;
29 Converter<S, T> get decoder => _codec.encoder;
30 Codec<S, T> get inverted => _codec;
31 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/convert/chunked_conversion.dart ('k') | test/dart_codegen/expect/convert/convert » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698