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

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

Issue 1039243002: fix temp used in postfix ops (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart/collection.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var async; 1 var async;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic 4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic
5 function _invokeErrorHandler(errorHandler, error, stackTrace) { 5 function _invokeErrorHandler(errorHandler, error, stackTrace) {
6 if (dart.is(errorHandler, ZoneBinaryCallback)) { 6 if (dart.is(errorHandler, ZoneBinaryCallback)) {
7 return dart.dinvokef(errorHandler, error, stackTrace); 7 return dart.dinvokef(errorHandler, error, stackTrace);
8 } else { 8 } else {
9 return dart.dinvokef(errorHandler, error); 9 return dart.dinvokef(errorHandler, error);
10 } 10 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 computation = null; 77 computation = null;
78 if (computation === null) 78 if (computation === null)
79 computation = dart.closureWrap((i) => null, "(int) → T"); 79 computation = dart.closureWrap((i) => null, "(int) → T");
80 let timer = null; 80 let timer = null;
81 let computationCount = 0; 81 let computationCount = 0;
82 let controller = null; 82 let controller = null;
83 let watch = new core.Stopwatch(); 83 let watch = new core.Stopwatch();
84 // Function sendEvent: () → void 84 // Function sendEvent: () → void
85 function sendEvent() { 85 function sendEvent() {
86 watch.reset(); 86 watch.reset();
87 let data = computation(((x) => computationCount = dart.notNull(x$) + 1 , x$)(computationCount)); 87 let data = computation(((x) => computationCount = dart.notNull(x) + 1, x)(computationCount));
88 controller.add(data); 88 controller.add(data);
89 } 89 }
90 // Function startPeriodicTimer: () → void 90 // Function startPeriodicTimer: () → void
91 function startPeriodicTimer() { 91 function startPeriodicTimer() {
92 dart.assert(timer === null); 92 dart.assert(timer === null);
93 timer = new Timer.periodic(period, (timer) => { 93 timer = new Timer.periodic(period, (timer) => {
94 sendEvent(); 94 sendEvent();
95 }); 95 });
96 } 96 }
97 controller = new StreamController({sync: true, onListen: (() => { 97 controller = new StreamController({sync: true, onListen: (() => {
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 result._completeError(theError, dart.as(theStackTrace, core.StackT race)); 1647 result._completeError(theError, dart.as(theStackTrace, core.StackT race));
1648 } else { 1648 } else {
1649 error = theError; 1649 error = theError;
1650 stackTrace = dart.as(theStackTrace, core.StackTrace); 1650 stackTrace = dart.as(theStackTrace, core.StackTrace);
1651 } 1651 }
1652 } else if (remaining === 0 && !dart.notNull(eagerError)) { 1652 } else if (remaining === 0 && !dart.notNull(eagerError)) {
1653 result._completeError(error, stackTrace); 1653 result._completeError(error, stackTrace);
1654 } 1654 }
1655 } 1655 }
1656 for (let future of futures) { 1656 for (let future of futures) {
1657 let pos = ((x) => remaining = dart.notNull(x$) + 1, x$)(remaining); 1657 let pos = ((x) => remaining = dart.notNull(x) + 1, x)(remaining);
1658 future.then(((value) => { 1658 future.then(((value) => {
1659 remaining = dart.notNull(remaining) - 1; 1659 remaining = dart.notNull(remaining) - 1;
1660 if (values !== null) { 1660 if (values !== null) {
1661 values.set(pos, value); 1661 values.set(pos, value);
1662 if (remaining === 0) { 1662 if (remaining === 0) {
1663 result._completeWithValue(values); 1663 result._completeWithValue(values);
1664 } 1664 }
1665 } else { 1665 } else {
1666 if (dart.notNull(cleanUp !== null) && dart.notNull(value !== null) ) { 1666 if (dart.notNull(cleanUp !== null) && dart.notNull(value !== null) ) {
1667 new Future.sync(() => { 1667 new Future.sync(() => {
(...skipping 3275 matching lines...) Expand 10 before | Expand all | Expand 10 after
4943 exports.StreamIterator = StreamIterator; 4943 exports.StreamIterator = StreamIterator;
4944 exports.StreamIterator$ = StreamIterator$; 4944 exports.StreamIterator$ = StreamIterator$;
4945 exports.StreamController = StreamController; 4945 exports.StreamController = StreamController;
4946 exports.StreamController$ = StreamController$; 4946 exports.StreamController$ = StreamController$;
4947 exports.Timer = Timer; 4947 exports.Timer = Timer;
4948 exports.ZoneSpecification = ZoneSpecification; 4948 exports.ZoneSpecification = ZoneSpecification;
4949 exports.ZoneDelegate = ZoneDelegate; 4949 exports.ZoneDelegate = ZoneDelegate;
4950 exports.Zone = Zone; 4950 exports.Zone = Zone;
4951 exports.runZoned = runZoned; 4951 exports.runZoned = runZoned;
4952 })(async || (async = {})); 4952 })(async || (async = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698