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

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

Issue 1038213003: Downward inference (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: 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
« no previous file with comments | « lib/runtime/dart/_js_helper.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 async; 1 var async;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic 4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic
5 function _invokeErrorHandler(errorHandler, error, stackTrace) { 5 function _invokeErrorHandler(errorHandler, error, stackTrace) {
6 if (dart.is(errorHandler, ZoneBinaryCallback)) { 6 if (dart.is(errorHandler, ZoneBinaryCallback)) {
7 return dart.dinvokef(errorHandler, error, stackTrace); 7 return dart.dinvokef(errorHandler, error, stackTrace);
8 } else { 8 } else {
9 return dart.dinvokef(errorHandler, error); 9 return dart.dinvokef(errorHandler, error);
10 } 10 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 let _onListen = Symbol('_onListen'); 53 let _onListen = Symbol('_onListen');
54 let _addError = Symbol('_addError'); 54 let _addError = Symbol('_addError');
55 let _completeError = Symbol('_completeError'); 55 let _completeError = Symbol('_completeError');
56 let _complete = Symbol('_complete'); 56 let _complete = Symbol('_complete');
57 let _sink = Symbol('_sink'); 57 let _sink = Symbol('_sink');
58 let Stream$ = dart.generic(function(T) { 58 let Stream$ = dart.generic(function(T) {
59 class Stream extends core.Object { 59 class Stream extends core.Object {
60 Stream() { 60 Stream() {
61 } 61 }
62 fromFuture(future) { 62 fromFuture(future) {
63 let controller = dart.as(new StreamController({sync: true}), _StreamCont roller$(T)); 63 let controller = new StreamController({sync: true});
64 future.then(dart.closureWrap(((value) => { 64 future.then(dart.closureWrap(((value) => {
65 controller._add(dart.as(value, T)); 65 controller._add(dart.as(value, T));
66 controller._closeUnchecked(); 66 controller._closeUnchecked();
67 }).bind(this), "(T) → dynamic"), {onError: ((error, stackTrace) => { 67 }).bind(this), "(T) → dynamic"), {onError: ((error, stackTrace) => {
68 controller._addError(error, dart.as(stackTrace, core.StackTrace)); 68 controller._addError(error, dart.as(stackTrace, core.StackTrace));
69 controller._closeUnchecked(); 69 controller._closeUnchecked();
70 }).bind(this)}); 70 }).bind(this)});
71 return controller.stream; 71 return controller.stream;
72 } 72 }
73 fromIterable(data) { 73 fromIterable(data) {
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 return doneSignal; 1720 return doneSignal;
1721 } 1721 }
1722 } 1722 }
1723 dart.defineNamedConstructor(Future, 'microtask'); 1723 dart.defineNamedConstructor(Future, 'microtask');
1724 dart.defineNamedConstructor(Future, 'sync'); 1724 dart.defineNamedConstructor(Future, 'sync');
1725 dart.defineNamedConstructor(Future, 'value'); 1725 dart.defineNamedConstructor(Future, 'value');
1726 dart.defineNamedConstructor(Future, 'error'); 1726 dart.defineNamedConstructor(Future, 'error');
1727 dart.defineNamedConstructor(Future, 'delayed'); 1727 dart.defineNamedConstructor(Future, 'delayed');
1728 dart.defineLazyProperties(Future, { 1728 dart.defineLazyProperties(Future, {
1729 get _nullFuture() { 1729 get _nullFuture() {
1730 return dart.as(new Future.value(null), _Future); 1730 return new Future.value(null);
1731 } 1731 }
1732 }); 1732 });
1733 return Future; 1733 return Future;
1734 }); 1734 });
1735 let Future = Future$(dart.dynamic); 1735 let Future = Future$(dart.dynamic);
1736 class TimeoutException extends core.Object { 1736 class TimeoutException extends core.Object {
1737 TimeoutException(message, duration) { 1737 TimeoutException(message, duration) {
1738 if (duration === void 0) 1738 if (duration === void 0)
1739 duration = null; 1739 duration = null;
1740 this.message = message; 1740 this.message = message;
(...skipping 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after
4097 _BoundSinkStream(stream$, sinkMapper) { 4097 _BoundSinkStream(stream$, sinkMapper) {
4098 this[_stream] = stream$; 4098 this[_stream] = stream$;
4099 this[_sinkMapper] = sinkMapper; 4099 this[_sinkMapper] = sinkMapper;
4100 super.Stream(); 4100 super.Stream();
4101 } 4101 }
4102 listen(onData, opts) { 4102 listen(onData, opts) {
4103 let onError = opts && 'onError' in opts ? opts.onError : null; 4103 let onError = opts && 'onError' in opts ? opts.onError : null;
4104 let onDone = opts && 'onDone' in opts ? opts.onDone : null; 4104 let onDone = opts && 'onDone' in opts ? opts.onDone : null;
4105 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; 4105 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
4106 cancelOnError = core.identical(true, cancelOnError); 4106 cancelOnError = core.identical(true, cancelOnError);
4107 let subscription = dart.as(new _SinkTransformerStreamSubscription(this[_ stream], dart.closureWrap(this[_sinkMapper], "(EventSink<dynamic>) → EventSink") , onData, onError, onDone, cancelOnError), StreamSubscription$(T)); 4107 let subscription = new _SinkTransformerStreamSubscription(this[_stream], dart.closureWrap(this[_sinkMapper], "(EventSink<dynamic>) → EventSink"), onData , onError, onDone, cancelOnError);
4108 return subscription; 4108 return subscription;
4109 } 4109 }
4110 } 4110 }
4111 return _BoundSinkStream; 4111 return _BoundSinkStream;
4112 }); 4112 });
4113 let _BoundSinkStream = _BoundSinkStream$(dart.dynamic, dart.dynamic); 4113 let _BoundSinkStream = _BoundSinkStream$(dart.dynamic, dart.dynamic);
4114 let _HandlerEventSink$ = dart.generic(function(S, T) { 4114 let _HandlerEventSink$ = dart.generic(function(S, T) {
4115 class _HandlerEventSink extends core.Object { 4115 class _HandlerEventSink extends core.Object {
4116 _HandlerEventSink(handleData$, handleError$, handleDone$, sink$) { 4116 _HandlerEventSink(handleData$, handleError$, handleDone$, sink$) {
4117 this[_handleData] = handleData$; 4117 this[_handleData] = handleData$;
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
5012 exports.StreamIterator = StreamIterator; 5012 exports.StreamIterator = StreamIterator;
5013 exports.StreamIterator$ = StreamIterator$; 5013 exports.StreamIterator$ = StreamIterator$;
5014 exports.StreamController = StreamController; 5014 exports.StreamController = StreamController;
5015 exports.StreamController$ = StreamController$; 5015 exports.StreamController$ = StreamController$;
5016 exports.Timer = Timer; 5016 exports.Timer = Timer;
5017 exports.ZoneSpecification = ZoneSpecification; 5017 exports.ZoneSpecification = ZoneSpecification;
5018 exports.ZoneDelegate = ZoneDelegate; 5018 exports.ZoneDelegate = ZoneDelegate;
5019 exports.Zone = Zone; 5019 exports.Zone = Zone;
5020 exports.runZoned = runZoned; 5020 exports.runZoned = runZoned;
5021 })(async || (async = {})); 5021 })(async || (async = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698