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

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

Issue 1133593004: fixes #131, use before define from variables to classes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix static fields 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
OLDNEW
1 var async = dart.defineLibrary(async, {}); 1 var async = dart.defineLibrary(async, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var _internal = dart.import(_internal); 3 var _internal = dart.import(_internal);
4 var _js_helper = dart.lazyImport(_js_helper); 4 var _js_helper = dart.lazyImport(_js_helper);
5 var _isolate_helper = dart.lazyImport(_isolate_helper); 5 var _isolate_helper = dart.lazyImport(_isolate_helper);
6 var collection = dart.import(collection); 6 var collection = dart.import(collection);
7 (function(exports, core, _internal, _js_helper, _isolate_helper, collection) { 7 (function(exports, core, _internal, _js_helper, _isolate_helper, collection) {
8 'use strict'; 8 'use strict';
9 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic 9 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic
10 function _invokeErrorHandler(errorHandler, error, stackTrace) { 10 function _invokeErrorHandler(errorHandler, error, stackTrace) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return null; 45 return null;
46 } 46 }
47 toString() { 47 toString() {
48 let result = `Uncaught Error: ${this.error}`; 48 let result = `Uncaught Error: ${this.error}`;
49 if (this.stackTrace != null) { 49 if (this.stackTrace != null) {
50 result = dart.notNull(result) + `\nStack Trace:\n${this.stackTrace}`; 50 result = dart.notNull(result) + `\nStack Trace:\n${this.stackTrace}`;
51 } 51 }
52 return result; 52 return result;
53 } 53 }
54 } 54 }
55 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart.dyn amic, [dart.dynamic])); 55 let __CastType0 = dart.typedef('__CastType0', dart.functionType(dart.dynamic, [dart.dynamic]));
56 let _controller = Symbol('_controller');
57 let _createSubscription = Symbol('_createSubscription');
58 let _subscribe = Symbol('_subscribe');
59 let _onListen = Symbol('_onListen');
60 let _add = Symbol('_add'); 56 let _add = Symbol('_add');
61 let _closeUnchecked = Symbol('_closeUnchecked'); 57 let _closeUnchecked = Symbol('_closeUnchecked');
62 let _addError = Symbol('_addError'); 58 let _addError = Symbol('_addError');
63 let _completeError = Symbol('_completeError'); 59 let _completeError = Symbol('_completeError');
64 let _complete = Symbol('_complete'); 60 let _complete = Symbol('_complete');
65 let _sink = Symbol('_sink'); 61 let _sink = Symbol('_sink');
66 let Stream$ = dart.generic(function(T) { 62 let Stream$ = dart.generic(function(T) {
67 class Stream extends core.Object { 63 class Stream extends core.Object {
68 Stream() { 64 Stream() {
69 } 65 }
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 return controller.stream; 810 return controller.stream;
815 } 811 }
816 } 812 }
817 dart.defineNamedConstructor(Stream, 'fromFuture'); 813 dart.defineNamedConstructor(Stream, 'fromFuture');
818 dart.defineNamedConstructor(Stream, 'fromIterable'); 814 dart.defineNamedConstructor(Stream, 'fromIterable');
819 dart.defineNamedConstructor(Stream, 'periodic'); 815 dart.defineNamedConstructor(Stream, 'periodic');
820 dart.defineNamedConstructor(Stream, 'eventTransformed'); 816 dart.defineNamedConstructor(Stream, 'eventTransformed');
821 return Stream; 817 return Stream;
822 }); 818 });
823 let Stream = Stream$(); 819 let Stream = Stream$();
820 let _createSubscription = Symbol('_createSubscription');
821 let _onListen = Symbol('_onListen');
824 let _StreamImpl$ = dart.generic(function(T) { 822 let _StreamImpl$ = dart.generic(function(T) {
825 class _StreamImpl extends Stream$(T) { 823 class _StreamImpl extends Stream$(T) {
826 _StreamImpl() { 824 _StreamImpl() {
827 super.Stream(); 825 super.Stream();
828 } 826 }
829 listen(onData, opts) { 827 listen(onData, opts) {
830 dart.as(onData, dart.functionType(dart.void, [T])); 828 dart.as(onData, dart.functionType(dart.void, [T]));
831 let onError = opts && 'onError' in opts ? opts.onError : null; 829 let onError = opts && 'onError' in opts ? opts.onError : null;
832 let onDone = opts && 'onDone' in opts ? opts.onDone : null; 830 let onDone = opts && 'onDone' in opts ? opts.onDone : null;
833 dart.as(onDone, dart.functionType(dart.void, [])); 831 dart.as(onDone, dart.functionType(dart.void, []));
834 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; 832 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
835 cancelOnError = core.identical(true, cancelOnError); 833 cancelOnError = core.identical(true, cancelOnError);
836 let subscription = this[_createSubscription](onData, onError, onDone, ca ncelOnError); 834 let subscription = this[_createSubscription](onData, onError, onDone, ca ncelOnError);
837 this[_onListen](subscription); 835 this[_onListen](subscription);
838 return dart.as(subscription, StreamSubscription$(T)); 836 return dart.as(subscription, StreamSubscription$(T));
839 } 837 }
840 [_createSubscription](onData, onError, onDone, cancelOnError) { 838 [_createSubscription](onData, onError, onDone, cancelOnError) {
841 dart.as(onData, dart.functionType(dart.void, [T])); 839 dart.as(onData, dart.functionType(dart.void, [T]));
842 dart.as(onDone, dart.functionType(dart.void, [])); 840 dart.as(onDone, dart.functionType(dart.void, []));
843 return new (_BufferingStreamSubscription$(T))(onData, onError, onDone, c ancelOnError); 841 return new (_BufferingStreamSubscription$(T))(onData, onError, onDone, c ancelOnError);
844 } 842 }
845 [_onListen](subscription) {} 843 [_onListen](subscription) {}
846 } 844 }
847 return _StreamImpl; 845 return _StreamImpl;
848 }); 846 });
849 let _StreamImpl = _StreamImpl$(); 847 let _StreamImpl = _StreamImpl$();
848 let _controller = Symbol('_controller');
849 let _subscribe = Symbol('_subscribe');
850 let _ControllerStream$ = dart.generic(function(T) { 850 let _ControllerStream$ = dart.generic(function(T) {
851 class _ControllerStream extends _StreamImpl$(T) { 851 class _ControllerStream extends _StreamImpl$(T) {
852 _ControllerStream(controller) { 852 _ControllerStream(controller) {
853 this[_controller] = controller; 853 this[_controller] = controller;
854 } 854 }
855 [_createSubscription](onData, onError, onDone, cancelOnError) { 855 [_createSubscription](onData, onError, onDone, cancelOnError) {
856 dart.as(onData, dart.functionType(dart.void, [T])); 856 dart.as(onData, dart.functionType(dart.void, [T]));
857 dart.as(onDone, dart.functionType(dart.void, [])); 857 dart.as(onDone, dart.functionType(dart.void, []));
858 return this[_controller][_subscribe](onData, onError, onDone, cancelOnEr ror); 858 return this[_controller][_subscribe](onData, onError, onDone, cancelOnEr ror);
859 } 859 }
(...skipping 25 matching lines...) Expand all
885 }); 885 });
886 let _BroadcastStream = _BroadcastStream$(); 886 let _BroadcastStream = _BroadcastStream$();
887 let _next = Symbol('_next'); 887 let _next = Symbol('_next');
888 let _previous = Symbol('_previous'); 888 let _previous = Symbol('_previous');
889 class _BroadcastSubscriptionLink extends core.Object { 889 class _BroadcastSubscriptionLink extends core.Object {
890 _BroadcastSubscriptionLink() { 890 _BroadcastSubscriptionLink() {
891 this[_next] = null; 891 this[_next] = null;
892 this[_previous] = null; 892 this[_previous] = null;
893 } 893 }
894 } 894 }
895 let _eventState = Symbol('_eventState');
896 let _expectsEvent = Symbol('_expectsEvent');
897 let _toggleEventId = Symbol('_toggleEventId');
898 let _isFiring = Symbol('_isFiring');
899 let _setRemoveAfterFiring = Symbol('_setRemoveAfterFiring');
900 let _removeAfterFiring = Symbol('_removeAfterFiring');
901 let _onPause = Symbol('_onPause');
902 let _onResume = Symbol('_onResume');
903 let _onCancel = Symbol('_onCancel');
904 let _recordCancel = Symbol('_recordCancel');
905 let _recordPause = Symbol('_recordPause');
906 let _recordResume = Symbol('_recordResume');
907 let _zone = Symbol('_zone'); 895 let _zone = Symbol('_zone');
908 let _state = Symbol('_state'); 896 let _state = Symbol('_state');
909 let _onData = Symbol('_onData'); 897 let _onData = Symbol('_onData');
910 let _onError = Symbol('_onError'); 898 let _onError = Symbol('_onError');
911 let _onDone = Symbol('_onDone'); 899 let _onDone = Symbol('_onDone');
912 let _cancelFuture = Symbol('_cancelFuture'); 900 let _cancelFuture = Symbol('_cancelFuture');
913 let _pending = Symbol('_pending'); 901 let _pending = Symbol('_pending');
914 let _setPendingEvents = Symbol('_setPendingEvents'); 902 let _setPendingEvents = Symbol('_setPendingEvents');
915 let _extractPending = Symbol('_extractPending'); 903 let _extractPending = Symbol('_extractPending');
916 let _isCanceled = Symbol('_isCanceled'); 904 let _isCanceled = Symbol('_isCanceled');
917 let _isPaused = Symbol('_isPaused'); 905 let _isPaused = Symbol('_isPaused');
918 let _isInputPaused = Symbol('_isInputPaused'); 906 let _isInputPaused = Symbol('_isInputPaused');
919 let _inCallback = Symbol('_inCallback'); 907 let _inCallback = Symbol('_inCallback');
920 let _guardCallback = Symbol('_guardCallback'); 908 let _guardCallback = Symbol('_guardCallback');
909 let _onPause = Symbol('_onPause');
921 let _decrementPauseCount = Symbol('_decrementPauseCount'); 910 let _decrementPauseCount = Symbol('_decrementPauseCount');
922 let _hasPending = Symbol('_hasPending'); 911 let _hasPending = Symbol('_hasPending');
923 let _mayResumeInput = Symbol('_mayResumeInput'); 912 let _mayResumeInput = Symbol('_mayResumeInput');
913 let _onResume = Symbol('_onResume');
924 let _cancel = Symbol('_cancel'); 914 let _cancel = Symbol('_cancel');
925 let _isClosed = Symbol('_isClosed'); 915 let _isClosed = Symbol('_isClosed');
926 let _waitsForCancel = Symbol('_waitsForCancel'); 916 let _waitsForCancel = Symbol('_waitsForCancel');
927 let _canFire = Symbol('_canFire'); 917 let _canFire = Symbol('_canFire');
928 let _cancelOnError = Symbol('_cancelOnError'); 918 let _cancelOnError = Symbol('_cancelOnError');
919 let _onCancel = Symbol('_onCancel');
929 let _incrementPauseCount = Symbol('_incrementPauseCount'); 920 let _incrementPauseCount = Symbol('_incrementPauseCount');
930 let _sendData = Symbol('_sendData'); 921 let _sendData = Symbol('_sendData');
931 let _addPending = Symbol('_addPending'); 922 let _addPending = Symbol('_addPending');
932 let _sendError = Symbol('_sendError'); 923 let _sendError = Symbol('_sendError');
933 let _close = Symbol('_close'); 924 let _close = Symbol('_close');
934 let _sendDone = Symbol('_sendDone'); 925 let _sendDone = Symbol('_sendDone');
935 let _checkState = Symbol('_checkState'); 926 let _checkState = Symbol('_checkState');
936 let _BufferingStreamSubscription$ = dart.generic(function(T) { 927 let _BufferingStreamSubscription$ = dart.generic(function(T) {
937 class _BufferingStreamSubscription extends core.Object { 928 class _BufferingStreamSubscription extends core.Object {
938 _BufferingStreamSubscription(onData, onError, onDone, cancelOnError) { 929 _BufferingStreamSubscription(onData, onError, onDone, cancelOnError) {
939 this[_zone] = Zone.current; 930 this[_zone] = Zone.current;
940 this[_state] = cancelOnError ? _BufferingStreamSubscription._STATE_CANCE L_ON_ERROR : 0; 931 this[_state] = cancelOnError ? _BufferingStreamSubscription$()._STATE_CA NCEL_ON_ERROR : 0;
941 this[_onData] = null; 932 this[_onData] = null;
942 this[_onError] = null; 933 this[_onError] = null;
943 this[_onDone] = null; 934 this[_onDone] = null;
944 this[_cancelFuture] = null; 935 this[_cancelFuture] = null;
945 this[_pending] = null; 936 this[_pending] = null;
946 this.onData(onData); 937 this.onData(onData);
947 this.onError(onError); 938 this.onError(onError);
948 this.onDone(onDone); 939 this.onDone(onDone);
949 } 940 }
950 [_setPendingEvents](pendingEvents) { 941 [_setPendingEvents](pendingEvents) {
951 dart.assert(this[_pending] == null); 942 dart.assert(this[_pending] == null);
952 if (pendingEvents == null) 943 if (pendingEvents == null)
953 return; 944 return;
954 this[_pending] = pendingEvents; 945 this[_pending] = pendingEvents;
955 if (!dart.notNull(pendingEvents.isEmpty)) { 946 if (!dart.notNull(pendingEvents.isEmpty)) {
956 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription._STATE_HAS_PENDING); 947 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription$()._STATE_HAS_PENDING);
957 this[_pending].schedule(this); 948 this[_pending].schedule(this);
958 } 949 }
959 } 950 }
960 [_extractPending]() { 951 [_extractPending]() {
961 dart.assert(this[_isCanceled]); 952 dart.assert(this[_isCanceled]);
962 let events = this[_pending]; 953 let events = this[_pending];
963 this[_pending] = null; 954 this[_pending] = null;
964 return events; 955 return events;
965 } 956 }
966 onData(handleData) { 957 onData(handleData) {
(...skipping 13 matching lines...) Expand all
980 handleDone = _nullDoneHandler; 971 handleDone = _nullDoneHandler;
981 this[_onDone] = this[_zone].registerCallback(handleDone); 972 this[_onDone] = this[_zone].registerCallback(handleDone);
982 } 973 }
983 pause(resumeSignal) { 974 pause(resumeSignal) {
984 if (resumeSignal === void 0) 975 if (resumeSignal === void 0)
985 resumeSignal = null; 976 resumeSignal = null;
986 if (this[_isCanceled]) 977 if (this[_isCanceled])
987 return; 978 return;
988 let wasPaused = this[_isPaused]; 979 let wasPaused = this[_isPaused];
989 let wasInputPaused = this[_isInputPaused]; 980 let wasInputPaused = this[_isInputPaused];
990 this[_state] = dart.notNull(this[_state]) + dart.notNull(_BufferingStrea mSubscription._STATE_PAUSE_COUNT) | dart.notNull(_BufferingStreamSubscription._S TATE_INPUT_PAUSED); 981 this[_state] = dart.notNull(this[_state]) + dart.notNull(_BufferingStrea mSubscription$()._STATE_PAUSE_COUNT) | dart.notNull(_BufferingStreamSubscription $()._STATE_INPUT_PAUSED);
991 if (resumeSignal != null) 982 if (resumeSignal != null)
992 resumeSignal.whenComplete(this.resume.bind(this)); 983 resumeSignal.whenComplete(this.resume.bind(this));
993 if (!dart.notNull(wasPaused) && dart.notNull(this[_pending] != null)) 984 if (!dart.notNull(wasPaused) && dart.notNull(this[_pending] != null))
994 this[_pending].cancelSchedule(); 985 this[_pending].cancelSchedule();
995 if (!dart.notNull(wasInputPaused) && !dart.notNull(this[_inCallback])) 986 if (!dart.notNull(wasInputPaused) && !dart.notNull(this[_inCallback]))
996 this[_guardCallback](this[_onPause].bind(this)); 987 this[_guardCallback](this[_onPause].bind(this));
997 } 988 }
998 resume() { 989 resume() {
999 if (this[_isCanceled]) 990 if (this[_isCanceled])
1000 return; 991 return;
1001 if (this[_isPaused]) { 992 if (this[_isPaused]) {
1002 this[_decrementPauseCount](); 993 this[_decrementPauseCount]();
1003 if (!dart.notNull(this[_isPaused])) { 994 if (!dart.notNull(this[_isPaused])) {
1004 if (dart.notNull(this[_hasPending]) && !dart.notNull(this[_pending]. isEmpty)) { 995 if (dart.notNull(this[_hasPending]) && !dart.notNull(this[_pending]. isEmpty)) {
1005 this[_pending].schedule(this); 996 this[_pending].schedule(this);
1006 } else { 997 } else {
1007 dart.assert(this[_mayResumeInput]); 998 dart.assert(this[_mayResumeInput]);
1008 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_Bufferi ngStreamSubscription._STATE_INPUT_PAUSED); 999 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_Bufferi ngStreamSubscription$()._STATE_INPUT_PAUSED);
1009 if (!dart.notNull(this[_inCallback])) 1000 if (!dart.notNull(this[_inCallback]))
1010 this[_guardCallback](this[_onResume].bind(this)); 1001 this[_guardCallback](this[_onResume].bind(this));
1011 } 1002 }
1012 } 1003 }
1013 } 1004 }
1014 } 1005 }
1015 cancel() { 1006 cancel() {
1016 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingStre amSubscription._STATE_WAIT_FOR_CANCEL); 1007 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingStre amSubscription$()._STATE_WAIT_FOR_CANCEL);
1017 if (this[_isCanceled]) 1008 if (this[_isCanceled])
1018 return this[_cancelFuture]; 1009 return this[_cancelFuture];
1019 this[_cancel](); 1010 this[_cancel]();
1020 return this[_cancelFuture]; 1011 return this[_cancelFuture];
1021 } 1012 }
1022 asFuture(futureValue) { 1013 asFuture(futureValue) {
1023 if (futureValue === void 0) 1014 if (futureValue === void 0)
1024 futureValue = null; 1015 futureValue = null;
1025 let result = new (_Future$(T))(); 1016 let result = new (_Future$(T))();
1026 this[_onDone] = () => { 1017 this[_onDone] = () => {
1027 result[_complete](futureValue); 1018 result[_complete](futureValue);
1028 }; 1019 };
1029 this[_onError] = ((error, stackTrace) => { 1020 this[_onError] = ((error, stackTrace) => {
1030 this.cancel(); 1021 this.cancel();
1031 result[_completeError](error, dart.as(stackTrace, core.StackTrace)); 1022 result[_completeError](error, dart.as(stackTrace, core.StackTrace));
1032 }).bind(this); 1023 }).bind(this);
1033 return result; 1024 return result;
1034 } 1025 }
1035 get [_isInputPaused]() { 1026 get [_isInputPaused]() {
1036 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption._STATE_INPUT_PAUSED)) != 0; 1027 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption$()._STATE_INPUT_PAUSED)) != 0;
1037 } 1028 }
1038 get [_isClosed]() { 1029 get [_isClosed]() {
1039 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption._STATE_CLOSED)) != 0; 1030 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption$()._STATE_CLOSED)) != 0;
1040 } 1031 }
1041 get [_isCanceled]() { 1032 get [_isCanceled]() {
1042 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption._STATE_CANCELED)) != 0; 1033 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption$()._STATE_CANCELED)) != 0;
1043 } 1034 }
1044 get [_waitsForCancel]() { 1035 get [_waitsForCancel]() {
1045 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption._STATE_WAIT_FOR_CANCEL)) != 0; 1036 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption$()._STATE_WAIT_FOR_CANCEL)) != 0;
1046 } 1037 }
1047 get [_inCallback]() { 1038 get [_inCallback]() {
1048 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption._STATE_IN_CALLBACK)) != 0; 1039 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption$()._STATE_IN_CALLBACK)) != 0;
1049 } 1040 }
1050 get [_hasPending]() { 1041 get [_hasPending]() {
1051 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption._STATE_HAS_PENDING)) != 0; 1042 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption$()._STATE_HAS_PENDING)) != 0;
1052 } 1043 }
1053 get [_isPaused]() { 1044 get [_isPaused]() {
1054 return dart.notNull(this[_state]) >= dart.notNull(_BufferingStreamSubscr iption._STATE_PAUSE_COUNT); 1045 return dart.notNull(this[_state]) >= dart.notNull(_BufferingStreamSubscr iption$()._STATE_PAUSE_COUNT);
1055 } 1046 }
1056 get [_canFire]() { 1047 get [_canFire]() {
1057 return dart.notNull(this[_state]) < dart.notNull(_BufferingStreamSubscri ption._STATE_IN_CALLBACK); 1048 return dart.notNull(this[_state]) < dart.notNull(_BufferingStreamSubscri ption$()._STATE_IN_CALLBACK);
1058 } 1049 }
1059 get [_mayResumeInput]() { 1050 get [_mayResumeInput]() {
1060 return !dart.notNull(this[_isPaused]) && (dart.notNull(this[_pending] == null) || dart.notNull(this[_pending].isEmpty)); 1051 return !dart.notNull(this[_isPaused]) && (dart.notNull(this[_pending] == null) || dart.notNull(this[_pending].isEmpty));
1061 } 1052 }
1062 get [_cancelOnError]() { 1053 get [_cancelOnError]() {
1063 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption._STATE_CANCEL_ON_ERROR)) != 0; 1054 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr iption$()._STATE_CANCEL_ON_ERROR)) != 0;
1064 } 1055 }
1065 get isPaused() { 1056 get isPaused() {
1066 return this[_isPaused]; 1057 return this[_isPaused];
1067 } 1058 }
1068 [_cancel]() { 1059 [_cancel]() {
1069 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription._STATE_CANCELED); 1060 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription$()._STATE_CANCELED);
1070 if (this[_hasPending]) { 1061 if (this[_hasPending]) {
1071 this[_pending].cancelSchedule(); 1062 this[_pending].cancelSchedule();
1072 } 1063 }
1073 if (!dart.notNull(this[_inCallback])) 1064 if (!dart.notNull(this[_inCallback]))
1074 this[_pending] = null; 1065 this[_pending] = null;
1075 this[_cancelFuture] = this[_onCancel](); 1066 this[_cancelFuture] = this[_onCancel]();
1076 } 1067 }
1077 [_incrementPauseCount]() { 1068 [_incrementPauseCount]() {
1078 this[_state] = dart.notNull(this[_state]) + dart.notNull(_BufferingStrea mSubscription._STATE_PAUSE_COUNT) | dart.notNull(_BufferingStreamSubscription._S TATE_INPUT_PAUSED); 1069 this[_state] = dart.notNull(this[_state]) + dart.notNull(_BufferingStrea mSubscription$()._STATE_PAUSE_COUNT) | dart.notNull(_BufferingStreamSubscription $()._STATE_INPUT_PAUSED);
1079 } 1070 }
1080 [_decrementPauseCount]() { 1071 [_decrementPauseCount]() {
1081 dart.assert(this[_isPaused]); 1072 dart.assert(this[_isPaused]);
1082 this[_state] = dart.notNull(this[_state]) - dart.notNull(_BufferingStrea mSubscription._STATE_PAUSE_COUNT); 1073 this[_state] = dart.notNull(this[_state]) - dart.notNull(_BufferingStrea mSubscription$()._STATE_PAUSE_COUNT);
1083 } 1074 }
1084 [_add](data) { 1075 [_add](data) {
1085 dart.as(data, T); 1076 dart.as(data, T);
1086 dart.assert(!dart.notNull(this[_isClosed])); 1077 dart.assert(!dart.notNull(this[_isClosed]));
1087 if (this[_isCanceled]) 1078 if (this[_isCanceled])
1088 return; 1079 return;
1089 if (this[_canFire]) { 1080 if (this[_canFire]) {
1090 this[_sendData](data); 1081 this[_sendData](data);
1091 } else { 1082 } else {
1092 this[_addPending](new _DelayedData(data)); 1083 this[_addPending](new _DelayedData(data));
1093 } 1084 }
1094 } 1085 }
1095 [_addError](error, stackTrace) { 1086 [_addError](error, stackTrace) {
1096 if (this[_isCanceled]) 1087 if (this[_isCanceled])
1097 return; 1088 return;
1098 if (this[_canFire]) { 1089 if (this[_canFire]) {
1099 this[_sendError](error, stackTrace); 1090 this[_sendError](error, stackTrace);
1100 } else { 1091 } else {
1101 this[_addPending](new _DelayedError(error, stackTrace)); 1092 this[_addPending](new _DelayedError(error, stackTrace));
1102 } 1093 }
1103 } 1094 }
1104 [_close]() { 1095 [_close]() {
1105 dart.assert(!dart.notNull(this[_isClosed])); 1096 dart.assert(!dart.notNull(this[_isClosed]));
1106 if (this[_isCanceled]) 1097 if (this[_isCanceled])
1107 return; 1098 return;
1108 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription._STATE_CLOSED); 1099 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription$()._STATE_CLOSED);
1109 if (this[_canFire]) { 1100 if (this[_canFire]) {
1110 this[_sendDone](); 1101 this[_sendDone]();
1111 } else { 1102 } else {
1112 this[_addPending](dart.const(new _DelayedDone())); 1103 this[_addPending](dart.const(new _DelayedDone()));
1113 } 1104 }
1114 } 1105 }
1115 [_onPause]() { 1106 [_onPause]() {
1116 dart.assert(this[_isInputPaused]); 1107 dart.assert(this[_isInputPaused]);
1117 } 1108 }
1118 [_onResume]() { 1109 [_onResume]() {
1119 dart.assert(!dart.notNull(this[_isInputPaused])); 1110 dart.assert(!dart.notNull(this[_isInputPaused]));
1120 } 1111 }
1121 [_onCancel]() { 1112 [_onCancel]() {
1122 dart.assert(this[_isCanceled]); 1113 dart.assert(this[_isCanceled]);
1123 return null; 1114 return null;
1124 } 1115 }
1125 [_addPending](event) { 1116 [_addPending](event) {
1126 let pending = dart.as(this[_pending], _StreamImplEvents); 1117 let pending = dart.as(this[_pending], _StreamImplEvents);
1127 if (this[_pending] == null) 1118 if (this[_pending] == null)
1128 pending = this[_pending] = new _StreamImplEvents(); 1119 pending = this[_pending] = new _StreamImplEvents();
1129 pending.add(event); 1120 pending.add(event);
1130 if (!dart.notNull(this[_hasPending])) { 1121 if (!dart.notNull(this[_hasPending])) {
1131 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription._STATE_HAS_PENDING); 1122 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription$()._STATE_HAS_PENDING);
1132 if (!dart.notNull(this[_isPaused])) { 1123 if (!dart.notNull(this[_isPaused])) {
1133 this[_pending].schedule(this); 1124 this[_pending].schedule(this);
1134 } 1125 }
1135 } 1126 }
1136 } 1127 }
1137 [_sendData](data) { 1128 [_sendData](data) {
1138 dart.as(data, T); 1129 dart.as(data, T);
1139 dart.assert(!dart.notNull(this[_isCanceled])); 1130 dart.assert(!dart.notNull(this[_isCanceled]));
1140 dart.assert(!dart.notNull(this[_isPaused])); 1131 dart.assert(!dart.notNull(this[_isPaused]));
1141 dart.assert(!dart.notNull(this[_inCallback])); 1132 dart.assert(!dart.notNull(this[_inCallback]));
1142 let wasInputPaused = this[_isInputPaused]; 1133 let wasInputPaused = this[_isInputPaused];
1143 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription._STATE_IN_CALLBACK); 1134 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription$()._STATE_IN_CALLBACK);
1144 this[_zone].runUnaryGuarded(this[_onData], data); 1135 this[_zone].runUnaryGuarded(this[_onData], data);
1145 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingStre amSubscription._STATE_IN_CALLBACK); 1136 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingStre amSubscription$()._STATE_IN_CALLBACK);
1146 this[_checkState](wasInputPaused); 1137 this[_checkState](wasInputPaused);
1147 } 1138 }
1148 [_sendError](error, stackTrace) { 1139 [_sendError](error, stackTrace) {
1149 dart.assert(!dart.notNull(this[_isCanceled])); 1140 dart.assert(!dart.notNull(this[_isCanceled]));
1150 dart.assert(!dart.notNull(this[_isPaused])); 1141 dart.assert(!dart.notNull(this[_isPaused]));
1151 dart.assert(!dart.notNull(this[_inCallback])); 1142 dart.assert(!dart.notNull(this[_inCallback]));
1152 let wasInputPaused = this[_isInputPaused]; 1143 let wasInputPaused = this[_isInputPaused];
1153 // Function sendError: () → void 1144 // Function sendError: () → void
1154 let sendError = (() => { 1145 let sendError = (() => {
1155 if (dart.notNull(this[_isCanceled]) && !dart.notNull(this[_waitsForCan cel])) 1146 if (dart.notNull(this[_isCanceled]) && !dart.notNull(this[_waitsForCan cel]))
1156 return; 1147 return;
1157 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription._STATE_IN_CALLBACK); 1148 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription$()._STATE_IN_CALLBACK);
1158 if (dart.is(this[_onError], ZoneBinaryCallback)) { 1149 if (dart.is(this[_onError], ZoneBinaryCallback)) {
1159 this[_zone].runBinaryGuarded(dart.as(this[_onError], __CastType22), error, stackTrace); 1150 this[_zone].runBinaryGuarded(dart.as(this[_onError], __CastType22), error, stackTrace);
1160 } else { 1151 } else {
1161 this[_zone].runUnaryGuarded(dart.as(this[_onError], __CastType25), e rror); 1152 this[_zone].runUnaryGuarded(dart.as(this[_onError], __CastType25), e rror);
1162 } 1153 }
1163 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingSt reamSubscription._STATE_IN_CALLBACK); 1154 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingSt reamSubscription$()._STATE_IN_CALLBACK);
1164 }).bind(this); 1155 }).bind(this);
1165 if (this[_cancelOnError]) { 1156 if (this[_cancelOnError]) {
1166 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription._STATE_WAIT_FOR_CANCEL); 1157 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription$()._STATE_WAIT_FOR_CANCEL);
1167 this[_cancel](); 1158 this[_cancel]();
1168 if (dart.is(this[_cancelFuture], Future)) { 1159 if (dart.is(this[_cancelFuture], Future)) {
1169 this[_cancelFuture].whenComplete(sendError); 1160 this[_cancelFuture].whenComplete(sendError);
1170 } else { 1161 } else {
1171 sendError(); 1162 sendError();
1172 } 1163 }
1173 } else { 1164 } else {
1174 sendError(); 1165 sendError();
1175 this[_checkState](wasInputPaused); 1166 this[_checkState](wasInputPaused);
1176 } 1167 }
1177 } 1168 }
1178 [_sendDone]() { 1169 [_sendDone]() {
1179 dart.assert(!dart.notNull(this[_isCanceled])); 1170 dart.assert(!dart.notNull(this[_isCanceled]));
1180 dart.assert(!dart.notNull(this[_isPaused])); 1171 dart.assert(!dart.notNull(this[_isPaused]));
1181 dart.assert(!dart.notNull(this[_inCallback])); 1172 dart.assert(!dart.notNull(this[_inCallback]));
1182 // Function sendDone: () → void 1173 // Function sendDone: () → void
1183 let sendDone = (() => { 1174 let sendDone = (() => {
1184 if (!dart.notNull(this[_waitsForCancel])) 1175 if (!dart.notNull(this[_waitsForCancel]))
1185 return; 1176 return;
1186 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription._STATE_CANCELED) | dart.notNull(_BufferingStreamSubscription._ST ATE_CLOSED) | dart.notNull(_BufferingStreamSubscription._STATE_IN_CALLBACK); 1177 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStr eamSubscription$()._STATE_CANCELED) | dart.notNull(_BufferingStreamSubscription$ ()._STATE_CLOSED) | dart.notNull(_BufferingStreamSubscription$()._STATE_IN_CALLB ACK);
1187 this[_zone].runGuarded(this[_onDone]); 1178 this[_zone].runGuarded(this[_onDone]);
1188 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingSt reamSubscription._STATE_IN_CALLBACK); 1179 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingSt reamSubscription$()._STATE_IN_CALLBACK);
1189 }).bind(this); 1180 }).bind(this);
1190 this[_cancel](); 1181 this[_cancel]();
1191 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription._STATE_WAIT_FOR_CANCEL); 1182 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription$()._STATE_WAIT_FOR_CANCEL);
1192 if (dart.is(this[_cancelFuture], Future)) { 1183 if (dart.is(this[_cancelFuture], Future)) {
1193 this[_cancelFuture].whenComplete(sendDone); 1184 this[_cancelFuture].whenComplete(sendDone);
1194 } else { 1185 } else {
1195 sendDone(); 1186 sendDone();
1196 } 1187 }
1197 } 1188 }
1198 [_guardCallback](callback) { 1189 [_guardCallback](callback) {
1199 dart.assert(!dart.notNull(this[_inCallback])); 1190 dart.assert(!dart.notNull(this[_inCallback]));
1200 let wasInputPaused = this[_isInputPaused]; 1191 let wasInputPaused = this[_isInputPaused];
1201 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription._STATE_IN_CALLBACK); 1192 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BufferingStrea mSubscription$()._STATE_IN_CALLBACK);
1202 dart.dcall(callback); 1193 dart.dcall(callback);
1203 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingStre amSubscription._STATE_IN_CALLBACK); 1194 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingStre amSubscription$()._STATE_IN_CALLBACK);
1204 this[_checkState](wasInputPaused); 1195 this[_checkState](wasInputPaused);
1205 } 1196 }
1206 [_checkState](wasInputPaused) { 1197 [_checkState](wasInputPaused) {
1207 dart.assert(!dart.notNull(this[_inCallback])); 1198 dart.assert(!dart.notNull(this[_inCallback]));
1208 if (dart.notNull(this[_hasPending]) && dart.notNull(this[_pending].isEmp ty)) { 1199 if (dart.notNull(this[_hasPending]) && dart.notNull(this[_pending].isEmp ty)) {
1209 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingSt reamSubscription._STATE_HAS_PENDING); 1200 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingSt reamSubscription$()._STATE_HAS_PENDING);
1210 if (dart.notNull(this[_isInputPaused]) && dart.notNull(this[_mayResume Input])) { 1201 if (dart.notNull(this[_isInputPaused]) && dart.notNull(this[_mayResume Input])) {
1211 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_Buffering StreamSubscription._STATE_INPUT_PAUSED); 1202 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_Buffering StreamSubscription$()._STATE_INPUT_PAUSED);
1212 } 1203 }
1213 } 1204 }
1214 while (true) { 1205 while (true) {
1215 if (this[_isCanceled]) { 1206 if (this[_isCanceled]) {
1216 this[_pending] = null; 1207 this[_pending] = null;
1217 return; 1208 return;
1218 } 1209 }
1219 let isInputPaused = this[_isInputPaused]; 1210 let isInputPaused = this[_isInputPaused];
1220 if (wasInputPaused == isInputPaused) 1211 if (wasInputPaused == isInputPaused)
1221 break; 1212 break;
1222 this[_state] = dart.notNull(this[_state]) ^ dart.notNull(_BufferingStr eamSubscription._STATE_IN_CALLBACK); 1213 this[_state] = dart.notNull(this[_state]) ^ dart.notNull(_BufferingStr eamSubscription$()._STATE_IN_CALLBACK);
1223 if (isInputPaused) { 1214 if (isInputPaused) {
1224 this[_onPause](); 1215 this[_onPause]();
1225 } else { 1216 } else {
1226 this[_onResume](); 1217 this[_onResume]();
1227 } 1218 }
1228 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingSt reamSubscription._STATE_IN_CALLBACK); 1219 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BufferingSt reamSubscription$()._STATE_IN_CALLBACK);
1229 wasInputPaused = isInputPaused; 1220 wasInputPaused = isInputPaused;
1230 } 1221 }
1231 if (dart.notNull(this[_hasPending]) && !dart.notNull(this[_isPaused])) { 1222 if (dart.notNull(this[_hasPending]) && !dart.notNull(this[_isPaused])) {
1232 this[_pending].schedule(this); 1223 this[_pending].schedule(this);
1233 } 1224 }
1234 } 1225 }
1235 } 1226 }
1236 _BufferingStreamSubscription[dart.implements] = () => [StreamSubscription$(T ), _EventSink$(T), _EventDispatch$(T)]; 1227 _BufferingStreamSubscription[dart.implements] = () => [StreamSubscription$(T ), _EventSink$(T), _EventDispatch$(T)];
1237 _BufferingStreamSubscription._STATE_CANCEL_ON_ERROR = 1;
1238 _BufferingStreamSubscription._STATE_CLOSED = 2;
1239 _BufferingStreamSubscription._STATE_INPUT_PAUSED = 4;
1240 _BufferingStreamSubscription._STATE_CANCELED = 8;
1241 _BufferingStreamSubscription._STATE_WAIT_FOR_CANCEL = 16;
1242 _BufferingStreamSubscription._STATE_IN_CALLBACK = 32;
1243 _BufferingStreamSubscription._STATE_HAS_PENDING = 64;
1244 _BufferingStreamSubscription._STATE_PAUSE_COUNT = 128;
1245 _BufferingStreamSubscription._STATE_PAUSE_COUNT_SHIFT = 7;
1246 return _BufferingStreamSubscription; 1228 return _BufferingStreamSubscription;
1247 }); 1229 });
1248 let _BufferingStreamSubscription = _BufferingStreamSubscription$(); 1230 let _BufferingStreamSubscription = _BufferingStreamSubscription$();
1231 let _recordCancel = Symbol('_recordCancel');
1232 let _recordPause = Symbol('_recordPause');
1233 let _recordResume = Symbol('_recordResume');
1249 let _ControllerSubscription$ = dart.generic(function(T) { 1234 let _ControllerSubscription$ = dart.generic(function(T) {
1250 class _ControllerSubscription extends _BufferingStreamSubscription$(T) { 1235 class _ControllerSubscription extends _BufferingStreamSubscription$(T) {
1251 _ControllerSubscription(controller, onData, onError, onDone, cancelOnError ) { 1236 _ControllerSubscription(controller, onData, onError, onDone, cancelOnError ) {
1252 this[_controller] = controller; 1237 this[_controller] = controller;
1253 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro r); 1238 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro r);
1254 } 1239 }
1255 [_onCancel]() { 1240 [_onCancel]() {
1256 return this[_controller][_recordCancel](this); 1241 return this[_controller][_recordCancel](this);
1257 } 1242 }
1258 [_onPause]() { 1243 [_onPause]() {
1259 this[_controller][_recordPause](this); 1244 this[_controller][_recordPause](this);
1260 } 1245 }
1261 [_onResume]() { 1246 [_onResume]() {
1262 this[_controller][_recordResume](this); 1247 this[_controller][_recordResume](this);
1263 } 1248 }
1264 } 1249 }
1265 return _ControllerSubscription; 1250 return _ControllerSubscription;
1266 }); 1251 });
1267 let _ControllerSubscription = _ControllerSubscription$(); 1252 let _ControllerSubscription = _ControllerSubscription$();
1253 let _eventState = Symbol('_eventState');
1254 let _expectsEvent = Symbol('_expectsEvent');
1255 let _toggleEventId = Symbol('_toggleEventId');
1256 let _isFiring = Symbol('_isFiring');
1257 let _setRemoveAfterFiring = Symbol('_setRemoveAfterFiring');
1258 let _removeAfterFiring = Symbol('_removeAfterFiring');
1268 let _BroadcastSubscription$ = dart.generic(function(T) { 1259 let _BroadcastSubscription$ = dart.generic(function(T) {
1269 class _BroadcastSubscription extends _ControllerSubscription$(T) { 1260 class _BroadcastSubscription extends _ControllerSubscription$(T) {
1270 _BroadcastSubscription(controller, onData, onError, onDone, cancelOnError) { 1261 _BroadcastSubscription(controller, onData, onError, onDone, cancelOnError) {
1271 this[_eventState] = null; 1262 this[_eventState] = null;
1272 this[_next] = null; 1263 this[_next] = null;
1273 this[_previous] = null; 1264 this[_previous] = null;
1274 super._ControllerSubscription(dart.as(controller, _StreamControllerLifec ycle$(T)), onData, onError, onDone, cancelOnError); 1265 super._ControllerSubscription(dart.as(controller, _StreamControllerLifec ycle$(T)), onData, onError, onDone, cancelOnError);
1275 this[_next] = this[_previous] = this; 1266 this[_next] = this[_previous] = this;
1276 } 1267 }
1277 get [_controller]() { 1268 get [_controller]() {
1278 return dart.as(super[_controller], _BroadcastStreamController$(T)); 1269 return dart.as(super[_controller], _BroadcastStreamController$(T));
1279 } 1270 }
1280 [_expectsEvent](eventId) { 1271 [_expectsEvent](eventId) {
1281 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri ption._STATE_EVENT_ID)) == eventId; 1272 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri ption$()._STATE_EVENT_ID)) == eventId;
1282 } 1273 }
1283 [_toggleEventId]() { 1274 [_toggleEventId]() {
1284 this[_eventState] = dart.notNull(this[_eventState]) ^ dart.notNull(_Broa dcastSubscription._STATE_EVENT_ID); 1275 this[_eventState] = dart.notNull(this[_eventState]) ^ dart.notNull(_Broa dcastSubscription$()._STATE_EVENT_ID);
1285 } 1276 }
1286 get [_isFiring]() { 1277 get [_isFiring]() {
1287 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri ption._STATE_FIRING)) != 0; 1278 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri ption$()._STATE_FIRING)) != 0;
1288 } 1279 }
1289 [_setRemoveAfterFiring]() { 1280 [_setRemoveAfterFiring]() {
1290 dart.assert(this[_isFiring]); 1281 dart.assert(this[_isFiring]);
1291 this[_eventState] = dart.notNull(this[_eventState]) | dart.notNull(_Broa dcastSubscription._STATE_REMOVE_AFTER_FIRING); 1282 this[_eventState] = dart.notNull(this[_eventState]) | dart.notNull(_Broa dcastSubscription$()._STATE_REMOVE_AFTER_FIRING);
1292 } 1283 }
1293 get [_removeAfterFiring]() { 1284 get [_removeAfterFiring]() {
1294 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri ption._STATE_REMOVE_AFTER_FIRING)) != 0; 1285 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri ption$()._STATE_REMOVE_AFTER_FIRING)) != 0;
1295 } 1286 }
1296 [_onPause]() {} 1287 [_onPause]() {}
1297 [_onResume]() {} 1288 [_onResume]() {}
1298 } 1289 }
1299 _BroadcastSubscription[dart.implements] = () => [_BroadcastSubscriptionLink] ; 1290 _BroadcastSubscription[dart.implements] = () => [_BroadcastSubscriptionLink] ;
1300 _BroadcastSubscription._STATE_EVENT_ID = 1;
1301 _BroadcastSubscription._STATE_FIRING = 2;
1302 _BroadcastSubscription._STATE_REMOVE_AFTER_FIRING = 4;
1303 return _BroadcastSubscription; 1291 return _BroadcastSubscription;
1304 }); 1292 });
1305 let _BroadcastSubscription = _BroadcastSubscription$(); 1293 let _BroadcastSubscription = _BroadcastSubscription$();
1294 _BroadcastSubscription._STATE_EVENT_ID = 1;
1295 _BroadcastSubscription._STATE_FIRING = 2;
1296 _BroadcastSubscription._STATE_REMOVE_AFTER_FIRING = 4;
1306 let _addStreamState = Symbol('_addStreamState'); 1297 let _addStreamState = Symbol('_addStreamState');
1307 let _doneFuture = Symbol('_doneFuture'); 1298 let _doneFuture = Symbol('_doneFuture');
1308 let _isEmpty = Symbol('_isEmpty'); 1299 let _isEmpty = Symbol('_isEmpty');
1309 let _hasOneListener = Symbol('_hasOneListener'); 1300 let _hasOneListener = Symbol('_hasOneListener');
1310 let _isAddingStream = Symbol('_isAddingStream'); 1301 let _isAddingStream = Symbol('_isAddingStream');
1311 let _mayAddEvent = Symbol('_mayAddEvent'); 1302 let _mayAddEvent = Symbol('_mayAddEvent');
1312 let _ensureDoneFuture = Symbol('_ensureDoneFuture'); 1303 let _ensureDoneFuture = Symbol('_ensureDoneFuture');
1313 let _addListener = Symbol('_addListener'); 1304 let _addListener = Symbol('_addListener');
1314 let _removeListener = Symbol('_removeListener'); 1305 let _removeListener = Symbol('_removeListener');
1315 let _callOnCancel = Symbol('_callOnCancel'); 1306 let _callOnCancel = Symbol('_callOnCancel');
1316 let _addEventError = Symbol('_addEventError'); 1307 let _addEventError = Symbol('_addEventError');
1317 let _forEachListener = Symbol('_forEachListener'); 1308 let _forEachListener = Symbol('_forEachListener');
1318 let _mayComplete = Symbol('_mayComplete'); 1309 let _mayComplete = Symbol('_mayComplete');
1319 let _asyncComplete = Symbol('_asyncComplete'); 1310 let _asyncComplete = Symbol('_asyncComplete');
1320 let _BroadcastStreamController$ = dart.generic(function(T) { 1311 let _BroadcastStreamController$ = dart.generic(function(T) {
1321 class _BroadcastStreamController extends core.Object { 1312 class _BroadcastStreamController extends core.Object {
1322 _BroadcastStreamController(onListen, onCancel) { 1313 _BroadcastStreamController(onListen, onCancel) {
1323 this[_onListen] = onListen; 1314 this[_onListen] = onListen;
1324 this[_onCancel] = onCancel; 1315 this[_onCancel] = onCancel;
1325 this[_state] = _BroadcastStreamController._STATE_INITIAL; 1316 this[_state] = _BroadcastStreamController$()._STATE_INITIAL;
1326 this[_next] = null; 1317 this[_next] = null;
1327 this[_previous] = null; 1318 this[_previous] = null;
1328 this[_addStreamState] = null; 1319 this[_addStreamState] = null;
1329 this[_doneFuture] = null; 1320 this[_doneFuture] = null;
1330 this[_next] = this[_previous] = this; 1321 this[_next] = this[_previous] = this;
1331 } 1322 }
1332 get stream() { 1323 get stream() {
1333 return new (_BroadcastStream$(T))(this); 1324 return new (_BroadcastStream$(T))(this);
1334 } 1325 }
1335 get sink() { 1326 get sink() {
1336 return new (_StreamSinkWrapper$(T))(this); 1327 return new (_StreamSinkWrapper$(T))(this);
1337 } 1328 }
1338 get isClosed() { 1329 get isClosed() {
1339 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro ller._STATE_CLOSED)) != 0; 1330 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro ller$()._STATE_CLOSED)) != 0;
1340 } 1331 }
1341 get isPaused() { 1332 get isPaused() {
1342 return false; 1333 return false;
1343 } 1334 }
1344 get hasListener() { 1335 get hasListener() {
1345 return !dart.notNull(this[_isEmpty]); 1336 return !dart.notNull(this[_isEmpty]);
1346 } 1337 }
1347 get [_hasOneListener]() { 1338 get [_hasOneListener]() {
1348 dart.assert(!dart.notNull(this[_isEmpty])); 1339 dart.assert(!dart.notNull(this[_isEmpty]));
1349 return core.identical(this[_next][_next], this); 1340 return core.identical(this[_next][_next], this);
1350 } 1341 }
1351 get [_isFiring]() { 1342 get [_isFiring]() {
1352 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro ller._STATE_FIRING)) != 0; 1343 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro ller$()._STATE_FIRING)) != 0;
1353 } 1344 }
1354 get [_isAddingStream]() { 1345 get [_isAddingStream]() {
1355 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro ller._STATE_ADDSTREAM)) != 0; 1346 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro ller$()._STATE_ADDSTREAM)) != 0;
1356 } 1347 }
1357 get [_mayAddEvent]() { 1348 get [_mayAddEvent]() {
1358 return dart.notNull(this[_state]) < dart.notNull(_BroadcastStreamControl ler._STATE_CLOSED); 1349 return dart.notNull(this[_state]) < dart.notNull(_BroadcastStreamControl ler$()._STATE_CLOSED);
1359 } 1350 }
1360 [_ensureDoneFuture]() { 1351 [_ensureDoneFuture]() {
1361 if (this[_doneFuture] != null) 1352 if (this[_doneFuture] != null)
1362 return this[_doneFuture]; 1353 return this[_doneFuture];
1363 return this[_doneFuture] = new _Future(); 1354 return this[_doneFuture] = new _Future();
1364 } 1355 }
1365 get [_isEmpty]() { 1356 get [_isEmpty]() {
1366 return core.identical(this[_next], this); 1357 return core.identical(this[_next], this);
1367 } 1358 }
1368 [_addListener](subscription) { 1359 [_addListener](subscription) {
1369 dart.as(subscription, _BroadcastSubscription$(T)); 1360 dart.as(subscription, _BroadcastSubscription$(T));
1370 dart.assert(core.identical(subscription[_next], subscription)); 1361 dart.assert(core.identical(subscription[_next], subscription));
1371 subscription[_previous] = this[_previous]; 1362 subscription[_previous] = this[_previous];
1372 subscription[_next] = this; 1363 subscription[_next] = this;
1373 this[_previous][_next] = subscription; 1364 this[_previous][_next] = subscription;
1374 this[_previous] = subscription; 1365 this[_previous] = subscription;
1375 subscription[_eventState] = dart.notNull(this[_state]) & dart.notNull(_B roadcastStreamController._STATE_EVENT_ID); 1366 subscription[_eventState] = dart.notNull(this[_state]) & dart.notNull(_B roadcastStreamController$()._STATE_EVENT_ID);
1376 } 1367 }
1377 [_removeListener](subscription) { 1368 [_removeListener](subscription) {
1378 dart.as(subscription, _BroadcastSubscription$(T)); 1369 dart.as(subscription, _BroadcastSubscription$(T));
1379 dart.assert(core.identical(subscription[_controller], this)); 1370 dart.assert(core.identical(subscription[_controller], this));
1380 dart.assert(!dart.notNull(core.identical(subscription[_next], subscripti on))); 1371 dart.assert(!dart.notNull(core.identical(subscription[_next], subscripti on)));
1381 let previous = subscription[_previous]; 1372 let previous = subscription[_previous];
1382 let next = subscription[_next]; 1373 let next = subscription[_next];
1383 previous[_next] = next; 1374 previous[_next] = next;
1384 next[_previous] = previous; 1375 next[_previous] = previous;
1385 subscription[_next] = subscription[_previous] = subscription; 1376 subscription[_next] = subscription[_previous] = subscription;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 } 1438 }
1448 this[_sendError](error, stackTrace); 1439 this[_sendError](error, stackTrace);
1449 } 1440 }
1450 close() { 1441 close() {
1451 if (this.isClosed) { 1442 if (this.isClosed) {
1452 dart.assert(this[_doneFuture] != null); 1443 dart.assert(this[_doneFuture] != null);
1453 return this[_doneFuture]; 1444 return this[_doneFuture];
1454 } 1445 }
1455 if (!dart.notNull(this[_mayAddEvent])) 1446 if (!dart.notNull(this[_mayAddEvent]))
1456 throw this[_addEventError](); 1447 throw this[_addEventError]();
1457 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BroadcastStrea mController._STATE_CLOSED); 1448 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BroadcastStrea mController$()._STATE_CLOSED);
1458 let doneFuture = this[_ensureDoneFuture](); 1449 let doneFuture = this[_ensureDoneFuture]();
1459 this[_sendDone](); 1450 this[_sendDone]();
1460 return doneFuture; 1451 return doneFuture;
1461 } 1452 }
1462 get done() { 1453 get done() {
1463 return this[_ensureDoneFuture](); 1454 return this[_ensureDoneFuture]();
1464 } 1455 }
1465 addStream(stream, opts) { 1456 addStream(stream, opts) {
1466 dart.as(stream, Stream$(T)); 1457 dart.as(stream, Stream$(T));
1467 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : true; 1458 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : true;
1468 if (!dart.notNull(this[_mayAddEvent])) 1459 if (!dart.notNull(this[_mayAddEvent]))
1469 throw this[_addEventError](); 1460 throw this[_addEventError]();
1470 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BroadcastStrea mController._STATE_ADDSTREAM); 1461 this[_state] = dart.notNull(this[_state]) | dart.notNull(_BroadcastStrea mController$()._STATE_ADDSTREAM);
1471 this[_addStreamState] = new (_AddStreamState$(T))(this, stream, cancelOn Error); 1462 this[_addStreamState] = new (_AddStreamState$(T))(this, stream, cancelOn Error);
1472 return this[_addStreamState].addStreamFuture; 1463 return this[_addStreamState].addStreamFuture;
1473 } 1464 }
1474 [_add](data) { 1465 [_add](data) {
1475 dart.as(data, T); 1466 dart.as(data, T);
1476 this[_sendData](data); 1467 this[_sendData](data);
1477 } 1468 }
1478 [_addError](error, stackTrace) { 1469 [_addError](error, stackTrace) {
1479 this[_sendError](error, stackTrace); 1470 this[_sendError](error, stackTrace);
1480 } 1471 }
1481 [_close]() { 1472 [_close]() {
1482 dart.assert(this[_isAddingStream]); 1473 dart.assert(this[_isAddingStream]);
1483 let addState = this[_addStreamState]; 1474 let addState = this[_addStreamState];
1484 this[_addStreamState] = null; 1475 this[_addStreamState] = null;
1485 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BroadcastStre amController._STATE_ADDSTREAM); 1476 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BroadcastStre amController$()._STATE_ADDSTREAM);
1486 addState.complete(); 1477 addState.complete();
1487 } 1478 }
1488 [_forEachListener](action) { 1479 [_forEachListener](action) {
1489 dart.as(action, dart.functionType(dart.void, [_BufferingStreamSubscripti on$(T)])); 1480 dart.as(action, dart.functionType(dart.void, [_BufferingStreamSubscripti on$(T)]));
1490 if (this[_isFiring]) { 1481 if (this[_isFiring]) {
1491 throw new core.StateError("Cannot fire new event. Controller is alread y firing an event"); 1482 throw new core.StateError("Cannot fire new event. Controller is alread y firing an event");
1492 } 1483 }
1493 if (this[_isEmpty]) 1484 if (this[_isEmpty])
1494 return; 1485 return;
1495 let id = dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContr oller._STATE_EVENT_ID); 1486 let id = dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContr oller$()._STATE_EVENT_ID);
1496 this[_state] = dart.notNull(this[_state]) ^ (dart.notNull(_BroadcastStre amController._STATE_EVENT_ID) | dart.notNull(_BroadcastStreamController._STATE_F IRING)); 1487 this[_state] = dart.notNull(this[_state]) ^ (dart.notNull(_BroadcastStre amController$()._STATE_EVENT_ID) | dart.notNull(_BroadcastStreamController$()._S TATE_FIRING));
1497 let link = this[_next]; 1488 let link = this[_next];
1498 while (!dart.notNull(core.identical(link, this))) { 1489 while (!dart.notNull(core.identical(link, this))) {
1499 let subscription = dart.as(link, _BroadcastSubscription$(T)); 1490 let subscription = dart.as(link, _BroadcastSubscription$(T));
1500 if (subscription[_expectsEvent](id)) { 1491 if (subscription[_expectsEvent](id)) {
1501 subscription[_eventState] = dart.notNull(subscription[_eventState]) | dart.notNull(_BroadcastSubscription._STATE_FIRING); 1492 subscription[_eventState] = dart.notNull(subscription[_eventState]) | dart.notNull(_BroadcastSubscription._STATE_FIRING);
1502 action(subscription); 1493 action(subscription);
1503 subscription[_toggleEventId](); 1494 subscription[_toggleEventId]();
1504 link = subscription[_next]; 1495 link = subscription[_next];
1505 if (subscription[_removeAfterFiring]) { 1496 if (subscription[_removeAfterFiring]) {
1506 this[_removeListener](subscription); 1497 this[_removeListener](subscription);
1507 } 1498 }
1508 subscription[_eventState] = dart.notNull(subscription[_eventState]) & ~dart.notNull(_BroadcastSubscription._STATE_FIRING); 1499 subscription[_eventState] = dart.notNull(subscription[_eventState]) & ~dart.notNull(_BroadcastSubscription._STATE_FIRING);
1509 } else { 1500 } else {
1510 link = subscription[_next]; 1501 link = subscription[_next];
1511 } 1502 }
1512 } 1503 }
1513 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BroadcastStre amController._STATE_FIRING); 1504 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_BroadcastStre amController$()._STATE_FIRING);
1514 if (this[_isEmpty]) { 1505 if (this[_isEmpty]) {
1515 this[_callOnCancel](); 1506 this[_callOnCancel]();
1516 } 1507 }
1517 } 1508 }
1518 [_callOnCancel]() { 1509 [_callOnCancel]() {
1519 dart.assert(this[_isEmpty]); 1510 dart.assert(this[_isEmpty]);
1520 if (dart.notNull(this.isClosed) && dart.notNull(this[_doneFuture][_mayCo mplete])) { 1511 if (dart.notNull(this.isClosed) && dart.notNull(this[_doneFuture][_mayCo mplete])) {
1521 this[_doneFuture][_asyncComplete](null); 1512 this[_doneFuture][_asyncComplete](null);
1522 } 1513 }
1523 _runGuarded(this[_onCancel]); 1514 _runGuarded(this[_onCancel]);
1524 } 1515 }
1525 } 1516 }
1526 _BroadcastStreamController[dart.implements] = () => [StreamController$(T), _ StreamControllerLifecycle$(T), _BroadcastSubscriptionLink, _EventSink$(T), _Even tDispatch$(T)]; 1517 _BroadcastStreamController[dart.implements] = () => [StreamController$(T), _ StreamControllerLifecycle$(T), _BroadcastSubscriptionLink, _EventSink$(T), _Even tDispatch$(T)];
1527 _BroadcastStreamController._STATE_INITIAL = 0;
1528 _BroadcastStreamController._STATE_EVENT_ID = 1;
1529 _BroadcastStreamController._STATE_FIRING = 2;
1530 _BroadcastStreamController._STATE_CLOSED = 4;
1531 _BroadcastStreamController._STATE_ADDSTREAM = 8;
1532 return _BroadcastStreamController; 1518 return _BroadcastStreamController;
1533 }); 1519 });
1534 let _BroadcastStreamController = _BroadcastStreamController$(); 1520 let _BroadcastStreamController = _BroadcastStreamController$();
1521 _BroadcastStreamController._STATE_INITIAL = 0;
1522 _BroadcastStreamController._STATE_EVENT_ID = 1;
1523 _BroadcastStreamController._STATE_FIRING = 2;
1524 _BroadcastStreamController._STATE_CLOSED = 4;
1525 _BroadcastStreamController._STATE_ADDSTREAM = 8;
1535 let _SyncBroadcastStreamController$ = dart.generic(function(T) { 1526 let _SyncBroadcastStreamController$ = dart.generic(function(T) {
1536 class _SyncBroadcastStreamController extends _BroadcastStreamController$(T) { 1527 class _SyncBroadcastStreamController extends _BroadcastStreamController$(T) {
1537 _SyncBroadcastStreamController(onListen, onCancel) { 1528 _SyncBroadcastStreamController(onListen, onCancel) {
1538 super._BroadcastStreamController(onListen, onCancel); 1529 super._BroadcastStreamController(onListen, onCancel);
1539 } 1530 }
1540 [_sendData](data) { 1531 [_sendData](data) {
1541 dart.as(data, T); 1532 dart.as(data, T);
1542 if (this[_isEmpty]) 1533 if (this[_isEmpty])
1543 return; 1534 return;
1544 if (this[_hasOneListener]) { 1535 if (this[_hasOneListener]) {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 if (value === void 0) 1707 if (value === void 0)
1717 value = null; 1708 value = null;
1718 return new _Future(); 1709 return new _Future();
1719 } 1710 }
1720 } 1711 }
1721 _DoneSubscription[dart.implements] = () => [StreamSubscription$(T)]; 1712 _DoneSubscription[dart.implements] = () => [StreamSubscription$(T)];
1722 return _DoneSubscription; 1713 return _DoneSubscription;
1723 }); 1714 });
1724 let _DoneSubscription = _DoneSubscription$(); 1715 let _DoneSubscription = _DoneSubscription$();
1725 let __CastType2$ = dart.generic(function(T) { 1716 let __CastType2$ = dart.generic(function(T) {
1726 let __CastType2 = dart.typedef('__CastType2', () => dart.functionType(dart.v oid, [_BufferingStreamSubscription$(T)])); 1717 let __CastType2 = dart.typedef('__CastType2', dart.functionType(dart.void, [ _BufferingStreamSubscription$(T)]));
1727 return __CastType2; 1718 return __CastType2;
1728 }); 1719 });
1729 let __CastType2 = __CastType2$(); 1720 let __CastType2 = __CastType2$();
1730 class DeferredLibrary extends core.Object { 1721 class DeferredLibrary extends core.Object {
1731 DeferredLibrary(libraryName, opts) { 1722 DeferredLibrary(libraryName, opts) {
1732 let uri = opts && 'uri' in opts ? opts.uri : null; 1723 let uri = opts && 'uri' in opts ? opts.uri : null;
1733 this.libraryName = libraryName; 1724 this.libraryName = libraryName;
1734 this.uri = uri; 1725 this.uri = uri;
1735 } 1726 }
1736 load() { 1727 load() {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 } 1867 }
1877 if (remaining == 0) { 1868 if (remaining == 0) {
1878 return new (Future$(core.List)).value(dart.const([])); 1869 return new (Future$(core.List)).value(dart.const([]));
1879 } 1870 }
1880 values = new core.List(remaining); 1871 values = new core.List(remaining);
1881 return result; 1872 return result;
1882 } 1873 }
1883 static forEach(input, f) { 1874 static forEach(input, f) {
1884 dart.as(f, dart.functionType(dart.dynamic, [dart.dynamic])); 1875 dart.as(f, dart.functionType(dart.dynamic, [dart.dynamic]));
1885 let iterator = input[core.$iterator]; 1876 let iterator = input[core.$iterator];
1886 return Future.doWhile(() => { 1877 return Future$().doWhile(() => {
1887 if (!dart.notNull(iterator.moveNext())) 1878 if (!dart.notNull(iterator.moveNext()))
1888 return false; 1879 return false;
1889 return new (Future$()).sync(() => dart.dcall(f, iterator.current)).the n(_ => true); 1880 return new (Future$()).sync(() => dart.dcall(f, iterator.current)).the n(_ => true);
1890 }); 1881 });
1891 } 1882 }
1892 static doWhile(f) { 1883 static doWhile(f) {
1893 dart.as(f, dart.functionType(dart.dynamic, [])); 1884 dart.as(f, dart.functionType(dart.dynamic, []));
1894 let doneSignal = new _Future(); 1885 let doneSignal = new _Future();
1895 let nextIteration = null; 1886 let nextIteration = null;
1896 nextIteration = Zone.current.bindUnaryCallback(keepGoing => { 1887 nextIteration = Zone.current.bindUnaryCallback(keepGoing => {
1897 if (keepGoing) { 1888 if (keepGoing) {
1898 new (Future$()).sync(f).then(dart.as(nextIteration, __CastType4), {o nError: doneSignal[_completeError].bind(doneSignal)}); 1889 new (Future$()).sync(f).then(dart.as(nextIteration, __CastType4), {o nError: doneSignal[_completeError].bind(doneSignal)});
1899 } else { 1890 } else {
1900 doneSignal[_complete](null); 1891 doneSignal[_complete](null);
1901 } 1892 }
1902 }, {runGuarded: true}); 1893 }, {runGuarded: true});
1903 dart.dcall(nextIteration, true); 1894 dart.dcall(nextIteration, true);
1904 return doneSignal; 1895 return doneSignal;
1905 } 1896 }
1906 } 1897 }
1907 dart.defineNamedConstructor(Future, 'microtask'); 1898 dart.defineNamedConstructor(Future, 'microtask');
1908 dart.defineNamedConstructor(Future, 'sync'); 1899 dart.defineNamedConstructor(Future, 'sync');
1909 dart.defineNamedConstructor(Future, 'value'); 1900 dart.defineNamedConstructor(Future, 'value');
1910 dart.defineNamedConstructor(Future, 'error'); 1901 dart.defineNamedConstructor(Future, 'error');
1911 dart.defineNamedConstructor(Future, 'delayed'); 1902 dart.defineNamedConstructor(Future, 'delayed');
1912 dart.defineLazyProperties(Future, {
1913 get _nullFuture() {
1914 return new _Future.immediate(null);
1915 }
1916 });
1917 return Future; 1903 return Future;
1918 }); 1904 });
1919 let Future = Future$(); 1905 let Future = Future$();
1906 dart.defineLazyProperties(Future, {
1907 get _nullFuture() {
1908 return new _Future.immediate(null);
1909 }
1910 });
1920 class TimeoutException extends core.Object { 1911 class TimeoutException extends core.Object {
1921 TimeoutException(message, duration) { 1912 TimeoutException(message, duration) {
1922 if (duration === void 0) 1913 if (duration === void 0)
1923 duration = null; 1914 duration = null;
1924 this.message = message; 1915 this.message = message;
1925 this.duration = duration; 1916 this.duration = duration;
1926 } 1917 }
1927 toString() { 1918 toString() {
1928 let result = "TimeoutException"; 1919 let result = "TimeoutException";
1929 if (this.duration != null) 1920 if (this.duration != null)
(...skipping 23 matching lines...) Expand all
1953 if (replacement != null) { 1944 if (replacement != null) {
1954 error = _nonNullError(replacement.error); 1945 error = _nonNullError(replacement.error);
1955 stackTrace = replacement.stackTrace; 1946 stackTrace = replacement.stackTrace;
1956 } 1947 }
1957 result[_completeError](error, dart.as(stackTrace, core.StackTrace)); 1948 result[_completeError](error, dart.as(stackTrace, core.StackTrace));
1958 } 1949 }
1959 // Function _nonNullError: (Object) → Object 1950 // Function _nonNullError: (Object) → Object
1960 function _nonNullError(error) { 1951 function _nonNullError(error) {
1961 return error != null ? error : new core.NullThrownError(); 1952 return error != null ? error : new core.NullThrownError();
1962 } 1953 }
1963 let __CastType4 = dart.typedef('__CastType4', () => dart.functionType(dart.dyn amic, [dart.dynamic])); 1954 let __CastType4 = dart.typedef('__CastType4', dart.functionType(dart.dynamic, [dart.dynamic]));
1964 let _FutureOnValue$ = dart.generic(function(T) { 1955 let _FutureOnValue$ = dart.generic(function(T) {
1965 let _FutureOnValue = dart.typedef('_FutureOnValue', () => dart.functionType( dart.dynamic, [T])); 1956 let _FutureOnValue = dart.typedef('_FutureOnValue', dart.functionType(dart.d ynamic, [T]));
1966 return _FutureOnValue; 1957 return _FutureOnValue;
1967 }); 1958 });
1968 let _FutureOnValue = _FutureOnValue$(); 1959 let _FutureOnValue = _FutureOnValue$();
1969 let _FutureErrorTest = dart.typedef('_FutureErrorTest', () => dart.functionTyp e(core.bool, [dart.dynamic])); 1960 let _FutureErrorTest = dart.typedef('_FutureErrorTest', dart.functionType(core .bool, [dart.dynamic]));
1970 let _FutureAction = dart.typedef('_FutureAction', () => dart.functionType(dart .dynamic, [])); 1961 let _FutureAction = dart.typedef('_FutureAction', dart.functionType(dart.dynam ic, []));
1971 let _Completer$ = dart.generic(function(T) { 1962 let _Completer$ = dart.generic(function(T) {
1972 class _Completer extends core.Object { 1963 class _Completer extends core.Object {
1973 _Completer() { 1964 _Completer() {
1974 this.future = new (_Future$(T))(); 1965 this.future = new (_Future$(T))();
1975 } 1966 }
1976 completeError(error, stackTrace) { 1967 completeError(error, stackTrace) {
1977 if (stackTrace === void 0) 1968 if (stackTrace === void 0)
1978 stackTrace = null; 1969 stackTrace = null;
1979 error = _nonNullError(error); 1970 error = _nonNullError(error);
1980 if (!dart.notNull(this.future[_mayComplete])) 1971 if (!dart.notNull(this.future[_mayComplete]))
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 let _value = Symbol('_value'); 2111 let _value = Symbol('_value');
2121 let _error = Symbol('_error'); 2112 let _error = Symbol('_error');
2122 let _setValue = Symbol('_setValue'); 2113 let _setValue = Symbol('_setValue');
2123 let _setErrorObject = Symbol('_setErrorObject'); 2114 let _setErrorObject = Symbol('_setErrorObject');
2124 let _setError = Symbol('_setError'); 2115 let _setError = Symbol('_setError');
2125 let _removeListeners = Symbol('_removeListeners'); 2116 let _removeListeners = Symbol('_removeListeners');
2126 let _Future$ = dart.generic(function(T) { 2117 let _Future$ = dart.generic(function(T) {
2127 class _Future extends core.Object { 2118 class _Future extends core.Object {
2128 _Future() { 2119 _Future() {
2129 this[_zone] = Zone.current; 2120 this[_zone] = Zone.current;
2130 this[_state] = _Future._INCOMPLETE; 2121 this[_state] = _Future$()._INCOMPLETE;
2131 this[_resultOrListeners] = null; 2122 this[_resultOrListeners] = null;
2132 } 2123 }
2133 immediate(value) { 2124 immediate(value) {
2134 this[_zone] = Zone.current; 2125 this[_zone] = Zone.current;
2135 this[_state] = _Future._INCOMPLETE; 2126 this[_state] = _Future$()._INCOMPLETE;
2136 this[_resultOrListeners] = null; 2127 this[_resultOrListeners] = null;
2137 this[_asyncComplete](value); 2128 this[_asyncComplete](value);
2138 } 2129 }
2139 immediateError(error, stackTrace) { 2130 immediateError(error, stackTrace) {
2140 if (stackTrace === void 0) 2131 if (stackTrace === void 0)
2141 stackTrace = null; 2132 stackTrace = null;
2142 this[_zone] = Zone.current; 2133 this[_zone] = Zone.current;
2143 this[_state] = _Future._INCOMPLETE; 2134 this[_state] = _Future$()._INCOMPLETE;
2144 this[_resultOrListeners] = null; 2135 this[_resultOrListeners] = null;
2145 this[_asyncCompleteError](error, stackTrace); 2136 this[_asyncCompleteError](error, stackTrace);
2146 } 2137 }
2147 get [_mayComplete]() { 2138 get [_mayComplete]() {
2148 return this[_state] == _Future._INCOMPLETE; 2139 return this[_state] == _Future$()._INCOMPLETE;
2149 } 2140 }
2150 get [_isChained]() { 2141 get [_isChained]() {
2151 return this[_state] == _Future._CHAINED; 2142 return this[_state] == _Future$()._CHAINED;
2152 } 2143 }
2153 get [_isComplete]() { 2144 get [_isComplete]() {
2154 return dart.notNull(this[_state]) >= dart.notNull(_Future._VALUE); 2145 return dart.notNull(this[_state]) >= dart.notNull(_Future$()._VALUE);
2155 } 2146 }
2156 get [_hasValue]() { 2147 get [_hasValue]() {
2157 return this[_state] == _Future._VALUE; 2148 return this[_state] == _Future$()._VALUE;
2158 } 2149 }
2159 get [_hasError]() { 2150 get [_hasError]() {
2160 return this[_state] == _Future._ERROR; 2151 return this[_state] == _Future$()._ERROR;
2161 } 2152 }
2162 set [_isChained](value) { 2153 set [_isChained](value) {
2163 if (value) { 2154 if (value) {
2164 dart.assert(!dart.notNull(this[_isComplete])); 2155 dart.assert(!dart.notNull(this[_isComplete]));
2165 this[_state] = _Future._CHAINED; 2156 this[_state] = _Future$()._CHAINED;
2166 } else { 2157 } else {
2167 dart.assert(this[_isChained]); 2158 dart.assert(this[_isChained]);
2168 this[_state] = _Future._INCOMPLETE; 2159 this[_state] = _Future$()._INCOMPLETE;
2169 } 2160 }
2170 } 2161 }
2171 then(f, opts) { 2162 then(f, opts) {
2172 dart.as(f, dart.functionType(dart.dynamic, [T])); 2163 dart.as(f, dart.functionType(dart.dynamic, [T]));
2173 let onError = opts && 'onError' in opts ? opts.onError : null; 2164 let onError = opts && 'onError' in opts ? opts.onError : null;
2174 let result = new (_Future$())(); 2165 let result = new (_Future$())();
2175 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { 2166 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) {
2176 f = dart.as(result[_zone].registerUnaryCallback(f), __CastType6); 2167 f = dart.as(result[_zone].registerUnaryCallback(f), __CastType6);
2177 if (onError != null) { 2168 if (onError != null) {
2178 onError = _registerErrorHandler(onError, result[_zone]); 2169 onError = _registerErrorHandler(onError, result[_zone]);
(...skipping 22 matching lines...) Expand all
2201 } 2192 }
2202 this[_addListener](new _FutureListener.whenComplete(result, action)); 2193 this[_addListener](new _FutureListener.whenComplete(result, action));
2203 return dart.as(result, Future$(T)); 2194 return dart.as(result, Future$(T));
2204 } 2195 }
2205 asStream() { 2196 asStream() {
2206 return new (Stream$(T)).fromFuture(this); 2197 return new (Stream$(T)).fromFuture(this);
2207 } 2198 }
2208 [_markPendingCompletion]() { 2199 [_markPendingCompletion]() {
2209 if (!dart.notNull(this[_mayComplete])) 2200 if (!dart.notNull(this[_mayComplete]))
2210 throw new core.StateError("Future already completed"); 2201 throw new core.StateError("Future already completed");
2211 this[_state] = _Future._PENDING_COMPLETE; 2202 this[_state] = _Future$()._PENDING_COMPLETE;
2212 } 2203 }
2213 get [_value]() { 2204 get [_value]() {
2214 dart.assert(dart.notNull(this[_isComplete]) && dart.notNull(this[_hasVal ue])); 2205 dart.assert(dart.notNull(this[_isComplete]) && dart.notNull(this[_hasVal ue]));
2215 return dart.as(this[_resultOrListeners], T); 2206 return dart.as(this[_resultOrListeners], T);
2216 } 2207 }
2217 get [_error]() { 2208 get [_error]() {
2218 dart.assert(dart.notNull(this[_isComplete]) && dart.notNull(this[_hasErr or])); 2209 dart.assert(dart.notNull(this[_isComplete]) && dart.notNull(this[_hasErr or]));
2219 return dart.as(this[_resultOrListeners], AsyncError); 2210 return dart.as(this[_resultOrListeners], AsyncError);
2220 } 2211 }
2221 [_setValue](value) { 2212 [_setValue](value) {
2222 dart.as(value, T); 2213 dart.as(value, T);
2223 dart.assert(!dart.notNull(this[_isComplete])); 2214 dart.assert(!dart.notNull(this[_isComplete]));
2224 this[_state] = _Future._VALUE; 2215 this[_state] = _Future$()._VALUE;
2225 this[_resultOrListeners] = value; 2216 this[_resultOrListeners] = value;
2226 } 2217 }
2227 [_setErrorObject](error) { 2218 [_setErrorObject](error) {
2228 dart.assert(!dart.notNull(this[_isComplete])); 2219 dart.assert(!dart.notNull(this[_isComplete]));
2229 this[_state] = _Future._ERROR; 2220 this[_state] = _Future$()._ERROR;
2230 this[_resultOrListeners] = error; 2221 this[_resultOrListeners] = error;
2231 } 2222 }
2232 [_setError](error, stackTrace) { 2223 [_setError](error, stackTrace) {
2233 this[_setErrorObject](new AsyncError(error, stackTrace)); 2224 this[_setErrorObject](new AsyncError(error, stackTrace));
2234 } 2225 }
2235 [_addListener](listener) { 2226 [_addListener](listener) {
2236 dart.assert(listener[_nextListener] == null); 2227 dart.assert(listener[_nextListener] == null);
2237 if (this[_isComplete]) { 2228 if (this[_isComplete]) {
2238 this[_zone].scheduleMicrotask((() => { 2229 this[_zone].scheduleMicrotask((() => {
2239 _Future._propagateToListeners(this, listener); 2230 _Future$()._propagateToListeners(this, listener);
2240 }).bind(this)); 2231 }).bind(this));
2241 } else { 2232 } else {
2242 listener[_nextListener] = dart.as(this[_resultOrListeners], _FutureLis tener); 2233 listener[_nextListener] = dart.as(this[_resultOrListeners], _FutureLis tener);
2243 this[_resultOrListeners] = listener; 2234 this[_resultOrListeners] = listener;
2244 } 2235 }
2245 } 2236 }
2246 [_removeListeners]() { 2237 [_removeListeners]() {
2247 dart.assert(!dart.notNull(this[_isComplete])); 2238 dart.assert(!dart.notNull(this[_isComplete]));
2248 let current = dart.as(this[_resultOrListeners], _FutureListener); 2239 let current = dart.as(this[_resultOrListeners], _FutureListener);
2249 this[_resultOrListeners] = null; 2240 this[_resultOrListeners] = null;
(...skipping 21 matching lines...) Expand all
2271 target[_completeError](error, dart.as(stackTrace, core.StackTrace)); 2262 target[_completeError](error, dart.as(stackTrace, core.StackTrace));
2272 } 2263 }
2273 }); 2264 });
2274 } 2265 }
2275 static _chainCoreFuture(source, target) { 2266 static _chainCoreFuture(source, target) {
2276 dart.assert(!dart.notNull(target[_isComplete])); 2267 dart.assert(!dart.notNull(target[_isComplete]));
2277 dart.assert(dart.is(source, _Future$())); 2268 dart.assert(dart.is(source, _Future$()));
2278 target[_isChained] = true; 2269 target[_isChained] = true;
2279 let listener = new _FutureListener.chain(target); 2270 let listener = new _FutureListener.chain(target);
2280 if (source[_isComplete]) { 2271 if (source[_isComplete]) {
2281 _Future._propagateToListeners(source, listener); 2272 _Future$()._propagateToListeners(source, listener);
2282 } else { 2273 } else {
2283 source[_addListener](listener); 2274 source[_addListener](listener);
2284 } 2275 }
2285 } 2276 }
2286 [_complete](value) { 2277 [_complete](value) {
2287 dart.assert(!dart.notNull(this[_isComplete])); 2278 dart.assert(!dart.notNull(this[_isComplete]));
2288 if (dart.is(value, Future)) { 2279 if (dart.is(value, Future)) {
2289 if (dart.is(value, _Future$())) { 2280 if (dart.is(value, _Future$())) {
2290 _Future._chainCoreFuture(dart.as(value, _Future$()), this); 2281 _Future$()._chainCoreFuture(dart.as(value, _Future$()), this);
2291 } else { 2282 } else {
2292 _Future._chainForeignFuture(dart.as(value, Future), this); 2283 _Future$()._chainForeignFuture(dart.as(value, Future), this);
2293 } 2284 }
2294 } else { 2285 } else {
2295 let listeners = this[_removeListeners](); 2286 let listeners = this[_removeListeners]();
2296 this[_setValue](dart.as(value, T)); 2287 this[_setValue](dart.as(value, T));
2297 _Future._propagateToListeners(this, listeners); 2288 _Future$()._propagateToListeners(this, listeners);
2298 } 2289 }
2299 } 2290 }
2300 [_completeWithValue](value) { 2291 [_completeWithValue](value) {
2301 dart.assert(!dart.notNull(this[_isComplete])); 2292 dart.assert(!dart.notNull(this[_isComplete]));
2302 dart.assert(!dart.is(value, Future)); 2293 dart.assert(!dart.is(value, Future));
2303 let listeners = this[_removeListeners](); 2294 let listeners = this[_removeListeners]();
2304 this[_setValue](dart.as(value, T)); 2295 this[_setValue](dart.as(value, T));
2305 _Future._propagateToListeners(this, listeners); 2296 _Future$()._propagateToListeners(this, listeners);
2306 } 2297 }
2307 [_completeError](error, stackTrace) { 2298 [_completeError](error, stackTrace) {
2308 if (stackTrace === void 0) 2299 if (stackTrace === void 0)
2309 stackTrace = null; 2300 stackTrace = null;
2310 dart.assert(!dart.notNull(this[_isComplete])); 2301 dart.assert(!dart.notNull(this[_isComplete]));
2311 let listeners = this[_removeListeners](); 2302 let listeners = this[_removeListeners]();
2312 this[_setError](error, stackTrace); 2303 this[_setError](error, stackTrace);
2313 _Future._propagateToListeners(this, listeners); 2304 _Future$()._propagateToListeners(this, listeners);
2314 } 2305 }
2315 [_asyncComplete](value) { 2306 [_asyncComplete](value) {
2316 dart.assert(!dart.notNull(this[_isComplete])); 2307 dart.assert(!dart.notNull(this[_isComplete]));
2317 if (value == null) { 2308 if (value == null) {
2318 } else if (dart.is(value, Future)) { 2309 } else if (dart.is(value, Future)) {
2319 let typedFuture = dart.as(value, Future$(T)); 2310 let typedFuture = dart.as(value, Future$(T));
2320 if (dart.is(typedFuture, _Future$())) { 2311 if (dart.is(typedFuture, _Future$())) {
2321 let coreFuture = dart.as(typedFuture, _Future$(T)); 2312 let coreFuture = dart.as(typedFuture, _Future$(T));
2322 if (dart.notNull(coreFuture[_isComplete]) && dart.notNull(coreFuture [_hasError])) { 2313 if (dart.notNull(coreFuture[_isComplete]) && dart.notNull(coreFuture [_hasError])) {
2323 this[_markPendingCompletion](); 2314 this[_markPendingCompletion]();
2324 this[_zone].scheduleMicrotask((() => { 2315 this[_zone].scheduleMicrotask((() => {
2325 _Future._chainCoreFuture(coreFuture, this); 2316 _Future$()._chainCoreFuture(coreFuture, this);
2326 }).bind(this)); 2317 }).bind(this));
2327 } else { 2318 } else {
2328 _Future._chainCoreFuture(coreFuture, this); 2319 _Future$()._chainCoreFuture(coreFuture, this);
2329 } 2320 }
2330 } else { 2321 } else {
2331 _Future._chainForeignFuture(typedFuture, this); 2322 _Future$()._chainForeignFuture(typedFuture, this);
2332 } 2323 }
2333 return; 2324 return;
2334 } else { 2325 } else {
2335 let typedValue = dart.as(value, T); 2326 let typedValue = dart.as(value, T);
2336 } 2327 }
2337 this[_markPendingCompletion](); 2328 this[_markPendingCompletion]();
2338 this[_zone].scheduleMicrotask((() => { 2329 this[_zone].scheduleMicrotask((() => {
2339 this[_completeWithValue](value); 2330 this[_completeWithValue](value);
2340 }).bind(this)); 2331 }).bind(this));
2341 } 2332 }
(...skipping 12 matching lines...) Expand all
2354 if (hasError) { 2345 if (hasError) {
2355 let asyncError = source[_error]; 2346 let asyncError = source[_error];
2356 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta ckTrace); 2347 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta ckTrace);
2357 } 2348 }
2358 return; 2349 return;
2359 } 2350 }
2360 while (listeners[_nextListener] != null) { 2351 while (listeners[_nextListener] != null) {
2361 let listener = listeners; 2352 let listener = listeners;
2362 listeners = listener[_nextListener]; 2353 listeners = listener[_nextListener];
2363 listener[_nextListener] = null; 2354 listener[_nextListener] = null;
2364 _Future._propagateToListeners(source, listener); 2355 _Future$()._propagateToListeners(source, listener);
2365 } 2356 }
2366 let listener = listeners; 2357 let listener = listeners;
2367 let listenerHasValue = true; 2358 let listenerHasValue = true;
2368 let sourceValue = hasError ? null : source[_value]; 2359 let sourceValue = hasError ? null : source[_value];
2369 let listenerValueOrError = sourceValue; 2360 let listenerValueOrError = sourceValue;
2370 let isPropagationAborted = false; 2361 let isPropagationAborted = false;
2371 if (dart.notNull(hasError) || dart.notNull(listener.handlesValue) || d art.notNull(listener.handlesComplete)) { 2362 if (dart.notNull(hasError) || dart.notNull(listener.handlesValue) || d art.notNull(listener.handlesComplete)) {
2372 let zone = listener[_zone]; 2363 let zone = listener[_zone];
2373 if (dart.notNull(hasError) && !dart.notNull(source[_zone].inSameErro rZone(zone))) { 2364 if (dart.notNull(hasError) && !dart.notNull(source[_zone].inSameErro rZone(zone))) {
2374 let asyncError = source[_error]; 2365 let asyncError = source[_error];
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
2442 } 2433 }
2443 listenerHasValue = false; 2434 listenerHasValue = false;
2444 return; 2435 return;
2445 } 2436 }
2446 2437
2447 if (dart.is(completeResult, Future)) { 2438 if (dart.is(completeResult, Future)) {
2448 let result = listener.result; 2439 let result = listener.result;
2449 result[_isChained] = true; 2440 result[_isChained] = true;
2450 isPropagationAborted = true; 2441 isPropagationAborted = true;
2451 dart.dsend(completeResult, 'then', ignored => { 2442 dart.dsend(completeResult, 'then', ignored => {
2452 _Future._propagateToListeners(source, new _FutureListener.chai n(result)); 2443 _Future$()._propagateToListeners(source, new _FutureListener.c hain(result));
2453 }, { 2444 }, {
2454 onError: (error, stackTrace) => { 2445 onError: (error, stackTrace) => {
2455 if (stackTrace === void 0) 2446 if (stackTrace === void 0)
2456 stackTrace = null; 2447 stackTrace = null;
2457 if (!dart.is(completeResult, _Future$())) { 2448 if (!dart.is(completeResult, _Future$())) {
2458 completeResult = new (_Future$())(); 2449 completeResult = new (_Future$())();
2459 dart.dsend(completeResult, _setError, error, stackTrace); 2450 dart.dsend(completeResult, _setError, error, stackTrace);
2460 } 2451 }
2461 _Future._propagateToListeners(dart.as(completeResult, _Futur e$()), new _FutureListener.chain(result)); 2452 _Future$()._propagateToListeners(dart.as(completeResult, _Fu ture$()), new _FutureListener.chain(result));
2462 } 2453 }
2463 }); 2454 });
2464 } 2455 }
2465 }; 2456 };
2466 if (!dart.notNull(hasError)) { 2457 if (!dart.notNull(hasError)) {
2467 if (listener.handlesValue) { 2458 if (listener.handlesValue) {
2468 listenerHasValue = handleValueCallback(); 2459 listenerHasValue = handleValueCallback();
2469 } 2460 }
2470 } else { 2461 } else {
2471 handleError(); 2462 handleError();
2472 } 2463 }
2473 if (listener.handlesComplete) { 2464 if (listener.handlesComplete) {
2474 handleWhenCompleteCallback(); 2465 handleWhenCompleteCallback();
2475 } 2466 }
2476 if (oldZone != null) 2467 if (oldZone != null)
2477 Zone._leave(oldZone); 2468 Zone._leave(oldZone);
2478 if (isPropagationAborted) 2469 if (isPropagationAborted)
2479 return; 2470 return;
2480 if (dart.notNull(listenerHasValue) && !dart.notNull(core.identical(s ourceValue, listenerValueOrError)) && dart.is(listenerValueOrError, Future)) { 2471 if (dart.notNull(listenerHasValue) && !dart.notNull(core.identical(s ourceValue, listenerValueOrError)) && dart.is(listenerValueOrError, Future)) {
2481 let chainSource = dart.as(listenerValueOrError, Future); 2472 let chainSource = dart.as(listenerValueOrError, Future);
2482 let result = listener.result; 2473 let result = listener.result;
2483 if (dart.is(chainSource, _Future$())) { 2474 if (dart.is(chainSource, _Future$())) {
2484 if (chainSource[_isComplete]) { 2475 if (chainSource[_isComplete]) {
2485 result[_isChained] = true; 2476 result[_isChained] = true;
2486 source = chainSource; 2477 source = chainSource;
2487 listeners = new _FutureListener.chain(result); 2478 listeners = new _FutureListener.chain(result);
2488 continue; 2479 continue;
2489 } else { 2480 } else {
2490 _Future._chainCoreFuture(chainSource, result); 2481 _Future$()._chainCoreFuture(chainSource, result);
2491 } 2482 }
2492 } else { 2483 } else {
2493 _Future._chainForeignFuture(chainSource, result); 2484 _Future$()._chainForeignFuture(chainSource, result);
2494 } 2485 }
2495 return; 2486 return;
2496 } 2487 }
2497 } 2488 }
2498 let result = listener.result; 2489 let result = listener.result;
2499 listeners = result[_removeListeners](); 2490 listeners = result[_removeListeners]();
2500 if (listenerHasValue) { 2491 if (listenerHasValue) {
2501 result[_setValue](listenerValueOrError); 2492 result[_setValue](listenerValueOrError);
2502 } else { 2493 } else {
2503 let asyncError = dart.as(listenerValueOrError, AsyncError); 2494 let asyncError = dart.as(listenerValueOrError, AsyncError);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2543 result[_completeError](e, dart.as(s, core.StackTrace)); 2534 result[_completeError](e, dart.as(s, core.StackTrace));
2544 } 2535 }
2545 } 2536 }
2546 }); 2537 });
2547 return result; 2538 return result;
2548 } 2539 }
2549 } 2540 }
2550 _Future[dart.implements] = () => [Future$(T)]; 2541 _Future[dart.implements] = () => [Future$(T)];
2551 dart.defineNamedConstructor(_Future, 'immediate'); 2542 dart.defineNamedConstructor(_Future, 'immediate');
2552 dart.defineNamedConstructor(_Future, 'immediateError'); 2543 dart.defineNamedConstructor(_Future, 'immediateError');
2553 _Future._INCOMPLETE = 0;
2554 _Future._PENDING_COMPLETE = 1;
2555 _Future._CHAINED = 2;
2556 _Future._VALUE = 4;
2557 _Future._ERROR = 8;
2558 return _Future; 2544 return _Future;
2559 }); 2545 });
2560 let _Future = _Future$(); 2546 let _Future = _Future$();
2547 _Future._INCOMPLETE = 0;
2548 _Future._PENDING_COMPLETE = 1;
2549 _Future._CHAINED = 2;
2550 _Future._VALUE = 4;
2551 _Future._ERROR = 8;
2561 let __CastType6$ = dart.generic(function(T) { 2552 let __CastType6$ = dart.generic(function(T) {
2562 let __CastType6 = dart.typedef('__CastType6', () => dart.functionType(dart.d ynamic, [T])); 2553 let __CastType6 = dart.typedef('__CastType6', dart.functionType(dart.dynamic , [T]));
2563 return __CastType6; 2554 return __CastType6;
2564 }); 2555 });
2565 let __CastType6 = __CastType6$(); 2556 let __CastType6 = __CastType6$();
2566 let __CastType8 = dart.typedef('__CastType8', () => dart.functionType(core.boo l, [dart.dynamic])); 2557 let __CastType8 = dart.typedef('__CastType8', dart.functionType(core.bool, [da rt.dynamic]));
2567 let __CastType10 = dart.typedef('__CastType10', () => dart.functionType(dart.d ynamic, [dart.dynamic])); 2558 let __CastType10 = dart.typedef('__CastType10', dart.functionType(dart.dynamic , [dart.dynamic]));
2568 let _AsyncCallback = dart.typedef('_AsyncCallback', () => dart.functionType(da rt.void, [])); 2559 let _AsyncCallback = dart.typedef('_AsyncCallback', dart.functionType(dart.voi d, []));
2569 class _AsyncCallbackEntry extends core.Object { 2560 class _AsyncCallbackEntry extends core.Object {
2570 _AsyncCallbackEntry(callback) { 2561 _AsyncCallbackEntry(callback) {
2571 this.callback = callback; 2562 this.callback = callback;
2572 this.next = null; 2563 this.next = null;
2573 } 2564 }
2574 } 2565 }
2575 exports._nextCallback = null; 2566 exports._nextCallback = null;
2576 exports._lastCallback = null; 2567 exports._lastCallback = null;
2577 exports._lastPriorityCallback = null; 2568 exports._lastPriorityCallback = null;
2578 exports._isInCallbackLoop = false; 2569 exports._isInCallbackLoop = false;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2789 this[_sink].addError(error, stackTrace); 2780 this[_sink].addError(error, stackTrace);
2790 } 2781 }
2791 close() { 2782 close() {
2792 this[_sink].close(); 2783 this[_sink].close();
2793 } 2784 }
2794 } 2785 }
2795 _ControllerEventSinkWrapper[dart.implements] = () => [EventSink$(T)]; 2786 _ControllerEventSinkWrapper[dart.implements] = () => [EventSink$(T)];
2796 return _ControllerEventSinkWrapper; 2787 return _ControllerEventSinkWrapper;
2797 }); 2788 });
2798 let _ControllerEventSinkWrapper = _ControllerEventSinkWrapper$(); 2789 let _ControllerEventSinkWrapper = _ControllerEventSinkWrapper$();
2799 let __CastType12 = dart.typedef('__CastType12', () => dart.functionType(dart.v oid, [StreamSubscription])); 2790 let __CastType12 = dart.typedef('__CastType12', dart.functionType(dart.void, [ StreamSubscription]));
2800 let __CastType14 = dart.typedef('__CastType14', () => dart.functionType(dart.d ynamic, [dart.dynamic, core.StackTrace])); 2791 let __CastType14 = dart.typedef('__CastType14', dart.functionType(dart.dynamic , [dart.dynamic, core.StackTrace]));
2801 let __CastType17 = dart.typedef('__CastType17', () => dart.functionType(dart.v oid, [])); 2792 let __CastType17 = dart.typedef('__CastType17', dart.functionType(dart.void, [ ]));
2802 let __CastType18 = dart.typedef('__CastType18', () => dart.functionType(dart.v oid, [EventSink])); 2793 let __CastType18 = dart.typedef('__CastType18', dart.functionType(dart.void, [ EventSink]));
2803 let StreamController$ = dart.generic(function(T) { 2794 let StreamController$ = dart.generic(function(T) {
2804 class StreamController extends core.Object { 2795 class StreamController extends core.Object {
2805 StreamController(opts) { 2796 StreamController(opts) {
2806 let onListen = opts && 'onListen' in opts ? opts.onListen : null; 2797 let onListen = opts && 'onListen' in opts ? opts.onListen : null;
2807 let onPause = opts && 'onPause' in opts ? opts.onPause : null; 2798 let onPause = opts && 'onPause' in opts ? opts.onPause : null;
2808 let onResume = opts && 'onResume' in opts ? opts.onResume : null; 2799 let onResume = opts && 'onResume' in opts ? opts.onResume : null;
2809 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; 2800 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null;
2810 let sync = opts && 'sync' in opts ? opts.sync : false; 2801 let sync = opts && 'sync' in opts ? opts.sync : false;
2811 if (dart.notNull(onListen == null) && dart.notNull(onPause == null) && d art.notNull(onResume == null) && dart.notNull(onCancel == null)) { 2802 if (dart.notNull(onListen == null) && dart.notNull(onPause == null) && d art.notNull(onResume == null) && dart.notNull(onCancel == null)) {
2812 return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoC allbackAsyncStreamController(), StreamController$(T)); 2803 return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoC allbackAsyncStreamController(), StreamController$(T));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2844 let _varData = Symbol('_varData'); 2835 let _varData = Symbol('_varData');
2845 let _isInitialState = Symbol('_isInitialState'); 2836 let _isInitialState = Symbol('_isInitialState');
2846 let _subscription = Symbol('_subscription'); 2837 let _subscription = Symbol('_subscription');
2847 let _pendingEvents = Symbol('_pendingEvents'); 2838 let _pendingEvents = Symbol('_pendingEvents');
2848 let _ensurePendingEvents = Symbol('_ensurePendingEvents'); 2839 let _ensurePendingEvents = Symbol('_ensurePendingEvents');
2849 let _badEventState = Symbol('_badEventState'); 2840 let _badEventState = Symbol('_badEventState');
2850 let _StreamController$ = dart.generic(function(T) { 2841 let _StreamController$ = dart.generic(function(T) {
2851 class _StreamController extends core.Object { 2842 class _StreamController extends core.Object {
2852 _StreamController() { 2843 _StreamController() {
2853 this[_varData] = null; 2844 this[_varData] = null;
2854 this[_state] = _StreamController._STATE_INITIAL; 2845 this[_state] = _StreamController$()._STATE_INITIAL;
2855 this[_doneFuture] = null; 2846 this[_doneFuture] = null;
2856 } 2847 }
2857 get stream() { 2848 get stream() {
2858 return new (_ControllerStream$(T))(this); 2849 return new (_ControllerStream$(T))(this);
2859 } 2850 }
2860 get sink() { 2851 get sink() {
2861 return new (_StreamSinkWrapper$(T))(this); 2852 return new (_StreamSinkWrapper$(T))(this);
2862 } 2853 }
2863 get [_isCanceled]() { 2854 get [_isCanceled]() {
2864 return (dart.notNull(this[_state]) & dart.notNull(_StreamController._STA TE_CANCELED)) != 0; 2855 return (dart.notNull(this[_state]) & dart.notNull(_StreamController$()._ STATE_CANCELED)) != 0;
2865 } 2856 }
2866 get hasListener() { 2857 get hasListener() {
2867 return (dart.notNull(this[_state]) & dart.notNull(_StreamController._STA TE_SUBSCRIBED)) != 0; 2858 return (dart.notNull(this[_state]) & dart.notNull(_StreamController$()._ STATE_SUBSCRIBED)) != 0;
2868 } 2859 }
2869 get [_isInitialState]() { 2860 get [_isInitialState]() {
2870 return (dart.notNull(this[_state]) & dart.notNull(_StreamController._STA TE_SUBSCRIPTION_MASK)) == _StreamController._STATE_INITIAL; 2861 return (dart.notNull(this[_state]) & dart.notNull(_StreamController$()._ STATE_SUBSCRIPTION_MASK)) == _StreamController$()._STATE_INITIAL;
2871 } 2862 }
2872 get isClosed() { 2863 get isClosed() {
2873 return (dart.notNull(this[_state]) & dart.notNull(_StreamController._STA TE_CLOSED)) != 0; 2864 return (dart.notNull(this[_state]) & dart.notNull(_StreamController$()._ STATE_CLOSED)) != 0;
2874 } 2865 }
2875 get isPaused() { 2866 get isPaused() {
2876 return this.hasListener ? this[_subscription][_isInputPaused] : !dart.no tNull(this[_isCanceled]); 2867 return this.hasListener ? this[_subscription][_isInputPaused] : !dart.no tNull(this[_isCanceled]);
2877 } 2868 }
2878 get [_isAddingStream]() { 2869 get [_isAddingStream]() {
2879 return (dart.notNull(this[_state]) & dart.notNull(_StreamController._STA TE_ADDSTREAM)) != 0; 2870 return (dart.notNull(this[_state]) & dart.notNull(_StreamController$()._ STATE_ADDSTREAM)) != 0;
2880 } 2871 }
2881 get [_mayAddEvent]() { 2872 get [_mayAddEvent]() {
2882 return dart.notNull(this[_state]) < dart.notNull(_StreamController._STAT E_CLOSED); 2873 return dart.notNull(this[_state]) < dart.notNull(_StreamController$()._S TATE_CLOSED);
2883 } 2874 }
2884 get [_pendingEvents]() { 2875 get [_pendingEvents]() {
2885 dart.assert(this[_isInitialState]); 2876 dart.assert(this[_isInitialState]);
2886 if (!dart.notNull(this[_isAddingStream])) { 2877 if (!dart.notNull(this[_isAddingStream])) {
2887 return dart.as(this[_varData], _PendingEvents); 2878 return dart.as(this[_varData], _PendingEvents);
2888 } 2879 }
2889 let state = dart.as(this[_varData], _StreamControllerAddStreamState); 2880 let state = dart.as(this[_varData], _StreamControllerAddStreamState);
2890 return dart.as(state.varData, _PendingEvents); 2881 return dart.as(state.varData, _PendingEvents);
2891 } 2882 }
2892 [_ensurePendingEvents]() { 2883 [_ensurePendingEvents]() {
(...skipping 25 matching lines...) Expand all
2918 } 2909 }
2919 addStream(source, opts) { 2910 addStream(source, opts) {
2920 dart.as(source, Stream$(T)); 2911 dart.as(source, Stream$(T));
2921 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : true; 2912 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : true;
2922 if (!dart.notNull(this[_mayAddEvent])) 2913 if (!dart.notNull(this[_mayAddEvent]))
2923 throw this[_badEventState](); 2914 throw this[_badEventState]();
2924 if (this[_isCanceled]) 2915 if (this[_isCanceled])
2925 return new _Future.immediate(null); 2916 return new _Future.immediate(null);
2926 let addState = new _StreamControllerAddStreamState(this, this[_varData], source, cancelOnError); 2917 let addState = new _StreamControllerAddStreamState(this, this[_varData], source, cancelOnError);
2927 this[_varData] = addState; 2918 this[_varData] = addState;
2928 this[_state] = dart.notNull(this[_state]) | dart.notNull(_StreamControll er._STATE_ADDSTREAM); 2919 this[_state] = dart.notNull(this[_state]) | dart.notNull(_StreamControll er$()._STATE_ADDSTREAM);
2929 return addState.addStreamFuture; 2920 return addState.addStreamFuture;
2930 } 2921 }
2931 get done() { 2922 get done() {
2932 return this[_ensureDoneFuture](); 2923 return this[_ensureDoneFuture]();
2933 } 2924 }
2934 [_ensureDoneFuture]() { 2925 [_ensureDoneFuture]() {
2935 if (this[_doneFuture] == null) { 2926 if (this[_doneFuture] == null) {
2936 this[_doneFuture] = this[_isCanceled] ? Future._nullFuture : new _Futu re(); 2927 this[_doneFuture] = this[_isCanceled] ? Future._nullFuture : new _Futu re();
2937 } 2928 }
2938 return this[_doneFuture]; 2929 return this[_doneFuture];
(...skipping 20 matching lines...) Expand all
2959 close() { 2950 close() {
2960 if (this.isClosed) { 2951 if (this.isClosed) {
2961 return this[_ensureDoneFuture](); 2952 return this[_ensureDoneFuture]();
2962 } 2953 }
2963 if (!dart.notNull(this[_mayAddEvent])) 2954 if (!dart.notNull(this[_mayAddEvent]))
2964 throw this[_badEventState](); 2955 throw this[_badEventState]();
2965 this[_closeUnchecked](); 2956 this[_closeUnchecked]();
2966 return this[_ensureDoneFuture](); 2957 return this[_ensureDoneFuture]();
2967 } 2958 }
2968 [_closeUnchecked]() { 2959 [_closeUnchecked]() {
2969 this[_state] = dart.notNull(this[_state]) | dart.notNull(_StreamControll er._STATE_CLOSED); 2960 this[_state] = dart.notNull(this[_state]) | dart.notNull(_StreamControll er$()._STATE_CLOSED);
2970 if (this.hasListener) { 2961 if (this.hasListener) {
2971 this[_sendDone](); 2962 this[_sendDone]();
2972 } else if (this[_isInitialState]) { 2963 } else if (this[_isInitialState]) {
2973 this[_ensurePendingEvents]().add(dart.const(new _DelayedDone())); 2964 this[_ensurePendingEvents]().add(dart.const(new _DelayedDone()));
2974 } 2965 }
2975 } 2966 }
2976 [_add](value) { 2967 [_add](value) {
2977 dart.as(value, T); 2968 dart.as(value, T);
2978 if (this.hasListener) { 2969 if (this.hasListener) {
2979 this[_sendData](value); 2970 this[_sendData](value);
2980 } else if (this[_isInitialState]) { 2971 } else if (this[_isInitialState]) {
2981 this[_ensurePendingEvents]().add(new (_DelayedData$(T))(value)); 2972 this[_ensurePendingEvents]().add(new (_DelayedData$(T))(value));
2982 } 2973 }
2983 } 2974 }
2984 [_addError](error, stackTrace) { 2975 [_addError](error, stackTrace) {
2985 if (this.hasListener) { 2976 if (this.hasListener) {
2986 this[_sendError](error, stackTrace); 2977 this[_sendError](error, stackTrace);
2987 } else if (this[_isInitialState]) { 2978 } else if (this[_isInitialState]) {
2988 this[_ensurePendingEvents]().add(new _DelayedError(error, stackTrace)) ; 2979 this[_ensurePendingEvents]().add(new _DelayedError(error, stackTrace)) ;
2989 } 2980 }
2990 } 2981 }
2991 [_close]() { 2982 [_close]() {
2992 dart.assert(this[_isAddingStream]); 2983 dart.assert(this[_isAddingStream]);
2993 let addState = dart.as(this[_varData], _StreamControllerAddStreamState); 2984 let addState = dart.as(this[_varData], _StreamControllerAddStreamState);
2994 this[_varData] = addState.varData; 2985 this[_varData] = addState.varData;
2995 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_StreamControl ler._STATE_ADDSTREAM); 2986 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_StreamControl ler$()._STATE_ADDSTREAM);
2996 addState.complete(); 2987 addState.complete();
2997 } 2988 }
2998 [_subscribe](onData, onError, onDone, cancelOnError) { 2989 [_subscribe](onData, onError, onDone, cancelOnError) {
2999 dart.as(onData, dart.functionType(dart.void, [T])); 2990 dart.as(onData, dart.functionType(dart.void, [T]));
3000 dart.as(onDone, dart.functionType(dart.void, [])); 2991 dart.as(onDone, dart.functionType(dart.void, []));
3001 if (!dart.notNull(this[_isInitialState])) { 2992 if (!dart.notNull(this[_isInitialState])) {
3002 throw new core.StateError("Stream has already been listened to."); 2993 throw new core.StateError("Stream has already been listened to.");
3003 } 2994 }
3004 let subscription = new _ControllerSubscription(this, onData, onError, on Done, cancelOnError); 2995 let subscription = new _ControllerSubscription(this, onData, onError, on Done, cancelOnError);
3005 let pendingEvents = this[_pendingEvents]; 2996 let pendingEvents = this[_pendingEvents];
3006 this[_state] = dart.notNull(this[_state]) | dart.notNull(_StreamControll er._STATE_SUBSCRIBED); 2997 this[_state] = dart.notNull(this[_state]) | dart.notNull(_StreamControll er$()._STATE_SUBSCRIBED);
3007 if (this[_isAddingStream]) { 2998 if (this[_isAddingStream]) {
3008 let addState = dart.as(this[_varData], _StreamControllerAddStreamState ); 2999 let addState = dart.as(this[_varData], _StreamControllerAddStreamState );
3009 addState.varData = subscription; 3000 addState.varData = subscription;
3010 addState.resume(); 3001 addState.resume();
3011 } else { 3002 } else {
3012 this[_varData] = subscription; 3003 this[_varData] = subscription;
3013 } 3004 }
3014 subscription[_setPendingEvents](pendingEvents); 3005 subscription[_setPendingEvents](pendingEvents);
3015 subscription[_guardCallback]((() => { 3006 subscription[_guardCallback]((() => {
3016 _runGuarded(this[_onListen]); 3007 _runGuarded(this[_onListen]);
3017 }).bind(this)); 3008 }).bind(this));
3018 return dart.as(subscription, StreamSubscription$(T)); 3009 return dart.as(subscription, StreamSubscription$(T));
3019 } 3010 }
3020 [_recordCancel](subscription) { 3011 [_recordCancel](subscription) {
3021 dart.as(subscription, StreamSubscription$(T)); 3012 dart.as(subscription, StreamSubscription$(T));
3022 let result = null; 3013 let result = null;
3023 if (this[_isAddingStream]) { 3014 if (this[_isAddingStream]) {
3024 let addState = dart.as(this[_varData], _StreamControllerAddStreamState ); 3015 let addState = dart.as(this[_varData], _StreamControllerAddStreamState );
3025 result = addState.cancel(); 3016 result = addState.cancel();
3026 } 3017 }
3027 this[_varData] = null; 3018 this[_varData] = null;
3028 this[_state] = dart.notNull(this[_state]) & ~(dart.notNull(_StreamContro ller._STATE_SUBSCRIBED) | dart.notNull(_StreamController._STATE_ADDSTREAM)) | da rt.notNull(_StreamController._STATE_CANCELED); 3019 this[_state] = dart.notNull(this[_state]) & ~(dart.notNull(_StreamContro ller$()._STATE_SUBSCRIBED) | dart.notNull(_StreamController$()._STATE_ADDSTREAM) ) | dart.notNull(_StreamController$()._STATE_CANCELED);
3029 if (this[_onCancel] != null) { 3020 if (this[_onCancel] != null) {
3030 if (result == null) { 3021 if (result == null) {
3031 try { 3022 try {
3032 result = dart.as(this[_onCancel](), Future); 3023 result = dart.as(this[_onCancel](), Future);
3033 } catch (e) { 3024 } catch (e) {
3034 let s = dart.stackTrace(e); 3025 let s = dart.stackTrace(e);
3035 result = new _Future(); 3026 result = new _Future();
3036 result[_asyncCompleteError](e, s); 3027 result[_asyncCompleteError](e, s);
3037 } 3028 }
3038 3029
(...skipping 25 matching lines...) Expand all
3064 [_recordResume](subscription) { 3055 [_recordResume](subscription) {
3065 dart.as(subscription, StreamSubscription$(T)); 3056 dart.as(subscription, StreamSubscription$(T));
3066 if (this[_isAddingStream]) { 3057 if (this[_isAddingStream]) {
3067 let addState = dart.as(this[_varData], _StreamControllerAddStreamState ); 3058 let addState = dart.as(this[_varData], _StreamControllerAddStreamState );
3068 addState.resume(); 3059 addState.resume();
3069 } 3060 }
3070 _runGuarded(this[_onResume]); 3061 _runGuarded(this[_onResume]);
3071 } 3062 }
3072 } 3063 }
3073 _StreamController[dart.implements] = () => [StreamController$(T), _StreamCon trollerLifecycle$(T), _EventSink$(T), _EventDispatch$(T)]; 3064 _StreamController[dart.implements] = () => [StreamController$(T), _StreamCon trollerLifecycle$(T), _EventSink$(T), _EventDispatch$(T)];
3074 _StreamController._STATE_INITIAL = 0;
3075 _StreamController._STATE_SUBSCRIBED = 1;
3076 _StreamController._STATE_CANCELED = 2;
3077 _StreamController._STATE_SUBSCRIPTION_MASK = 3;
3078 _StreamController._STATE_CLOSED = 4;
3079 _StreamController._STATE_ADDSTREAM = 8;
3080 return _StreamController; 3065 return _StreamController;
3081 }); 3066 });
3082 let _StreamController = _StreamController$(); 3067 let _StreamController = _StreamController$();
3068 _StreamController._STATE_INITIAL = 0;
3069 _StreamController._STATE_SUBSCRIBED = 1;
3070 _StreamController._STATE_CANCELED = 2;
3071 _StreamController._STATE_SUBSCRIPTION_MASK = 3;
3072 _StreamController._STATE_CLOSED = 4;
3073 _StreamController._STATE_ADDSTREAM = 8;
3083 let _SyncStreamControllerDispatch$ = dart.generic(function(T) { 3074 let _SyncStreamControllerDispatch$ = dart.generic(function(T) {
3084 class _SyncStreamControllerDispatch extends core.Object { 3075 class _SyncStreamControllerDispatch extends core.Object {
3085 [_sendData](data) { 3076 [_sendData](data) {
3086 dart.as(data, T); 3077 dart.as(data, T);
3087 this[_subscription][_add](data); 3078 this[_subscription][_add](data);
3088 } 3079 }
3089 [_sendError](error, stackTrace) { 3080 [_sendError](error, stackTrace) {
3090 this[_subscription][_addError](error, stackTrace); 3081 this[_subscription][_addError](error, stackTrace);
3091 } 3082 }
3092 [_sendDone]() { 3083 [_sendDone]() {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
3149 } 3140 }
3150 get [_onResume]() { 3141 get [_onResume]() {
3151 return null; 3142 return null;
3152 } 3143 }
3153 get [_onCancel]() { 3144 get [_onCancel]() {
3154 return null; 3145 return null;
3155 } 3146 }
3156 } 3147 }
3157 class _NoCallbackAsyncStreamController extends dart.mixin(_StreamController, _ AsyncStreamControllerDispatch, _NoCallbacks) {} 3148 class _NoCallbackAsyncStreamController extends dart.mixin(_StreamController, _ AsyncStreamControllerDispatch, _NoCallbacks) {}
3158 class _NoCallbackSyncStreamController extends dart.mixin(_StreamController, _S yncStreamControllerDispatch, _NoCallbacks) {} 3149 class _NoCallbackSyncStreamController extends dart.mixin(_StreamController, _S yncStreamControllerDispatch, _NoCallbacks) {}
3159 let _NotificationHandler = dart.typedef('_NotificationHandler', () => dart.fun ctionType(dart.dynamic, [])); 3150 let _NotificationHandler = dart.typedef('_NotificationHandler', dart.functionT ype(dart.dynamic, []));
3160 // Function _runGuarded: (() → dynamic) → Future<dynamic> 3151 // Function _runGuarded: (() → dynamic) → Future<dynamic>
3161 function _runGuarded(notificationHandler) { 3152 function _runGuarded(notificationHandler) {
3162 if (notificationHandler == null) 3153 if (notificationHandler == null)
3163 return null; 3154 return null;
3164 try { 3155 try {
3165 let result = notificationHandler(); 3156 let result = notificationHandler();
3166 if (dart.is(result, Future)) 3157 if (dart.is(result, Future))
3167 return dart.as(result, Future); 3158 return dart.as(result, Future);
3168 return null; 3159 return null;
3169 } catch (e) { 3160 } catch (e) {
(...skipping 30 matching lines...) Expand all
3200 } 3191 }
3201 } 3192 }
3202 _StreamSinkWrapper[dart.implements] = () => [StreamSink$(T)]; 3193 _StreamSinkWrapper[dart.implements] = () => [StreamSink$(T)];
3203 return _StreamSinkWrapper; 3194 return _StreamSinkWrapper;
3204 }); 3195 });
3205 let _StreamSinkWrapper = _StreamSinkWrapper$(); 3196 let _StreamSinkWrapper = _StreamSinkWrapper$();
3206 let _AddStreamState$ = dart.generic(function(T) { 3197 let _AddStreamState$ = dart.generic(function(T) {
3207 class _AddStreamState extends core.Object { 3198 class _AddStreamState extends core.Object {
3208 _AddStreamState(controller, source, cancelOnError) { 3199 _AddStreamState(controller, source, cancelOnError) {
3209 this.addStreamFuture = new _Future(); 3200 this.addStreamFuture = new _Future();
3210 this.addSubscription = source.listen(controller[_add].bind(controller), {onError: cancelOnError ? dart.as(_AddStreamState.makeErrorHandler(controller), core.Function) : controller[_addError].bind(controller), onDone: controller[_clo se].bind(controller), cancelOnError: cancelOnError}); 3201 this.addSubscription = source.listen(controller[_add].bind(controller), {onError: cancelOnError ? dart.as(_AddStreamState$().makeErrorHandler(controller ), core.Function) : controller[_addError].bind(controller), onDone: controller[_ close].bind(controller), cancelOnError: cancelOnError});
3211 } 3202 }
3212 static makeErrorHandler(controller) { 3203 static makeErrorHandler(controller) {
3213 return (e, s) => { 3204 return (e, s) => {
3214 controller[_addError](e, s); 3205 controller[_addError](e, s);
3215 controller[_close](); 3206 controller[_close]();
3216 }; 3207 };
3217 } 3208 }
3218 pause() { 3209 pause() {
3219 this.addSubscription.pause(); 3210 this.addSubscription.pause();
3220 } 3211 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3254 let _EventSink$ = dart.generic(function(T) { 3245 let _EventSink$ = dart.generic(function(T) {
3255 class _EventSink extends core.Object {} 3246 class _EventSink extends core.Object {}
3256 return _EventSink; 3247 return _EventSink;
3257 }); 3248 });
3258 let _EventSink = _EventSink$(); 3249 let _EventSink = _EventSink$();
3259 let _EventDispatch$ = dart.generic(function(T) { 3250 let _EventDispatch$ = dart.generic(function(T) {
3260 class _EventDispatch extends core.Object {} 3251 class _EventDispatch extends core.Object {}
3261 return _EventDispatch; 3252 return _EventDispatch;
3262 }); 3253 });
3263 let _EventDispatch = _EventDispatch$(); 3254 let _EventDispatch = _EventDispatch$();
3264 let _EventGenerator = dart.typedef('_EventGenerator', () => dart.functionType( _PendingEvents, [])); 3255 _BufferingStreamSubscription._STATE_CANCEL_ON_ERROR = 1;
3265 let _isUsed = Symbol('_isUsed'); 3256 _BufferingStreamSubscription._STATE_CLOSED = 2;
3266 let _GeneratedStreamImpl$ = dart.generic(function(T) { 3257 _BufferingStreamSubscription._STATE_INPUT_PAUSED = 4;
3267 class _GeneratedStreamImpl extends _StreamImpl$(T) { 3258 _BufferingStreamSubscription._STATE_CANCELED = 8;
3268 _GeneratedStreamImpl(pending) { 3259 _BufferingStreamSubscription._STATE_WAIT_FOR_CANCEL = 16;
3269 this[_pending] = pending; 3260 _BufferingStreamSubscription._STATE_IN_CALLBACK = 32;
3270 this[_isUsed] = false; 3261 _BufferingStreamSubscription._STATE_HAS_PENDING = 64;
3271 } 3262 _BufferingStreamSubscription._STATE_PAUSE_COUNT = 128;
3272 [_createSubscription](onData, onError, onDone, cancelOnError) { 3263 _BufferingStreamSubscription._STATE_PAUSE_COUNT_SHIFT = 7;
3273 dart.as(onData, dart.functionType(dart.void, [T]));
3274 dart.as(onDone, dart.functionType(dart.void, []));
3275 if (this[_isUsed])
3276 throw new core.StateError("Stream has already been listened to.");
3277 this[_isUsed] = true;
3278 return dart.as((() => {
3279 let _ = new _BufferingStreamSubscription(onData, onError, onDone, canc elOnError);
3280 _[_setPendingEvents](this[_pending]());
3281 return _;
3282 }).bind(this)(), StreamSubscription$(T));
3283 }
3284 }
3285 return _GeneratedStreamImpl;
3286 });
3287 let _GeneratedStreamImpl = _GeneratedStreamImpl$();
3288 let _iterator = Symbol('_iterator');
3289 let _eventScheduled = Symbol('_eventScheduled'); 3264 let _eventScheduled = Symbol('_eventScheduled');
3290 class _PendingEvents extends core.Object { 3265 class _PendingEvents extends core.Object {
3291 _PendingEvents() { 3266 _PendingEvents() {
3292 this[_state] = _PendingEvents._STATE_UNSCHEDULED; 3267 this[_state] = _PendingEvents._STATE_UNSCHEDULED;
3293 } 3268 }
3294 get isScheduled() { 3269 get isScheduled() {
3295 return this[_state] == _PendingEvents._STATE_SCHEDULED; 3270 return this[_state] == _PendingEvents._STATE_SCHEDULED;
3296 } 3271 }
3297 get [_eventScheduled]() { 3272 get [_eventScheduled]() {
3298 return dart.notNull(this[_state]) >= dart.notNull(_PendingEvents._STATE_SC HEDULED); 3273 return dart.notNull(this[_state]) >= dart.notNull(_PendingEvents._STATE_SC HEDULED);
(...skipping 14 matching lines...) Expand all
3313 return; 3288 return;
3314 this.handleNext(dispatch); 3289 this.handleNext(dispatch);
3315 }).bind(this)); 3290 }).bind(this));
3316 this[_state] = _PendingEvents._STATE_SCHEDULED; 3291 this[_state] = _PendingEvents._STATE_SCHEDULED;
3317 } 3292 }
3318 cancelSchedule() { 3293 cancelSchedule() {
3319 if (this.isScheduled) 3294 if (this.isScheduled)
3320 this[_state] = _PendingEvents._STATE_CANCELED; 3295 this[_state] = _PendingEvents._STATE_CANCELED;
3321 } 3296 }
3322 } 3297 }
3323 _PendingEvents._STATE_UNSCHEDULED = 0; 3298 let _EventGenerator = dart.typedef('_EventGenerator', dart.functionType(_Pendi ngEvents, []));
3324 _PendingEvents._STATE_SCHEDULED = 1; 3299 let _isUsed = Symbol('_isUsed');
3325 _PendingEvents._STATE_CANCELED = 3; 3300 let _GeneratedStreamImpl$ = dart.generic(function(T) {
3301 class _GeneratedStreamImpl extends _StreamImpl$(T) {
3302 _GeneratedStreamImpl(pending) {
3303 this[_pending] = pending;
3304 this[_isUsed] = false;
3305 }
3306 [_createSubscription](onData, onError, onDone, cancelOnError) {
3307 dart.as(onData, dart.functionType(dart.void, [T]));
3308 dart.as(onDone, dart.functionType(dart.void, []));
3309 if (this[_isUsed])
3310 throw new core.StateError("Stream has already been listened to.");
3311 this[_isUsed] = true;
3312 return dart.as((() => {
3313 let _ = new _BufferingStreamSubscription(onData, onError, onDone, canc elOnError);
3314 _[_setPendingEvents](this[_pending]());
3315 return _;
3316 }).bind(this)(), StreamSubscription$(T));
3317 }
3318 }
3319 return _GeneratedStreamImpl;
3320 });
3321 let _GeneratedStreamImpl = _GeneratedStreamImpl$();
3322 let _iterator = Symbol('_iterator');
3326 let _IterablePendingEvents$ = dart.generic(function(T) { 3323 let _IterablePendingEvents$ = dart.generic(function(T) {
3327 class _IterablePendingEvents extends _PendingEvents { 3324 class _IterablePendingEvents extends _PendingEvents {
3328 _IterablePendingEvents(data) { 3325 _IterablePendingEvents(data) {
3329 this[_iterator] = data[core.$iterator]; 3326 this[_iterator] = data[core.$iterator];
3330 super._PendingEvents(); 3327 super._PendingEvents();
3331 } 3328 }
3332 get isEmpty() { 3329 get isEmpty() {
3333 return this[_iterator] == null; 3330 return this[_iterator] == null;
3334 } 3331 }
3335 handleNext(dispatch) { 3332 handleNext(dispatch) {
(...skipping 20 matching lines...) Expand all
3356 clear() { 3353 clear() {
3357 if (this.isScheduled) 3354 if (this.isScheduled)
3358 this.cancelSchedule(); 3355 this.cancelSchedule();
3359 this[_iterator] = null; 3356 this[_iterator] = null;
3360 } 3357 }
3361 } 3358 }
3362 return _IterablePendingEvents; 3359 return _IterablePendingEvents;
3363 }); 3360 });
3364 let _IterablePendingEvents = _IterablePendingEvents$(); 3361 let _IterablePendingEvents = _IterablePendingEvents$();
3365 let _DataHandler$ = dart.generic(function(T) { 3362 let _DataHandler$ = dart.generic(function(T) {
3366 let _DataHandler = dart.typedef('_DataHandler', () => dart.functionType(dart .void, [T])); 3363 let _DataHandler = dart.typedef('_DataHandler', dart.functionType(dart.void, [T]));
3367 return _DataHandler; 3364 return _DataHandler;
3368 }); 3365 });
3369 let _DataHandler = _DataHandler$(); 3366 let _DataHandler = _DataHandler$();
3370 let _DoneHandler = dart.typedef('_DoneHandler', () => dart.functionType(dart.v oid, [])); 3367 let _DoneHandler = dart.typedef('_DoneHandler', dart.functionType(dart.void, [ ]));
3371 // Function _nullDataHandler: (dynamic) → void 3368 // Function _nullDataHandler: (dynamic) → void
3372 function _nullDataHandler(value) { 3369 function _nullDataHandler(value) {
3373 } 3370 }
3374 // Function _nullErrorHandler: (dynamic, [StackTrace]) → void 3371 // Function _nullErrorHandler: (dynamic, [StackTrace]) → void
3375 function _nullErrorHandler(error, stackTrace) { 3372 function _nullErrorHandler(error, stackTrace) {
3376 if (stackTrace === void 0) 3373 if (stackTrace === void 0)
3377 stackTrace = null; 3374 stackTrace = null;
3378 Zone.current.handleUncaughtError(error, stackTrace); 3375 Zone.current.handleUncaughtError(error, stackTrace);
3379 } 3376 }
3380 // Function _nullDoneHandler: () → void 3377 // Function _nullDoneHandler: () → void
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
3420 dispatch[_sendDone](); 3417 dispatch[_sendDone]();
3421 } 3418 }
3422 get next() { 3419 get next() {
3423 return null; 3420 return null;
3424 } 3421 }
3425 set next(_) { 3422 set next(_) {
3426 throw new core.StateError("No events after a done."); 3423 throw new core.StateError("No events after a done.");
3427 } 3424 }
3428 } 3425 }
3429 _DelayedDone[dart.implements] = () => [_DelayedEvent]; 3426 _DelayedDone[dart.implements] = () => [_DelayedEvent];
3427 _PendingEvents._STATE_UNSCHEDULED = 0;
3428 _PendingEvents._STATE_SCHEDULED = 1;
3429 _PendingEvents._STATE_CANCELED = 3;
3430 class _StreamImplEvents extends _PendingEvents { 3430 class _StreamImplEvents extends _PendingEvents {
3431 _StreamImplEvents() { 3431 _StreamImplEvents() {
3432 this.firstPendingEvent = null; 3432 this.firstPendingEvent = null;
3433 this.lastPendingEvent = null; 3433 this.lastPendingEvent = null;
3434 super._PendingEvents(); 3434 super._PendingEvents();
3435 } 3435 }
3436 get isEmpty() { 3436 get isEmpty() {
3437 return this.lastPendingEvent == null; 3437 return this.lastPendingEvent == null;
3438 } 3438 }
3439 add(event) { 3439 add(event) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3471 this[_next] = this[_previous] = this; 3471 this[_next] = this[_previous] = this;
3472 } 3472 }
3473 [_insertBefore](newNext) { 3473 [_insertBefore](newNext) {
3474 let newPrevious = newNext[_previous]; 3474 let newPrevious = newNext[_previous];
3475 newPrevious[_next] = this; 3475 newPrevious[_next] = this;
3476 newNext[_previous] = this[_previous]; 3476 newNext[_previous] = this[_previous];
3477 this[_previous][_next] = newNext; 3477 this[_previous][_next] = newNext;
3478 this[_previous] = newPrevious; 3478 this[_previous] = newPrevious;
3479 } 3479 }
3480 } 3480 }
3481 let _broadcastCallback = dart.typedef('_broadcastCallback', () => dart.functio nType(dart.void, [StreamSubscription])); 3481 let _broadcastCallback = dart.typedef('_broadcastCallback', dart.functionType( dart.void, [StreamSubscription]));
3482 let _schedule = Symbol('_schedule'); 3482 let _schedule = Symbol('_schedule');
3483 let _isSent = Symbol('_isSent'); 3483 let _isSent = Symbol('_isSent');
3484 let _isScheduled = Symbol('_isScheduled'); 3484 let _isScheduled = Symbol('_isScheduled');
3485 let _DoneStreamSubscription$ = dart.generic(function(T) { 3485 let _DoneStreamSubscription$ = dart.generic(function(T) {
3486 class _DoneStreamSubscription extends core.Object { 3486 class _DoneStreamSubscription extends core.Object {
3487 _DoneStreamSubscription(onDone) { 3487 _DoneStreamSubscription(onDone) {
3488 this[_onDone] = onDone; 3488 this[_onDone] = onDone;
3489 this[_zone] = Zone.current; 3489 this[_zone] = Zone.current;
3490 this[_state] = 0; 3490 this[_state] = 0;
3491 this[_schedule](); 3491 this[_schedule]();
3492 } 3492 }
3493 get [_isSent]() { 3493 get [_isSent]() {
3494 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio n._DONE_SENT)) != 0; 3494 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio n$()._DONE_SENT)) != 0;
3495 } 3495 }
3496 get [_isScheduled]() { 3496 get [_isScheduled]() {
3497 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio n._SCHEDULED)) != 0; 3497 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio n$()._SCHEDULED)) != 0;
3498 } 3498 }
3499 get isPaused() { 3499 get isPaused() {
3500 return dart.notNull(this[_state]) >= dart.notNull(_DoneStreamSubscriptio n._PAUSED); 3500 return dart.notNull(this[_state]) >= dart.notNull(_DoneStreamSubscriptio n$()._PAUSED);
3501 } 3501 }
3502 [_schedule]() { 3502 [_schedule]() {
3503 if (this[_isScheduled]) 3503 if (this[_isScheduled])
3504 return; 3504 return;
3505 this[_zone].scheduleMicrotask(this[_sendDone].bind(this)); 3505 this[_zone].scheduleMicrotask(this[_sendDone].bind(this));
3506 this[_state] = dart.notNull(this[_state]) | dart.notNull(_DoneStreamSubs cription._SCHEDULED); 3506 this[_state] = dart.notNull(this[_state]) | dart.notNull(_DoneStreamSubs cription$()._SCHEDULED);
3507 } 3507 }
3508 onData(handleData) { 3508 onData(handleData) {
3509 dart.as(handleData, dart.functionType(dart.void, [T])); 3509 dart.as(handleData, dart.functionType(dart.void, [T]));
3510 } 3510 }
3511 onError(handleError) {} 3511 onError(handleError) {}
3512 onDone(handleDone) { 3512 onDone(handleDone) {
3513 dart.as(handleDone, dart.functionType(dart.void, [])); 3513 dart.as(handleDone, dart.functionType(dart.void, []));
3514 this[_onDone] = handleDone; 3514 this[_onDone] = handleDone;
3515 } 3515 }
3516 pause(resumeSignal) { 3516 pause(resumeSignal) {
3517 if (resumeSignal === void 0) 3517 if (resumeSignal === void 0)
3518 resumeSignal = null; 3518 resumeSignal = null;
3519 this[_state] = dart.notNull(this[_state]) + dart.notNull(_DoneStreamSubs cription._PAUSED); 3519 this[_state] = dart.notNull(this[_state]) + dart.notNull(_DoneStreamSubs cription$()._PAUSED);
3520 if (resumeSignal != null) 3520 if (resumeSignal != null)
3521 resumeSignal.whenComplete(this.resume.bind(this)); 3521 resumeSignal.whenComplete(this.resume.bind(this));
3522 } 3522 }
3523 resume() { 3523 resume() {
3524 if (this.isPaused) { 3524 if (this.isPaused) {
3525 this[_state] = dart.notNull(this[_state]) - dart.notNull(_DoneStreamSu bscription._PAUSED); 3525 this[_state] = dart.notNull(this[_state]) - dart.notNull(_DoneStreamSu bscription$()._PAUSED);
3526 if (!dart.notNull(this.isPaused) && !dart.notNull(this[_isSent])) { 3526 if (!dart.notNull(this.isPaused) && !dart.notNull(this[_isSent])) {
3527 this[_schedule](); 3527 this[_schedule]();
3528 } 3528 }
3529 } 3529 }
3530 } 3530 }
3531 cancel() { 3531 cancel() {
3532 return null; 3532 return null;
3533 } 3533 }
3534 asFuture(futureValue) { 3534 asFuture(futureValue) {
3535 if (futureValue === void 0) 3535 if (futureValue === void 0)
3536 futureValue = null; 3536 futureValue = null;
3537 let result = new _Future(); 3537 let result = new _Future();
3538 this[_onDone] = () => { 3538 this[_onDone] = () => {
3539 result[_completeWithValue](null); 3539 result[_completeWithValue](null);
3540 }; 3540 };
3541 return result; 3541 return result;
3542 } 3542 }
3543 [_sendDone]() { 3543 [_sendDone]() {
3544 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_DoneStreamSub scription._SCHEDULED); 3544 this[_state] = dart.notNull(this[_state]) & ~dart.notNull(_DoneStreamSub scription$()._SCHEDULED);
3545 if (this.isPaused) 3545 if (this.isPaused)
3546 return; 3546 return;
3547 this[_state] = dart.notNull(this[_state]) | dart.notNull(_DoneStreamSubs cription._DONE_SENT); 3547 this[_state] = dart.notNull(this[_state]) | dart.notNull(_DoneStreamSubs cription$()._DONE_SENT);
3548 if (this[_onDone] != null) 3548 if (this[_onDone] != null)
3549 this[_zone].runGuarded(this[_onDone]); 3549 this[_zone].runGuarded(this[_onDone]);
3550 } 3550 }
3551 } 3551 }
3552 _DoneStreamSubscription[dart.implements] = () => [StreamSubscription$(T)]; 3552 _DoneStreamSubscription[dart.implements] = () => [StreamSubscription$(T)];
3553 _DoneStreamSubscription._DONE_SENT = 1;
3554 _DoneStreamSubscription._SCHEDULED = 2;
3555 _DoneStreamSubscription._PAUSED = 4;
3556 return _DoneStreamSubscription; 3553 return _DoneStreamSubscription;
3557 }); 3554 });
3558 let _DoneStreamSubscription = _DoneStreamSubscription$(); 3555 let _DoneStreamSubscription = _DoneStreamSubscription$();
3556 _DoneStreamSubscription._DONE_SENT = 1;
3557 _DoneStreamSubscription._SCHEDULED = 2;
3558 _DoneStreamSubscription._PAUSED = 4;
3559 let _source = Symbol('_source'); 3559 let _source = Symbol('_source');
3560 let _onListenHandler = Symbol('_onListenHandler'); 3560 let _onListenHandler = Symbol('_onListenHandler');
3561 let _onCancelHandler = Symbol('_onCancelHandler'); 3561 let _onCancelHandler = Symbol('_onCancelHandler');
3562 let _cancelSubscription = Symbol('_cancelSubscription'); 3562 let _cancelSubscription = Symbol('_cancelSubscription');
3563 let _pauseSubscription = Symbol('_pauseSubscription'); 3563 let _pauseSubscription = Symbol('_pauseSubscription');
3564 let _resumeSubscription = Symbol('_resumeSubscription'); 3564 let _resumeSubscription = Symbol('_resumeSubscription');
3565 let _isSubscriptionPaused = Symbol('_isSubscriptionPaused'); 3565 let _isSubscriptionPaused = Symbol('_isSubscriptionPaused');
3566 let _AsBroadcastStream$ = dart.generic(function(T) { 3566 let _AsBroadcastStream$ = dart.generic(function(T) {
3567 class _AsBroadcastStream extends Stream$(T) { 3567 class _AsBroadcastStream extends Stream$(T) {
3568 _AsBroadcastStream(source, onListenHandler, onCancelHandler) { 3568 _AsBroadcastStream(source, onListenHandler, onCancelHandler) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3680 let _BroadcastSubscriptionWrapper = _BroadcastSubscriptionWrapper$(); 3680 let _BroadcastSubscriptionWrapper = _BroadcastSubscriptionWrapper$();
3681 let _current = Symbol('_current'); 3681 let _current = Symbol('_current');
3682 let _futureOrPrefetch = Symbol('_futureOrPrefetch'); 3682 let _futureOrPrefetch = Symbol('_futureOrPrefetch');
3683 let _clear = Symbol('_clear'); 3683 let _clear = Symbol('_clear');
3684 let _StreamIteratorImpl$ = dart.generic(function(T) { 3684 let _StreamIteratorImpl$ = dart.generic(function(T) {
3685 class _StreamIteratorImpl extends core.Object { 3685 class _StreamIteratorImpl extends core.Object {
3686 _StreamIteratorImpl(stream) { 3686 _StreamIteratorImpl(stream) {
3687 this[_subscription] = null; 3687 this[_subscription] = null;
3688 this[_current] = null; 3688 this[_current] = null;
3689 this[_futureOrPrefetch] = null; 3689 this[_futureOrPrefetch] = null;
3690 this[_state] = _StreamIteratorImpl._STATE_FOUND; 3690 this[_state] = _StreamIteratorImpl$()._STATE_FOUND;
3691 this[_subscription] = stream.listen(this[_onData].bind(this), {onError: this[_onError].bind(this), onDone: this[_onDone].bind(this), cancelOnError: true }); 3691 this[_subscription] = stream.listen(this[_onData].bind(this), {onError: this[_onError].bind(this), onDone: this[_onDone].bind(this), cancelOnError: true });
3692 } 3692 }
3693 get current() { 3693 get current() {
3694 return this[_current]; 3694 return this[_current];
3695 } 3695 }
3696 moveNext() { 3696 moveNext() {
3697 if (this[_state] == _StreamIteratorImpl._STATE_DONE) { 3697 if (this[_state] == _StreamIteratorImpl$()._STATE_DONE) {
3698 return new (_Future$(core.bool)).immediate(false); 3698 return new (_Future$(core.bool)).immediate(false);
3699 } 3699 }
3700 if (this[_state] == _StreamIteratorImpl._STATE_MOVING) { 3700 if (this[_state] == _StreamIteratorImpl$()._STATE_MOVING) {
3701 throw new core.StateError("Already waiting for next."); 3701 throw new core.StateError("Already waiting for next.");
3702 } 3702 }
3703 if (this[_state] == _StreamIteratorImpl._STATE_FOUND) { 3703 if (this[_state] == _StreamIteratorImpl$()._STATE_FOUND) {
3704 this[_state] = _StreamIteratorImpl._STATE_MOVING; 3704 this[_state] = _StreamIteratorImpl$()._STATE_MOVING;
3705 this[_current] = null; 3705 this[_current] = null;
3706 this[_futureOrPrefetch] = new (_Future$(core.bool))(); 3706 this[_futureOrPrefetch] = new (_Future$(core.bool))();
3707 return dart.as(this[_futureOrPrefetch], Future$(core.bool)); 3707 return dart.as(this[_futureOrPrefetch], Future$(core.bool));
3708 } else { 3708 } else {
3709 dart.assert(dart.notNull(this[_state]) >= dart.notNull(_StreamIterator Impl._STATE_EXTRA_DATA)); 3709 dart.assert(dart.notNull(this[_state]) >= dart.notNull(_StreamIterator Impl$()._STATE_EXTRA_DATA));
3710 switch (this[_state]) { 3710 switch (this[_state]) {
3711 case _StreamIteratorImpl._STATE_EXTRA_DATA: 3711 case _StreamIteratorImpl$()._STATE_EXTRA_DATA:
3712 { 3712 {
3713 this[_state] = _StreamIteratorImpl._STATE_FOUND; 3713 this[_state] = _StreamIteratorImpl$()._STATE_FOUND;
3714 this[_current] = dart.as(this[_futureOrPrefetch], T); 3714 this[_current] = dart.as(this[_futureOrPrefetch], T);
3715 this[_futureOrPrefetch] = null; 3715 this[_futureOrPrefetch] = null;
3716 this[_subscription].resume(); 3716 this[_subscription].resume();
3717 return new (_Future$(core.bool)).immediate(true); 3717 return new (_Future$(core.bool)).immediate(true);
3718 } 3718 }
3719 case _StreamIteratorImpl._STATE_EXTRA_ERROR: 3719 case _StreamIteratorImpl$()._STATE_EXTRA_ERROR:
3720 { 3720 {
3721 let prefetch = dart.as(this[_futureOrPrefetch], AsyncError); 3721 let prefetch = dart.as(this[_futureOrPrefetch], AsyncError);
3722 this[_clear](); 3722 this[_clear]();
3723 return new (_Future$(core.bool)).immediateError(prefetch.error, pr efetch.stackTrace); 3723 return new (_Future$(core.bool)).immediateError(prefetch.error, pr efetch.stackTrace);
3724 } 3724 }
3725 case _StreamIteratorImpl._STATE_EXTRA_DONE: 3725 case _StreamIteratorImpl$()._STATE_EXTRA_DONE:
3726 { 3726 {
3727 this[_clear](); 3727 this[_clear]();
3728 return new (_Future$(core.bool)).immediate(false); 3728 return new (_Future$(core.bool)).immediate(false);
3729 } 3729 }
3730 } 3730 }
3731 } 3731 }
3732 } 3732 }
3733 [_clear]() { 3733 [_clear]() {
3734 this[_subscription] = null; 3734 this[_subscription] = null;
3735 this[_futureOrPrefetch] = null; 3735 this[_futureOrPrefetch] = null;
3736 this[_current] = null; 3736 this[_current] = null;
3737 this[_state] = _StreamIteratorImpl._STATE_DONE; 3737 this[_state] = _StreamIteratorImpl$()._STATE_DONE;
3738 } 3738 }
3739 cancel() { 3739 cancel() {
3740 let subscription = this[_subscription]; 3740 let subscription = this[_subscription];
3741 if (this[_state] == _StreamIteratorImpl._STATE_MOVING) { 3741 if (this[_state] == _StreamIteratorImpl$()._STATE_MOVING) {
3742 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); 3742 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
3743 this[_clear](); 3743 this[_clear]();
3744 hasNext[_complete](false); 3744 hasNext[_complete](false);
3745 } else { 3745 } else {
3746 this[_clear](); 3746 this[_clear]();
3747 } 3747 }
3748 return subscription.cancel(); 3748 return subscription.cancel();
3749 } 3749 }
3750 [_onData](data) { 3750 [_onData](data) {
3751 dart.as(data, T); 3751 dart.as(data, T);
3752 if (this[_state] == _StreamIteratorImpl._STATE_MOVING) { 3752 if (this[_state] == _StreamIteratorImpl$()._STATE_MOVING) {
3753 this[_current] = data; 3753 this[_current] = data;
3754 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); 3754 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
3755 this[_futureOrPrefetch] = null; 3755 this[_futureOrPrefetch] = null;
3756 this[_state] = _StreamIteratorImpl._STATE_FOUND; 3756 this[_state] = _StreamIteratorImpl$()._STATE_FOUND;
3757 hasNext[_complete](true); 3757 hasNext[_complete](true);
3758 return; 3758 return;
3759 } 3759 }
3760 this[_subscription].pause(); 3760 this[_subscription].pause();
3761 dart.assert(this[_futureOrPrefetch] == null); 3761 dart.assert(this[_futureOrPrefetch] == null);
3762 this[_futureOrPrefetch] = data; 3762 this[_futureOrPrefetch] = data;
3763 this[_state] = _StreamIteratorImpl._STATE_EXTRA_DATA; 3763 this[_state] = _StreamIteratorImpl$()._STATE_EXTRA_DATA;
3764 } 3764 }
3765 [_onError](error, stackTrace) { 3765 [_onError](error, stackTrace) {
3766 if (stackTrace === void 0) 3766 if (stackTrace === void 0)
3767 stackTrace = null; 3767 stackTrace = null;
3768 if (this[_state] == _StreamIteratorImpl._STATE_MOVING) { 3768 if (this[_state] == _StreamIteratorImpl$()._STATE_MOVING) {
3769 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); 3769 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
3770 this[_clear](); 3770 this[_clear]();
3771 hasNext[_completeError](error, stackTrace); 3771 hasNext[_completeError](error, stackTrace);
3772 return; 3772 return;
3773 } 3773 }
3774 this[_subscription].pause(); 3774 this[_subscription].pause();
3775 dart.assert(this[_futureOrPrefetch] == null); 3775 dart.assert(this[_futureOrPrefetch] == null);
3776 this[_futureOrPrefetch] = new AsyncError(error, stackTrace); 3776 this[_futureOrPrefetch] = new AsyncError(error, stackTrace);
3777 this[_state] = _StreamIteratorImpl._STATE_EXTRA_ERROR; 3777 this[_state] = _StreamIteratorImpl$()._STATE_EXTRA_ERROR;
3778 } 3778 }
3779 [_onDone]() { 3779 [_onDone]() {
3780 if (this[_state] == _StreamIteratorImpl._STATE_MOVING) { 3780 if (this[_state] == _StreamIteratorImpl$()._STATE_MOVING) {
3781 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); 3781 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
3782 this[_clear](); 3782 this[_clear]();
3783 hasNext[_complete](false); 3783 hasNext[_complete](false);
3784 return; 3784 return;
3785 } 3785 }
3786 this[_subscription].pause(); 3786 this[_subscription].pause();
3787 this[_futureOrPrefetch] = null; 3787 this[_futureOrPrefetch] = null;
3788 this[_state] = _StreamIteratorImpl._STATE_EXTRA_DONE; 3788 this[_state] = _StreamIteratorImpl$()._STATE_EXTRA_DONE;
3789 } 3789 }
3790 } 3790 }
3791 _StreamIteratorImpl[dart.implements] = () => [StreamIterator$(T)]; 3791 _StreamIteratorImpl[dart.implements] = () => [StreamIterator$(T)];
3792 _StreamIteratorImpl._STATE_FOUND = 0;
3793 _StreamIteratorImpl._STATE_DONE = 1;
3794 _StreamIteratorImpl._STATE_MOVING = 2;
3795 _StreamIteratorImpl._STATE_EXTRA_DATA = 3;
3796 _StreamIteratorImpl._STATE_EXTRA_ERROR = 4;
3797 _StreamIteratorImpl._STATE_EXTRA_DONE = 5;
3798 return _StreamIteratorImpl; 3792 return _StreamIteratorImpl;
3799 }); 3793 });
3800 let _StreamIteratorImpl = _StreamIteratorImpl$(); 3794 let _StreamIteratorImpl = _StreamIteratorImpl$();
3795 _StreamIteratorImpl._STATE_FOUND = 0;
3796 _StreamIteratorImpl._STATE_DONE = 1;
3797 _StreamIteratorImpl._STATE_MOVING = 2;
3798 _StreamIteratorImpl._STATE_EXTRA_DATA = 3;
3799 _StreamIteratorImpl._STATE_EXTRA_ERROR = 4;
3800 _StreamIteratorImpl._STATE_EXTRA_DONE = 5;
3801 let __CastType20$ = dart.generic(function(T) { 3801 let __CastType20$ = dart.generic(function(T) {
3802 let __CastType20 = dart.typedef('__CastType20', () => dart.functionType(dart .void, [T])); 3802 let __CastType20 = dart.typedef('__CastType20', dart.functionType(dart.void, [T]));
3803 return __CastType20; 3803 return __CastType20;
3804 }); 3804 });
3805 let __CastType20 = __CastType20$(); 3805 let __CastType20 = __CastType20$();
3806 let __CastType22 = dart.typedef('__CastType22', () => dart.functionType(dart.d ynamic, [dart.dynamic, dart.dynamic])); 3806 let __CastType22 = dart.typedef('__CastType22', dart.functionType(dart.dynamic , [dart.dynamic, dart.dynamic]));
3807 let __CastType25 = dart.typedef('__CastType25', () => dart.functionType(dart.d ynamic, [dart.dynamic])); 3807 let __CastType25 = dart.typedef('__CastType25', dart.functionType(dart.dynamic , [dart.dynamic]));
3808 // Function _runUserCode: (() → dynamic, (dynamic) → dynamic, (dynamic, StackT race) → dynamic) → dynamic 3808 // Function _runUserCode: (() → dynamic, (dynamic) → dynamic, (dynamic, StackT race) → dynamic) → dynamic
3809 function _runUserCode(userCode, onSuccess, onError) { 3809 function _runUserCode(userCode, onSuccess, onError) {
3810 try { 3810 try {
3811 dart.dcall(onSuccess, userCode()); 3811 dart.dcall(onSuccess, userCode());
3812 } catch (e) { 3812 } catch (e) {
3813 let s = dart.stackTrace(e); 3813 let s = dart.stackTrace(e);
3814 let replacement = Zone.current.errorCallback(e, s); 3814 let replacement = Zone.current.errorCallback(e, s);
3815 if (replacement == null) { 3815 if (replacement == null) {
3816 dart.dcall(onError, e, s); 3816 dart.dcall(onError, e, s);
3817 } else { 3817 } else {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3942 this[_stream][_handleError](error, stackTrace, this); 3942 this[_stream][_handleError](error, stackTrace, this);
3943 } 3943 }
3944 [_handleDone]() { 3944 [_handleDone]() {
3945 this[_stream][_handleDone](this); 3945 this[_stream][_handleDone](this);
3946 } 3946 }
3947 } 3947 }
3948 return _ForwardingStreamSubscription; 3948 return _ForwardingStreamSubscription;
3949 }); 3949 });
3950 let _ForwardingStreamSubscription = _ForwardingStreamSubscription$(); 3950 let _ForwardingStreamSubscription = _ForwardingStreamSubscription$();
3951 let _Predicate$ = dart.generic(function(T) { 3951 let _Predicate$ = dart.generic(function(T) {
3952 let _Predicate = dart.typedef('_Predicate', () => dart.functionType(core.boo l, [T])); 3952 let _Predicate = dart.typedef('_Predicate', dart.functionType(core.bool, [T] ));
3953 return _Predicate; 3953 return _Predicate;
3954 }); 3954 });
3955 let _Predicate = _Predicate$(); 3955 let _Predicate = _Predicate$();
3956 // Function _addErrorWithReplacement: (_EventSink<dynamic>, dynamic, dynamic) → void 3956 // Function _addErrorWithReplacement: (_EventSink<dynamic>, dynamic, dynamic) → void
3957 function _addErrorWithReplacement(sink, error, stackTrace) { 3957 function _addErrorWithReplacement(sink, error, stackTrace) {
3958 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core .StackTrace)); 3958 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core .StackTrace));
3959 if (replacement != null) { 3959 if (replacement != null) {
3960 error = _nonNullError(replacement.error); 3960 error = _nonNullError(replacement.error);
3961 stackTrace = replacement.stackTrace; 3961 stackTrace = replacement.stackTrace;
3962 } 3962 }
(...skipping 20 matching lines...) Expand all
3983 3983
3984 if (satisfies) { 3984 if (satisfies) {
3985 sink[_add](inputEvent); 3985 sink[_add](inputEvent);
3986 } 3986 }
3987 } 3987 }
3988 } 3988 }
3989 return _WhereStream; 3989 return _WhereStream;
3990 }); 3990 });
3991 let _WhereStream = _WhereStream$(); 3991 let _WhereStream = _WhereStream$();
3992 let _Transformation$ = dart.generic(function(S, T) { 3992 let _Transformation$ = dart.generic(function(S, T) {
3993 let _Transformation = dart.typedef('_Transformation', () => dart.functionTyp e(T, [S])); 3993 let _Transformation = dart.typedef('_Transformation', dart.functionType(T, [ S]));
3994 return _Transformation; 3994 return _Transformation;
3995 }); 3995 });
3996 let _Transformation = _Transformation$(); 3996 let _Transformation = _Transformation$();
3997 let _transform = Symbol('_transform'); 3997 let _transform = Symbol('_transform');
3998 let _MapStream$ = dart.generic(function(S, T) { 3998 let _MapStream$ = dart.generic(function(S, T) {
3999 class _MapStream extends _ForwardingStream$(S, T) { 3999 class _MapStream extends _ForwardingStream$(S, T) {
4000 _MapStream(source, transform) { 4000 _MapStream(source, transform) {
4001 this[_transform] = transform; 4001 this[_transform] = transform;
4002 super._ForwardingStream(source); 4002 super._ForwardingStream(source);
4003 } 4003 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4036 } catch (e) { 4036 } catch (e) {
4037 let s = dart.stackTrace(e); 4037 let s = dart.stackTrace(e);
4038 _addErrorWithReplacement(sink, e, s); 4038 _addErrorWithReplacement(sink, e, s);
4039 } 4039 }
4040 4040
4041 } 4041 }
4042 } 4042 }
4043 return _ExpandStream; 4043 return _ExpandStream;
4044 }); 4044 });
4045 let _ExpandStream = _ExpandStream$(); 4045 let _ExpandStream = _ExpandStream$();
4046 let _ErrorTest = dart.typedef('_ErrorTest', () => dart.functionType(core.bool, [dart.dynamic])); 4046 let _ErrorTest = dart.typedef('_ErrorTest', dart.functionType(core.bool, [dart .dynamic]));
4047 let _HandleErrorStream$ = dart.generic(function(T) { 4047 let _HandleErrorStream$ = dart.generic(function(T) {
4048 class _HandleErrorStream extends _ForwardingStream$(T, T) { 4048 class _HandleErrorStream extends _ForwardingStream$(T, T) {
4049 _HandleErrorStream(source, onError, test) { 4049 _HandleErrorStream(source, onError, test) {
4050 this[_transform] = onError; 4050 this[_transform] = onError;
4051 this[_test] = test; 4051 this[_test] = test;
4052 super._ForwardingStream(source); 4052 super._ForwardingStream(source);
4053 } 4053 }
4054 [_handleError](error, stackTrace, sink) { 4054 [_handleError](error, stackTrace, sink) {
4055 dart.as(sink, _EventSink$(T)); 4055 dart.as(sink, _EventSink$(T));
4056 let matches = true; 4056 let matches = true;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
4187 if (!dart.notNull(satisfies)) { 4187 if (!dart.notNull(satisfies)) {
4188 this[_hasFailed] = true; 4188 this[_hasFailed] = true;
4189 sink[_add](inputEvent); 4189 sink[_add](inputEvent);
4190 } 4190 }
4191 } 4191 }
4192 } 4192 }
4193 return _SkipWhileStream; 4193 return _SkipWhileStream;
4194 }); 4194 });
4195 let _SkipWhileStream = _SkipWhileStream$(); 4195 let _SkipWhileStream = _SkipWhileStream$();
4196 let _Equality$ = dart.generic(function(T) { 4196 let _Equality$ = dart.generic(function(T) {
4197 let _Equality = dart.typedef('_Equality', () => dart.functionType(core.bool, [T, T])); 4197 let _Equality = dart.typedef('_Equality', dart.functionType(core.bool, [T, T ]));
4198 return _Equality; 4198 return _Equality;
4199 }); 4199 });
4200 let _Equality = _Equality$(); 4200 let _Equality = _Equality$();
4201 let _equals = Symbol('_equals'); 4201 let _equals = Symbol('_equals');
4202 let _DistinctStream$ = dart.generic(function(T) { 4202 let _DistinctStream$ = dart.generic(function(T) {
4203 class _DistinctStream extends _ForwardingStream$(T, T) { 4203 class _DistinctStream extends _ForwardingStream$(T, T) {
4204 _DistinctStream(source, equals) { 4204 _DistinctStream(source, equals) {
4205 this[_previous] = _DistinctStream._SENTINEL; 4205 this[_previous] = _DistinctStream$()._SENTINEL;
4206 this[_equals] = equals; 4206 this[_equals] = equals;
4207 super._ForwardingStream(source); 4207 super._ForwardingStream(source);
4208 } 4208 }
4209 [_handleData](inputEvent, sink) { 4209 [_handleData](inputEvent, sink) {
4210 dart.as(inputEvent, T); 4210 dart.as(inputEvent, T);
4211 dart.as(sink, _EventSink$(T)); 4211 dart.as(sink, _EventSink$(T));
4212 if (core.identical(this[_previous], _DistinctStream._SENTINEL)) { 4212 if (core.identical(this[_previous], _DistinctStream$()._SENTINEL)) {
4213 this[_previous] = inputEvent; 4213 this[_previous] = inputEvent;
4214 return sink[_add](inputEvent); 4214 return sink[_add](inputEvent);
4215 } else { 4215 } else {
4216 let isEqual = null; 4216 let isEqual = null;
4217 try { 4217 try {
4218 if (this[_equals] == null) { 4218 if (this[_equals] == null) {
4219 isEqual = dart.equals(this[_previous], inputEvent); 4219 isEqual = dart.equals(this[_previous], inputEvent);
4220 } else { 4220 } else {
4221 isEqual = this[_equals](dart.as(this[_previous], T), inputEvent); 4221 isEqual = this[_equals](dart.as(this[_previous], T), inputEvent);
4222 } 4222 }
4223 } catch (e) { 4223 } catch (e) {
4224 let s = dart.stackTrace(e); 4224 let s = dart.stackTrace(e);
4225 _addErrorWithReplacement(sink, e, s); 4225 _addErrorWithReplacement(sink, e, s);
4226 return null; 4226 return null;
4227 } 4227 }
4228 4228
4229 if (!dart.notNull(isEqual)) { 4229 if (!dart.notNull(isEqual)) {
4230 sink[_add](inputEvent); 4230 sink[_add](inputEvent);
4231 this[_previous] = inputEvent; 4231 this[_previous] = inputEvent;
4232 } 4232 }
4233 } 4233 }
4234 } 4234 }
4235 } 4235 }
4236 dart.defineLazyProperties(_DistinctStream, {
4237 get _SENTINEL() {
4238 return new core.Object();
4239 },
4240 set _SENTINEL(_) {}
4241 });
4242 return _DistinctStream; 4236 return _DistinctStream;
4243 }); 4237 });
4244 let _DistinctStream = _DistinctStream$(); 4238 let _DistinctStream = _DistinctStream$();
4239 dart.defineLazyProperties(_DistinctStream, {
4240 get _SENTINEL() {
4241 return new core.Object();
4242 },
4243 set _SENTINEL(_) {}
4244 });
4245 let _EventSinkWrapper$ = dart.generic(function(T) { 4245 let _EventSinkWrapper$ = dart.generic(function(T) {
4246 class _EventSinkWrapper extends core.Object { 4246 class _EventSinkWrapper extends core.Object {
4247 _EventSinkWrapper(sink) { 4247 _EventSinkWrapper(sink) {
4248 this[_sink] = sink; 4248 this[_sink] = sink;
4249 } 4249 }
4250 add(data) { 4250 add(data) {
4251 dart.as(data, T); 4251 dart.as(data, T);
4252 this[_sink][_add](data); 4252 this[_sink][_add](data);
4253 } 4253 }
4254 addError(error, stackTrace) { 4254 addError(error, stackTrace) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
4347 let s = dart.stackTrace(e); 4347 let s = dart.stackTrace(e);
4348 this[_addError](e, s); 4348 this[_addError](e, s);
4349 } 4349 }
4350 4350
4351 } 4351 }
4352 } 4352 }
4353 return _SinkTransformerStreamSubscription; 4353 return _SinkTransformerStreamSubscription;
4354 }); 4354 });
4355 let _SinkTransformerStreamSubscription = _SinkTransformerStreamSubscription$() ; 4355 let _SinkTransformerStreamSubscription = _SinkTransformerStreamSubscription$() ;
4356 let _SinkMapper$ = dart.generic(function(S, T) { 4356 let _SinkMapper$ = dart.generic(function(S, T) {
4357 let _SinkMapper = dart.typedef('_SinkMapper', () => dart.functionType(EventS ink$(S), [EventSink$(T)])); 4357 let _SinkMapper = dart.typedef('_SinkMapper', dart.functionType(EventSink$(S ), [EventSink$(T)]));
4358 return _SinkMapper; 4358 return _SinkMapper;
4359 }); 4359 });
4360 let _SinkMapper = _SinkMapper$(); 4360 let _SinkMapper = _SinkMapper$();
4361 let _sinkMapper = Symbol('_sinkMapper'); 4361 let _sinkMapper = Symbol('_sinkMapper');
4362 let _StreamSinkTransformer$ = dart.generic(function(S, T) { 4362 let _StreamSinkTransformer$ = dart.generic(function(S, T) {
4363 class _StreamSinkTransformer extends core.Object { 4363 class _StreamSinkTransformer extends core.Object {
4364 _StreamSinkTransformer(sinkMapper) { 4364 _StreamSinkTransformer(sinkMapper) {
4365 this[_sinkMapper] = sinkMapper; 4365 this[_sinkMapper] = sinkMapper;
4366 } 4366 }
4367 bind(stream) { 4367 bind(stream) {
(...skipping 23 matching lines...) Expand all
4391 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; 4391 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
4392 cancelOnError = core.identical(true, cancelOnError); 4392 cancelOnError = core.identical(true, cancelOnError);
4393 let subscription = new (_SinkTransformerStreamSubscription$(dart.dynamic , T))(this[_stream], dart.as(this[_sinkMapper], _SinkMapper), onData, onError, o nDone, cancelOnError); 4393 let subscription = new (_SinkTransformerStreamSubscription$(dart.dynamic , T))(this[_stream], dart.as(this[_sinkMapper], _SinkMapper), onData, onError, o nDone, cancelOnError);
4394 return subscription; 4394 return subscription;
4395 } 4395 }
4396 } 4396 }
4397 return _BoundSinkStream; 4397 return _BoundSinkStream;
4398 }); 4398 });
4399 let _BoundSinkStream = _BoundSinkStream$(); 4399 let _BoundSinkStream = _BoundSinkStream$();
4400 let _TransformDataHandler$ = dart.generic(function(S, T) { 4400 let _TransformDataHandler$ = dart.generic(function(S, T) {
4401 let _TransformDataHandler = dart.typedef('_TransformDataHandler', () => dart .functionType(dart.void, [S, EventSink$(T)])); 4401 let _TransformDataHandler = dart.typedef('_TransformDataHandler', dart.funct ionType(dart.void, [S, EventSink$(T)]));
4402 return _TransformDataHandler; 4402 return _TransformDataHandler;
4403 }); 4403 });
4404 let _TransformDataHandler = _TransformDataHandler$(); 4404 let _TransformDataHandler = _TransformDataHandler$();
4405 let _TransformErrorHandler$ = dart.generic(function(T) { 4405 let _TransformErrorHandler$ = dart.generic(function(T) {
4406 let _TransformErrorHandler = dart.typedef('_TransformErrorHandler', () => da rt.functionType(dart.void, [core.Object, core.StackTrace, EventSink$(T)])); 4406 let _TransformErrorHandler = dart.typedef('_TransformErrorHandler', dart.fun ctionType(dart.void, [core.Object, core.StackTrace, EventSink$(T)]));
4407 return _TransformErrorHandler; 4407 return _TransformErrorHandler;
4408 }); 4408 });
4409 let _TransformErrorHandler = _TransformErrorHandler$(); 4409 let _TransformErrorHandler = _TransformErrorHandler$();
4410 let _TransformDoneHandler$ = dart.generic(function(T) { 4410 let _TransformDoneHandler$ = dart.generic(function(T) {
4411 let _TransformDoneHandler = dart.typedef('_TransformDoneHandler', () => dart .functionType(dart.void, [EventSink$(T)])); 4411 let _TransformDoneHandler = dart.typedef('_TransformDoneHandler', dart.funct ionType(dart.void, [EventSink$(T)]));
4412 return _TransformDoneHandler; 4412 return _TransformDoneHandler;
4413 }); 4413 });
4414 let _TransformDoneHandler = _TransformDoneHandler$(); 4414 let _TransformDoneHandler = _TransformDoneHandler$();
4415 let _HandlerEventSink$ = dart.generic(function(S, T) { 4415 let _HandlerEventSink$ = dart.generic(function(S, T) {
4416 class _HandlerEventSink extends core.Object { 4416 class _HandlerEventSink extends core.Object {
4417 _HandlerEventSink(handleData, handleError, handleDone, sink) { 4417 _HandlerEventSink(handleData, handleError, handleDone, sink) {
4418 this[_handleData] = handleData; 4418 this[_handleData] = handleData;
4419 this[_handleError] = handleError; 4419 this[_handleError] = handleError;
4420 this[_handleDone] = handleDone; 4420 this[_handleDone] = handleDone;
4421 this[_sink] = sink; 4421 this[_sink] = sink;
(...skipping 17 matching lines...) Expand all
4439 let _HandlerEventSink = _HandlerEventSink$(); 4439 let _HandlerEventSink = _HandlerEventSink$();
4440 let _StreamHandlerTransformer$ = dart.generic(function(S, T) { 4440 let _StreamHandlerTransformer$ = dart.generic(function(S, T) {
4441 class _StreamHandlerTransformer extends _StreamSinkTransformer$(S, T) { 4441 class _StreamHandlerTransformer extends _StreamSinkTransformer$(S, T) {
4442 _StreamHandlerTransformer(opts) { 4442 _StreamHandlerTransformer(opts) {
4443 let handleData = opts && 'handleData' in opts ? opts.handleData : null; 4443 let handleData = opts && 'handleData' in opts ? opts.handleData : null;
4444 let handleError = opts && 'handleError' in opts ? opts.handleError : nul l; 4444 let handleError = opts && 'handleError' in opts ? opts.handleError : nul l;
4445 let handleDone = opts && 'handleDone' in opts ? opts.handleDone : null; 4445 let handleDone = opts && 'handleDone' in opts ? opts.handleDone : null;
4446 super._StreamSinkTransformer(dart.as(outputSink => { 4446 super._StreamSinkTransformer(dart.as(outputSink => {
4447 dart.as(outputSink, EventSink$(T)); 4447 dart.as(outputSink, EventSink$(T));
4448 if (handleData == null) 4448 if (handleData == null)
4449 handleData = dart.as(_StreamHandlerTransformer._defaultHandleData, _ _CastType27); 4449 handleData = dart.as(_StreamHandlerTransformer$()._defaultHandleData , __CastType27);
4450 if (handleError == null) 4450 if (handleError == null)
4451 handleError = dart.as(_StreamHandlerTransformer._defaultHandleError, __CastType30); 4451 handleError = dart.as(_StreamHandlerTransformer$()._defaultHandleErr or, __CastType30);
4452 if (handleDone == null) 4452 if (handleDone == null)
4453 handleDone = _StreamHandlerTransformer._defaultHandleDone; 4453 handleDone = _StreamHandlerTransformer$()._defaultHandleDone;
4454 return new (_HandlerEventSink$(S, T))(handleData, handleError, handleD one, outputSink); 4454 return new (_HandlerEventSink$(S, T))(handleData, handleError, handleD one, outputSink);
4455 }, _SinkMapper$(S, T))); 4455 }, _SinkMapper$(S, T)));
4456 } 4456 }
4457 bind(stream) { 4457 bind(stream) {
4458 dart.as(stream, Stream$(S)); 4458 dart.as(stream, Stream$(S));
4459 return super.bind(stream); 4459 return super.bind(stream);
4460 } 4460 }
4461 static _defaultHandleData(data, sink) { 4461 static _defaultHandleData(data, sink) {
4462 sink.add(data); 4462 sink.add(data);
4463 } 4463 }
4464 static _defaultHandleError(error, stackTrace, sink) { 4464 static _defaultHandleError(error, stackTrace, sink) {
4465 sink.addError(error); 4465 sink.addError(error);
4466 } 4466 }
4467 static _defaultHandleDone(sink) { 4467 static _defaultHandleDone(sink) {
4468 sink.close(); 4468 sink.close();
4469 } 4469 }
4470 } 4470 }
4471 return _StreamHandlerTransformer; 4471 return _StreamHandlerTransformer;
4472 }); 4472 });
4473 let _StreamHandlerTransformer = _StreamHandlerTransformer$(); 4473 let _StreamHandlerTransformer = _StreamHandlerTransformer$();
4474 let _SubscriptionTransformer$ = dart.generic(function(S, T) { 4474 let _SubscriptionTransformer$ = dart.generic(function(S, T) {
4475 let _SubscriptionTransformer = dart.typedef('_SubscriptionTransformer', () = > dart.functionType(StreamSubscription$(T), [Stream$(S), core.bool])); 4475 let _SubscriptionTransformer = dart.typedef('_SubscriptionTransformer', dart .functionType(StreamSubscription$(T), [Stream$(S), core.bool]));
4476 return _SubscriptionTransformer; 4476 return _SubscriptionTransformer;
4477 }); 4477 });
4478 let _SubscriptionTransformer = _SubscriptionTransformer$(); 4478 let _SubscriptionTransformer = _SubscriptionTransformer$();
4479 let _transformer = Symbol('_transformer'); 4479 let _transformer = Symbol('_transformer');
4480 let _StreamSubscriptionTransformer$ = dart.generic(function(S, T) { 4480 let _StreamSubscriptionTransformer$ = dart.generic(function(S, T) {
4481 class _StreamSubscriptionTransformer extends core.Object { 4481 class _StreamSubscriptionTransformer extends core.Object {
4482 _StreamSubscriptionTransformer(transformer) { 4482 _StreamSubscriptionTransformer(transformer) {
4483 this[_transformer] = transformer; 4483 this[_transformer] = transformer;
4484 } 4484 }
4485 bind(stream) { 4485 bind(stream) {
(...skipping 23 matching lines...) Expand all
4509 result.onData(onData); 4509 result.onData(onData);
4510 result.onError(onError); 4510 result.onError(onError);
4511 result.onDone(onDone); 4511 result.onDone(onDone);
4512 return result; 4512 return result;
4513 } 4513 }
4514 } 4514 }
4515 return _BoundSubscriptionStream; 4515 return _BoundSubscriptionStream;
4516 }); 4516 });
4517 let _BoundSubscriptionStream = _BoundSubscriptionStream$(); 4517 let _BoundSubscriptionStream = _BoundSubscriptionStream$();
4518 let __CastType27$ = dart.generic(function(S, T) { 4518 let __CastType27$ = dart.generic(function(S, T) {
4519 let __CastType27 = dart.typedef('__CastType27', () => dart.functionType(dart .void, [S, EventSink$(T)])); 4519 let __CastType27 = dart.typedef('__CastType27', dart.functionType(dart.void, [S, EventSink$(T)]));
4520 return __CastType27; 4520 return __CastType27;
4521 }); 4521 });
4522 let __CastType27 = __CastType27$(); 4522 let __CastType27 = __CastType27$();
4523 let __CastType30$ = dart.generic(function(T) { 4523 let __CastType30$ = dart.generic(function(T) {
4524 let __CastType30 = dart.typedef('__CastType30', () => dart.functionType(dart .void, [core.Object, core.StackTrace, EventSink$(T)])); 4524 let __CastType30 = dart.typedef('__CastType30', dart.functionType(dart.void, [core.Object, core.StackTrace, EventSink$(T)]));
4525 return __CastType30; 4525 return __CastType30;
4526 }); 4526 });
4527 let __CastType30 = __CastType30$(); 4527 let __CastType30 = __CastType30$();
4528 class Timer extends core.Object { 4528 class Timer extends core.Object {
4529 Timer(duration, callback) { 4529 Timer(duration, callback) {
4530 if (dart.equals(Zone.current, Zone.ROOT)) { 4530 if (dart.equals(Zone.current, Zone.ROOT)) {
4531 return Zone.current.createTimer(duration, callback); 4531 return Zone.current.createTimer(duration, callback);
4532 } 4532 }
4533 return Zone.current.createTimer(duration, Zone.current.bindCallback(callba ck, {runGuarded: true})); 4533 return Zone.current.createTimer(duration, Zone.current.bindCallback(callba ck, {runGuarded: true}));
4534 } 4534 }
(...skipping 13 matching lines...) Expand all
4548 return new _isolate_helper.TimerImpl(milliseconds, callback); 4548 return new _isolate_helper.TimerImpl(milliseconds, callback);
4549 } 4549 }
4550 static _createPeriodicTimer(duration, callback) { 4550 static _createPeriodicTimer(duration, callback) {
4551 let milliseconds = duration.inMilliseconds; 4551 let milliseconds = duration.inMilliseconds;
4552 if (dart.notNull(milliseconds) < 0) 4552 if (dart.notNull(milliseconds) < 0)
4553 milliseconds = 0; 4553 milliseconds = 0;
4554 return new _isolate_helper.TimerImpl.periodic(milliseconds, callback); 4554 return new _isolate_helper.TimerImpl.periodic(milliseconds, callback);
4555 } 4555 }
4556 } 4556 }
4557 dart.defineNamedConstructor(Timer, 'periodic'); 4557 dart.defineNamedConstructor(Timer, 'periodic');
4558 let __CastType34 = dart.typedef('__CastType34', () => dart.functionType(dart.v oid, [Timer])); 4558 let __CastType34 = dart.typedef('__CastType34', dart.functionType(dart.void, [ Timer]));
4559 let ZoneCallback = dart.typedef('ZoneCallback', () => dart.functionType(dart.d ynamic, [])); 4559 let ZoneCallback = dart.typedef('ZoneCallback', dart.functionType(dart.dynamic , []));
4560 let ZoneUnaryCallback = dart.typedef('ZoneUnaryCallback', () => dart.functionT ype(dart.dynamic, [dart.dynamic])); 4560 let ZoneUnaryCallback = dart.typedef('ZoneUnaryCallback', dart.functionType(da rt.dynamic, [dart.dynamic]));
4561 let ZoneBinaryCallback = dart.typedef('ZoneBinaryCallback', () => dart.functio nType(dart.dynamic, [dart.dynamic, dart.dynamic])); 4561 let ZoneBinaryCallback = dart.typedef('ZoneBinaryCallback', dart.functionType( dart.dynamic, [dart.dynamic, dart.dynamic]));
4562 let HandleUncaughtErrorHandler = dart.typedef('HandleUncaughtErrorHandler', () => dart.functionType(dart.dynamic, [Zone, ZoneDelegate, Zone, dart.dynamic, cor e.StackTrace])); 4562 class Zone extends core.Object {
4563 let RunHandler = dart.typedef('RunHandler', () => dart.functionType(dart.dynam ic, [Zone, ZoneDelegate, Zone, dart.functionType(dart.dynamic, [])])); 4563 _() {
4564 let RunUnaryHandler = dart.typedef('RunUnaryHandler', () => dart.functionType( dart.dynamic, [Zone, ZoneDelegate, Zone, dart.functionType(dart.dynamic, [dart.d ynamic]), dart.dynamic])); 4564 }
4565 let RunBinaryHandler = dart.typedef('RunBinaryHandler', () => dart.functionTyp e(dart.dynamic, [Zone, ZoneDelegate, Zone, dart.functionType(dart.dynamic, [dart .dynamic, dart.dynamic]), dart.dynamic, dart.dynamic])); 4565 static get current() {
4566 let RegisterCallbackHandler = dart.typedef('RegisterCallbackHandler', () => da rt.functionType(ZoneCallback, [Zone, ZoneDelegate, Zone, dart.functionType(dart. dynamic, [])])); 4566 return Zone._current;
4567 let RegisterUnaryCallbackHandler = dart.typedef('RegisterUnaryCallbackHandler' , () => dart.functionType(ZoneUnaryCallback, [Zone, ZoneDelegate, Zone, dart.fun ctionType(dart.dynamic, [dart.dynamic])])); 4567 }
4568 let RegisterBinaryCallbackHandler = dart.typedef('RegisterBinaryCallbackHandle r', () => dart.functionType(ZoneBinaryCallback, [Zone, ZoneDelegate, Zone, dart. functionType(dart.dynamic, [dart.dynamic, dart.dynamic])])); 4568 static _enter(zone) {
4569 let ErrorCallbackHandler = dart.typedef('ErrorCallbackHandler', () => dart.fun ctionType(AsyncError, [Zone, ZoneDelegate, Zone, core.Object, core.StackTrace])) ; 4569 dart.assert(zone != null);
4570 let ScheduleMicrotaskHandler = dart.typedef('ScheduleMicrotaskHandler', () => dart.functionType(dart.void, [Zone, ZoneDelegate, Zone, dart.functionType(dart.d ynamic, [])])); 4570 dart.assert(!dart.notNull(core.identical(zone, Zone._current)));
4571 let CreateTimerHandler = dart.typedef('CreateTimerHandler', () => dart.functio nType(Timer, [Zone, ZoneDelegate, Zone, core.Duration, dart.functionType(dart.vo id, [])])); 4571 let previous = Zone._current;
4572 let CreatePeriodicTimerHandler = dart.typedef('CreatePeriodicTimerHandler', () => dart.functionType(Timer, [Zone, ZoneDelegate, Zone, core.Duration, dart.func tionType(dart.void, [Timer])])); 4572 Zone._current = zone;
4573 let PrintHandler = dart.typedef('PrintHandler', () => dart.functionType(dart.v oid, [Zone, ZoneDelegate, Zone, core.String])); 4573 return previous;
4574 let ForkHandler = dart.typedef('ForkHandler', () => dart.functionType(Zone, [Z one, ZoneDelegate, Zone, ZoneSpecification, core.Map])); 4574 }
4575 class _ZoneFunction extends core.Object { 4575 static _leave(previous) {
4576 _ZoneFunction(zone, func) { 4576 dart.assert(previous != null);
4577 this.zone = zone; 4577 Zone._current = previous;
4578 this.function = func;
4579 } 4578 }
4580 } 4579 }
4580 dart.defineNamedConstructor(Zone, '_');
4581 class ZoneDelegate extends core.Object {}
4582 let HandleUncaughtErrorHandler = dart.typedef('HandleUncaughtErrorHandler', da rt.functionType(dart.dynamic, [Zone, ZoneDelegate, Zone, dart.dynamic, core.Stac kTrace]));
4583 let RunHandler = dart.typedef('RunHandler', dart.functionType(dart.dynamic, [Z one, ZoneDelegate, Zone, dart.functionType(dart.dynamic, [])]));
4584 let RunUnaryHandler = dart.typedef('RunUnaryHandler', dart.functionType(dart.d ynamic, [Zone, ZoneDelegate, Zone, dart.functionType(dart.dynamic, [dart.dynamic ]), dart.dynamic]));
4585 let RunBinaryHandler = dart.typedef('RunBinaryHandler', dart.functionType(dart .dynamic, [Zone, ZoneDelegate, Zone, dart.functionType(dart.dynamic, [dart.dynam ic, dart.dynamic]), dart.dynamic, dart.dynamic]));
4586 let RegisterCallbackHandler = dart.typedef('RegisterCallbackHandler', dart.fun ctionType(ZoneCallback, [Zone, ZoneDelegate, Zone, dart.functionType(dart.dynami c, [])]));
4587 let RegisterUnaryCallbackHandler = dart.typedef('RegisterUnaryCallbackHandler' , dart.functionType(ZoneUnaryCallback, [Zone, ZoneDelegate, Zone, dart.functionT ype(dart.dynamic, [dart.dynamic])]));
4588 let RegisterBinaryCallbackHandler = dart.typedef('RegisterBinaryCallbackHandle r', dart.functionType(ZoneBinaryCallback, [Zone, ZoneDelegate, Zone, dart.functi onType(dart.dynamic, [dart.dynamic, dart.dynamic])]));
4589 let ErrorCallbackHandler = dart.typedef('ErrorCallbackHandler', dart.functionT ype(AsyncError, [Zone, ZoneDelegate, Zone, core.Object, core.StackTrace]));
4590 let ScheduleMicrotaskHandler = dart.typedef('ScheduleMicrotaskHandler', dart.f unctionType(dart.void, [Zone, ZoneDelegate, Zone, dart.functionType(dart.dynamic , [])]));
4591 let CreateTimerHandler = dart.typedef('CreateTimerHandler', dart.functionType( Timer, [Zone, ZoneDelegate, Zone, core.Duration, dart.functionType(dart.void, [] )]));
4592 let CreatePeriodicTimerHandler = dart.typedef('CreatePeriodicTimerHandler', da rt.functionType(Timer, [Zone, ZoneDelegate, Zone, core.Duration, dart.functionTy pe(dart.void, [Timer])]));
4593 let PrintHandler = dart.typedef('PrintHandler', dart.functionType(dart.void, [ Zone, ZoneDelegate, Zone, core.String]));
4581 class ZoneSpecification extends core.Object { 4594 class ZoneSpecification extends core.Object {
4582 ZoneSpecification(opts) { 4595 ZoneSpecification(opts) {
4583 return new _ZoneSpecification(opts); 4596 return new _ZoneSpecification(opts);
4584 } 4597 }
4585 from(other, opts) { 4598 from(other, opts) {
4586 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han dleUncaughtError : null; 4599 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han dleUncaughtError : null;
4587 let run = opts && 'run' in opts ? opts.run : null; 4600 let run = opts && 'run' in opts ? opts.run : null;
4588 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; 4601 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null;
4589 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; 4602 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null;
4590 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC allback : null; 4603 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC allback : null;
4591 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts .registerUnaryCallback : null; 4604 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts .registerUnaryCallback : null;
4592 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op ts.registerBinaryCallback : null; 4605 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op ts.registerBinaryCallback : null;
4593 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback : null; 4606 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback : null;
4594 let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.schedul eMicrotask : null; 4607 let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.schedul eMicrotask : null;
4595 let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null; 4608 let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null;
4596 let createPeriodicTimer = opts && 'createPeriodicTimer' in opts ? opts.cre atePeriodicTimer : null; 4609 let createPeriodicTimer = opts && 'createPeriodicTimer' in opts ? opts.cre atePeriodicTimer : null;
4597 let print = opts && 'print' in opts ? opts.print : null; 4610 let print = opts && 'print' in opts ? opts.print : null;
4598 let fork = opts && 'fork' in opts ? opts.fork : null; 4611 let fork = opts && 'fork' in opts ? opts.fork : null;
4599 return new ZoneSpecification({handleUncaughtError: handleUncaughtError != null ? handleUncaughtError : other.handleUncaughtError, run: run != null ? run : other.run, runUnary: runUnary != null ? runUnary : other.runUnary, runBinary: r unBinary != null ? runBinary : other.runBinary, registerCallback: registerCallba ck != null ? registerCallback : other.registerCallback, registerUnaryCallback: r egisterUnaryCallback != null ? registerUnaryCallback : other.registerUnaryCallba ck, registerBinaryCallback: registerBinaryCallback != null ? registerBinaryCallb ack : other.registerBinaryCallback, errorCallback: errorCallback != null ? error Callback : other.errorCallback, scheduleMicrotask: scheduleMicrotask != null ? s cheduleMicrotask : other.scheduleMicrotask, createTimer: createTimer != null ? c reateTimer : other.createTimer, createPeriodicTimer: createPeriodicTimer != null ? createPeriodicTimer : other.createPeriodicTimer, print: print != null ? print : other.print, fork: fork != null ? fork : other.fork}); 4612 return new ZoneSpecification({handleUncaughtError: handleUncaughtError != null ? handleUncaughtError : other.handleUncaughtError, run: run != null ? run : other.run, runUnary: runUnary != null ? runUnary : other.runUnary, runBinary: r unBinary != null ? runBinary : other.runBinary, registerCallback: registerCallba ck != null ? registerCallback : other.registerCallback, registerUnaryCallback: r egisterUnaryCallback != null ? registerUnaryCallback : other.registerUnaryCallba ck, registerBinaryCallback: registerBinaryCallback != null ? registerBinaryCallb ack : other.registerBinaryCallback, errorCallback: errorCallback != null ? error Callback : other.errorCallback, scheduleMicrotask: scheduleMicrotask != null ? s cheduleMicrotask : other.scheduleMicrotask, createTimer: createTimer != null ? c reateTimer : other.createTimer, createPeriodicTimer: createPeriodicTimer != null ? createPeriodicTimer : other.createPeriodicTimer, print: print != null ? print : other.print, fork: fork != null ? fork : other.fork});
4600 } 4613 }
4601 } 4614 }
4602 dart.defineNamedConstructor(ZoneSpecification, 'from'); 4615 dart.defineNamedConstructor(ZoneSpecification, 'from');
4616 let ForkHandler = dart.typedef('ForkHandler', dart.functionType(Zone, [Zone, Z oneDelegate, Zone, ZoneSpecification, core.Map]));
4617 class _ZoneFunction extends core.Object {
4618 _ZoneFunction(zone, func) {
4619 this.zone = zone;
4620 this.function = func;
4621 }
4622 }
4603 class _ZoneSpecification extends core.Object { 4623 class _ZoneSpecification extends core.Object {
4604 _ZoneSpecification(opts) { 4624 _ZoneSpecification(opts) {
4605 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han dleUncaughtError : null; 4625 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han dleUncaughtError : null;
4606 let run = opts && 'run' in opts ? opts.run : null; 4626 let run = opts && 'run' in opts ? opts.run : null;
4607 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; 4627 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null;
4608 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; 4628 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null;
4609 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC allback : null; 4629 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC allback : null;
4610 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts .registerUnaryCallback : null; 4630 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts .registerUnaryCallback : null;
4611 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op ts.registerBinaryCallback : null; 4631 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op ts.registerBinaryCallback : null;
4612 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback : null; 4632 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback : null;
(...skipping 11 matching lines...) Expand all
4624 this.registerBinaryCallback = registerBinaryCallback; 4644 this.registerBinaryCallback = registerBinaryCallback;
4625 this.errorCallback = errorCallback; 4645 this.errorCallback = errorCallback;
4626 this.scheduleMicrotask = scheduleMicrotask; 4646 this.scheduleMicrotask = scheduleMicrotask;
4627 this.createTimer = createTimer; 4647 this.createTimer = createTimer;
4628 this.createPeriodicTimer = createPeriodicTimer; 4648 this.createPeriodicTimer = createPeriodicTimer;
4629 this.print = print; 4649 this.print = print;
4630 this.fork = fork; 4650 this.fork = fork;
4631 } 4651 }
4632 } 4652 }
4633 _ZoneSpecification[dart.implements] = () => [ZoneSpecification]; 4653 _ZoneSpecification[dart.implements] = () => [ZoneSpecification];
4634 class ZoneDelegate extends core.Object {} 4654 class _Zone extends core.Object {
4635 class Zone extends core.Object { 4655 _Zone() {
4636 _() {
4637 } 4656 }
4638 static get current() { 4657 inSameErrorZone(otherZone) {
4639 return Zone._current; 4658 return dart.notNull(core.identical(this, otherZone)) || dart.notNull(core. identical(this.errorZone, otherZone.errorZone));
4640 }
4641 static _enter(zone) {
4642 dart.assert(zone != null);
4643 dart.assert(!dart.notNull(core.identical(zone, Zone._current)));
4644 let previous = Zone._current;
4645 Zone._current = zone;
4646 return previous;
4647 }
4648 static _leave(previous) {
4649 dart.assert(previous != null);
4650 Zone._current = previous;
4651 } 4659 }
4652 } 4660 }
4653 dart.defineNamedConstructor(Zone, '_'); 4661 _Zone[dart.implements] = () => [Zone];
4654 Zone.ROOT = _ROOT_ZONE;
Jennifer Messerly 2015/05/12 16:23:45 this is an example of something fixed. _ROOT_ZONE
4655 Zone._current = _ROOT_ZONE;
4656 let _delegate = Symbol('_delegate');
4657 // Function _parentDelegate: (_Zone) → ZoneDelegate
4658 function _parentDelegate(zone) {
4659 if (zone.parent == null)
4660 return null;
4661 return zone.parent[_delegate];
4662 }
4663 let _delegationTarget = Symbol('_delegationTarget');
4664 let _handleUncaughtError = Symbol('_handleUncaughtError');
4665 let _run = Symbol('_run'); 4662 let _run = Symbol('_run');
4666 let _runUnary = Symbol('_runUnary'); 4663 let _runUnary = Symbol('_runUnary');
4667 let _runBinary = Symbol('_runBinary'); 4664 let _runBinary = Symbol('_runBinary');
4668 let _registerCallback = Symbol('_registerCallback'); 4665 let _registerCallback = Symbol('_registerCallback');
4669 let _registerUnaryCallback = Symbol('_registerUnaryCallback'); 4666 let _registerUnaryCallback = Symbol('_registerUnaryCallback');
4670 let _registerBinaryCallback = Symbol('_registerBinaryCallback'); 4667 let _registerBinaryCallback = Symbol('_registerBinaryCallback');
4671 let _errorCallback = Symbol('_errorCallback'); 4668 let _errorCallback = Symbol('_errorCallback');
4672 let _scheduleMicrotask = Symbol('_scheduleMicrotask'); 4669 let _scheduleMicrotask = Symbol('_scheduleMicrotask');
4673 let _createTimer = Symbol('_createTimer'); 4670 let _createTimer = Symbol('_createTimer');
4674 let _createPeriodicTimer = Symbol('_createPeriodicTimer'); 4671 let _createPeriodicTimer = Symbol('_createPeriodicTimer');
4675 let _print = Symbol('_print'); 4672 let _print = Symbol('_print');
4676 let _fork = Symbol('_fork'); 4673 let _fork = Symbol('_fork');
4674 let _handleUncaughtError = Symbol('_handleUncaughtError');
4675 let _map = Symbol('_map');
4676 let _delegate = Symbol('_delegate');
4677 class _RootZone extends _Zone {
4678 _RootZone() {
4679 super._Zone();
4680 }
4681 get [_run]() {
4682 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRun));
4683 }
4684 get [_runUnary]() {
4685 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRunUnary));
4686 }
4687 get [_runBinary]() {
4688 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRunBinary));
4689 }
4690 get [_registerCallback]() {
4691 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRegisterCallback));
4692 }
4693 get [_registerUnaryCallback]() {
4694 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRegisterUnaryCallback ));
4695 }
4696 get [_registerBinaryCallback]() {
4697 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRegisterBinaryCallbac k));
4698 }
4699 get [_errorCallback]() {
4700 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootErrorCallback));
4701 }
4702 get [_scheduleMicrotask]() {
4703 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootScheduleMicrotask));
4704 }
4705 get [_createTimer]() {
4706 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootCreateTimer));
4707 }
4708 get [_createPeriodicTimer]() {
4709 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootCreatePeriodicTimer)) ;
4710 }
4711 get [_print]() {
4712 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootPrint));
4713 }
4714 get [_fork]() {
4715 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootFork));
4716 }
4717 get [_handleUncaughtError]() {
4718 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootHandleUncaughtError)) ;
4719 }
4720 get parent() {
4721 return null;
4722 }
4723 get [_map]() {
4724 return _RootZone._rootMap;
4725 }
4726 get [_delegate]() {
4727 if (_RootZone._rootDelegate != null)
4728 return _RootZone._rootDelegate;
4729 return _RootZone._rootDelegate = new _ZoneDelegate(this);
4730 }
4731 get errorZone() {
4732 return this;
4733 }
4734 runGuarded(f) {
4735 try {
4736 if (core.identical(_ROOT_ZONE, Zone._current)) {
4737 return f();
4738 }
4739 return _rootRun(null, null, this, f);
4740 } catch (e) {
4741 let s = dart.stackTrace(e);
4742 return this.handleUncaughtError(e, s);
4743 }
4744
4745 }
4746 runUnaryGuarded(f, arg) {
4747 try {
4748 if (core.identical(_ROOT_ZONE, Zone._current)) {
4749 return dart.dcall(f, arg);
4750 }
4751 return _rootRunUnary(null, null, this, f, arg);
4752 } catch (e) {
4753 let s = dart.stackTrace(e);
4754 return this.handleUncaughtError(e, s);
4755 }
4756
4757 }
4758 runBinaryGuarded(f, arg1, arg2) {
4759 try {
4760 if (core.identical(_ROOT_ZONE, Zone._current)) {
4761 return dart.dcall(f, arg1, arg2);
4762 }
4763 return _rootRunBinary(null, null, this, f, arg1, arg2);
4764 } catch (e) {
4765 let s = dart.stackTrace(e);
4766 return this.handleUncaughtError(e, s);
4767 }
4768
4769 }
4770 bindCallback(f, opts) {
4771 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true;
4772 if (runGuarded) {
4773 return (() => this.runGuarded(f)).bind(this);
4774 } else {
4775 return (() => this.run(f)).bind(this);
4776 }
4777 }
4778 bindUnaryCallback(f, opts) {
4779 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true;
4780 if (runGuarded) {
4781 return (arg => this.runUnaryGuarded(f, arg)).bind(this);
4782 } else {
4783 return (arg => this.runUnary(f, arg)).bind(this);
4784 }
4785 }
4786 bindBinaryCallback(f, opts) {
4787 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true;
4788 if (runGuarded) {
4789 return ((arg1, arg2) => this.runBinaryGuarded(f, arg1, arg2)).bind(this) ;
4790 } else {
4791 return ((arg1, arg2) => this.runBinary(f, arg1, arg2)).bind(this);
4792 }
4793 }
4794 get(key) {
4795 return null;
4796 }
4797 handleUncaughtError(error, stackTrace) {
4798 return _rootHandleUncaughtError(null, null, this, error, stackTrace);
4799 }
4800 fork(opts) {
4801 let specification = opts && 'specification' in opts ? opts.specification : null;
4802 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null;
4803 return _rootFork(null, null, this, specification, zoneValues);
4804 }
4805 run(f) {
4806 if (core.identical(Zone._current, _ROOT_ZONE))
4807 return f();
4808 return _rootRun(null, null, this, f);
4809 }
4810 runUnary(f, arg) {
4811 if (core.identical(Zone._current, _ROOT_ZONE))
4812 return dart.dcall(f, arg);
4813 return _rootRunUnary(null, null, this, f, arg);
4814 }
4815 runBinary(f, arg1, arg2) {
4816 if (core.identical(Zone._current, _ROOT_ZONE))
4817 return dart.dcall(f, arg1, arg2);
4818 return _rootRunBinary(null, null, this, f, arg1, arg2);
4819 }
4820 registerCallback(f) {
4821 return f;
4822 }
4823 registerUnaryCallback(f) {
4824 return f;
4825 }
4826 registerBinaryCallback(f) {
4827 return f;
4828 }
4829 errorCallback(error, stackTrace) {
4830 return null;
4831 }
4832 scheduleMicrotask(f) {
4833 _rootScheduleMicrotask(null, null, this, f);
4834 }
4835 createTimer(duration, f) {
4836 return Timer._createTimer(duration, f);
4837 }
4838 createPeriodicTimer(duration, f) {
4839 return Timer._createPeriodicTimer(duration, f);
4840 }
4841 print(line) {
4842 _internal.printToConsole(line);
4843 }
4844 }
4845 let _ROOT_ZONE = dart.const(new _RootZone());
Jennifer Messerly 2015/05/12 16:23:45 and here's the _ROOT_ZONE fixed version. The order
4846 Zone.ROOT = _ROOT_ZONE;
4847 Zone._current = _ROOT_ZONE;
4848 // Function _parentDelegate: (_Zone) → ZoneDelegate
4849 function _parentDelegate(zone) {
4850 if (zone.parent == null)
4851 return null;
4852 return zone.parent[_delegate];
4853 }
4854 let _delegationTarget = Symbol('_delegationTarget');
4677 class _ZoneDelegate extends core.Object { 4855 class _ZoneDelegate extends core.Object {
4678 _ZoneDelegate(delegationTarget) { 4856 _ZoneDelegate(delegationTarget) {
4679 this[_delegationTarget] = delegationTarget; 4857 this[_delegationTarget] = delegationTarget;
4680 } 4858 }
4681 handleUncaughtError(zone, error, stackTrace) { 4859 handleUncaughtError(zone, error, stackTrace) {
4682 let implementation = this[_delegationTarget][_handleUncaughtError]; 4860 let implementation = this[_delegationTarget][_handleUncaughtError];
4683 let implZone = implementation.zone; 4861 let implZone = implementation.zone;
4684 return dart.dcall(implementation.function, implZone, _parentDelegate(implZ one), zone, error, stackTrace); 4862 return dart.dcall(implementation.function, implZone, _parentDelegate(implZ one), zone, error, stackTrace);
4685 } 4863 }
4686 run(zone, f) { 4864 run(zone, f) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
4740 let implZone = implementation.zone; 4918 let implZone = implementation.zone;
4741 dart.dcall(implementation.function, implZone, _parentDelegate(implZone), z one, line); 4919 dart.dcall(implementation.function, implZone, _parentDelegate(implZone), z one, line);
4742 } 4920 }
4743 fork(zone, specification, zoneValues) { 4921 fork(zone, specification, zoneValues) {
4744 let implementation = this[_delegationTarget][_fork]; 4922 let implementation = this[_delegationTarget][_fork];
4745 let implZone = implementation.zone; 4923 let implZone = implementation.zone;
4746 return dart.as(dart.dcall(implementation.function, implZone, _parentDelega te(implZone), zone, specification, zoneValues), Zone); 4924 return dart.as(dart.dcall(implementation.function, implZone, _parentDelega te(implZone), zone, specification, zoneValues), Zone);
4747 } 4925 }
4748 } 4926 }
4749 _ZoneDelegate[dart.implements] = () => [ZoneDelegate]; 4927 _ZoneDelegate[dart.implements] = () => [ZoneDelegate];
4750 class _Zone extends core.Object {
4751 _Zone() {
4752 }
4753 inSameErrorZone(otherZone) {
4754 return dart.notNull(core.identical(this, otherZone)) || dart.notNull(core. identical(this.errorZone, otherZone.errorZone));
4755 }
4756 }
4757 _Zone[dart.implements] = () => [Zone];
4758 let _delegateCache = Symbol('_delegateCache'); 4928 let _delegateCache = Symbol('_delegateCache');
4759 let _map = Symbol('_map');
4760 class _CustomZone extends _Zone { 4929 class _CustomZone extends _Zone {
4761 get [_delegate]() { 4930 get [_delegate]() {
4762 if (this[_delegateCache] != null) 4931 if (this[_delegateCache] != null)
4763 return this[_delegateCache]; 4932 return this[_delegateCache];
4764 this[_delegateCache] = new _ZoneDelegate(this); 4933 this[_delegateCache] = new _ZoneDelegate(this);
4765 return this[_delegateCache]; 4934 return this[_delegateCache];
4766 } 4935 }
4767 _CustomZone(parent, specification, map) { 4936 _CustomZone(parent, specification, map) {
4768 this.parent = parent; 4937 this.parent = parent;
4769 this[_map] = map; 4938 this[_map] = map;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
5091 return _rootCreatePeriodicTimer; 5260 return _rootCreatePeriodicTimer;
5092 } 5261 }
5093 get print() { 5262 get print() {
5094 return _rootPrint; 5263 return _rootPrint;
5095 } 5264 }
5096 get fork() { 5265 get fork() {
5097 return _rootFork; 5266 return _rootFork;
5098 } 5267 }
5099 } 5268 }
5100 _RootZoneSpecification[dart.implements] = () => [ZoneSpecification]; 5269 _RootZoneSpecification[dart.implements] = () => [ZoneSpecification];
5101 class _RootZone extends _Zone {
5102 _RootZone() {
5103 super._Zone();
5104 }
5105 get [_run]() {
5106 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRun));
5107 }
5108 get [_runUnary]() {
5109 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRunUnary));
5110 }
5111 get [_runBinary]() {
5112 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRunBinary));
5113 }
5114 get [_registerCallback]() {
5115 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRegisterCallback));
5116 }
5117 get [_registerUnaryCallback]() {
5118 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRegisterUnaryCallback ));
5119 }
5120 get [_registerBinaryCallback]() {
5121 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootRegisterBinaryCallbac k));
5122 }
5123 get [_errorCallback]() {
5124 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootErrorCallback));
5125 }
5126 get [_scheduleMicrotask]() {
5127 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootScheduleMicrotask));
5128 }
5129 get [_createTimer]() {
5130 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootCreateTimer));
5131 }
5132 get [_createPeriodicTimer]() {
5133 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootCreatePeriodicTimer)) ;
5134 }
5135 get [_print]() {
5136 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootPrint));
5137 }
5138 get [_fork]() {
5139 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootFork));
5140 }
5141 get [_handleUncaughtError]() {
5142 return dart.const(new _ZoneFunction(_ROOT_ZONE, _rootHandleUncaughtError)) ;
5143 }
5144 get parent() {
5145 return null;
5146 }
5147 get [_map]() {
5148 return _RootZone._rootMap;
5149 }
5150 get [_delegate]() {
5151 if (_RootZone._rootDelegate != null)
5152 return _RootZone._rootDelegate;
5153 return _RootZone._rootDelegate = new _ZoneDelegate(this);
5154 }
5155 get errorZone() {
5156 return this;
5157 }
5158 runGuarded(f) {
5159 try {
5160 if (core.identical(_ROOT_ZONE, Zone._current)) {
5161 return f();
5162 }
5163 return _rootRun(null, null, this, f);
5164 } catch (e) {
5165 let s = dart.stackTrace(e);
5166 return this.handleUncaughtError(e, s);
5167 }
5168
5169 }
5170 runUnaryGuarded(f, arg) {
5171 try {
5172 if (core.identical(_ROOT_ZONE, Zone._current)) {
5173 return dart.dcall(f, arg);
5174 }
5175 return _rootRunUnary(null, null, this, f, arg);
5176 } catch (e) {
5177 let s = dart.stackTrace(e);
5178 return this.handleUncaughtError(e, s);
5179 }
5180
5181 }
5182 runBinaryGuarded(f, arg1, arg2) {
5183 try {
5184 if (core.identical(_ROOT_ZONE, Zone._current)) {
5185 return dart.dcall(f, arg1, arg2);
5186 }
5187 return _rootRunBinary(null, null, this, f, arg1, arg2);
5188 } catch (e) {
5189 let s = dart.stackTrace(e);
5190 return this.handleUncaughtError(e, s);
5191 }
5192
5193 }
5194 bindCallback(f, opts) {
5195 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true;
5196 if (runGuarded) {
5197 return (() => this.runGuarded(f)).bind(this);
5198 } else {
5199 return (() => this.run(f)).bind(this);
5200 }
5201 }
5202 bindUnaryCallback(f, opts) {
5203 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true;
5204 if (runGuarded) {
5205 return (arg => this.runUnaryGuarded(f, arg)).bind(this);
5206 } else {
5207 return (arg => this.runUnary(f, arg)).bind(this);
5208 }
5209 }
5210 bindBinaryCallback(f, opts) {
5211 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true;
5212 if (runGuarded) {
5213 return ((arg1, arg2) => this.runBinaryGuarded(f, arg1, arg2)).bind(this) ;
5214 } else {
5215 return ((arg1, arg2) => this.runBinary(f, arg1, arg2)).bind(this);
5216 }
5217 }
5218 get(key) {
5219 return null;
5220 }
5221 handleUncaughtError(error, stackTrace) {
5222 return _rootHandleUncaughtError(null, null, this, error, stackTrace);
5223 }
5224 fork(opts) {
5225 let specification = opts && 'specification' in opts ? opts.specification : null;
5226 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null;
5227 return _rootFork(null, null, this, specification, zoneValues);
5228 }
5229 run(f) {
5230 if (core.identical(Zone._current, _ROOT_ZONE))
5231 return f();
5232 return _rootRun(null, null, this, f);
5233 }
5234 runUnary(f, arg) {
5235 if (core.identical(Zone._current, _ROOT_ZONE))
5236 return dart.dcall(f, arg);
5237 return _rootRunUnary(null, null, this, f, arg);
5238 }
5239 runBinary(f, arg1, arg2) {
5240 if (core.identical(Zone._current, _ROOT_ZONE))
5241 return dart.dcall(f, arg1, arg2);
5242 return _rootRunBinary(null, null, this, f, arg1, arg2);
5243 }
5244 registerCallback(f) {
5245 return f;
5246 }
5247 registerUnaryCallback(f) {
5248 return f;
5249 }
5250 registerBinaryCallback(f) {
5251 return f;
5252 }
5253 errorCallback(error, stackTrace) {
5254 return null;
5255 }
5256 scheduleMicrotask(f) {
5257 _rootScheduleMicrotask(null, null, this, f);
5258 }
5259 createTimer(duration, f) {
5260 return Timer._createTimer(duration, f);
5261 }
5262 createPeriodicTimer(duration, f) {
5263 return Timer._createPeriodicTimer(duration, f);
5264 }
5265 print(line) {
5266 _internal.printToConsole(line);
5267 }
5268 }
5269 _RootZone._rootDelegate = null; 5270 _RootZone._rootDelegate = null;
5270 dart.defineLazyProperties(_RootZone, { 5271 dart.defineLazyProperties(_RootZone, {
5271 get _rootMap() { 5272 get _rootMap() {
5272 return new collection.HashMap(); 5273 return new collection.HashMap();
5273 }, 5274 },
5274 set _rootMap(_) {} 5275 set _rootMap(_) {}
5275 }); 5276 });
5276 let _ROOT_ZONE = dart.const(new _RootZone());
5277 // Function runZoned: (() → dynamic, {zoneValues: Map<dynamic, dynamic>, zoneS pecification: ZoneSpecification, onError: Function}) → dynamic 5277 // Function runZoned: (() → dynamic, {zoneValues: Map<dynamic, dynamic>, zoneS pecification: ZoneSpecification, onError: Function}) → dynamic
5278 function runZoned(body, opts) { 5278 function runZoned(body, opts) {
5279 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; 5279 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null;
5280 let zoneSpecification = opts && 'zoneSpecification' in opts ? opts.zoneSpeci fication : null; 5280 let zoneSpecification = opts && 'zoneSpecification' in opts ? opts.zoneSpeci fication : null;
5281 let onError = opts && 'onError' in opts ? opts.onError : null; 5281 let onError = opts && 'onError' in opts ? opts.onError : null;
5282 let errorHandler = null; 5282 let errorHandler = null;
5283 if (onError != null) { 5283 if (onError != null) {
5284 errorHandler = (self, parent, zone, error, stackTrace) => { 5284 errorHandler = (self, parent, zone, error, stackTrace) => {
5285 try { 5285 try {
5286 if (dart.is(onError, ZoneBinaryCallback)) { 5286 if (dart.is(onError, ZoneBinaryCallback)) {
(...skipping 16 matching lines...) Expand all
5303 } else if (errorHandler != null) { 5303 } else if (errorHandler != null) {
5304 zoneSpecification = new ZoneSpecification.from(zoneSpecification, {handleU ncaughtError: errorHandler}); 5304 zoneSpecification = new ZoneSpecification.from(zoneSpecification, {handleU ncaughtError: errorHandler});
5305 } 5305 }
5306 let zone = Zone.current.fork({specification: zoneSpecification, zoneValues: zoneValues}); 5306 let zone = Zone.current.fork({specification: zoneSpecification, zoneValues: zoneValues});
5307 if (onError != null) { 5307 if (onError != null) {
5308 return zone.runGuarded(body); 5308 return zone.runGuarded(body);
5309 } else { 5309 } else {
5310 return zone.run(body); 5310 return zone.run(body);
5311 } 5311 }
5312 } 5312 }
5313 let __CastType36 = dart.typedef('__CastType36', () => dart.functionType(dart.v oid, [Timer])); 5313 let __CastType36 = dart.typedef('__CastType36', dart.functionType(dart.void, [ Timer]));
5314 let __CastType38 = dart.typedef('__CastType38', () => dart.functionType(dart.d ynamic, [dart.dynamic])); 5314 let __CastType38 = dart.typedef('__CastType38', dart.functionType(dart.dynamic , [dart.dynamic]));
5315 dart.copyProperties(exports, { 5315 dart.copyProperties(exports, {
5316 get _hasDocument() { 5316 get _hasDocument() {
5317 return typeof document == 'object'; 5317 return typeof document == 'object';
5318 } 5318 }
5319 }); 5319 });
5320 // Exports: 5320 // Exports:
5321 exports.AsyncError = AsyncError; 5321 exports.AsyncError = AsyncError;
5322 exports.Stream$ = Stream$; 5322 exports.Stream$ = Stream$;
5323 exports.Stream = Stream; 5323 exports.Stream = Stream;
5324 exports.DeferredLibrary = DeferredLibrary; 5324 exports.DeferredLibrary = DeferredLibrary;
(...skipping 17 matching lines...) Expand all
5342 exports.StreamTransformer$ = StreamTransformer$; 5342 exports.StreamTransformer$ = StreamTransformer$;
5343 exports.StreamTransformer = StreamTransformer; 5343 exports.StreamTransformer = StreamTransformer;
5344 exports.StreamIterator$ = StreamIterator$; 5344 exports.StreamIterator$ = StreamIterator$;
5345 exports.StreamIterator = StreamIterator; 5345 exports.StreamIterator = StreamIterator;
5346 exports.StreamController$ = StreamController$; 5346 exports.StreamController$ = StreamController$;
5347 exports.StreamController = StreamController; 5347 exports.StreamController = StreamController;
5348 exports.Timer = Timer; 5348 exports.Timer = Timer;
5349 exports.ZoneCallback = ZoneCallback; 5349 exports.ZoneCallback = ZoneCallback;
5350 exports.ZoneUnaryCallback = ZoneUnaryCallback; 5350 exports.ZoneUnaryCallback = ZoneUnaryCallback;
5351 exports.ZoneBinaryCallback = ZoneBinaryCallback; 5351 exports.ZoneBinaryCallback = ZoneBinaryCallback;
5352 exports.Zone = Zone;
5353 exports.ZoneDelegate = ZoneDelegate;
5352 exports.HandleUncaughtErrorHandler = HandleUncaughtErrorHandler; 5354 exports.HandleUncaughtErrorHandler = HandleUncaughtErrorHandler;
5353 exports.RunHandler = RunHandler; 5355 exports.RunHandler = RunHandler;
5354 exports.RunUnaryHandler = RunUnaryHandler; 5356 exports.RunUnaryHandler = RunUnaryHandler;
5355 exports.RunBinaryHandler = RunBinaryHandler; 5357 exports.RunBinaryHandler = RunBinaryHandler;
5356 exports.RegisterCallbackHandler = RegisterCallbackHandler; 5358 exports.RegisterCallbackHandler = RegisterCallbackHandler;
5357 exports.RegisterUnaryCallbackHandler = RegisterUnaryCallbackHandler; 5359 exports.RegisterUnaryCallbackHandler = RegisterUnaryCallbackHandler;
5358 exports.RegisterBinaryCallbackHandler = RegisterBinaryCallbackHandler; 5360 exports.RegisterBinaryCallbackHandler = RegisterBinaryCallbackHandler;
5359 exports.ErrorCallbackHandler = ErrorCallbackHandler; 5361 exports.ErrorCallbackHandler = ErrorCallbackHandler;
5360 exports.ScheduleMicrotaskHandler = ScheduleMicrotaskHandler; 5362 exports.ScheduleMicrotaskHandler = ScheduleMicrotaskHandler;
5361 exports.CreateTimerHandler = CreateTimerHandler; 5363 exports.CreateTimerHandler = CreateTimerHandler;
5362 exports.CreatePeriodicTimerHandler = CreatePeriodicTimerHandler; 5364 exports.CreatePeriodicTimerHandler = CreatePeriodicTimerHandler;
5363 exports.PrintHandler = PrintHandler; 5365 exports.PrintHandler = PrintHandler;
5366 exports.ZoneSpecification = ZoneSpecification;
5364 exports.ForkHandler = ForkHandler; 5367 exports.ForkHandler = ForkHandler;
5365 exports.ZoneSpecification = ZoneSpecification;
5366 exports.ZoneDelegate = ZoneDelegate;
5367 exports.Zone = Zone;
5368 exports.runZoned = runZoned; 5368 exports.runZoned = runZoned;
5369 })(async, core, _internal, _js_helper, _isolate_helper, collection); 5369 })(async, core, _internal, _js_helper, _isolate_helper, collection);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698