library #lib; import self as self; import "dart:core" as core; [@vm.bytecode= Bytecode { Entry 4 CheckStack Try #0 start: PushConstant CP#0 PushConstant CP#2 IndirectStaticCall 1, CP#1 Drop1 Jump L1 Try #0 end: Try #0 handler: SetFrame 4 MoveSpecial r0, exception MoveSpecial r1, stackTrace Push r0 PopLocal r2 PushNull PushInt 2 CreateArrayTOS StoreLocal r3 Push r3 PushInt 0 PushConstant CP#4 StoreIndexedTOS Push r3 PushInt 1 Push r2 StoreIndexedTOS PushConstant CP#5 IndirectStaticCall 1, CP#1 PushConstant CP#6 IndirectStaticCall 1, CP#1 Drop1 Jump L1 L1: PushNull ReturnTOS } ExceptionsTable { try-index 0, outer -1, start 2, end 7, handler 7, types [CP#3] } ConstantPool { [0] = String 'danger!' [1] = ArgDesc num-args 1, num-type-args 0, names [] [2] = StaticICData target 'dart.core::print', arg-desc CP#1 [3] = Type dynamic [4] = String 'caught ' [5] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1 [6] = StaticICData target 'dart.core::print', arg-desc CP#1 } ]static method testTryCatch1() → dynamic { try { core::print("danger!"); } on dynamic catch(final dynamic e) { core::print("caught ${e}"); } } [@vm.bytecode= Bytecode { Entry 5 CheckStack Try #0 start: PushConstant CP#0 PushConstant CP#2 IndirectStaticCall 1, CP#1 Drop1 Jump L1 Try #0 end: Try #0 handler: SetFrame 5 MoveSpecial r0, exception MoveSpecial r1, stackTrace Push r0 PushNull PushNull PushConstant CP#3 InstanceCall 4, CP#5 PushTrue IfNeStrictTOS Jump L2 PushConstant CP#6 PushConstant CP#7 IndirectStaticCall 1, CP#1 Drop1 Jump L1 L2: Push r0 PushNull PushNull PushConstant CP#8 InstanceCall 4, CP#9 PushTrue IfNeStrictTOS Jump L3 Push r0 PopLocal r2 PushNull PushInt 2 CreateArrayTOS StoreLocal r3 Push r3 PushInt 0 PushConstant CP#10 StoreIndexedTOS Push r3 PushInt 1 Push r2 StoreIndexedTOS PushConstant CP#11 IndirectStaticCall 1, CP#1 PushConstant CP#12 IndirectStaticCall 1, CP#1 Drop1 Jump L1 L3: Push r0 PushNull PushNull PushConstant CP#13 InstanceCall 4, CP#14 PushTrue IfNeStrictTOS Jump L4 Push r0 PopLocal r2 Push r1 PopLocal r3 PushNull PushInt 4 CreateArrayTOS StoreLocal r4 Push r4 PushInt 0 PushConstant CP#15 StoreIndexedTOS Push r4 PushInt 1 Push r2 StoreIndexedTOS Push r4 PushInt 2 PushConstant CP#16 StoreIndexedTOS Push r4 PushInt 3 Push r3 StoreIndexedTOS PushConstant CP#17 IndirectStaticCall 1, CP#1 PushConstant CP#18 IndirectStaticCall 1, CP#1 Drop1 Jump L1 L4: Push r0 PopLocal r2 Push r1 PopLocal r3 PushNull PushInt 4 CreateArrayTOS StoreLocal r4 Push r4 PushInt 0 PushConstant CP#20 StoreIndexedTOS Push r4 PushInt 1 Push r2 StoreIndexedTOS Push r4 PushInt 2 PushConstant CP#16 StoreIndexedTOS Push r4 PushInt 3 Push r3 StoreIndexedTOS PushConstant CP#21 IndirectStaticCall 1, CP#1 PushConstant CP#22 IndirectStaticCall 1, CP#1 Drop1 Jump L1 L1: PushNull ReturnTOS } ExceptionsTable { try-index 0, outer -1, start 2, end 7, handler 7, needs-stack-trace, types [CP#3, CP#8, CP#13, CP#19] } ConstantPool { [0] = String 'danger!' [1] = ArgDesc num-args 1, num-type-args 0, names [] [2] = StaticICData target 'dart.core::print', arg-desc CP#1 [3] = Type dart.core::TypeError [4] = ArgDesc num-args 4, num-type-args 0, names [] [5] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#4 [6] = String 'caught type error' [7] = StaticICData target 'dart.core::print', arg-desc CP#1 [8] = Type dart.core::AssertionError [9] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#4 [10] = String 'caught assertion error ' [11] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1 [12] = StaticICData target 'dart.core::print', arg-desc CP#1 [13] = Type dart.core::Error [14] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#4 [15] = String 'caught error ' [16] = String ' ' [17] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1 [18] = StaticICData target 'dart.core::print', arg-desc CP#1 [19] = Type dynamic [20] = String 'caught something ' [21] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1 [22] = StaticICData target 'dart.core::print', arg-desc CP#1 } ]static method testTryCatch2() → dynamic { try { core::print("danger!"); } on core::TypeError catch(no-exception-var) { core::print("caught type error"); } on core::AssertionError catch(final core::AssertionError e) { core::print("caught assertion error ${e}"); } on core::Error catch(final core::Error e, final core::StackTrace st) { core::print("caught error ${e} ${st}"); } on dynamic catch(final dynamic e, final core::StackTrace st) { core::print("caught something ${e} ${st}"); } } [@vm.bytecode= Bytecode { Entry 7 CheckStack AllocateContext 3 PopLocal r0 Push r0 PushInt 1 StoreContextVar 0 Push r0 PopLocal r2 Try #0 start: Push r0 PushInt 2 StoreContextVar 1 Allocate CP#9 StoreLocal r5 Push r5 PushNull StoreFieldTOS CP#10 Push r5 PushNull StoreFieldTOS CP#12 Push r5 PushConstant CP#14 StoreFieldTOS CP#15 Push r5 PushConstant CP#0 StoreFieldTOS CP#17 Push r5 Push r0 StoreFieldTOS CP#1 PopLocal r4 Push r4 InstanceCall 1, CP#19 Drop1 Push r0 LoadContextVar 1 PushConstant CP#20 IndirectStaticCall 1, CP#4 Drop1 Jump L1 Try #0 end: Try #0 handler: SetFrame 7 Push r2 PopLocal r0 MoveSpecial r2, exception MoveSpecial r3, stackTrace Push r2 PopLocal r4 Push r0 Push r3 StoreContextVar 2 PushNull PushInt 4 CreateArrayTOS StoreLocal r5 Push r5 PushInt 0 PushConstant CP#21 StoreIndexedTOS Push r5 PushInt 1 Push r4 StoreIndexedTOS Push r5 PushInt 2 PushConstant CP#22 StoreIndexedTOS Push r5 PushInt 3 Push r0 LoadContextVar 2 StoreIndexedTOS PushConstant CP#23 IndirectStaticCall 1, CP#4 PushConstant CP#24 IndirectStaticCall 1, CP#4 Drop1 Allocate CP#9 StoreLocal r5 Push r5 PushNull StoreFieldTOS CP#10 Push r5 PushNull StoreFieldTOS CP#12 Push r5 PushConstant CP#14 StoreFieldTOS CP#15 Push r5 PushConstant CP#25 StoreFieldTOS CP#17 Push r5 Push r0 StoreFieldTOS CP#1 PopLocal r6 Push r6 ReturnTOS Jump L1 L1: Push r0 LoadContextParent PopLocal r0 PushNull ReturnTOS } ExceptionsTable { try-index 0, outer -1, start 9, end 39, handler 39, needs-stack-trace, types [CP#6] } ConstantPool { [0] = ClosureFunction foo () → void; [1] = InstanceField dart.core::_Closure::_context [2] = Reserved [3] = String 'danger foo' [4] = ArgDesc num-args 1, num-type-args 0, names [] [5] = StaticICData target 'dart.core::print', arg-desc CP#4 [6] = Type dynamic [7] = StaticICData target 'dart.core::print', arg-desc CP#4 [8] = EndClosureFunctionScope [9] = Class dart.core::_Closure [10] = InstanceField dart.core::_Closure::_instantiator_type_arguments [11] = Reserved [12] = InstanceField dart.core::_Closure::_function_type_arguments [13] = Reserved [14] = EmptyTypeArguments [15] = InstanceField dart.core::_Closure::_delayed_type_arguments [16] = Reserved [17] = InstanceField dart.core::_Closure::_function [18] = Reserved [19] = ICData dynamic target-name 'call', arg-desc CP#4 [20] = StaticICData target 'dart.core::print', arg-desc CP#4 [21] = String 'caught ' [22] = String ' ' [23] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#4 [24] = StaticICData target 'dart.core::print', arg-desc CP#4 [25] = ClosureFunction bar () → void; [26] = String 'danger bar' [27] = StaticICData target 'dart.core::print', arg-desc CP#4 [28] = Type dart.core::Error [29] = ArgDesc num-args 4, num-type-args 0, names [] [30] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#29 [31] = String 'error ' [32] = String ', captured stack trace: ' [33] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#4 [34] = StaticICData target 'dart.core::print', arg-desc CP#4 [35] = EndClosureFunctionScope } Closure CP#0 { EntryFixed 1, 6 CheckStack Push FP[-5] LoadFieldTOS CP#1 PopLocal r0 Push r0 PopLocal r2 Try #0 start: PushConstant CP#3 PushConstant CP#5 IndirectStaticCall 1, CP#4 Drop1 Jump L1 Try #0 end: Try #0 handler: SetFrame 6 Push r2 PopLocal r0 MoveSpecial r2, exception MoveSpecial r3, stackTrace Push r2 PopLocal r4 Push r0 LoadContextVar 0 PushConstant CP#7 IndirectStaticCall 1, CP#4 Drop1 Push r0 PushInt 3 StoreContextVar 1 Jump L1 L1: PushNull ReturnTOS } Closure CP#25 { EntryFixed 1, 6 CheckStack Push FP[-5] LoadFieldTOS CP#1 PopLocal r0 Push r0 PopLocal r2 Try #0 start: PushConstant CP#26 PushConstant CP#27 IndirectStaticCall 1, CP#4 Drop1 Jump L1 Try #0 end: Try #0 handler: SetFrame 6 Push r2 PopLocal r0 MoveSpecial r2, exception MoveSpecial r3, stackTrace Push r2 PushNull PushNull PushConstant CP#28 InstanceCall 4, CP#30 PushTrue IfNeStrictTOS Jump L2 Push r2 PopLocal r4 PushNull PushInt 4 CreateArrayTOS StoreLocal r5 Push r5 PushInt 0 PushConstant CP#31 StoreIndexedTOS Push r5 PushInt 1 Push r4 StoreIndexedTOS Push r5 PushInt 2 PushConstant CP#32 StoreIndexedTOS Push r5 PushInt 3 Push r0 LoadContextVar 2 StoreIndexedTOS PushConstant CP#33 IndirectStaticCall 1, CP#4 PushConstant CP#34 IndirectStaticCall 1, CP#4 Drop1 Jump L1 L2: Push r2 Push r3 Throw 1 L1: PushNull ReturnTOS } ]static method testTryCatch3() → dynamic { core::int x = 1; try { core::int y = 2; function foo() → void { try { core::print("danger foo"); } on dynamic catch(final dynamic e) { core::print(x); y = 3; } } [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call(); core::print(y); } on dynamic catch(final dynamic e, final core::StackTrace st) { core::print("caught ${e} ${st}"); function bar() → void { try { core::print("danger bar"); } on core::Error catch(final core::Error e) { core::print("error ${e}, captured stack trace: ${st}"); } } return bar; } } [@vm.bytecode= Bytecode { Entry 8 CheckStack Try #0 start: Try #1 start: PushConstant CP#0 PushConstant CP#2 IndirectStaticCall 1, CP#1 Drop1 Jump L1 Try #1 end: Try #1 handler: SetFrame 8 MoveSpecial r2, exception MoveSpecial r3, stackTrace Push r2 PopLocal r4 Try #2 start: PushConstant CP#4 PushConstant CP#5 IndirectStaticCall 1, CP#1 Drop1 Push FP[-5] AssertBoolean 0 PushTrue IfNeStrictTOS Jump L2 Push r2 Push r3 Throw 1 Drop1 L2: Jump L3 Try #2 end: Try #2 handler: SetFrame 8 MoveSpecial r5, exception MoveSpecial r6, stackTrace Push r5 PopLocal r7 PushConstant CP#6 PushConstant CP#7 IndirectStaticCall 1, CP#1 Drop1 Jump L3 L3: Jump L1 L1: Jump L4 Try #0 end: Try #0 handler: SetFrame 8 MoveSpecial r0, exception MoveSpecial r1, stackTrace Push r0 PopLocal r2 Push r1 PopLocal r3 PushConstant CP#8 PushConstant CP#9 IndirectStaticCall 1, CP#1 Drop1 Push r3 PushConstant CP#10 IndirectStaticCall 1, CP#1 Drop1 Jump L4 L4: PushNull ReturnTOS } ExceptionsTable { try-index 0, outer -1, start 2, end 38, handler 38, needs-stack-trace, types [CP#3] try-index 1, outer 0, start 2, end 7, handler 7, needs-stack-trace, types [CP#3] try-index 2, outer 0, start 12, end 26, handler 26, types [CP#3] } ConstantPool { [0] = String 'try 1 > try 2' [1] = ArgDesc num-args 1, num-type-args 0, names [] [2] = StaticICData target 'dart.core::print', arg-desc CP#1 [3] = Type dynamic [4] = String 'try 1 > catch 2 > try 3' [5] = StaticICData target 'dart.core::print', arg-desc CP#1 [6] = String 'try 1 > catch 2 > catch 3' [7] = StaticICData target 'dart.core::print', arg-desc CP#1 [8] = String 'catch 1' [9] = StaticICData target 'dart.core::print', arg-desc CP#1 [10] = StaticICData target 'dart.core::print', arg-desc CP#1 } ]static method testRethrow(core::bool cond) → dynamic { try { try { core::print("try 1 > try 2"); } on dynamic catch(final dynamic e) { try { core::print("try 1 > catch 2 > try 3"); if(cond) { rethrow; } } on dynamic catch(final dynamic e) { core::print("try 1 > catch 2 > catch 3"); } } } on dynamic catch(final dynamic e, final core::StackTrace st) { core::print("catch 1"); core::print(st); } } [@vm.bytecode= Bytecode { Entry 3 CheckStack PushInt 0 PopLocal r0 L5: CheckStack Push r0 PushInt 10 InstanceCall 2, CP#1 AssertBoolean 0 PushTrue IfNeStrictTOS Jump L1 Try #0 start: Push r0 PushInt 5 InstanceCall 2, CP#2 AssertBoolean 0 PushTrue IfNeStrictTOS Jump L2 Jump L3 L2: Jump L4 Try #0 end: Try #0 handler: SetFrame 3 MoveSpecial r1, exception MoveSpecial r2, stackTrace Push r0 PushConstant CP#5 IndirectStaticCall 1, CP#4 Drop1 Push r1 Push r2 Throw 1 L3: Push r0 PushConstant CP#6 IndirectStaticCall 1, CP#4 Drop1 Jump L1 L4: Push r0 PushConstant CP#7 IndirectStaticCall 1, CP#4 Drop1 Push r0 PushInt 1 InstanceCall 2, CP#8 StoreLocal r0 Drop1 Jump L5 L1: PushNull ReturnTOS } ExceptionsTable { try-index 0, outer -1, start 12, end 21, handler 21, needs-stack-trace, types [CP#3] } ConstantPool { [0] = ArgDesc num-args 2, num-type-args 0, names [] [1] = ICData target-name '<', arg-desc CP#0 [2] = ICData target-name '>', arg-desc CP#0 [3] = Type dynamic [4] = ArgDesc num-args 1, num-type-args 0, names [] [5] = StaticICData target 'dart.core::print', arg-desc CP#4 [6] = StaticICData target 'dart.core::print', arg-desc CP#4 [7] = StaticICData target 'dart.core::print', arg-desc CP#4 [8] = ICData target-name '+', arg-desc CP#0 } ]static method testTryFinally1() → dynamic { #L1: for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) { try { if(i.{core::num::>}(5)) { break #L1; } } finally { core::print(i); } } } [@vm.bytecode= Bytecode { Entry 9 CheckStack AllocateContext 2 PopLocal r0 Push r0 Push FP[-5] StoreContextVar 0 Push r0 LoadContextVar 0 PopLocal r2 Push r2 PushInt 1 InstanceCall 2, CP#1 PushTrue IfEqStrictTOS Jump L1 Push r2 PushInt 2 InstanceCall 2, CP#2 PushTrue IfEqStrictTOS Jump L2 Jump L3 L1: Push r0 PopLocal r3 Try #0 start: PushConstant CP#3 PushConstant CP#5 IndirectStaticCall 1, CP#4 Drop1 Push r0 PushInt 3 StoreContextVar 1 Push r0 PopLocal r5 Try #1 start: PushConstant CP#6 PushConstant CP#7 IndirectStaticCall 1, CP#4 Drop1 Allocate CP#14 StoreLocal r8 Push r8 PushNull StoreFieldTOS CP#15 Push r8 PushNull StoreFieldTOS CP#17 Push r8 PushConstant CP#19 StoreFieldTOS CP#20 Push r8 PushConstant CP#8 StoreFieldTOS CP#22 Push r8 Push r0 StoreFieldTOS CP#9 PopLocal r7 Push r7 InstanceCall 1, CP#24 Drop1 Jump L4 Jump L5 Try #1 end: Try #1 handler: SetFrame 9 Push r5 PopLocal r0 MoveSpecial r5, exception MoveSpecial r6, stackTrace PushConstant CP#26 PushConstant CP#27 IndirectStaticCall 1, CP#4 Drop1 Push r5 Push r6 Throw 1 L4: Push r5 PopLocal r0 PushConstant CP#26 PushConstant CP#28 IndirectStaticCall 1, CP#4 Drop1 Jump L6 L5: Push r5 PopLocal r0 PushConstant CP#26 PushConstant CP#29 IndirectStaticCall 1, CP#4 Drop1 PushConstant CP#30 PushConstant CP#31 IndirectStaticCall 1, CP#4 Drop1 Jump L7 Try #0 end: Try #0 handler: SetFrame 9 Push r3 PopLocal r0 MoveSpecial r3, exception MoveSpecial r4, stackTrace PushConstant CP#32 PushConstant CP#33 IndirectStaticCall 1, CP#4 Drop1 Push r3 Push r4 Throw 1 L6: Push r3 PopLocal r0 PushConstant CP#32 PushConstant CP#34 IndirectStaticCall 1, CP#4 Drop1 Jump L2 L7: Push r3 PopLocal r0 PushConstant CP#32 PushConstant CP#35 IndirectStaticCall 1, CP#4 Drop1 Jump L3 L2: PushConstant CP#36 PushConstant CP#37 IndirectStaticCall 1, CP#4 Drop1 Jump L3 L3: PushNull ReturnTOS } ExceptionsTable { try-index 0, outer -1, start 25, end 91, handler 91, needs-stack-trace, types [CP#25] try-index 1, outer 0, start 34, end 61, handler 61, needs-stack-trace, types [CP#25] } ConstantPool { [0] = ArgDesc num-args 2, num-type-args 0, names [] [1] = ICData target-name '==', arg-desc CP#0 [2] = ICData target-name '==', arg-desc CP#0 [3] = String 'before try 1' [4] = ArgDesc num-args 1, num-type-args 0, names [] [5] = StaticICData target 'dart.core::print', arg-desc CP#4 [6] = String 'try' [7] = StaticICData target 'dart.core::print', arg-desc CP#4 [8] = ClosureFunction foo () → void; [9] = InstanceField dart.core::_Closure::_context [10] = Reserved [11] = StaticICData target 'dart.core::print', arg-desc CP#4 [12] = StaticICData target 'dart.core::print', arg-desc CP#4 [13] = EndClosureFunctionScope [14] = Class dart.core::_Closure [15] = InstanceField dart.core::_Closure::_instantiator_type_arguments [16] = Reserved [17] = InstanceField dart.core::_Closure::_function_type_arguments [18] = Reserved [19] = EmptyTypeArguments [20] = InstanceField dart.core::_Closure::_delayed_type_arguments [21] = Reserved [22] = InstanceField dart.core::_Closure::_function [23] = Reserved [24] = ICData dynamic target-name 'call', arg-desc CP#4 [25] = Type dynamic [26] = String 'finally 1' [27] = StaticICData target 'dart.core::print', arg-desc CP#4 [28] = StaticICData target 'dart.core::print', arg-desc CP#4 [29] = StaticICData target 'dart.core::print', arg-desc CP#4 [30] = String 'after try 1' [31] = StaticICData target 'dart.core::print', arg-desc CP#4 [32] = String 'finally 2' [33] = StaticICData target 'dart.core::print', arg-desc CP#4 [34] = StaticICData target 'dart.core::print', arg-desc CP#4 [35] = StaticICData target 'dart.core::print', arg-desc CP#4 [36] = String 'case 2' [37] = StaticICData target 'dart.core::print', arg-desc CP#4 } Closure CP#8 { EntryFixed 1, 2 CheckStack Push FP[-5] LoadFieldTOS CP#9 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#11 IndirectStaticCall 1, CP#4 Drop1 Push r0 LoadContextVar 1 PushConstant CP#12 IndirectStaticCall 1, CP#4 Drop1 PushNull ReturnTOS } ]static method testTryFinally2(core::int x) → dynamic { #L2: switch(x) { #L3: case 1: { try { core::print("before try 1"); core::int y = 3; try { core::print("try"); function foo() → void { core::print(x); core::print(y); } [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call(); continue #L4; } finally { core::print("finally 1"); } core::print("after try 1"); } finally { core::print("finally 2"); } break #L2; } #L4: case 2: { core::print("case 2"); break #L2; } } } [@vm.bytecode= Bytecode { Entry 6 CheckStack AllocateContext 1 PopLocal r0 Push r0 PushInt 11 StoreContextVar 0 PushNull PopLocal r2 Push r0 PopLocal r3 Try #0 start: Allocate CP#22 StoreLocal r5 Push r5 PushNull StoreFieldTOS CP#23 Push r5 PushNull StoreFieldTOS CP#25 Push r5 PushConstant CP#27 StoreFieldTOS CP#28 Push r5 PushConstant CP#0 StoreFieldTOS CP#30 Push r5 Push r0 StoreFieldTOS CP#1 PopLocal r2 Jump L1 Try #0 end: Try #0 handler: SetFrame 6 Push r3 PopLocal r0 MoveSpecial r3, exception MoveSpecial r4, stackTrace Push r0 LoadContextVar 0 PushConstant CP#32 IndirectStaticCall 1, CP#3 Drop1 Push r2 InstanceCall 1, CP#33 Drop1 Push r3 Push r4 Throw 1 L1: Push r3 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#34 IndirectStaticCall 1, CP#3 Drop1 Push r2 InstanceCall 1, CP#35 Drop1 Push r0 LoadContextParent PopLocal r0 PushNull ReturnTOS } ExceptionsTable { try-index 0, outer -1, start 11, end 30, handler 30, needs-stack-trace, types [CP#7] } ConstantPool { [0] = ClosureFunction () → dart.core::int; [1] = InstanceField dart.core::_Closure::_context [2] = Reserved [3] = ArgDesc num-args 1, num-type-args 0, names [] [4] = StaticICData target 'dart.core::print', arg-desc CP#3 [5] = String 'try 1' [6] = StaticICData target 'dart.core::print', arg-desc CP#3 [7] = Type dynamic [8] = String 'try 2' [9] = StaticICData target 'dart.core::print', arg-desc CP#3 [10] = StaticICData target 'dart.core::print', arg-desc CP#3 [11] = StaticICData target 'dart.core::print', arg-desc CP#3 [12] = StaticICData target 'dart.core::print', arg-desc CP#3 [13] = StaticICData target 'dart.core::print', arg-desc CP#3 [14] = StaticICData target 'dart.core::print', arg-desc CP#3 [15] = StaticICData target 'dart.core::print', arg-desc CP#3 [16] = StaticICData target 'dart.core::print', arg-desc CP#3 [17] = StaticICData target 'dart.core::print', arg-desc CP#3 [18] = StaticICData target 'dart.core::print', arg-desc CP#3 [19] = StaticICData target 'dart.core::print', arg-desc CP#3 [20] = StaticICData target 'dart.core::print', arg-desc CP#3 [21] = EndClosureFunctionScope [22] = Class dart.core::_Closure [23] = InstanceField dart.core::_Closure::_instantiator_type_arguments [24] = Reserved [25] = InstanceField dart.core::_Closure::_function_type_arguments [26] = Reserved [27] = EmptyTypeArguments [28] = InstanceField dart.core::_Closure::_delayed_type_arguments [29] = Reserved [30] = InstanceField dart.core::_Closure::_function [31] = Reserved [32] = StaticICData target 'dart.core::print', arg-desc CP#3 [33] = ICData dynamic target-name 'call', arg-desc CP#3 [34] = StaticICData target 'dart.core::print', arg-desc CP#3 [35] = ICData dynamic target-name 'call', arg-desc CP#3 } Closure CP#0 { EntryFixed 1, 6 CheckStack Push FP[-5] LoadFieldTOS CP#1 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#4 IndirectStaticCall 1, CP#3 Drop1 Push r0 PopLocal r2 Try #0 start: PushConstant CP#5 PushConstant CP#6 IndirectStaticCall 1, CP#3 Drop1 Jump L1 Jump L2 Try #0 end: Try #0 handler: SetFrame 6 Push r2 PopLocal r0 MoveSpecial r2, exception MoveSpecial r3, stackTrace Push r0 PopLocal r4 Try #1 start: PushConstant CP#8 PushConstant CP#9 IndirectStaticCall 1, CP#3 Drop1 Jump L3 Jump L4 Try #1 end: Try #1 handler: SetFrame 6 Push r4 PopLocal r0 MoveSpecial r4, exception MoveSpecial r5, stackTrace Push r0 LoadContextVar 0 PushConstant CP#10 IndirectStaticCall 1, CP#3 Drop1 Push r4 Push r5 Throw 1 L3: Push r4 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#11 IndirectStaticCall 1, CP#3 Drop1 PushInt 43 ReturnTOS L4: Push r4 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#12 IndirectStaticCall 1, CP#3 Drop1 Push r2 Push r3 Throw 1 L1: Push r2 PopLocal r0 Push r0 PopLocal r4 Try #2 start: PushConstant CP#8 PushConstant CP#13 IndirectStaticCall 1, CP#3 Drop1 Jump L5 Jump L6 Try #2 end: Try #2 handler: SetFrame 6 Push r4 PopLocal r0 MoveSpecial r4, exception MoveSpecial r5, stackTrace Push r0 LoadContextVar 0 PushConstant CP#14 IndirectStaticCall 1, CP#3 Drop1 Push r4 Push r5 Throw 1 L5: Push r4 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#15 IndirectStaticCall 1, CP#3 Drop1 PushInt 43 ReturnTOS L6: Push r4 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#16 IndirectStaticCall 1, CP#3 Drop1 PushInt 42 ReturnTOS L2: Push r2 PopLocal r0 Push r0 PopLocal r4 Try #3 start: PushConstant CP#8 PushConstant CP#17 IndirectStaticCall 1, CP#3 Drop1 Jump L7 Jump L8 Try #3 end: Try #3 handler: SetFrame 6 Push r4 PopLocal r0 MoveSpecial r4, exception MoveSpecial r5, stackTrace Push r0 LoadContextVar 0 PushConstant CP#18 IndirectStaticCall 1, CP#3 Drop1 Push r4 Push r5 Throw 1 L7: Push r4 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#19 IndirectStaticCall 1, CP#3 Drop1 PushInt 43 ReturnTOS L8: Push r4 PopLocal r0 Push r0 LoadContextVar 0 PushConstant CP#20 IndirectStaticCall 1, CP#3 Drop1 PushNull ReturnTOS } ]static method testTryFinally3() → dynamic { core::int x = 11; dynamic y; try { y = () → core::int { core::print(x); try { core::print("try 1"); return 42; } finally { try { core::print("try 2"); return 43; } finally { core::print(x); } } }; } finally { core::print(x); [@vm.call-site-attributes.metadata=receiverType:dynamic] y.call(); } } [@vm.bytecode= Bytecode { Entry 5 CheckStack Try #0 start: Try #1 start: PushConstant CP#0 PushConstant CP#2 IndirectStaticCall 1, CP#1 Drop1 Jump L1 Try #1 end: Try #1 handler: SetFrame 5 MoveSpecial r2, exception MoveSpecial r3, stackTrace Push r2 PopLocal r4 PushConstant CP#4 PushConstant CP#5 IndirectStaticCall 1, CP#1 Drop1 Jump L1 L1: Jump L2 Try #0 end: Try #0 handler: SetFrame 5 MoveSpecial r0, exception MoveSpecial r1, stackTrace PushConstant CP#6 PushConstant CP#7 IndirectStaticCall 1, CP#1 Drop1 Push r0 Push r1 Throw 1 L2: PushConstant CP#6 PushConstant CP#8 IndirectStaticCall 1, CP#1 Drop1 PushNull ReturnTOS } ExceptionsTable { try-index 0, outer -1, start 2, end 18, handler 18, needs-stack-trace, types [CP#3] try-index 1, outer 0, start 2, end 7, handler 7, types [CP#3] } ConstantPool { [0] = String 'try' [1] = ArgDesc num-args 1, num-type-args 0, names [] [2] = StaticICData target 'dart.core::print', arg-desc CP#1 [3] = Type dynamic [4] = String 'catch' [5] = StaticICData target 'dart.core::print', arg-desc CP#1 [6] = String 'finally' [7] = StaticICData target 'dart.core::print', arg-desc CP#1 [8] = StaticICData target 'dart.core::print', arg-desc CP#1 } ]static method testTryCatchFinally() → dynamic { try try { core::print("try"); } on dynamic catch(final dynamic e) { core::print("catch"); } finally { core::print("finally"); } } [@vm.bytecode= Bytecode { Entry 0 CheckStack PushNull ReturnTOS } ConstantPool { } ]static method main() → dynamic {}