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

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

Issue 1135883004: Make typedefs lazy again (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 v = dart.notNull(v) | dart.notNull(v) >> 16; 368 v = dart.notNull(v) | dart.notNull(v) >> 16;
369 v = dart.notNull(v) + 1; 369 v = dart.notNull(v) + 1;
370 return v; 370 return v;
371 } 371 }
372 close() { 372 close() {
373 this[_callback](this[_buffer][core.$sublist](0, this[_bufferIndex])); 373 this[_callback](this[_buffer][core.$sublist](0, this[_bufferIndex]));
374 } 374 }
375 } 375 }
376 _ByteCallbackSink._INITIAL_BUFFER_SIZE = 1024; 376 _ByteCallbackSink._INITIAL_BUFFER_SIZE = 1024;
377 let _ChunkedConversionCallback$ = dart.generic(function(T) { 377 let _ChunkedConversionCallback$ = dart.generic(function(T) {
378 let _ChunkedConversionCallback = dart.typedef('_ChunkedConversionCallback', dart.functionType(dart.void, [T])); 378 let _ChunkedConversionCallback = dart.typedef('_ChunkedConversionCallback', () => dart.functionType(dart.void, [T]));
379 return _ChunkedConversionCallback; 379 return _ChunkedConversionCallback;
380 }); 380 });
381 let _ChunkedConversionCallback = _ChunkedConversionCallback$(); 381 let _ChunkedConversionCallback = _ChunkedConversionCallback$();
382 let _accumulated = Symbol('_accumulated'); 382 let _accumulated = Symbol('_accumulated');
383 let _SimpleCallbackSink$ = dart.generic(function(T) { 383 let _SimpleCallbackSink$ = dart.generic(function(T) {
384 class _SimpleCallbackSink extends ChunkedConversionSink$(T) { 384 class _SimpleCallbackSink extends ChunkedConversionSink$(T) {
385 _SimpleCallbackSink(callback) { 385 _SimpleCallbackSink(callback) {
386 this[_accumulated] = dart.setType([], core.List$(T)); 386 this[_accumulated] = dart.setType([], core.List$(T));
387 this[_callback] = callback; 387 this[_callback] = callback;
388 super.ChunkedConversionSink(); 388 super.ChunkedConversionSink();
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 return new JsonEncoder(dart.as(this[_toEncodable$], dart.functionType(core .Object, [core.Object]))); 676 return new JsonEncoder(dart.as(this[_toEncodable$], dart.functionType(core .Object, [core.Object])));
677 } 677 }
678 get decoder() { 678 get decoder() {
679 if (this[_reviver] == null) 679 if (this[_reviver] == null)
680 return dart.const(new JsonDecoder()); 680 return dart.const(new JsonDecoder());
681 return new JsonDecoder(this[_reviver]); 681 return new JsonDecoder(this[_reviver]);
682 } 682 }
683 } 683 }
684 dart.defineNamedConstructor(JsonCodec, 'withReviver'); 684 dart.defineNamedConstructor(JsonCodec, 'withReviver');
685 let JSON = dart.const(new JsonCodec()); 685 let JSON = dart.const(new JsonCodec());
686 let _Reviver = dart.typedef('_Reviver', dart.functionType(dart.dynamic, [dart. dynamic, dart.dynamic])); 686 let _Reviver = dart.typedef('_Reviver', () => dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic]));
687 let _ToEncodable = dart.typedef('_ToEncodable', dart.functionType(dart.dynamic , [dart.dynamic])); 687 let _ToEncodable = dart.typedef('_ToEncodable', () => dart.functionType(dart.d ynamic, [dart.dynamic]));
688 class JsonEncoder extends Converter$(core.Object, core.String) { 688 class JsonEncoder extends Converter$(core.Object, core.String) {
689 JsonEncoder(toEncodable) { 689 JsonEncoder(toEncodable) {
690 if (toEncodable === void 0) 690 if (toEncodable === void 0)
691 toEncodable = null; 691 toEncodable = null;
692 this.indent = null; 692 this.indent = null;
693 this[_toEncodable$] = toEncodable; 693 this[_toEncodable$] = toEncodable;
694 super.Converter(); 694 super.Converter();
695 } 695 }
696 withIndent(indent, toEncodable) { 696 withIndent(indent, toEncodable) {
697 if (toEncodable === void 0) 697 if (toEncodable === void 0)
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 this.buffer[core.$setRange](this.index, end, indent); 1267 this.buffer[core.$setRange](this.index, end, indent);
1268 this.index = end; 1268 this.index = end;
1269 } else { 1269 } else {
1270 for (let i = 0; dart.notNull(i) < dart.notNull(indentLength); i = dart .notNull(i) + 1) { 1270 for (let i = 0; dart.notNull(i) < dart.notNull(indentLength); i = dart .notNull(i) + 1) {
1271 this.writeByte(indent[core.$get](i)); 1271 this.writeByte(indent[core.$get](i));
1272 } 1272 }
1273 } 1273 }
1274 } 1274 }
1275 } 1275 }
1276 } 1276 }
1277 let __CastType0 = dart.typedef('__CastType0', dart.functionType(core.Object, [ core.Object])); 1277 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.Obj ect, [core.Object]));
1278 let __CastType2 = dart.typedef('__CastType2', dart.functionType(dart.dynamic, [dart.dynamic])); 1278 let __CastType2 = dart.typedef('__CastType2', () => dart.functionType(dart.dyn amic, [dart.dynamic]));
1279 let __CastType4 = dart.typedef('__CastType4', dart.functionType(dart.dynamic, [core.Object])); 1279 let __CastType4 = dart.typedef('__CastType4', () => dart.functionType(dart.dyn amic, [core.Object]));
1280 class Latin1Codec extends Encoding { 1280 class Latin1Codec extends Encoding {
1281 Latin1Codec(opts) { 1281 Latin1Codec(opts) {
1282 let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : fa lse; 1282 let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : fa lse;
1283 this[_allowInvalid] = allowInvalid; 1283 this[_allowInvalid] = allowInvalid;
1284 super.Encoding(); 1284 super.Encoding();
1285 } 1285 }
1286 get name() { 1286 get name() {
1287 return "iso-8859-1"; 1287 return "iso-8859-1";
1288 } 1288 }
1289 decode(bytes, opts) { 1289 decode(bytes, opts) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 } 1471 }
1472 dart.defineNamedConstructor(StringConversionSink, 'withCallback'); 1472 dart.defineNamedConstructor(StringConversionSink, 'withCallback');
1473 dart.defineNamedConstructor(StringConversionSink, 'from'); 1473 dart.defineNamedConstructor(StringConversionSink, 'from');
1474 dart.defineNamedConstructor(StringConversionSink, 'fromStringSink'); 1474 dart.defineNamedConstructor(StringConversionSink, 'fromStringSink');
1475 class ClosableStringSink extends core.StringSink { 1475 class ClosableStringSink extends core.StringSink {
1476 fromStringSink(sink, onClose) { 1476 fromStringSink(sink, onClose) {
1477 return new _ClosableStringSink(sink, onClose); 1477 return new _ClosableStringSink(sink, onClose);
1478 } 1478 }
1479 } 1479 }
1480 dart.defineNamedConstructor(ClosableStringSink, 'fromStringSink'); 1480 dart.defineNamedConstructor(ClosableStringSink, 'fromStringSink');
1481 let _StringSinkCloseCallback = dart.typedef('_StringSinkCloseCallback', dart.f unctionType(dart.void, [])); 1481 let _StringSinkCloseCallback = dart.typedef('_StringSinkCloseCallback', () => dart.functionType(dart.void, []));
1482 class _ClosableStringSink extends core.Object { 1482 class _ClosableStringSink extends core.Object {
1483 _ClosableStringSink(sink, callback) { 1483 _ClosableStringSink(sink, callback) {
1484 this[_sink] = sink; 1484 this[_sink] = sink;
1485 this[_callback] = callback; 1485 this[_callback] = callback;
1486 } 1486 }
1487 close() { 1487 close() {
1488 return this[_callback](); 1488 return this[_callback]();
1489 } 1489 }
1490 writeCharCode(charCode) { 1490 writeCharCode(charCode) {
1491 return this[_sink].writeCharCode(charCode); 1491 return this[_sink].writeCharCode(charCode);
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 exports.LineSplitter = LineSplitter; 2428 exports.LineSplitter = LineSplitter;
2429 exports.StringConversionSink = StringConversionSink; 2429 exports.StringConversionSink = StringConversionSink;
2430 exports.ClosableStringSink = ClosableStringSink; 2430 exports.ClosableStringSink = ClosableStringSink;
2431 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E; 2431 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E;
2432 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; 2432 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE;
2433 exports.Utf8Codec = Utf8Codec; 2433 exports.Utf8Codec = Utf8Codec;
2434 exports.UTF8 = UTF8; 2434 exports.UTF8 = UTF8;
2435 exports.Utf8Encoder = Utf8Encoder; 2435 exports.Utf8Encoder = Utf8Encoder;
2436 exports.Utf8Decoder = Utf8Decoder; 2436 exports.Utf8Decoder = Utf8Decoder;
2437 })(convert, core, async, typed_data, _internal, collection); 2437 })(convert, core, async, typed_data, _internal, collection);
OLDNEW
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698