| library; |
| import self as self; |
| import "dart:async" as asy; |
| import "dart:core" as core; |
| import "dart:_internal" as _in; |
| |
| static method returnFutureOfVoid() → asy::Future<void>* /* originally async */ { |
| final asy::_Future<void>* :async_future = new asy::_Future::•<void>(); |
| core::bool* :is_sync = false; |
| FutureOr<void>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L1: |
| {} |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |
| static method returnVoid() → void {} |
| static method returnVoidAsync() → void /* originally async */ { |
| final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>(); |
| core::bool* :is_sync = false; |
| FutureOr<dynamic>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L2: |
| {} |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |
| static method main() → dynamic /* originally async */ { |
| final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>(); |
| core::bool* :is_sync = false; |
| FutureOr<dynamic>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| dynamic :saved_try_context_var0; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L3: |
| { |
| [yield] let dynamic #t1 = asy::_awaitHelper(self::returnVoid(), :async_op_then, :async_op_error, :async_op) in null; |
| _in::unsafeCast<void>(:result); |
| [yield] let dynamic #t2 = asy::_awaitHelper(self::returnFutureOfVoid(), :async_op_then, :async_op_error, :async_op) in null; |
| _in::unsafeCast<void>(:result); |
| [yield] let dynamic #t3 = asy::_awaitHelper(self::returnVoidAsync(), :async_op_then, :async_op_error, :async_op) in null; |
| _in::unsafeCast<void>(:result); |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |