| library; |
| import self as self; |
| import "dart:async" as asy; |
| import "dart:core" as core; |
| |
| static field core::List<core::String> stringList = <dynamic>["bar"]; |
| static method asyncString() → asy::Future<core::String> /* originally async */ { |
| final asy::Completer<core::String> :completer = asy::Completer::sync<core::String>(); |
| asy::FutureOr<core::String> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L1: |
| { |
| :return_value = "foo"; |
| break #L1; |
| } |
| :completer.{asy::Completer::complete}(:return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| asy::Future::microtask<dynamic>(:async_op); |
| return :completer.{asy::Completer::future}; |
| } |
| static method asyncString2() → asy::Future<core::String> /* originally async */ { |
| final asy::Completer<core::String> :completer = asy::Completer::sync<core::String>(); |
| asy::FutureOr<core::String> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L2: |
| { |
| :return_value = self::asyncString(); |
| break #L2; |
| } |
| :completer.{asy::Completer::complete}(:return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| asy::Future::microtask<dynamic>(:async_op); |
| return :completer.{asy::Completer::future}; |
| } |
| static method syncStarString() → core::Iterable<core::String> /* originally sync* */ { |
| dynamic :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :sync_op(core::_SyncIterator<core::String> :iterator) → core::bool yielding { |
| { |
| { |
| :iterator.{core::_SyncIterator::_current} = "foo"; |
| [yield] true; |
| } |
| { |
| :iterator.{core::_SyncIterator::_yieldEachIterable} = self::syncStarString2(); |
| [yield] true; |
| } |
| { |
| :iterator.{core::_SyncIterator::_yieldEachIterable} = self::stringList; |
| [yield] true; |
| } |
| } |
| return false; |
| } |
| return new core::_SyncIterable::•<core::String>(:sync_op); |
| } |
| static method syncStarString2() → core::Iterable<core::String> /* originally sync* */ { |
| dynamic :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :sync_op(core::_SyncIterator<core::String> :iterator) → core::bool yielding { |
| { |
| { |
| :iterator.{core::_SyncIterator::_current} = "foo"; |
| [yield] true; |
| } |
| } |
| return false; |
| } |
| return new core::_SyncIterable::•<core::String>(:sync_op); |
| } |
| static method asyncStarString() → asy::Stream<core::String> /* originally async* */ { |
| asy::_AsyncStarStreamController<core::String> :controller; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| dynamic :saved_try_context_var0; |
| dynamic :saved_try_context_var1; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try |
| try { |
| #L3: |
| { |
| if(:controller.{asy::_AsyncStarStreamController::add}("foo")) |
| return null; |
| else |
| [yield] null; |
| if(:controller.{asy::_AsyncStarStreamController::addStream}(self::asyncStarString2())) |
| return null; |
| else |
| [yield] null; |
| [yield] let dynamic #t1 = asy::_awaitHelper(self::asyncString(), :async_op_then, :async_op_error, :async_op) in null; |
| if(:controller.{asy::_AsyncStarStreamController::add}(:result)) |
| return null; |
| else |
| [yield] null; |
| } |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :controller.{asy::_AsyncStarStreamController::addError}(:exception, :stack_trace); |
| } |
| finally { |
| :controller.{asy::_AsyncStarStreamController::close}(); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :controller = new asy::_AsyncStarStreamController::•<core::String>(:async_op); |
| return :controller.{asy::_AsyncStarStreamController::stream}; |
| } |
| static method asyncStarString2() → asy::Stream<core::String> /* originally async* */ { |
| asy::_AsyncStarStreamController<core::String> :controller; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| dynamic :saved_try_context_var0; |
| dynamic :saved_try_context_var1; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try |
| try { |
| #L4: |
| { |
| if(:controller.{asy::_AsyncStarStreamController::add}("bar")) |
| return null; |
| else |
| [yield] null; |
| } |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :controller.{asy::_AsyncStarStreamController::addError}(:exception, :stack_trace); |
| } |
| finally { |
| :controller.{asy::_AsyncStarStreamController::close}(); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :controller = new asy::_AsyncStarStreamController::•<core::String>(:async_op); |
| return :controller.{asy::_AsyncStarStreamController::stream}; |
| } |
| static method main() → dynamic /* originally async */ { |
| final asy::Completer<dynamic> :completer = asy::Completer::sync<dynamic>(); |
| asy::FutureOr<dynamic> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :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 { |
| #L5: |
| { |
| [yield] let dynamic #t2 = asy::_awaitHelper(self::asyncString(), :async_op_then, :async_op_error, :async_op) in null; |
| core::String str = :result; |
| } |
| :completer.{asy::Completer::complete}(:return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| asy::Future::microtask<dynamic>(:async_op); |
| return :completer.{asy::Completer::future}; |
| } |