OLD | NEW |
1 library test; | 1 library test; |
2 import self as self; | 2 import self as self; |
3 import "dart:async" as asy; | 3 import "dart:async" as asy; |
4 import "dart:core" as core; | 4 import "dart:core" as core; |
5 | 5 |
6 static method main() → asy::Future<dynamic> /* originally async */ { | 6 static method main() → asy::Future<dynamic> async { |
7 final asy::Completer<asy::FutureOr<dynamic>> :completer = asy::Completer::sync
<asy::FutureOr<dynamic>>(); | 7 dynamic d; |
8 asy::FutureOr<dynamic> :return_value; | 8 core::List<core::int> l0 = await<core::int>[d]; |
9 dynamic :async_op_then; | 9 core::List<core::int> l1 = await asy::Future::value<core::List<core::int>>(<co
re::int>[d]); |
10 dynamic :async_op_error; | |
11 dynamic :await_jump_var = 0; | |
12 dynamic :await_ctx_var; | |
13 dynamic :saved_try_context_var0; | |
14 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]
) → dynamic yielding | |
15 try { | |
16 #L1: | |
17 { | |
18 dynamic d; | |
19 asy::_awaitHelper(<core::int>[d], :async_op_then, :async_op_error, :asyn
c_op); | |
20 [yield] null; | |
21 core::List<core::int> l0 = :result; | |
22 asy::_awaitHelper(asy::Future::value<core::List<core::int>>(<core::int>[
d]), :async_op_then, :async_op_error, :async_op); | |
23 [yield] null; | |
24 core::List<core::int> l1 = :result; | |
25 } | |
26 :completer.complete(:return_value); | |
27 return; | |
28 } | |
29 on dynamic catch(dynamic :exception, dynamic :stack_trace) { | |
30 :completer.completeError(:exception, :stack_trace); | |
31 } | |
32 :async_op_then = asy::_asyncThenWrapperHelper(:async_op); | |
33 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); | |
34 asy::Future::microtask<dynamic>(:async_op); | |
35 return :completer.future; | |
36 } | 10 } |
OLD | NEW |