| library test; |
| import self as self; |
| import "dart:async" as asy; |
| import "dart:core" as core; |
| |
| static method test() → dynamic /* originally async */ { |
| final asy::_AsyncAwaitCompleter<dynamic>* :async_completer = new asy::_AsyncAwaitCompleter::•<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; |
| dynamic :saved_try_context_var1; |
| dynamic :exception0; |
| dynamic :stack_trace0; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L1: |
| { |
| core::String* s; |
| for (core::int* x in s) { |
| } |
| { |
| dynamic :stream = s; |
| asy::_asyncStarListenHelper(:stream, :async_op); |
| asy::_StreamIterator<core::int*>* :for-iterator = new asy::_StreamIterator::•<core::int*>(:stream); |
| try |
| #L2: |
| while (true) { |
| dynamic #t1 = asy::_asyncStarMoveNextHelper(:stream); |
| [yield] let dynamic #t2 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null; |
| if(:result) { |
| core::int* x = :for-iterator.{asy::_StreamIterator::current}; |
| {} |
| } |
| else |
| break #L2; |
| } |
| finally |
| if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) { |
| [yield] let dynamic #t3 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null; |
| :result; |
| } |
| } |
| core::int* y; |
| for (final dynamic #t4 in s) { |
| y = #t4; |
| } |
| { |
| dynamic :stream = s; |
| asy::_asyncStarListenHelper(:stream, :async_op); |
| asy::_StreamIterator<dynamic>* :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream); |
| try |
| #L3: |
| while (true) { |
| dynamic #t5 = asy::_asyncStarMoveNextHelper(:stream); |
| [yield] let dynamic #t6 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null; |
| if(:result) { |
| final dynamic #t7 = :for-iterator.{asy::_StreamIterator::current}; |
| { |
| y = #t7; |
| } |
| } |
| else |
| break #L3; |
| } |
| finally |
| if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) { |
| [yield] let dynamic #t8 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null; |
| :result; |
| } |
| } |
| } |
| asy::_completeOnAsyncReturn(:async_completer, :return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :async_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); |
| :async_completer.start(:async_op); |
| return :async_completer.{asy::Completer::future}; |
| } |
| static method main() → dynamic {} |