| library; |
| import self as self; |
| import "dart:core" as core; |
| import "dart:async" as asy; |
| |
| static method method(core::Iterable<core::int> iterable) → core::Iterable<core::int> sync* { |
| yield 1; |
| yield 2; |
| yield* iterable; |
| } |
| static method asyncMethod(asy::Stream<core::int> stream) → asy::Stream<core::int> { |
| synthesized asy::StreamController<core::Object?> #controller = asy::StreamController::•<core::Object?>(); |
| synthesized () → asy::Future<void> #body = () → asy::Future<void> async /* futureValueType= void */ { |
| core::bool :async_temporary_0; |
| core::bool :async_temporary_1; |
| core::bool :async_temporary_2; |
| core::bool :async_temporary_3; |
| core::bool :async_temporary_4; |
| dynamic :async_temporary_5; |
| synthesized asy::Completer<core::bool> #completer = asy::Completer::•<core::bool>(); |
| #controller.{asy::StreamController::add}(#completer){(core::Object?) → void}; |
| { |
| core::int #t1 = 0; |
| core::Object #t2; |
| core::StackTrace #t3; |
| try |
| try { |
| :async_temporary_0 = await #completer.{asy::Completer::future}{asy::Future<core::bool>}; |
| :async_temporary_0 as{ForLegacy} dynamic; |
| { |
| { |
| #controller.{asy::StreamController::add}(1){(core::Object?) → void}; |
| #completer = asy::Completer::•<core::bool>(); |
| #controller.{asy::StreamController::add}(#completer){(core::Object?) → void}; |
| :async_temporary_1 = await #completer.{asy::Completer::future}{asy::Future<core::bool>}; |
| :async_temporary_1 as{ForLegacy} dynamic; |
| } |
| { |
| #controller.{asy::StreamController::add}(2){(core::Object?) → void}; |
| #completer = asy::Completer::•<core::bool>(); |
| #controller.{asy::StreamController::add}(#completer){(core::Object?) → void}; |
| :async_temporary_2 = await #completer.{asy::Completer::future}{asy::Future<core::bool>}; |
| :async_temporary_2 as{ForLegacy} dynamic; |
| } |
| { |
| synthesized asy::_StreamIterator<core::int> #forIterator = new asy::_StreamIterator::•<core::int>(stream); |
| synthesized core::bool #jumpSentinel = #C1; |
| { |
| core::int #t4 = 0; |
| core::Object #t5; |
| core::StackTrace #t6; |
| try { |
| #L1: |
| for (; ; ) { |
| :async_temporary_4 = await #forIterator.{asy::_StreamIterator::moveNext}(){() → asy::Future<core::bool>}; |
| if(#jumpSentinel = :async_temporary_4 as{ForLegacy} dynamic) { |
| synthesized core::int #awaitForVar = #forIterator.{asy::_StreamIterator::current}{core::int}; |
| { |
| #controller.{asy::StreamController::add}(#awaitForVar){(core::Object?) → void}; |
| #completer = asy::Completer::•<core::bool>(); |
| #controller.{asy::StreamController::add}(#completer){(core::Object?) → void}; |
| :async_temporary_3 = await #completer.{asy::Completer::future}{asy::Future<core::bool>}; |
| :async_temporary_3 as{ForLegacy} dynamic; |
| } |
| } |
| else |
| break #L1; |
| } |
| } |
| finally { |
| if(#jumpSentinel) { |
| :async_temporary_5 = await #forIterator.{asy::_StreamIterator::cancel}(){() → asy::Future<dynamic>}; |
| :async_temporary_5; |
| } |
| #t4; |
| #t5; |
| #t6; |
| } |
| } |
| } |
| } |
| } |
| on dynamic catch(dynamic #t7, core::StackTrace #t8) { |
| #controller.{asy::StreamController::addError}(#t7){(core::Object, [core::StackTrace?]) → void}; |
| #t7; |
| #t8; |
| } |
| finally { |
| #controller.{asy::StreamController::close}(){() → asy::Future<dynamic>}; |
| #t1; |
| #t2; |
| #t3; |
| } |
| } |
| }; |
| synthesized core::bool #isFirst = #C2; |
| synthesized core::bool #isEven = #C1; |
| #controller.{asy::StreamController::add}(#C3){(core::Object?) → void}; |
| return #controller.{asy::StreamController::stream}{() → asy::Stream<core::Object?>}.{asy::Stream::asyncMap}<core::Object?>((synthesized core::Object? value) → FutureOr<core::Object?> async /* futureValueType= core::Object? */ { |
| if(#isFirst) { |
| #body(){() → asy::Future<void>}; |
| return #C3; |
| } |
| if(!#isEven) |
| value.{asy::Completer::complete}(#C2){([FutureOr<core::bool>?]) → void}; |
| return value; |
| }){((core::Object?) → FutureOr<core::Object?>) → asy::Stream<core::Object?>}.{asy::Stream::where}((synthesized core::Object? value) → core::Object? { |
| if(#isFirst) { |
| #isFirst = #C1; |
| return #C1; |
| } |
| synthesized core::bool keep = #isEven; |
| #isEven = !#isEven; |
| return keep; |
| }){((core::Object?) → core::bool) → asy::Stream<core::Object?>}.{asy::Stream::cast}<core::int>(){() → asy::Stream<core::int>}; |
| } |
| |
| constants { |
| #C1 = false |
| #C2 = true |
| #C3 = null |
| } |