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

Unified Diff: test/dart_codegen/expect/async/schedule_microtask.dart

Issue 1148283010: Remove dart backend (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/dart_codegen/expect/async/future_impl.dart ('k') | test/dart_codegen/expect/async/stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/dart_codegen/expect/async/schedule_microtask.dart
diff --git a/test/dart_codegen/expect/async/schedule_microtask.dart b/test/dart_codegen/expect/async/schedule_microtask.dart
deleted file mode 100644
index 5b50f93ead5737903a49d2580015c6b3b33604c1..0000000000000000000000000000000000000000
--- a/test/dart_codegen/expect/async/schedule_microtask.dart
+++ /dev/null
@@ -1,70 +0,0 @@
-part of dart.async;
- typedef void _AsyncCallback();
- class _AsyncCallbackEntry {final _AsyncCallback callback;
- _AsyncCallbackEntry next;
- _AsyncCallbackEntry(this.callback);
-}
- _AsyncCallbackEntry _nextCallback;
- _AsyncCallbackEntry _lastCallback;
- _AsyncCallbackEntry _lastPriorityCallback;
- bool _isInCallbackLoop = false;
- void _asyncRunCallbackLoop() {
-while (_nextCallback != null) {
- _lastPriorityCallback = null;
- _AsyncCallbackEntry entry = _nextCallback;
- _nextCallback = entry.next;
- if (_nextCallback == null) _lastCallback = null;
- entry.callback();
- }
-}
- void _asyncRunCallback() {
-_isInCallbackLoop = true;
- try {
- _asyncRunCallbackLoop();
- }
- finally {
- _lastPriorityCallback = null;
- _isInCallbackLoop = false;
- if (_nextCallback != null) _AsyncRun._scheduleImmediate(_asyncRunCallback);
- }
-}
- void _scheduleAsyncCallback(callback) {
-if (_nextCallback == null) {
- _nextCallback = _lastCallback = new _AsyncCallbackEntry(DEVC$RT.cast(callback, dynamic, _AsyncCallback, "CompositeCast", """line 66, column 61 of dart:async/schedule_microtask.dart: """, callback is _AsyncCallback, false));
- if (!_isInCallbackLoop) {
- _AsyncRun._scheduleImmediate(_asyncRunCallback);
- }
- }
- else {
- _AsyncCallbackEntry newEntry = new _AsyncCallbackEntry(DEVC$RT.cast(callback, dynamic, _AsyncCallback, "CompositeCast", """line 71, column 60 of dart:async/schedule_microtask.dart: """, callback is _AsyncCallback, false));
- _lastCallback.next = newEntry;
- _lastCallback = newEntry;
- }
-}
- void _schedulePriorityAsyncCallback(callback) {
-_AsyncCallbackEntry entry = new _AsyncCallbackEntry(DEVC$RT.cast(callback, dynamic, _AsyncCallback, "CompositeCast", """line 84, column 55 of dart:async/schedule_microtask.dart: """, callback is _AsyncCallback, false));
- if (_nextCallback == null) {
- _scheduleAsyncCallback(callback);
- _lastPriorityCallback = _lastCallback;
- }
- else if (_lastPriorityCallback == null) {
- entry.next = _nextCallback;
- _nextCallback = _lastPriorityCallback = entry;
- }
- else {
- entry.next = _lastPriorityCallback.next;
- _lastPriorityCallback.next = entry;
- _lastPriorityCallback = entry;
- if (entry.next == null) {
- _lastCallback = entry;
- }
- }
-}
- void scheduleMicrotask(void callback()) {
-if (identical(_ROOT_ZONE, Zone.current)) {
- _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback);
- return;}
- Zone.current.scheduleMicrotask(Zone.current.bindCallback(callback, runGuarded: true));
-}
- class _AsyncRun {external static void _scheduleImmediate(void callback());
-}
« no previous file with comments | « test/dart_codegen/expect/async/future_impl.dart ('k') | test/dart_codegen/expect/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698