| library #lib; |
| import self as self; |
| import "dart:async" as asy; |
| import "dart:core" as core; |
| |
| import "dart:async"; |
| |
| [@vm.bytecode= |
| Bytecode { |
| Entry 3 |
| CheckStack 0 |
| Allocate CP#20 |
| StoreLocal r2 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#21 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#23 |
| Push r2 |
| PushConstant CP#25 |
| StoreFieldTOS CP#26 |
| Push r2 |
| PushConstant CP#0 |
| StoreFieldTOS CP#28 |
| Push r2 |
| Push r0 |
| StoreFieldTOS CP#1 |
| ReturnTOS |
| } |
| ConstantPool { |
| [0] = ClosureFunction 0 |
| [1] = InstanceField dart:core::_Closure::_context (field) |
| [2] = Reserved |
| [3] = Type dart:async::Future < dart:core::int > |
| [4] = ObjectRef 'x' |
| [5] = SubtypeTestCache |
| [6] = Class dart:async::_AsyncAwaitCompleter |
| [7] = ObjectRef < dart:core::Null > |
| [8] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names [] |
| [9] = Reserved |
| [10] = ClosureFunction 1 |
| [11] = ObjectRef null |
| [12] = DirectCall 'dart:async::_awaitHelper', ArgDesc num-args 4, num-type-args 0, names [] |
| [13] = Reserved |
| [14] = DirectCall 'dart:async::_completeOnAsyncReturn', ArgDesc num-args 2, num-type-args 0, names [] |
| [15] = Reserved |
| [16] = Type dynamic |
| [17] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names [] |
| [18] = Reserved |
| [19] = EndClosureFunctionScope |
| [20] = Class dart:core::_Closure |
| [21] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field) |
| [22] = Reserved |
| [23] = InstanceField dart:core::_Closure::_function_type_arguments (field) |
| [24] = Reserved |
| [25] = EmptyTypeArguments |
| [26] = InstanceField dart:core::_Closure::_delayed_type_arguments (field) |
| [27] = Reserved |
| [28] = InstanceField dart:core::_Closure::_function (field) |
| [29] = Reserved |
| [30] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [31] = Reserved |
| [32] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [33] = Reserved |
| [34] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [35] = Reserved |
| [36] = ObjectRef ArgDesc num-args 2, num-type-args 0, names [] |
| [37] = ICData dynamic target-name 'start', arg-desc CP#36 |
| [38] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names [] |
| [39] = Reserved |
| [40] = EndClosureFunctionScope |
| } |
| Closure #lib::asyncInFieldInitializer (field)::'<anonymous closure>' (dart:async::Future < dart:core::int > x) -> dart:async::Future < dart:core::Null > |
| ClosureBytecode { |
| EntryFixed 2, 4 |
| CheckStack 0 |
| Push FP[-6] |
| LoadFieldTOS CP#1 |
| PopLocal r0 |
| AllocateContext 0, 9 |
| PopLocal r0 |
| Push r0 |
| Push FP[-5] |
| StoreContextVar 0, 0 |
| Push FP[-5] |
| PushConstant CP#3 |
| PushNull |
| PushNull |
| PushConstant CP#4 |
| AssertAssignable 0, CP#5 |
| Drop1 |
| Push r0 |
| PushConstant CP#7 |
| PushConstant CP#6 |
| AllocateT |
| StoreLocal r2 |
| Push r2 |
| DirectCall 1, CP#8 |
| Drop1 |
| StoreContextVar 0, 1 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 2 |
| PushNull |
| PopLocal r3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 4 |
| Push r0 |
| PushInt 0 |
| StoreContextVar 0, 5 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 6 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 7 |
| Push r0 |
| Allocate CP#20 |
| StoreLocal r2 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#21 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#23 |
| Push r2 |
| PushConstant CP#25 |
| StoreFieldTOS CP#26 |
| Push r2 |
| PushConstant CP#10 |
| StoreFieldTOS CP#28 |
| Push r2 |
| Push r0 |
| StoreFieldTOS CP#1 |
| StoreContextVar 0, 8 |
| Push r0 |
| LoadContextVar 0, 8 |
| DirectCall 1, CP#30 |
| PopLocal r3 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 8 |
| DirectCall 1, CP#32 |
| StoreContextVar 0, 3 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 8 |
| DirectCall 1, CP#34 |
| StoreContextVar 0, 4 |
| Push r0 |
| LoadContextVar 0, 1 |
| Push r0 |
| LoadContextVar 0, 8 |
| DynamicCall 2, CP#37 |
| Drop1 |
| Push r0 |
| LoadContextVar 0, 1 |
| InterfaceCall 1, CP#38 |
| ReturnTOS |
| |
| } |
| |
| Closure #lib::asyncInFieldInitializer (field)::Closure/0::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic |
| ClosureBytecode { |
| EntryOptional 1, 3, 0 |
| LoadConstant r1, CP#11 |
| LoadConstant r2, CP#11 |
| LoadConstant r3, CP#11 |
| Frame 6 |
| CheckStack 0 |
| Push r0 |
| LoadFieldTOS CP#1 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 5 |
| StoreLocal r5 |
| PushInt 0 |
| JumpIfNeStrict L1 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 7 |
| Try #0 start: |
| Push r4 |
| PushInt 1 |
| StoreContextVar 0, 5 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 6 |
| Push r4 |
| LoadContextVar 0, 0 |
| Push r4 |
| LoadContextVar 0, 3 |
| Push r4 |
| LoadContextVar 0, 4 |
| Push r4 |
| LoadContextVar 0, 8 |
| DirectCall 4, CP#12 |
| PopLocal r8 |
| PushNull |
| ReturnTOS |
| L4: |
| Push r2 |
| JumpIfNull L2 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L2: |
| Push r1 |
| Drop1 |
| Push r4 |
| LoadContextVar 0, 1 |
| Push r4 |
| LoadContextVar 0, 2 |
| DirectCall 2, CP#14 |
| Drop1 |
| PushNull |
| ReturnTOS |
| Try #0 end: |
| Try #0 handler: |
| SetFrame 10 |
| Push r0 |
| LoadFieldTOS CP#1 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 7 |
| PopLocal r4 |
| MoveSpecial exception, r6 |
| MoveSpecial stackTrace, r7 |
| Push r6 |
| PopLocal r8 |
| Push r7 |
| PopLocal r9 |
| Push r4 |
| LoadContextVar 0, 1 |
| Push r8 |
| Push r9 |
| InterfaceCall 3, CP#17 |
| Drop1 |
| Jump L3 |
| L3: |
| PushNull |
| ReturnTOS |
| L1: |
| Push r4 |
| LoadContextVar 0, 6 |
| PopLocal r4 |
| Jump L4 |
| |
| } |
| ]static field (asy::Future<core::int>) → asy::Future<core::Null> asyncInFieldInitializer = (asy::Future<core::int> x) → asy::Future<core::Null> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::Null> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Null>(); |
| asy::FutureOr<core::Null> :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 { |
| #L1: |
| { |
| [yield] let dynamic #t1 = asy::_awaitHelper(x, :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}; |
| }; |
| [@vm.bytecode= |
| Bytecode { |
| Entry 7 |
| CheckStack 0 |
| AllocateContext 0, 4 |
| PopLocal r0 |
| Push r0 |
| PushConstant CP#1 |
| PushConstant CP#0 |
| AllocateT |
| StoreLocal r2 |
| Push r2 |
| DirectCall 1, CP#2 |
| Drop1 |
| StoreContextVar 0, 0 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 1 |
| PushNull |
| PopLocal r3 |
| PushNull |
| PopLocal r4 |
| PushNull |
| PopLocal r5 |
| Push r0 |
| PushInt 0 |
| StoreContextVar 0, 2 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 3 |
| Allocate CP#14 |
| StoreLocal r2 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#15 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#17 |
| Push r2 |
| PushConstant CP#19 |
| StoreFieldTOS CP#20 |
| Push r2 |
| PushConstant CP#4 |
| StoreFieldTOS CP#22 |
| Push r2 |
| Push r0 |
| StoreFieldTOS CP#6 |
| PopLocal r6 |
| Push r6 |
| DirectCall 1, CP#24 |
| PopLocal r3 |
| Push r6 |
| DirectCall 1, CP#26 |
| PopLocal r4 |
| Push r6 |
| DirectCall 1, CP#28 |
| PopLocal r5 |
| Push r0 |
| LoadContextVar 0, 0 |
| Push r6 |
| DynamicCall 2, CP#31 |
| Drop1 |
| Push r0 |
| LoadContextVar 0, 0 |
| InterfaceCall 1, CP#32 |
| ReturnTOS |
| } |
| ConstantPool { |
| [0] = Class dart:async::_AsyncAwaitCompleter |
| [1] = ObjectRef < dart:core::int > |
| [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names [] |
| [3] = Reserved |
| [4] = ClosureFunction 0 |
| [5] = ObjectRef null |
| [6] = InstanceField dart:core::_Closure::_context (field) |
| [7] = Reserved |
| [8] = DirectCall 'dart:async::_completeOnAsyncReturn', ArgDesc num-args 2, num-type-args 0, names [] |
| [9] = Reserved |
| [10] = Type dynamic |
| [11] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names [] |
| [12] = Reserved |
| [13] = EndClosureFunctionScope |
| [14] = Class dart:core::_Closure |
| [15] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field) |
| [16] = Reserved |
| [17] = InstanceField dart:core::_Closure::_function_type_arguments (field) |
| [18] = Reserved |
| [19] = EmptyTypeArguments |
| [20] = InstanceField dart:core::_Closure::_delayed_type_arguments (field) |
| [21] = Reserved |
| [22] = InstanceField dart:core::_Closure::_function (field) |
| [23] = Reserved |
| [24] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [25] = Reserved |
| [26] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [27] = Reserved |
| [28] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [29] = Reserved |
| [30] = ObjectRef ArgDesc num-args 2, num-type-args 0, names [] |
| [31] = ICData dynamic target-name 'start', arg-desc CP#30 |
| [32] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names [] |
| [33] = Reserved |
| } |
| Closure #lib::foo::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic |
| ClosureBytecode { |
| EntryOptional 1, 3, 0 |
| LoadConstant r1, CP#5 |
| LoadConstant r2, CP#5 |
| LoadConstant r3, CP#5 |
| Frame 6 |
| CheckStack 0 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 2 |
| StoreLocal r5 |
| PushInt 0 |
| JumpIfNeStrict L1 |
| Push r4 |
| PopLocal r6 |
| Try #0 start: |
| Push r4 |
| PushInt 42 |
| StoreContextVar 0, 1 |
| Jump L2 |
| L2: |
| Push r4 |
| LoadContextVar 0, 0 |
| Push r4 |
| LoadContextVar 0, 1 |
| DirectCall 2, CP#8 |
| Drop1 |
| PushNull |
| ReturnTOS |
| Try #0 end: |
| Try #0 handler: |
| SetFrame 10 |
| Push r6 |
| PopLocal r4 |
| MoveSpecial exception, r6 |
| MoveSpecial stackTrace, r7 |
| Push r6 |
| PopLocal r8 |
| Push r7 |
| PopLocal r9 |
| Push r4 |
| LoadContextVar 0, 0 |
| Push r8 |
| Push r9 |
| InterfaceCall 3, CP#11 |
| Drop1 |
| Jump L3 |
| L3: |
| PushNull |
| ReturnTOS |
| L1: |
| Trap |
| |
| } |
| ]static method foo() → asy::Future<core::int> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>(); |
| asy::FutureOr<core::int> :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 = 42; |
| break #L2; |
| } |
| 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}; |
| } |
| [@vm.bytecode= |
| Bytecode { |
| Entry 4 |
| CheckStack 0 |
| AllocateContext 0, 11 |
| PopLocal r0 |
| Push r0 |
| Push FP[-6] |
| StoreContextVar 0, 0 |
| Push r0 |
| Push FP[-5] |
| StoreContextVar 0, 1 |
| Push r0 |
| PushConstant CP#1 |
| PushConstant CP#0 |
| AllocateT |
| StoreLocal r2 |
| Push r2 |
| DirectCall 1, CP#2 |
| Drop1 |
| StoreContextVar 0, 2 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 3 |
| PushNull |
| PopLocal r3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 4 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 5 |
| Push r0 |
| PushInt 0 |
| StoreContextVar 0, 6 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 7 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 8 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 9 |
| Push r0 |
| Allocate CP#18 |
| StoreLocal r2 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#19 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#21 |
| Push r2 |
| PushConstant CP#23 |
| StoreFieldTOS CP#24 |
| Push r2 |
| PushConstant CP#4 |
| StoreFieldTOS CP#26 |
| Push r2 |
| Push r0 |
| StoreFieldTOS CP#6 |
| StoreContextVar 0, 10 |
| Push r0 |
| LoadContextVar 0, 10 |
| DirectCall 1, CP#28 |
| PopLocal r3 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 10 |
| DirectCall 1, CP#30 |
| StoreContextVar 0, 4 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 10 |
| DirectCall 1, CP#32 |
| StoreContextVar 0, 5 |
| Push r0 |
| LoadContextVar 0, 2 |
| Push r0 |
| LoadContextVar 0, 10 |
| DynamicCall 2, CP#35 |
| Drop1 |
| Push r0 |
| LoadContextVar 0, 2 |
| InterfaceCall 1, CP#36 |
| ReturnTOS |
| } |
| ConstantPool { |
| [0] = Class dart:async::_AsyncAwaitCompleter |
| [1] = ObjectRef < dart:core::int > |
| [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names [] |
| [3] = Reserved |
| [4] = ClosureFunction 0 |
| [5] = ObjectRef null |
| [6] = InstanceField dart:core::_Closure::_context (field) |
| [7] = Reserved |
| [8] = DirectCall 'dart:async::_awaitHelper', ArgDesc num-args 4, num-type-args 0, names [] |
| [9] = Reserved |
| [10] = InterfaceCall 'dart:core::num::+', ArgDesc num-args 2, num-type-args 0, names [] |
| [11] = Reserved |
| [12] = DirectCall 'dart:async::_completeOnAsyncReturn', ArgDesc num-args 2, num-type-args 0, names [] |
| [13] = Reserved |
| [14] = Type dynamic |
| [15] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names [] |
| [16] = Reserved |
| [17] = EndClosureFunctionScope |
| [18] = Class dart:core::_Closure |
| [19] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field) |
| [20] = Reserved |
| [21] = InstanceField dart:core::_Closure::_function_type_arguments (field) |
| [22] = Reserved |
| [23] = EmptyTypeArguments |
| [24] = InstanceField dart:core::_Closure::_delayed_type_arguments (field) |
| [25] = Reserved |
| [26] = InstanceField dart:core::_Closure::_function (field) |
| [27] = Reserved |
| [28] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [29] = Reserved |
| [30] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [31] = Reserved |
| [32] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [33] = Reserved |
| [34] = ObjectRef ArgDesc num-args 2, num-type-args 0, names [] |
| [35] = ICData dynamic target-name 'start', arg-desc CP#34 |
| [36] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names [] |
| [37] = Reserved |
| } |
| Closure #lib::simpleAsyncAwait::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic |
| ClosureBytecode { |
| EntryOptional 1, 3, 0 |
| LoadConstant r1, CP#5 |
| LoadConstant r2, CP#5 |
| LoadConstant r3, CP#5 |
| Frame 6 |
| CheckStack 0 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 6 |
| StoreLocal r5 |
| PushInt 0 |
| JumpIfNeStrict L1 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 8 |
| Try #0 start: |
| Push r4 |
| PushInt 1 |
| StoreContextVar 0, 6 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 7 |
| Push r4 |
| LoadContextVar 0, 0 |
| Push r4 |
| LoadContextVar 0, 4 |
| Push r4 |
| LoadContextVar 0, 5 |
| Push r4 |
| LoadContextVar 0, 10 |
| DirectCall 4, CP#8 |
| PopLocal r8 |
| PushNull |
| ReturnTOS |
| L6: |
| Push r2 |
| JumpIfNull L2 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L2: |
| Push r4 |
| Push r1 |
| StoreContextVar 0, 9 |
| Push r4 |
| PushInt 2 |
| StoreContextVar 0, 6 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 7 |
| Push r4 |
| LoadContextVar 0, 1 |
| Push r4 |
| LoadContextVar 0, 4 |
| Push r4 |
| LoadContextVar 0, 5 |
| Push r4 |
| LoadContextVar 0, 10 |
| DirectCall 4, CP#8 |
| PopLocal r9 |
| PushNull |
| ReturnTOS |
| L7: |
| Push r2 |
| JumpIfNull L3 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L3: |
| Push r4 |
| Push r4 |
| LoadContextVar 0, 9 |
| Push r1 |
| InterfaceCall 2, CP#10 |
| StoreContextVar 0, 3 |
| Jump L4 |
| L4: |
| Push r4 |
| LoadContextVar 0, 2 |
| Push r4 |
| LoadContextVar 0, 3 |
| DirectCall 2, CP#12 |
| Drop1 |
| PushNull |
| ReturnTOS |
| Try #0 end: |
| Try #0 handler: |
| SetFrame 10 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 8 |
| PopLocal r4 |
| MoveSpecial exception, r6 |
| MoveSpecial stackTrace, r7 |
| Push r6 |
| PopLocal r8 |
| Push r7 |
| PopLocal r9 |
| Push r4 |
| LoadContextVar 0, 2 |
| Push r8 |
| Push r9 |
| InterfaceCall 3, CP#15 |
| Drop1 |
| Jump L5 |
| L5: |
| PushNull |
| ReturnTOS |
| L1: |
| Push r4 |
| LoadContextVar 0, 7 |
| PopLocal r4 |
| Push r5 |
| PushInt 1 |
| JumpIfEqStrict L6 |
| Jump L7 |
| |
| } |
| ]static method simpleAsyncAwait(asy::Future<core::int> a, asy::Future<core::int> b) → asy::Future<core::int> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>(); |
| asy::FutureOr<core::int> :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 :async_temporary_0; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L3: |
| { |
| [yield] let dynamic #t2 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null; |
| :async_temporary_0 = :result; |
| [yield] let dynamic #t3 = asy::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null; |
| :return_value = :async_temporary_0.{core::num::+}(:result); |
| break #L3; |
| } |
| 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}; |
| } |
| [@vm.bytecode= |
| Bytecode { |
| Entry 4 |
| CheckStack 0 |
| AllocateContext 0, 11 |
| PopLocal r0 |
| Push r0 |
| Push FP[-5] |
| StoreContextVar 0, 0 |
| Push r0 |
| PushConstant CP#1 |
| PushConstant CP#0 |
| AllocateT |
| StoreLocal r2 |
| Push r2 |
| DirectCall 1, CP#2 |
| Drop1 |
| StoreContextVar 0, 1 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 2 |
| PushNull |
| PopLocal r3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 4 |
| Push r0 |
| PushInt 0 |
| StoreContextVar 0, 5 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 6 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 7 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 8 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 9 |
| Push r0 |
| Allocate CP#26 |
| StoreLocal r2 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#27 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#29 |
| Push r2 |
| PushConstant CP#31 |
| StoreFieldTOS CP#32 |
| Push r2 |
| PushConstant CP#4 |
| StoreFieldTOS CP#34 |
| Push r2 |
| Push r0 |
| StoreFieldTOS CP#6 |
| StoreContextVar 0, 10 |
| Push r0 |
| LoadContextVar 0, 10 |
| DirectCall 1, CP#36 |
| PopLocal r3 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 10 |
| DirectCall 1, CP#38 |
| StoreContextVar 0, 3 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 10 |
| DirectCall 1, CP#40 |
| StoreContextVar 0, 4 |
| Push r0 |
| LoadContextVar 0, 1 |
| Push r0 |
| LoadContextVar 0, 10 |
| DynamicCall 2, CP#43 |
| Drop1 |
| Push r0 |
| LoadContextVar 0, 1 |
| InterfaceCall 1, CP#44 |
| ReturnTOS |
| } |
| ConstantPool { |
| [0] = Class dart:async::_AsyncAwaitCompleter |
| [1] = ObjectRef < dart:core::int > |
| [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names [] |
| [3] = Reserved |
| [4] = ClosureFunction 0 |
| [5] = ObjectRef null |
| [6] = InstanceField dart:core::_Closure::_context (field) |
| [7] = Reserved |
| [8] = InterfaceCall 'dart:core::Iterable::get:iterator', ArgDesc num-args 1, num-type-args 0, names [] |
| [9] = Reserved |
| [10] = InterfaceCall 'dart:core::Iterator::moveNext', ArgDesc num-args 1, num-type-args 0, names [] |
| [11] = Reserved |
| [12] = InterfaceCall 'dart:core::Iterator::get:current', ArgDesc num-args 1, num-type-args 0, names [] |
| [13] = Reserved |
| [14] = DirectCall '#lib::foo', ArgDesc num-args 0, num-type-args 0, names [] |
| [15] = Reserved |
| [16] = DirectCall 'dart:async::_awaitHelper', ArgDesc num-args 4, num-type-args 0, names [] |
| [17] = Reserved |
| [18] = InterfaceCall 'dart:core::num::+', ArgDesc num-args 2, num-type-args 0, names [] |
| [19] = Reserved |
| [20] = DirectCall 'dart:async::_completeOnAsyncReturn', ArgDesc num-args 2, num-type-args 0, names [] |
| [21] = Reserved |
| [22] = Type dynamic |
| [23] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names [] |
| [24] = Reserved |
| [25] = EndClosureFunctionScope |
| [26] = Class dart:core::_Closure |
| [27] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field) |
| [28] = Reserved |
| [29] = InstanceField dart:core::_Closure::_function_type_arguments (field) |
| [30] = Reserved |
| [31] = EmptyTypeArguments |
| [32] = InstanceField dart:core::_Closure::_delayed_type_arguments (field) |
| [33] = Reserved |
| [34] = InstanceField dart:core::_Closure::_function (field) |
| [35] = Reserved |
| [36] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [37] = Reserved |
| [38] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [39] = Reserved |
| [40] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [41] = Reserved |
| [42] = ObjectRef ArgDesc num-args 2, num-type-args 0, names [] |
| [43] = ICData dynamic target-name 'start', arg-desc CP#42 |
| [44] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names [] |
| [45] = Reserved |
| } |
| Closure #lib::loops::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic |
| ClosureBytecode { |
| EntryOptional 1, 3, 0 |
| LoadConstant r1, CP#5 |
| LoadConstant r2, CP#5 |
| LoadConstant r3, CP#5 |
| Frame 7 |
| CheckStack 0 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 5 |
| StoreLocal r5 |
| PushInt 0 |
| JumpIfNeStrict L1 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 7 |
| Try #0 start: |
| AllocateContext 1, 1 |
| StoreLocal r5 |
| Push r5 |
| Push r4 |
| StoreContextParent |
| PopLocal r4 |
| Push r4 |
| PushInt 0 |
| StoreContextVar 1, 0 |
| AllocateContext 2, 2 |
| StoreLocal r5 |
| Push r5 |
| Push r4 |
| StoreContextParent |
| PopLocal r4 |
| Push r4 |
| PushInt 0 |
| StoreContextVar 2, 0 |
| L6: |
| CheckStack 1 |
| Push r4 |
| LoadContextVar 2, 0 |
| PushInt 10 |
| CompareIntLt |
| JumpIfFalse L2 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 0, 0 |
| InterfaceCall 1, CP#8 |
| PopLocal r8 |
| Push r4 |
| Push r8 |
| StoreContextVar 2, 1 |
| L5: |
| CheckStack 2 |
| Push r4 |
| LoadContextVar 2, 1 |
| StoreLocal r8 |
| InterfaceCall 1, CP#10 |
| JumpIfFalse L3 |
| AllocateContext 3, 1 |
| StoreLocal r5 |
| Push r5 |
| Push r4 |
| StoreContextParent |
| PopLocal r4 |
| Push r4 |
| Push r8 |
| InterfaceCall 1, CP#12 |
| StoreContextVar 3, 0 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 9 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| Push r4 |
| LoadContextParent |
| LoadContextVar 2, 0 |
| Push r4 |
| LoadContextVar 3, 0 |
| AddInt |
| StoreContextVar 0, 8 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| PushInt 1 |
| StoreContextVar 0, 5 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| Push r4 |
| StoreContextVar 0, 6 |
| DirectCall 0, CP#14 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 0, 3 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 0, 4 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 0, 10 |
| DirectCall 4, CP#16 |
| PopLocal r10 |
| PushNull |
| ReturnTOS |
| L11: |
| Push r2 |
| JumpIfNull L4 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L4: |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 0, 9 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 0, 8 |
| Push r1 |
| InterfaceCall 2, CP#18 |
| InterfaceCall 2, CP#18 |
| StoreContextVar 1, 0 |
| Push r4 |
| LoadContextParent |
| PopLocal r4 |
| Jump L5 |
| L3: |
| Push r4 |
| CloneContext 2, 2 |
| PopLocal r4 |
| Push r4 |
| Push r4 |
| LoadContextVar 2, 0 |
| PushInt 1 |
| AddInt |
| StoreLocal r8 |
| StoreContextVar 2, 0 |
| Push r8 |
| Drop1 |
| Jump L6 |
| L2: |
| Push r4 |
| LoadContextParent |
| PopLocal r4 |
| PushInt 0 |
| PopLocal r8 |
| L8: |
| CheckStack 1 |
| Push r8 |
| PushInt 10 |
| CompareIntLt |
| JumpIfFalse L7 |
| Push r4 |
| Push r4 |
| LoadContextVar 1, 0 |
| Push r8 |
| AddInt |
| StoreContextVar 1, 0 |
| Push r8 |
| PushInt 1 |
| AddInt |
| StoreLocal r8 |
| Drop1 |
| Jump L8 |
| L7: |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 2 |
| Push r4 |
| LoadContextParent |
| PopLocal r4 |
| Jump L9 |
| L9: |
| Push r4 |
| LoadContextVar 0, 1 |
| Push r4 |
| LoadContextVar 0, 2 |
| DirectCall 2, CP#20 |
| Drop1 |
| PushNull |
| ReturnTOS |
| Try #0 end: |
| Try #0 handler: |
| SetFrame 11 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 7 |
| PopLocal r4 |
| MoveSpecial exception, r6 |
| MoveSpecial stackTrace, r7 |
| Push r6 |
| PopLocal r8 |
| Push r7 |
| PopLocal r9 |
| Push r4 |
| LoadContextVar 0, 1 |
| Push r8 |
| Push r9 |
| InterfaceCall 3, CP#23 |
| Drop1 |
| Jump L10 |
| L10: |
| PushNull |
| ReturnTOS |
| L1: |
| Push r4 |
| LoadContextVar 0, 6 |
| PopLocal r4 |
| Jump L11 |
| |
| } |
| ]static method loops(core::List<core::int> list) → asy::Future<core::int> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>(); |
| asy::FutureOr<core::int> :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 :async_temporary_0; |
| dynamic :async_temporary_1; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L4: |
| { |
| core::int sum = 0; |
| for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) { |
| for (core::int j in list) { |
| :async_temporary_1 = sum; |
| :async_temporary_0 = i.{core::num::+}(j); |
| [yield] let dynamic #t4 = asy::_awaitHelper(self::foo(), :async_op_then, :async_op_error, :async_op) in null; |
| sum = :async_temporary_1.{core::num::+}(:async_temporary_0.{core::num::+}(:result)); |
| } |
| } |
| for (core::int k = 0; k.{core::num::<}(10); k = k.{core::num::+}(1)) { |
| sum = sum.{core::num::+}(k); |
| } |
| :return_value = sum; |
| break #L4; |
| } |
| 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}; |
| } |
| [@vm.bytecode= |
| Bytecode { |
| Entry 4 |
| CheckStack 0 |
| AllocateContext 0, 16 |
| PopLocal r0 |
| Push r0 |
| Push FP[-7] |
| StoreContextVar 0, 0 |
| Push r0 |
| Push FP[-6] |
| StoreContextVar 0, 1 |
| Push r0 |
| Push FP[-5] |
| StoreContextVar 0, 2 |
| Push r0 |
| PushConstant CP#1 |
| PushConstant CP#0 |
| AllocateT |
| StoreLocal r2 |
| Push r2 |
| DirectCall 1, CP#2 |
| Drop1 |
| StoreContextVar 0, 3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 4 |
| PushNull |
| PopLocal r3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 5 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 6 |
| Push r0 |
| PushInt 0 |
| StoreContextVar 0, 7 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 8 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 9 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 10 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 11 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 12 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 13 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 14 |
| Push r0 |
| Allocate CP#24 |
| StoreLocal r2 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#25 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#27 |
| Push r2 |
| PushConstant CP#29 |
| StoreFieldTOS CP#30 |
| Push r2 |
| PushConstant CP#4 |
| StoreFieldTOS CP#32 |
| Push r2 |
| Push r0 |
| StoreFieldTOS CP#6 |
| StoreContextVar 0, 15 |
| Push r0 |
| LoadContextVar 0, 15 |
| DirectCall 1, CP#34 |
| PopLocal r3 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 15 |
| DirectCall 1, CP#36 |
| StoreContextVar 0, 5 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 15 |
| DirectCall 1, CP#38 |
| StoreContextVar 0, 6 |
| Push r0 |
| LoadContextVar 0, 3 |
| Push r0 |
| LoadContextVar 0, 15 |
| DynamicCall 2, CP#41 |
| Drop1 |
| Push r0 |
| LoadContextVar 0, 3 |
| InterfaceCall 1, CP#42 |
| ReturnTOS |
| } |
| ConstantPool { |
| [0] = Class dart:async::_AsyncAwaitCompleter |
| [1] = ObjectRef < dart:core::int > |
| [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names [] |
| [3] = Reserved |
| [4] = ClosureFunction 0 |
| [5] = ObjectRef null |
| [6] = InstanceField dart:core::_Closure::_context (field) |
| [7] = Reserved |
| [8] = DirectCall 'dart:async::_awaitHelper', ArgDesc num-args 4, num-type-args 0, names [] |
| [9] = Reserved |
| [10] = InterfaceCall 'dart:core::num::+', ArgDesc num-args 2, num-type-args 0, names [] |
| [11] = Reserved |
| [12] = Type dynamic |
| [13] = Type dart:core::Error |
| [14] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names [] |
| [15] = Reserved |
| [16] = ObjectRef 'fin' |
| [17] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names [] |
| [18] = Reserved |
| [19] = DirectCall 'dart:async::_completeOnAsyncReturn', ArgDesc num-args 2, num-type-args 0, names [] |
| [20] = Reserved |
| [21] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names [] |
| [22] = Reserved |
| [23] = EndClosureFunctionScope |
| [24] = Class dart:core::_Closure |
| [25] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field) |
| [26] = Reserved |
| [27] = InstanceField dart:core::_Closure::_function_type_arguments (field) |
| [28] = Reserved |
| [29] = EmptyTypeArguments |
| [30] = InstanceField dart:core::_Closure::_delayed_type_arguments (field) |
| [31] = Reserved |
| [32] = InstanceField dart:core::_Closure::_function (field) |
| [33] = Reserved |
| [34] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [35] = Reserved |
| [36] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [37] = Reserved |
| [38] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [39] = Reserved |
| [40] = ObjectRef ArgDesc num-args 2, num-type-args 0, names [] |
| [41] = ICData dynamic target-name 'start', arg-desc CP#40 |
| [42] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names [] |
| [43] = Reserved |
| } |
| Closure #lib::tryCatchRethrow::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic |
| ClosureBytecode { |
| EntryOptional 1, 3, 0 |
| LoadConstant r1, CP#5 |
| LoadConstant r2, CP#5 |
| LoadConstant r3, CP#5 |
| Frame 10 |
| CheckStack 0 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 7 |
| StoreLocal r5 |
| PushInt 0 |
| JumpIfNeStrict L1 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 9 |
| Try #0 start: |
| AllocateContext 1, 2 |
| StoreLocal r5 |
| Push r5 |
| Push r4 |
| StoreContextParent |
| PopLocal r4 |
| Push r4 |
| PushInt 1 |
| StoreContextVar 1, 0 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 0, 10 |
| Try #1 start: |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 0, 11 |
| Try #2 start: |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 14 |
| Push r4 |
| LoadContextParent |
| PushInt 1 |
| StoreContextVar 0, 7 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 0, 8 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 0 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 5 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 6 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 15 |
| DirectCall 4, CP#8 |
| PopLocal r13 |
| PushNull |
| ReturnTOS |
| L13: |
| Push r2 |
| JumpIfNull L2 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L2: |
| Push r4 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 14 |
| Push r1 |
| InterfaceCall 2, CP#10 |
| StoreContextVar 1, 0 |
| Jump L3 |
| Try #2 end: |
| Try #2 handler: |
| SetFrame 14 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 11 |
| PopLocal r4 |
| MoveSpecial exception, r10 |
| MoveSpecial stackTrace, r11 |
| Push r4 |
| LoadContextParent |
| Push r10 |
| StoreContextVar 0, 12 |
| Push r4 |
| LoadContextParent |
| Push r11 |
| StoreContextVar 0, 13 |
| Push r4 |
| Push r10 |
| StoreContextVar 1, 1 |
| Push r4 |
| LoadContextVar 1, 1 |
| PushConstant CP#13 |
| InterfaceCall 2, CP#14 |
| JumpIfFalse L4 |
| Push r4 |
| LoadContextParent |
| PushInt 42 |
| StoreContextVar 0, 4 |
| Jump L5 |
| L4: |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 14 |
| Push r4 |
| LoadContextParent |
| PushInt 2 |
| StoreContextVar 0, 7 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 0, 8 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 1 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 5 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 6 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 15 |
| DirectCall 4, CP#8 |
| PopLocal r13 |
| PushNull |
| ReturnTOS |
| L14: |
| Push r2 |
| JumpIfNull L6 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L6: |
| Push r4 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 14 |
| Push r1 |
| InterfaceCall 2, CP#10 |
| StoreContextVar 1, 0 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 12 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 13 |
| Throw 1 |
| L3: |
| Jump L7 |
| Try #1 end: |
| Try #1 handler: |
| SetFrame 14 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 10 |
| PopLocal r4 |
| MoveSpecial exception, r8 |
| MoveSpecial stackTrace, r9 |
| Push r4 |
| LoadContextParent |
| Push r8 |
| StoreContextVar 0, 12 |
| Push r4 |
| LoadContextParent |
| Push r9 |
| StoreContextVar 0, 13 |
| PushConstant CP#16 |
| DirectCall 1, CP#17 |
| Drop1 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 14 |
| Push r4 |
| LoadContextParent |
| PushInt 3 |
| StoreContextVar 0, 7 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 0, 8 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 2 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 5 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 6 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 15 |
| DirectCall 4, CP#8 |
| PopLocal r12 |
| PushNull |
| ReturnTOS |
| L15: |
| Push r2 |
| JumpIfNull L8 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L8: |
| Push r4 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 14 |
| Push r1 |
| InterfaceCall 2, CP#10 |
| StoreContextVar 1, 0 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 4 |
| Push r4 |
| LoadContextParent |
| PopLocal r4 |
| Jump L9 |
| L5: |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 10 |
| PopLocal r4 |
| PushConstant CP#16 |
| DirectCall 1, CP#17 |
| Drop1 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 14 |
| Push r4 |
| LoadContextParent |
| PushInt 4 |
| StoreContextVar 0, 7 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 0, 8 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 2 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 5 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 6 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 15 |
| DirectCall 4, CP#8 |
| PopLocal r12 |
| PushNull |
| ReturnTOS |
| L16: |
| Push r2 |
| JumpIfNull L10 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L10: |
| Push r4 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 14 |
| Push r1 |
| InterfaceCall 2, CP#10 |
| StoreContextVar 1, 0 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 4 |
| Push r4 |
| LoadContextParent |
| PopLocal r4 |
| Jump L9 |
| L7: |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 10 |
| PopLocal r4 |
| PushConstant CP#16 |
| DirectCall 1, CP#17 |
| Drop1 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 14 |
| Push r4 |
| LoadContextParent |
| PushInt 5 |
| StoreContextVar 0, 7 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 0, 8 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 2 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 5 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 6 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 15 |
| DirectCall 4, CP#8 |
| PopLocal r12 |
| PushNull |
| ReturnTOS |
| L17: |
| Push r2 |
| JumpIfNull L11 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L11: |
| Push r4 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 0, 14 |
| Push r1 |
| InterfaceCall 2, CP#10 |
| StoreContextVar 1, 0 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextVar 1, 0 |
| StoreContextVar 0, 4 |
| Push r4 |
| LoadContextParent |
| PopLocal r4 |
| Jump L9 |
| L9: |
| Push r4 |
| LoadContextVar 0, 3 |
| Push r4 |
| LoadContextVar 0, 4 |
| DirectCall 2, CP#19 |
| Drop1 |
| PushNull |
| ReturnTOS |
| Try #0 end: |
| Try #0 handler: |
| SetFrame 14 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 9 |
| PopLocal r4 |
| MoveSpecial exception, r6 |
| MoveSpecial stackTrace, r7 |
| Push r6 |
| PopLocal r8 |
| Push r7 |
| PopLocal r9 |
| Push r4 |
| LoadContextVar 0, 3 |
| Push r8 |
| Push r9 |
| InterfaceCall 3, CP#21 |
| Drop1 |
| Jump L12 |
| L12: |
| PushNull |
| ReturnTOS |
| L1: |
| Push r4 |
| LoadContextVar 0, 8 |
| PopLocal r4 |
| Push r5 |
| PushInt 1 |
| JumpIfEqStrict L13 |
| Push r5 |
| PushInt 2 |
| JumpIfEqStrict L14 |
| Push r5 |
| PushInt 3 |
| JumpIfEqStrict L15 |
| Push r5 |
| PushInt 4 |
| JumpIfEqStrict L16 |
| Jump L17 |
| |
| } |
| ]static method tryCatchRethrow(asy::Future<core::int> a, asy::Future<core::int> b, asy::Future<core::int> c) → asy::Future<core::int> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>(); |
| asy::FutureOr<core::int> :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 :saved_try_context_var2; |
| dynamic :exception0; |
| dynamic :stack_trace0; |
| dynamic :async_temporary_0; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L5: |
| { |
| core::int x = 1; |
| try |
| try { |
| :async_temporary_0 = x; |
| [yield] let dynamic #t5 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null; |
| x = :async_temporary_0.{core::num::+}(:result); |
| } |
| on dynamic catch(final dynamic e) { |
| if(e is core::Error) { |
| :return_value = 42; |
| break #L5; |
| } |
| :async_temporary_0 = x; |
| [yield] let dynamic #t6 = asy::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null; |
| x = :async_temporary_0.{core::num::+}(:result); |
| rethrow; |
| } |
| finally { |
| core::print("fin"); |
| :async_temporary_0 = x; |
| [yield] let dynamic #t7 = asy::_awaitHelper(c, :async_op_then, :async_op_error, :async_op) in null; |
| x = :async_temporary_0.{core::num::+}(:result); |
| :return_value = x; |
| break #L5; |
| } |
| } |
| 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}; |
| } |
| [@vm.bytecode= |
| Bytecode { |
| Entry 4 |
| CheckStack 0 |
| AllocateContext 0, 2 |
| PopLocal r0 |
| Push r0 |
| Push FP[-5] |
| StoreContextVar 0, 0 |
| Push r0 |
| PushInt 3 |
| StoreContextVar 0, 1 |
| Allocate CP#20 |
| StoreLocal r3 |
| Push r3 |
| PushNull |
| StoreFieldTOS CP#21 |
| Push r3 |
| PushNull |
| StoreFieldTOS CP#23 |
| Push r3 |
| PushConstant CP#25 |
| StoreFieldTOS CP#26 |
| Push r3 |
| PushConstant CP#0 |
| StoreFieldTOS CP#28 |
| Push r3 |
| Push r0 |
| StoreFieldTOS CP#1 |
| PopLocal r2 |
| Push r2 |
| ReturnTOS |
| } |
| ConstantPool { |
| [0] = ClosureFunction 0 |
| [1] = InstanceField dart:core::_Closure::_context (field) |
| [2] = Reserved |
| [3] = Class dart:async::_AsyncAwaitCompleter |
| [4] = ObjectRef < dart:core::int > |
| [5] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names [] |
| [6] = Reserved |
| [7] = ClosureFunction 1 |
| [8] = ObjectRef null |
| [9] = DirectCall 'dart:async::_awaitHelper', ArgDesc num-args 4, num-type-args 0, names [] |
| [10] = Reserved |
| [11] = Type dynamic |
| [12] = ObjectRef 'fin' |
| [13] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names [] |
| [14] = Reserved |
| [15] = DirectCall 'dart:async::_completeOnAsyncReturn', ArgDesc num-args 2, num-type-args 0, names [] |
| [16] = Reserved |
| [17] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names [] |
| [18] = Reserved |
| [19] = EndClosureFunctionScope |
| [20] = Class dart:core::_Closure |
| [21] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field) |
| [22] = Reserved |
| [23] = InstanceField dart:core::_Closure::_function_type_arguments (field) |
| [24] = Reserved |
| [25] = EmptyTypeArguments |
| [26] = InstanceField dart:core::_Closure::_delayed_type_arguments (field) |
| [27] = Reserved |
| [28] = InstanceField dart:core::_Closure::_function (field) |
| [29] = Reserved |
| [30] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [31] = Reserved |
| [32] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [33] = Reserved |
| [34] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [35] = Reserved |
| [36] = ObjectRef ArgDesc num-args 2, num-type-args 0, names [] |
| [37] = ICData dynamic target-name 'start', arg-desc CP#36 |
| [38] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names [] |
| [39] = Reserved |
| [40] = EndClosureFunctionScope |
| } |
| Closure #lib::closure::'nested' () -> dart:async::Future < dart:core::int > |
| ClosureBytecode { |
| EntryFixed 1, 4 |
| CheckStack 0 |
| Push FP[-5] |
| LoadFieldTOS CP#1 |
| PopLocal r0 |
| AllocateContext 1, 9 |
| StoreLocal r1 |
| Push r1 |
| Push r0 |
| StoreContextParent |
| PopLocal r0 |
| Push r0 |
| PushConstant CP#4 |
| PushConstant CP#3 |
| AllocateT |
| StoreLocal r2 |
| Push r2 |
| DirectCall 1, CP#5 |
| Drop1 |
| StoreContextVar 1, 0 |
| Push r0 |
| PushNull |
| StoreContextVar 1, 1 |
| PushNull |
| PopLocal r3 |
| Push r0 |
| PushNull |
| StoreContextVar 1, 2 |
| Push r0 |
| PushNull |
| StoreContextVar 1, 3 |
| Push r0 |
| PushInt 0 |
| StoreContextVar 1, 4 |
| Push r0 |
| PushNull |
| StoreContextVar 1, 5 |
| Push r0 |
| PushNull |
| StoreContextVar 1, 6 |
| Push r0 |
| PushNull |
| StoreContextVar 1, 7 |
| Push r0 |
| Allocate CP#20 |
| StoreLocal r2 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#21 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#23 |
| Push r2 |
| PushConstant CP#25 |
| StoreFieldTOS CP#26 |
| Push r2 |
| PushConstant CP#7 |
| StoreFieldTOS CP#28 |
| Push r2 |
| Push r0 |
| StoreFieldTOS CP#1 |
| StoreContextVar 1, 8 |
| Push r0 |
| LoadContextVar 1, 8 |
| DirectCall 1, CP#30 |
| PopLocal r3 |
| Push r0 |
| Push r0 |
| LoadContextVar 1, 8 |
| DirectCall 1, CP#32 |
| StoreContextVar 1, 2 |
| Push r0 |
| Push r0 |
| LoadContextVar 1, 8 |
| DirectCall 1, CP#34 |
| StoreContextVar 1, 3 |
| Push r0 |
| LoadContextVar 1, 0 |
| Push r0 |
| LoadContextVar 1, 8 |
| DynamicCall 2, CP#37 |
| Drop1 |
| Push r0 |
| LoadContextVar 1, 0 |
| InterfaceCall 1, CP#38 |
| ReturnTOS |
| |
| } |
| |
| Closure #lib::closure::Closure/0::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic |
| ClosureBytecode { |
| EntryOptional 1, 3, 0 |
| LoadConstant r1, CP#8 |
| LoadConstant r2, CP#8 |
| LoadConstant r3, CP#8 |
| Frame 8 |
| CheckStack 0 |
| Push r0 |
| LoadFieldTOS CP#1 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 1, 4 |
| StoreLocal r5 |
| PushInt 0 |
| JumpIfNeStrict L1 |
| Push r4 |
| Push r4 |
| StoreContextVar 1, 6 |
| Try #0 start: |
| AllocateContext 2, 1 |
| StoreLocal r5 |
| Push r5 |
| Push r4 |
| StoreContextParent |
| PopLocal r4 |
| Push r4 |
| PushInt 4 |
| StoreContextVar 2, 0 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 1, 7 |
| Try #1 start: |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| PushInt 5 |
| StoreContextVar 0, 1 |
| Push r4 |
| LoadContextParent |
| PushInt 1 |
| StoreContextVar 1, 4 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| StoreContextVar 1, 5 |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 0, 0 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 1, 2 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 1, 3 |
| Push r4 |
| LoadContextParent |
| LoadContextVar 1, 8 |
| DirectCall 4, CP#9 |
| PopLocal r11 |
| PushNull |
| ReturnTOS |
| L6: |
| Push r2 |
| JumpIfNull L2 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L2: |
| Push r4 |
| Push r1 |
| StoreContextVar 2, 0 |
| Push r4 |
| LoadContextParent |
| Push r4 |
| LoadContextParent |
| LoadContextParent |
| LoadContextVar 0, 1 |
| Push r4 |
| LoadContextVar 2, 0 |
| AddInt |
| StoreContextVar 1, 1 |
| Jump L3 |
| Try #1 end: |
| Try #1 handler: |
| SetFrame 12 |
| Push r0 |
| LoadFieldTOS CP#1 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 1, 7 |
| PopLocal r4 |
| MoveSpecial exception, r8 |
| MoveSpecial stackTrace, r9 |
| PushConstant CP#12 |
| DirectCall 1, CP#13 |
| Drop1 |
| Push r8 |
| Push r9 |
| Throw 1 |
| L3: |
| Push r0 |
| LoadFieldTOS CP#1 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 1, 7 |
| PopLocal r4 |
| PushConstant CP#12 |
| DirectCall 1, CP#13 |
| Drop1 |
| Push r4 |
| LoadContextParent |
| PopLocal r4 |
| Jump L4 |
| L4: |
| Push r4 |
| LoadContextVar 1, 0 |
| Push r4 |
| LoadContextVar 1, 1 |
| DirectCall 2, CP#15 |
| Drop1 |
| PushNull |
| ReturnTOS |
| Try #0 end: |
| Try #0 handler: |
| SetFrame 12 |
| Push r0 |
| LoadFieldTOS CP#1 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 1, 6 |
| PopLocal r4 |
| MoveSpecial exception, r6 |
| MoveSpecial stackTrace, r7 |
| Push r6 |
| PopLocal r8 |
| Push r7 |
| PopLocal r9 |
| Push r4 |
| LoadContextVar 1, 0 |
| Push r8 |
| Push r9 |
| InterfaceCall 3, CP#17 |
| Drop1 |
| Jump L5 |
| L5: |
| PushNull |
| ReturnTOS |
| L1: |
| Push r4 |
| LoadContextVar 1, 5 |
| PopLocal r4 |
| Jump L6 |
| |
| } |
| ]static method closure(asy::Future<core::int> a) → dynamic { |
| core::int x = 3; |
| function nested() → asy::Future<core::int> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>(); |
| asy::FutureOr<core::int> :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; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L6: |
| { |
| core::int y = 4; |
| try { |
| x = 5; |
| [yield] let dynamic #t8 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null; |
| y = :result; |
| :return_value = x.{core::num::+}(y); |
| break #L6; |
| } |
| finally { |
| core::print("fin"); |
| } |
| } |
| 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}; |
| } |
| return nested; |
| } |
| [@vm.bytecode= |
| Bytecode { |
| Entry 4 |
| CheckStack 0 |
| AllocateContext 0, 9 |
| PopLocal r0 |
| Push r0 |
| Push FP[-5] |
| StoreContextVar 0, 0 |
| Push r0 |
| PushConstant CP#1 |
| PushConstant CP#0 |
| AllocateT |
| StoreLocal r2 |
| Push r2 |
| DirectCall 1, CP#2 |
| Drop1 |
| StoreContextVar 0, 1 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 2 |
| PushNull |
| PopLocal r3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 3 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 4 |
| Push r0 |
| PushInt 0 |
| StoreContextVar 0, 5 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 6 |
| Push r0 |
| PushNull |
| StoreContextVar 0, 7 |
| Push r0 |
| Allocate CP#20 |
| StoreLocal r2 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#21 |
| Push r2 |
| PushNull |
| StoreFieldTOS CP#23 |
| Push r2 |
| PushConstant CP#25 |
| StoreFieldTOS CP#26 |
| Push r2 |
| PushConstant CP#4 |
| StoreFieldTOS CP#28 |
| Push r2 |
| Push r0 |
| StoreFieldTOS CP#6 |
| StoreContextVar 0, 8 |
| Push r0 |
| LoadContextVar 0, 8 |
| DirectCall 1, CP#30 |
| PopLocal r3 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 8 |
| DirectCall 1, CP#32 |
| StoreContextVar 0, 3 |
| Push r0 |
| Push r0 |
| LoadContextVar 0, 8 |
| DirectCall 1, CP#34 |
| StoreContextVar 0, 4 |
| Push r0 |
| LoadContextVar 0, 1 |
| Push r0 |
| LoadContextVar 0, 8 |
| DynamicCall 2, CP#37 |
| Drop1 |
| Push r0 |
| LoadContextVar 0, 1 |
| InterfaceCall 1, CP#38 |
| ReturnTOS |
| } |
| ConstantPool { |
| [0] = Class dart:async::_AsyncAwaitCompleter |
| [1] = ObjectRef < dart:core::int > |
| [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names [] |
| [3] = Reserved |
| [4] = ClosureFunction 0 |
| [5] = ObjectRef null |
| [6] = InstanceField dart:core::_Closure::_context (field) |
| [7] = Reserved |
| [8] = DirectCall 'dart:async::_awaitHelper', ArgDesc num-args 4, num-type-args 0, names [] |
| [9] = Reserved |
| [10] = InterfaceCall 'dart:core::num::==', ArgDesc num-args 2, num-type-args 0, names [] |
| [11] = Reserved |
| [12] = DirectCall 'dart:core::_AssertionError::_throwNew', ArgDesc num-args 3, num-type-args 0, names [] |
| [13] = Reserved |
| [14] = DirectCall 'dart:async::_completeOnAsyncReturn', ArgDesc num-args 2, num-type-args 0, names [] |
| [15] = Reserved |
| [16] = Type dynamic |
| [17] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names [] |
| [18] = Reserved |
| [19] = EndClosureFunctionScope |
| [20] = Class dart:core::_Closure |
| [21] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field) |
| [22] = Reserved |
| [23] = InstanceField dart:core::_Closure::_function_type_arguments (field) |
| [24] = Reserved |
| [25] = EmptyTypeArguments |
| [26] = InstanceField dart:core::_Closure::_delayed_type_arguments (field) |
| [27] = Reserved |
| [28] = InstanceField dart:core::_Closure::_function (field) |
| [29] = Reserved |
| [30] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [31] = Reserved |
| [32] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [33] = Reserved |
| [34] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names [] |
| [35] = Reserved |
| [36] = ObjectRef ArgDesc num-args 2, num-type-args 0, names [] |
| [37] = ICData dynamic target-name 'start', arg-desc CP#36 |
| [38] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names [] |
| [39] = Reserved |
| } |
| Closure #lib::testAssert::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic |
| ClosureBytecode { |
| EntryOptional 1, 3, 0 |
| LoadConstant r1, CP#5 |
| LoadConstant r2, CP#5 |
| LoadConstant r3, CP#5 |
| Frame 6 |
| CheckStack 0 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 5 |
| StoreLocal r5 |
| PushInt 0 |
| JumpIfNeStrict L1 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 7 |
| Try #0 start: |
| JumpIfNoAsserts L2 |
| Push r4 |
| PushInt 1 |
| StoreContextVar 0, 5 |
| Push r4 |
| Push r4 |
| StoreContextVar 0, 6 |
| Push r4 |
| LoadContextVar 0, 0 |
| Push r4 |
| LoadContextVar 0, 3 |
| Push r4 |
| LoadContextVar 0, 4 |
| Push r4 |
| LoadContextVar 0, 8 |
| DirectCall 4, CP#8 |
| PopLocal r8 |
| PushNull |
| ReturnTOS |
| L6: |
| Push r2 |
| JumpIfNull L3 |
| Push r2 |
| Push r3 |
| Throw 1 |
| L3: |
| JumpIfNoAsserts L2 |
| Push r1 |
| PushInt 42 |
| InterfaceCall 2, CP#10 |
| AssertBoolean 0 |
| JumpIfTrue L2 |
| PushInt 0 |
| PushInt 0 |
| PushNull |
| DirectCall 3, CP#12 |
| Drop1 |
| L2: |
| Push r4 |
| PushInt 7 |
| StoreContextVar 0, 2 |
| Jump L4 |
| L4: |
| Push r4 |
| LoadContextVar 0, 1 |
| Push r4 |
| LoadContextVar 0, 2 |
| DirectCall 2, CP#14 |
| Drop1 |
| PushNull |
| ReturnTOS |
| Try #0 end: |
| Try #0 handler: |
| SetFrame 10 |
| Push r0 |
| LoadFieldTOS CP#6 |
| PopLocal r4 |
| Push r4 |
| LoadContextVar 0, 7 |
| PopLocal r4 |
| MoveSpecial exception, r6 |
| MoveSpecial stackTrace, r7 |
| Push r6 |
| PopLocal r8 |
| Push r7 |
| PopLocal r9 |
| Push r4 |
| LoadContextVar 0, 1 |
| Push r8 |
| Push r9 |
| InterfaceCall 3, CP#17 |
| Drop1 |
| Jump L5 |
| L5: |
| PushNull |
| ReturnTOS |
| L1: |
| Push r4 |
| LoadContextVar 0, 6 |
| PopLocal r4 |
| Jump L6 |
| |
| } |
| ]static method testAssert(asy::Future<core::int> a) → asy::Future<core::int> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>(); |
| asy::FutureOr<core::int> :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 { |
| #L7: |
| { |
| assert { |
| [yield] let dynamic #t9 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null; |
| assert(:result.{core::num::==}(42)); |
| } |
| :return_value = 7; |
| break #L7; |
| } |
| 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}; |
| } |
| [@vm.bytecode= |
| Bytecode { |
| Entry 0 |
| CheckStack 0 |
| PushNull |
| ReturnTOS |
| } |
| ConstantPool { |
| } |
| ]static method main() → dynamic {} |