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

Side by Side Diff: lib/runtime/dart/convert.js

Issue 1147143007: fixes #206, add checking for unary ops (Closed) Base URL: git@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
1 var convert = dart.defineLibrary(convert, {}); 1 var convert = dart.defineLibrary(convert, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var async = dart.import(async); 3 var async = dart.import(async);
4 var typed_data = dart.import(typed_data); 4 var typed_data = dart.import(typed_data);
5 var _internal = dart.import(_internal); 5 var _internal = dart.import(_internal);
6 var collection = dart.import(collection); 6 var collection = dart.import(collection);
7 (function(exports, core, async, typed_data, _internal, collection) { 7 (function(exports, core, async, typed_data, _internal, collection) {
8 'use strict'; 8 'use strict';
9 let Codec$ = dart.generic(function(S, T) { 9 let Codec$ = dart.generic(function(S, T) {
10 class Codec extends core.Object { 10 class Codec extends core.Object {
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 throw new JsonUnsupportedObjectError(object); 1197 throw new JsonUnsupportedObjectError(object);
1198 } 1198 }
1199 this[_removeSeen](object); 1199 this[_removeSeen](object);
1200 } catch (e) { 1200 } catch (e) {
1201 throw new JsonUnsupportedObjectError(object, {cause: e}); 1201 throw new JsonUnsupportedObjectError(object, {cause: e});
1202 } 1202 }
1203 1203
1204 } 1204 }
1205 writeJsonValue(object) { 1205 writeJsonValue(object) {
1206 if (dart.is(object, core.num)) { 1206 if (dart.is(object, core.num)) {
1207 if (dart.dsend(dart.dload(object, 'isFinite'), '!')) 1207 if (!dart.notNull(dart.as(dart.dload(object, 'isFinite'), core.bool)))
Jennifer Messerly 2015/06/04 00:16:23 we'll probably want to do something about the nonN
1208 return false; 1208 return false;
1209 this.writeNumber(dart.as(object, core.num)); 1209 this.writeNumber(dart.as(object, core.num));
1210 return true; 1210 return true;
1211 } else if (core.identical(object, true)) { 1211 } else if (core.identical(object, true)) {
1212 this.writeString('true'); 1212 this.writeString('true');
1213 return true; 1213 return true;
1214 } else if (core.identical(object, false)) { 1214 } else if (core.identical(object, false)) {
1215 this.writeString('false'); 1215 this.writeString('false');
1216 return true; 1216 return true;
1217 } else if (object == null) { 1217 } else if (object == null) {
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 exports.LineSplitter = LineSplitter; 2890 exports.LineSplitter = LineSplitter;
2891 exports.StringConversionSink = StringConversionSink; 2891 exports.StringConversionSink = StringConversionSink;
2892 exports.ClosableStringSink = ClosableStringSink; 2892 exports.ClosableStringSink = ClosableStringSink;
2893 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E; 2893 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E;
2894 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; 2894 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE;
2895 exports.Utf8Codec = Utf8Codec; 2895 exports.Utf8Codec = Utf8Codec;
2896 exports.UTF8 = UTF8; 2896 exports.UTF8 = UTF8;
2897 exports.Utf8Encoder = Utf8Encoder; 2897 exports.Utf8Encoder = Utf8Encoder;
2898 exports.Utf8Decoder = Utf8Decoder; 2898 exports.Utf8Decoder = Utf8Decoder;
2899 })(convert, core, async, typed_data, _internal, collection); 2899 })(convert, core, async, typed_data, _internal, collection);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698