| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| import "dart:async" as asy; |
| |
| static method foo() → dynamic { |
| try { |
| return; |
| } |
| finally { |
| core::print("Hello from finally block!"); |
| } |
| } |
| static method bar(dynamic d) → dynamic async* { |
| { |
| synthesized asy::Stream<dynamic> :stream = d as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<dynamic>; |
| synthesized asy::_StreamIterator<dynamic>? :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream); |
| try |
| while (let dynamic #t1 = asy::_asyncStarMoveNextHelper(:stream) in await :for-iterator.{asy::_StreamIterator::moveNext}(){() → asy::Future<core::bool>}) { |
| dynamic x = :for-iterator.{asy::_StreamIterator::current}{dynamic}; |
| { |
| yield x; |
| yield* x as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<dynamic>; |
| } |
| } |
| finally |
| if(!(:for-iterator.{asy::_StreamIterator::_subscription}{asy::StreamSubscription<dynamic>?} == null)) |
| await :for-iterator.{asy::_StreamIterator::cancel}(){() → asy::Future<dynamic>}; |
| } |
| } |
| static method main() → dynamic { |
| do { |
| core::print("Hello from do-while!"); |
| } |
| while (false) |
| do { |
| void x = core::print("Hello from do-while!"); |
| } |
| while (false) |
| { |
| synthesized core::Iterator<core::String> :sync-for-iterator = core::_GrowableList::_literal1<core::String>("Hello from for-in!").{core::Iterable::iterator}{core::Iterator<core::String>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| core::String s = :sync-for-iterator.{core::Iterator::current}{core::String}; |
| { |
| core::print(s); |
| } |
| } |
| } |
| { |
| synthesized core::Iterator<core::String> :sync-for-iterator = core::_GrowableList::_literal1<core::String>("Hello from for-in without block!").{core::Iterable::iterator}{core::Iterator<core::String>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| core::String s = :sync-for-iterator.{core::Iterator::current}{core::String}; |
| core::print(s); |
| } |
| } |
| dynamic s; |
| { |
| synthesized core::Iterator<dynamic> :sync-for-iterator = core::_GrowableList::_literal1<dynamic>("Hello from for-in without decl!").{core::Iterable::iterator}{core::Iterator<dynamic>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| final dynamic #t2 = :sync-for-iterator.{core::Iterator::current}{dynamic}; |
| { |
| s = #t2; |
| core::print(s); |
| } |
| } |
| } |
| { |
| synthesized core::Iterator<dynamic> :sync-for-iterator = core::_GrowableList::_literal1<dynamic>("Hello from for-in without decl and block!").{core::Iterable::iterator}{core::Iterator<dynamic>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| final dynamic #t3 = :sync-for-iterator.{core::Iterator::current}{dynamic}; |
| { |
| s = #t3; |
| core::print(s); |
| } |
| } |
| } |
| core::print("Hello from labeled statement!"); |
| try { |
| try { |
| throw "Hello from rethrow!"; |
| } |
| on core::Object catch(final core::Object e) { |
| rethrow; |
| } |
| } |
| on core::Object catch(final core::Object e) { |
| core::print(e); |
| } |
| self::foo(); |
| core::bool done = false; |
| while (!done) { |
| done = true; |
| core::print("Hello from while!"); |
| } |
| ; |
| assert(true); |
| assert(true, "Hello from assert!"); |
| try { |
| assert(false, "Hello from assert!"); |
| } |
| on core::Object catch(final core::Object e) { |
| core::print(e); |
| } |
| #L1: |
| { |
| final synthesized core::int #0#0 = 1; |
| if(#C1 =={core::num::==}{(core::Object) → core::bool} #0#0 || #C2 =={core::num::==}{(core::Object) → core::bool} #0#0) { |
| { |
| core::print("Hello from switch case!"); |
| break #L1; |
| } |
| } |
| else { |
| { |
| break #L1; |
| } |
| } |
| } |
| #L2: |
| { |
| core::int #t4 = -1; |
| final synthesized core::int #1#0 = 4; |
| if(#C2 =={core::num::==}{(core::Object) → core::bool} #1#0) |
| #t4 = 0; |
| else |
| if(#C1 =={core::num::==}{(core::Object) → core::bool} #1#0) |
| #t4 = 1; |
| else |
| if(#C3 =={core::num::==}{(core::Object) → core::bool} #1#0) |
| #t4 = 2; |
| else |
| if(#C4 =={core::num::==}{(core::Object) → core::bool} #1#0) |
| #t4 = 3; |
| else |
| #t4 = 4; |
| switch(#t4) { |
| #L3: |
| case #C3: |
| { |
| { |
| core::print("Hello from case 2!"); |
| break #L2; |
| } |
| } |
| #L4: |
| case #C1: |
| { |
| { |
| core::print("Hello from case 1!"); |
| continue #L3; |
| } |
| } |
| #L5: |
| case #C2: |
| { |
| { |
| core::print("Hello from case 0!"); |
| continue #L4; |
| } |
| } |
| #L6: |
| case #C5: |
| { |
| { |
| core::print("Hello from case 4!"); |
| continue #L7; |
| } |
| } |
| #L7: |
| case #C4: |
| default: |
| { |
| { |
| continue #L5; |
| } |
| } |
| } |
| } |
| #L8: |
| { |
| core::int #t5 = -1; |
| final synthesized core::int #2#0 = 4; |
| if(#C1 =={core::num::==}{(core::Object) → core::bool} #2#0) |
| #t5 = 0; |
| else |
| #t5 = 1; |
| switch(#t5) { |
| #L9: |
| case #C3: |
| { |
| { |
| core::print("Hello from next case 1"); |
| break #L8; |
| } |
| } |
| #L10: |
| case #C1: |
| default: |
| { |
| { |
| continue #L9; |
| } |
| } |
| } |
| } |
| core::int i = 0; |
| #L11: |
| do |
| #L12: |
| { |
| core::print("Hello from do-while!"); |
| if((i = i.{core::num::+}(1){(core::num) → core::int}).{core::num::<}(3){(core::num) → core::bool}) |
| break #L12; |
| break #L11; |
| } |
| while (true) |
| i = 0; |
| #L13: |
| while (true) |
| #L14: |
| { |
| core::print("Hello from while!"); |
| if((i = i.{core::num::+}(1){(core::num) → core::int}).{core::num::<}(3){(core::num) → core::bool}) |
| break #L14; |
| break #L13; |
| } |
| } |
| |
| constants { |
| #C1 = 1 |
| #C2 = 2 |
| #C3 = 0 |
| #C4 = 4 |
| #C5 = 3 |
| } |