0554eeb4bb
This CL adds EntryFixed bytecode instruction in bytecode generator and interpreter. The new instruction is used instead of Entry in prologues of closures with fixed arguments in order to check number of arguments. Fixes language_2/closure_call_wrong_argument_count_test in bytecode mode. Change-Id: I873166a73c5f33e7faca8739cd6f210370e81b2e Reviewed-on: https://dart-review.googlesource.com/71231 Reviewed-by: Régis Crelier <regis@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
2533 lines
72 KiB
Plaintext
2533 lines
72 KiB
Plaintext
library #lib;
|
|
import self as self;
|
|
import "dart:async" as asy;
|
|
import "dart:core" as core;
|
|
|
|
[@vm.bytecode=
|
|
Bytecode {
|
|
Entry 3
|
|
CheckStack
|
|
Allocate CP#21
|
|
StoreLocal r2
|
|
Push r2
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#22
|
|
Push r2
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#24
|
|
Push r2
|
|
PushConstant CP#26
|
|
StoreFieldTOS CP#27
|
|
Push r2
|
|
PushConstant CP#0
|
|
StoreFieldTOS CP#29
|
|
Push r2
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ClosureFunction <anonymous closure> (dart.async::Future<dart.core::int> x) → dart.async::Future<dart.core::Null> /* originally async */ ;
|
|
[1] = InstanceField dart.core::_Closure::_context
|
|
[2] = Reserved
|
|
[3] = Null
|
|
[4] = Type dart.async::Future<dart.core::int>
|
|
[5] = String 'x'
|
|
[6] = SubtypeTestCache
|
|
[7] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::Null]
|
|
[8] = ArgDesc num-args 1, num-type-args 0, names []
|
|
[9] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#8
|
|
[10] = Int 0
|
|
[11] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
|
|
[12] = Int 1
|
|
[13] = ArgDesc num-args 4, num-type-args 0, names []
|
|
[14] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#13
|
|
[15] = ArgDesc num-args 2, num-type-args 0, names []
|
|
[16] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#15
|
|
[17] = Type dynamic
|
|
[18] = ArgDesc num-args 3, num-type-args 0, names []
|
|
[19] = ICData target-name 'completeError', arg-desc CP#18
|
|
[20] = EndClosureFunctionScope
|
|
[21] = Class dart.core::_Closure
|
|
[22] = InstanceField dart.core::_Closure::_instantiator_type_arguments
|
|
[23] = Reserved
|
|
[24] = InstanceField dart.core::_Closure::_function_type_arguments
|
|
[25] = Reserved
|
|
[26] = EmptyTypeArguments
|
|
[27] = InstanceField dart.core::_Closure::_delayed_type_arguments
|
|
[28] = Reserved
|
|
[29] = InstanceField dart.core::_Closure::_function
|
|
[30] = Reserved
|
|
[31] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#8
|
|
[32] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#8
|
|
[33] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#8
|
|
[34] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
|
|
[35] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#15
|
|
[36] = ICData get target-name 'future', arg-desc CP#8
|
|
[37] = EndClosureFunctionScope
|
|
}
|
|
Closure CP#11 {
|
|
EntryOptional 1, 3, 0
|
|
LoadConstant r1, CP#3
|
|
LoadConstant r2, CP#3
|
|
LoadConstant r3, CP#3
|
|
Frame 6
|
|
CheckStack
|
|
Push r0
|
|
LoadFieldTOS CP#1
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 5
|
|
StoreLocal r5
|
|
PushConstant CP#10
|
|
IfNeStrictNumTOS
|
|
Jump L1
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 7
|
|
Try #0 start:
|
|
Push r4
|
|
PushConstant CP#12
|
|
StoreContextVar 5
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 6
|
|
Push r4
|
|
LoadContextVar 0
|
|
Push r4
|
|
LoadContextVar 3
|
|
Push r4
|
|
LoadContextVar 4
|
|
Push r4
|
|
LoadContextVar 8
|
|
PushConstant CP#14
|
|
IndirectStaticCall 4, CP#13
|
|
PopLocal r8
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L4:
|
|
IfEqNull r2
|
|
Jump L2
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L2:
|
|
Push r1
|
|
Drop1
|
|
Push r4
|
|
LoadContextVar 1
|
|
Push r4
|
|
LoadContextVar 2
|
|
PushConstant CP#16
|
|
IndirectStaticCall 2, CP#15
|
|
Drop1
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
Jump L3
|
|
Try #0 end:
|
|
Try #0 handler:
|
|
SetFrame 10
|
|
Push r0
|
|
LoadFieldTOS CP#1
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 7
|
|
PopLocal r4
|
|
MoveSpecial r6, exception
|
|
MoveSpecial r7, stackTrace
|
|
Push r6
|
|
PopLocal r8
|
|
Push r7
|
|
PopLocal r9
|
|
Push r4
|
|
LoadContextVar 1
|
|
Push r8
|
|
Push r9
|
|
InstanceCall 3, CP#19
|
|
Drop1
|
|
Jump L3
|
|
L3:
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L1:
|
|
Push r4
|
|
LoadContextVar 6
|
|
PopLocal r4
|
|
Jump L4
|
|
|
|
}
|
|
|
|
Closure CP#0 {
|
|
EntryFixed 2, 4
|
|
CheckStack
|
|
Push FP[-6]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r0
|
|
AllocateContext 9
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 0
|
|
Push FP[-5]
|
|
PushConstant CP#3
|
|
PushConstant CP#3
|
|
PushConstant CP#4
|
|
PushConstant CP#5
|
|
AssertAssignable 0, CP#6
|
|
Drop1
|
|
Push r0
|
|
PushConstant CP#7
|
|
PushConstant CP#9
|
|
IndirectStaticCall 1, CP#8
|
|
StoreContextVar 1
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 2
|
|
PushConstant CP#3
|
|
PopLocal r2
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 3
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 4
|
|
Push r0
|
|
PushConstant CP#10
|
|
StoreContextVar 5
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 6
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 7
|
|
Push r0
|
|
Allocate CP#21
|
|
StoreLocal r3
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#22
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#24
|
|
Push r3
|
|
PushConstant CP#26
|
|
StoreFieldTOS CP#27
|
|
Push r3
|
|
PushConstant CP#11
|
|
StoreFieldTOS CP#29
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
StoreContextVar 8
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#31
|
|
IndirectStaticCall 1, CP#8
|
|
PopLocal r2
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#32
|
|
IndirectStaticCall 1, CP#8
|
|
StoreContextVar 3
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#33
|
|
IndirectStaticCall 1, CP#8
|
|
StoreContextVar 4
|
|
PushConstant CP#34
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#35
|
|
IndirectStaticCall 2, CP#15
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 1
|
|
InstanceCall 1, CP#36
|
|
ReturnTOS
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
|
|
}
|
|
]static field (asy::Future<core::int>) → asy::Future<core::Null> asyncInFieldInitializer = (asy::Future<core::int> x) → asy::Future<core::Null> /* originally async */ {
|
|
final asy::Completer<core::Null> :async_completer = asy::Completer::sync<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);
|
|
asy::Future::microtask<dynamic>(:async_op);
|
|
return :async_completer.{asy::Completer::future};
|
|
};
|
|
[@vm.bytecode=
|
|
Bytecode {
|
|
Entry 7
|
|
CheckStack
|
|
AllocateContext 4
|
|
PopLocal r0
|
|
Push r0
|
|
PushConstant CP#0
|
|
PushConstant CP#2
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 0
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 1
|
|
PushConstant CP#3
|
|
PopLocal r2
|
|
PushConstant CP#3
|
|
PopLocal r3
|
|
PushConstant CP#3
|
|
PopLocal r4
|
|
Push r0
|
|
PushConstant CP#4
|
|
StoreContextVar 2
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 3
|
|
Allocate CP#15
|
|
StoreLocal r6
|
|
Push r6
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#16
|
|
Push r6
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#18
|
|
Push r6
|
|
PushConstant CP#20
|
|
StoreFieldTOS CP#21
|
|
Push r6
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#23
|
|
Push r6
|
|
Push r0
|
|
StoreFieldTOS CP#6
|
|
PopLocal r5
|
|
Push r5
|
|
PushConstant CP#25
|
|
IndirectStaticCall 1, CP#1
|
|
PopLocal r2
|
|
Push r5
|
|
PushConstant CP#26
|
|
IndirectStaticCall 1, CP#1
|
|
PopLocal r3
|
|
Push r5
|
|
PushConstant CP#27
|
|
IndirectStaticCall 1, CP#1
|
|
PopLocal r4
|
|
PushConstant CP#28
|
|
Push r5
|
|
PushConstant CP#29
|
|
IndirectStaticCall 2, CP#9
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 0
|
|
InstanceCall 1, CP#30
|
|
ReturnTOS
|
|
Push r0
|
|
LoadContextParent
|
|
PopLocal r0
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
|
|
[1] = ArgDesc num-args 1, num-type-args 0, names []
|
|
[2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
|
|
[3] = Null
|
|
[4] = Int 0
|
|
[5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
|
|
[6] = InstanceField dart.core::_Closure::_context
|
|
[7] = Reserved
|
|
[8] = Int 42
|
|
[9] = ArgDesc num-args 2, num-type-args 0, names []
|
|
[10] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#9
|
|
[11] = Type dynamic
|
|
[12] = ArgDesc num-args 3, num-type-args 0, names []
|
|
[13] = ICData target-name 'completeError', arg-desc CP#12
|
|
[14] = EndClosureFunctionScope
|
|
[15] = Class dart.core::_Closure
|
|
[16] = InstanceField dart.core::_Closure::_instantiator_type_arguments
|
|
[17] = Reserved
|
|
[18] = InstanceField dart.core::_Closure::_function_type_arguments
|
|
[19] = Reserved
|
|
[20] = EmptyTypeArguments
|
|
[21] = InstanceField dart.core::_Closure::_delayed_type_arguments
|
|
[22] = Reserved
|
|
[23] = InstanceField dart.core::_Closure::_function
|
|
[24] = Reserved
|
|
[25] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
|
|
[26] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
|
|
[27] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
|
|
[28] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
|
|
[29] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#9
|
|
[30] = ICData get target-name 'future', arg-desc CP#1
|
|
}
|
|
Closure CP#5 {
|
|
EntryOptional 1, 3, 0
|
|
LoadConstant r1, CP#3
|
|
LoadConstant r2, CP#3
|
|
LoadConstant r3, CP#3
|
|
Frame 6
|
|
CheckStack
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 2
|
|
StoreLocal r5
|
|
PushConstant CP#4
|
|
IfNeStrictNumTOS
|
|
Jump L1
|
|
Push r4
|
|
PopLocal r6
|
|
Try #0 start:
|
|
Push r4
|
|
PushConstant CP#8
|
|
StoreContextVar 1
|
|
Jump L2
|
|
L2:
|
|
Push r4
|
|
LoadContextVar 0
|
|
Push r4
|
|
LoadContextVar 1
|
|
PushConstant CP#10
|
|
IndirectStaticCall 2, CP#9
|
|
Drop1
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
Jump L3
|
|
Try #0 end:
|
|
Try #0 handler:
|
|
SetFrame 10
|
|
Push r6
|
|
PopLocal r4
|
|
MoveSpecial r6, exception
|
|
MoveSpecial r7, stackTrace
|
|
Push r6
|
|
PopLocal r8
|
|
Push r7
|
|
PopLocal r9
|
|
Push r4
|
|
LoadContextVar 0
|
|
Push r8
|
|
Push r9
|
|
InstanceCall 3, CP#13
|
|
Drop1
|
|
Jump L3
|
|
L3:
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L1:
|
|
Trap
|
|
|
|
}
|
|
]static method foo() → asy::Future<core::int> /* originally async */ {
|
|
final asy::Completer<core::int> :async_completer = asy::Completer::sync<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);
|
|
asy::Future::microtask<dynamic>(:async_op);
|
|
return :async_completer.{asy::Completer::future};
|
|
}
|
|
[@vm.bytecode=
|
|
Bytecode {
|
|
Entry 4
|
|
CheckStack
|
|
AllocateContext 11
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-6]
|
|
StoreContextVar 0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 1
|
|
Push r0
|
|
PushConstant CP#0
|
|
PushConstant CP#2
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 2
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 3
|
|
PushConstant CP#3
|
|
PopLocal r2
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 4
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 5
|
|
Push r0
|
|
PushConstant CP#4
|
|
StoreContextVar 6
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 7
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 8
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 9
|
|
Push r0
|
|
Allocate CP#20
|
|
StoreLocal r3
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#21
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#23
|
|
Push r3
|
|
PushConstant CP#25
|
|
StoreFieldTOS CP#26
|
|
Push r3
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#28
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#6
|
|
StoreContextVar 10
|
|
Push r0
|
|
LoadContextVar 10
|
|
PushConstant CP#30
|
|
IndirectStaticCall 1, CP#1
|
|
PopLocal r2
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 10
|
|
PushConstant CP#31
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 4
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 10
|
|
PushConstant CP#32
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 5
|
|
PushConstant CP#33
|
|
Push r0
|
|
LoadContextVar 10
|
|
PushConstant CP#34
|
|
IndirectStaticCall 2, CP#13
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 2
|
|
InstanceCall 1, CP#35
|
|
ReturnTOS
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
|
|
[1] = ArgDesc num-args 1, num-type-args 0, names []
|
|
[2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
|
|
[3] = Null
|
|
[4] = Int 0
|
|
[5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
|
|
[6] = InstanceField dart.core::_Closure::_context
|
|
[7] = Reserved
|
|
[8] = Int 1
|
|
[9] = ArgDesc num-args 4, num-type-args 0, names []
|
|
[10] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
|
|
[11] = Int 2
|
|
[12] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
|
|
[13] = ArgDesc num-args 2, num-type-args 0, names []
|
|
[14] = ICData target-name '+', arg-desc CP#13
|
|
[15] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#13
|
|
[16] = Type dynamic
|
|
[17] = ArgDesc num-args 3, num-type-args 0, names []
|
|
[18] = ICData target-name 'completeError', arg-desc CP#17
|
|
[19] = EndClosureFunctionScope
|
|
[20] = Class dart.core::_Closure
|
|
[21] = InstanceField dart.core::_Closure::_instantiator_type_arguments
|
|
[22] = Reserved
|
|
[23] = InstanceField dart.core::_Closure::_function_type_arguments
|
|
[24] = Reserved
|
|
[25] = EmptyTypeArguments
|
|
[26] = InstanceField dart.core::_Closure::_delayed_type_arguments
|
|
[27] = Reserved
|
|
[28] = InstanceField dart.core::_Closure::_function
|
|
[29] = Reserved
|
|
[30] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
|
|
[31] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
|
|
[32] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
|
|
[33] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
|
|
[34] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#13
|
|
[35] = ICData get target-name 'future', arg-desc CP#1
|
|
}
|
|
Closure CP#5 {
|
|
EntryOptional 1, 3, 0
|
|
LoadConstant r1, CP#3
|
|
LoadConstant r2, CP#3
|
|
LoadConstant r3, CP#3
|
|
Frame 6
|
|
CheckStack
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 6
|
|
StoreLocal r5
|
|
PushConstant CP#4
|
|
IfNeStrictNumTOS
|
|
Jump L1
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 8
|
|
Try #0 start:
|
|
Push r4
|
|
PushConstant CP#8
|
|
StoreContextVar 6
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 7
|
|
Push r4
|
|
LoadContextVar 0
|
|
Push r4
|
|
LoadContextVar 4
|
|
Push r4
|
|
LoadContextVar 5
|
|
Push r4
|
|
LoadContextVar 10
|
|
PushConstant CP#10
|
|
IndirectStaticCall 4, CP#9
|
|
PopLocal r8
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L6:
|
|
IfEqNull r2
|
|
Jump L2
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L2:
|
|
Push r4
|
|
Push r1
|
|
StoreContextVar 9
|
|
Push r4
|
|
PushConstant CP#11
|
|
StoreContextVar 6
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 7
|
|
Push r4
|
|
LoadContextVar 1
|
|
Push r4
|
|
LoadContextVar 4
|
|
Push r4
|
|
LoadContextVar 5
|
|
Push r4
|
|
LoadContextVar 10
|
|
PushConstant CP#12
|
|
IndirectStaticCall 4, CP#9
|
|
PopLocal r9
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L7:
|
|
IfEqNull r2
|
|
Jump L3
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L3:
|
|
Push r4
|
|
Push r4
|
|
LoadContextVar 9
|
|
Push r1
|
|
InstanceCall 2, CP#14
|
|
StoreContextVar 3
|
|
Jump L4
|
|
L4:
|
|
Push r4
|
|
LoadContextVar 2
|
|
Push r4
|
|
LoadContextVar 3
|
|
PushConstant CP#15
|
|
IndirectStaticCall 2, CP#13
|
|
Drop1
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
Jump L5
|
|
Try #0 end:
|
|
Try #0 handler:
|
|
SetFrame 10
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 8
|
|
PopLocal r4
|
|
MoveSpecial r6, exception
|
|
MoveSpecial r7, stackTrace
|
|
Push r6
|
|
PopLocal r8
|
|
Push r7
|
|
PopLocal r9
|
|
Push r4
|
|
LoadContextVar 2
|
|
Push r8
|
|
Push r9
|
|
InstanceCall 3, CP#18
|
|
Drop1
|
|
Jump L5
|
|
L5:
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L1:
|
|
Push r4
|
|
LoadContextVar 7
|
|
PopLocal r4
|
|
Push r5
|
|
PushConstant CP#8
|
|
IfEqStrictNumTOS
|
|
Jump L6
|
|
Jump L7
|
|
|
|
}
|
|
]static method simpleAsyncAwait(asy::Future<core::int> a, asy::Future<core::int> b) → asy::Future<core::int> /* originally async */ {
|
|
final asy::Completer<core::int> :async_completer = asy::Completer::sync<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);
|
|
asy::Future::microtask<dynamic>(:async_op);
|
|
return :async_completer.{asy::Completer::future};
|
|
}
|
|
[@vm.bytecode=
|
|
Bytecode {
|
|
Entry 4
|
|
CheckStack
|
|
AllocateContext 11
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 0
|
|
Push r0
|
|
PushConstant CP#0
|
|
PushConstant CP#2
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 1
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 2
|
|
PushConstant CP#3
|
|
PopLocal r2
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 3
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 4
|
|
Push r0
|
|
PushConstant CP#4
|
|
StoreContextVar 5
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 6
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 7
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 8
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 9
|
|
Push r0
|
|
Allocate CP#32
|
|
StoreLocal r3
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#33
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#35
|
|
Push r3
|
|
PushConstant CP#37
|
|
StoreFieldTOS CP#38
|
|
Push r3
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#40
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#6
|
|
StoreContextVar 10
|
|
Push r0
|
|
LoadContextVar 10
|
|
PushConstant CP#42
|
|
IndirectStaticCall 1, CP#1
|
|
PopLocal r2
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 10
|
|
PushConstant CP#43
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 3
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 10
|
|
PushConstant CP#44
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 4
|
|
PushConstant CP#45
|
|
Push r0
|
|
LoadContextVar 10
|
|
PushConstant CP#46
|
|
IndirectStaticCall 2, CP#9
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 1
|
|
InstanceCall 1, CP#47
|
|
ReturnTOS
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
|
|
[1] = ArgDesc num-args 1, num-type-args 0, names []
|
|
[2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
|
|
[3] = Null
|
|
[4] = Int 0
|
|
[5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
|
|
[6] = InstanceField dart.core::_Closure::_context
|
|
[7] = Reserved
|
|
[8] = Int 10
|
|
[9] = ArgDesc num-args 2, num-type-args 0, names []
|
|
[10] = ICData target-name '<', arg-desc CP#9
|
|
[11] = Bool true
|
|
[12] = ICData get target-name 'iterator', arg-desc CP#1
|
|
[13] = ICData target-name 'moveNext', arg-desc CP#1
|
|
[14] = ICData get target-name 'current', arg-desc CP#1
|
|
[15] = ICData target-name '+', arg-desc CP#9
|
|
[16] = Int 1
|
|
[17] = ArgDesc num-args 0, num-type-args 0, names []
|
|
[18] = StaticICData target '#lib::foo', arg-desc CP#17
|
|
[19] = ArgDesc num-args 4, num-type-args 0, names []
|
|
[20] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#19
|
|
[21] = ICData target-name '+', arg-desc CP#9
|
|
[22] = ICData target-name '+', arg-desc CP#9
|
|
[23] = ICData target-name '+', arg-desc CP#9
|
|
[24] = ICData target-name '<', arg-desc CP#9
|
|
[25] = ICData target-name '+', arg-desc CP#9
|
|
[26] = ICData target-name '+', arg-desc CP#9
|
|
[27] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#9
|
|
[28] = Type dynamic
|
|
[29] = ArgDesc num-args 3, num-type-args 0, names []
|
|
[30] = ICData target-name 'completeError', arg-desc CP#29
|
|
[31] = EndClosureFunctionScope
|
|
[32] = Class dart.core::_Closure
|
|
[33] = InstanceField dart.core::_Closure::_instantiator_type_arguments
|
|
[34] = Reserved
|
|
[35] = InstanceField dart.core::_Closure::_function_type_arguments
|
|
[36] = Reserved
|
|
[37] = EmptyTypeArguments
|
|
[38] = InstanceField dart.core::_Closure::_delayed_type_arguments
|
|
[39] = Reserved
|
|
[40] = InstanceField dart.core::_Closure::_function
|
|
[41] = Reserved
|
|
[42] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
|
|
[43] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
|
|
[44] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
|
|
[45] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
|
|
[46] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#9
|
|
[47] = ICData get target-name 'future', arg-desc CP#1
|
|
}
|
|
Closure CP#5 {
|
|
EntryOptional 1, 3, 0
|
|
LoadConstant r1, CP#3
|
|
LoadConstant r2, CP#3
|
|
LoadConstant r3, CP#3
|
|
Frame 7
|
|
CheckStack
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 5
|
|
StoreLocal r5
|
|
PushConstant CP#4
|
|
IfNeStrictNumTOS
|
|
Jump L1
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 7
|
|
Try #0 start:
|
|
AllocateContext 1
|
|
StoreLocal r5
|
|
Push r5
|
|
Push r4
|
|
StoreContextParent
|
|
PopLocal r4
|
|
Push r4
|
|
PushConstant CP#4
|
|
StoreContextVar 0
|
|
AllocateContext 2
|
|
StoreLocal r5
|
|
Push r5
|
|
Push r4
|
|
StoreContextParent
|
|
PopLocal r4
|
|
Push r4
|
|
PushConstant CP#4
|
|
StoreContextVar 0
|
|
L6:
|
|
CheckStack
|
|
Push r4
|
|
LoadContextVar 0
|
|
PushConstant CP#8
|
|
InstanceCall 2, CP#10
|
|
AssertBoolean 0
|
|
PushConstant CP#11
|
|
IfNeStrictTOS
|
|
Jump L2
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 0
|
|
InstanceCall 1, CP#12
|
|
PopLocal r8
|
|
Push r4
|
|
Push r8
|
|
StoreContextVar 1
|
|
L5:
|
|
CheckStack
|
|
Push r4
|
|
LoadContextVar 1
|
|
StoreLocal r8
|
|
InstanceCall 1, CP#13
|
|
PushConstant CP#11
|
|
IfNeStrictTOS
|
|
Jump L3
|
|
AllocateContext 1
|
|
StoreLocal r5
|
|
Push r5
|
|
Push r4
|
|
StoreContextParent
|
|
PopLocal r4
|
|
Push r4
|
|
Push r8
|
|
InstanceCall 1, CP#14
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 0
|
|
StoreContextVar 9
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 0
|
|
Push r4
|
|
LoadContextVar 0
|
|
InstanceCall 2, CP#15
|
|
StoreContextVar 8
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
PushConstant CP#16
|
|
StoreContextVar 5
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 6
|
|
PushConstant CP#18
|
|
IndirectStaticCall 0, CP#17
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 3
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 4
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 10
|
|
PushConstant CP#20
|
|
IndirectStaticCall 4, CP#19
|
|
PopLocal r10
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L11:
|
|
IfEqNull r2
|
|
Jump L4
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L4:
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 9
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 8
|
|
Push r1
|
|
InstanceCall 2, CP#21
|
|
InstanceCall 2, CP#22
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
Jump L5
|
|
L3:
|
|
Push r4
|
|
CloneContext
|
|
PopLocal r4
|
|
Push r4
|
|
Push r4
|
|
LoadContextVar 0
|
|
PushConstant CP#16
|
|
InstanceCall 2, CP#23
|
|
StoreLocal r8
|
|
StoreContextVar 0
|
|
Push r8
|
|
Drop1
|
|
Jump L6
|
|
L2:
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
PushConstant CP#4
|
|
PopLocal r8
|
|
L8:
|
|
CheckStack
|
|
Push r8
|
|
PushConstant CP#8
|
|
InstanceCall 2, CP#24
|
|
AssertBoolean 0
|
|
PushConstant CP#11
|
|
IfNeStrictTOS
|
|
Jump L7
|
|
Push r4
|
|
Push r4
|
|
LoadContextVar 0
|
|
Push r8
|
|
InstanceCall 2, CP#25
|
|
StoreContextVar 0
|
|
Push r8
|
|
PushConstant CP#16
|
|
InstanceCall 2, CP#26
|
|
StoreLocal r8
|
|
Drop1
|
|
Jump L8
|
|
L7:
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 2
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
Jump L9
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
L9:
|
|
Push r4
|
|
LoadContextVar 1
|
|
Push r4
|
|
LoadContextVar 2
|
|
PushConstant CP#27
|
|
IndirectStaticCall 2, CP#9
|
|
Drop1
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
Jump L10
|
|
Try #0 end:
|
|
Try #0 handler:
|
|
SetFrame 11
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 7
|
|
PopLocal r4
|
|
MoveSpecial r6, exception
|
|
MoveSpecial r7, stackTrace
|
|
Push r6
|
|
PopLocal r8
|
|
Push r7
|
|
PopLocal r9
|
|
Push r4
|
|
LoadContextVar 1
|
|
Push r8
|
|
Push r9
|
|
InstanceCall 3, CP#30
|
|
Drop1
|
|
Jump L10
|
|
L10:
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L1:
|
|
Push r4
|
|
LoadContextVar 6
|
|
PopLocal r4
|
|
Jump L11
|
|
|
|
}
|
|
]static method loops(core::List<core::int> list) → asy::Future<core::int> /* originally async */ {
|
|
final asy::Completer<core::int> :async_completer = asy::Completer::sync<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);
|
|
asy::Future::microtask<dynamic>(:async_op);
|
|
return :async_completer.{asy::Completer::future};
|
|
}
|
|
[@vm.bytecode=
|
|
Bytecode {
|
|
Entry 4
|
|
CheckStack
|
|
AllocateContext 16
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-7]
|
|
StoreContextVar 0
|
|
Push r0
|
|
Push FP[-6]
|
|
StoreContextVar 1
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 2
|
|
Push r0
|
|
PushConstant CP#0
|
|
PushConstant CP#2
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 3
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 4
|
|
PushConstant CP#3
|
|
PopLocal r2
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 5
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 6
|
|
Push r0
|
|
PushConstant CP#4
|
|
StoreContextVar 7
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 8
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 9
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 10
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 11
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 12
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 13
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 14
|
|
Push r0
|
|
Allocate CP#38
|
|
StoreLocal r3
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#39
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#41
|
|
Push r3
|
|
PushConstant CP#43
|
|
StoreFieldTOS CP#44
|
|
Push r3
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#46
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#6
|
|
StoreContextVar 15
|
|
Push r0
|
|
LoadContextVar 15
|
|
PushConstant CP#48
|
|
IndirectStaticCall 1, CP#1
|
|
PopLocal r2
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 15
|
|
PushConstant CP#49
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 5
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 15
|
|
PushConstant CP#50
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 6
|
|
PushConstant CP#51
|
|
Push r0
|
|
LoadContextVar 15
|
|
PushConstant CP#52
|
|
IndirectStaticCall 2, CP#11
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 3
|
|
InstanceCall 1, CP#53
|
|
ReturnTOS
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
|
|
[1] = ArgDesc num-args 1, num-type-args 0, names []
|
|
[2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
|
|
[3] = Null
|
|
[4] = Int 0
|
|
[5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
|
|
[6] = InstanceField dart.core::_Closure::_context
|
|
[7] = Reserved
|
|
[8] = Int 1
|
|
[9] = ArgDesc num-args 4, num-type-args 0, names []
|
|
[10] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
|
|
[11] = ArgDesc num-args 2, num-type-args 0, names []
|
|
[12] = ICData target-name '+', arg-desc CP#11
|
|
[13] = Type dynamic
|
|
[14] = Type dart.core::Error
|
|
[15] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#9
|
|
[16] = Bool true
|
|
[17] = Int 42
|
|
[18] = Int 2
|
|
[19] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
|
|
[20] = ICData target-name '+', arg-desc CP#11
|
|
[21] = String 'fin'
|
|
[22] = StaticICData target 'dart.core::print', arg-desc CP#1
|
|
[23] = Int 3
|
|
[24] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
|
|
[25] = ICData target-name '+', arg-desc CP#11
|
|
[26] = StaticICData target 'dart.core::print', arg-desc CP#1
|
|
[27] = Int 4
|
|
[28] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
|
|
[29] = ICData target-name '+', arg-desc CP#11
|
|
[30] = StaticICData target 'dart.core::print', arg-desc CP#1
|
|
[31] = Int 5
|
|
[32] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
|
|
[33] = ICData target-name '+', arg-desc CP#11
|
|
[34] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#11
|
|
[35] = ArgDesc num-args 3, num-type-args 0, names []
|
|
[36] = ICData target-name 'completeError', arg-desc CP#35
|
|
[37] = EndClosureFunctionScope
|
|
[38] = Class dart.core::_Closure
|
|
[39] = InstanceField dart.core::_Closure::_instantiator_type_arguments
|
|
[40] = Reserved
|
|
[41] = InstanceField dart.core::_Closure::_function_type_arguments
|
|
[42] = Reserved
|
|
[43] = EmptyTypeArguments
|
|
[44] = InstanceField dart.core::_Closure::_delayed_type_arguments
|
|
[45] = Reserved
|
|
[46] = InstanceField dart.core::_Closure::_function
|
|
[47] = Reserved
|
|
[48] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
|
|
[49] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
|
|
[50] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
|
|
[51] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
|
|
[52] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#11
|
|
[53] = ICData get target-name 'future', arg-desc CP#1
|
|
}
|
|
Closure CP#5 {
|
|
EntryOptional 1, 3, 0
|
|
LoadConstant r1, CP#3
|
|
LoadConstant r2, CP#3
|
|
LoadConstant r3, CP#3
|
|
Frame 10
|
|
CheckStack
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 7
|
|
StoreLocal r5
|
|
PushConstant CP#4
|
|
IfNeStrictNumTOS
|
|
Jump L1
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 9
|
|
Try #0 start:
|
|
AllocateContext 2
|
|
StoreLocal r5
|
|
Push r5
|
|
Push r4
|
|
StoreContextParent
|
|
PopLocal r4
|
|
Push r4
|
|
PushConstant CP#8
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 10
|
|
Try #1 start:
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 11
|
|
Try #2 start:
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 14
|
|
Push r4
|
|
LoadContextParent
|
|
PushConstant CP#8
|
|
StoreContextVar 7
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 8
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 5
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 6
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 15
|
|
PushConstant CP#10
|
|
IndirectStaticCall 4, CP#9
|
|
PopLocal r13
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L13:
|
|
IfEqNull r2
|
|
Jump L2
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L2:
|
|
Push r4
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 14
|
|
Push r1
|
|
InstanceCall 2, CP#12
|
|
StoreContextVar 0
|
|
Jump L3
|
|
Try #2 end:
|
|
Try #2 handler:
|
|
SetFrame 14
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 11
|
|
PopLocal r4
|
|
MoveSpecial r10, exception
|
|
MoveSpecial r11, stackTrace
|
|
Push r4
|
|
LoadContextParent
|
|
Push r10
|
|
StoreContextVar 12
|
|
Push r4
|
|
LoadContextParent
|
|
Push r11
|
|
StoreContextVar 13
|
|
Push r4
|
|
Push r10
|
|
StoreContextVar 1
|
|
Push r4
|
|
LoadContextVar 1
|
|
PushConstant CP#3
|
|
PushConstant CP#3
|
|
PushConstant CP#14
|
|
InstanceCall 4, CP#15
|
|
AssertBoolean 0
|
|
PushConstant CP#16
|
|
IfNeStrictTOS
|
|
Jump L4
|
|
Push r4
|
|
LoadContextParent
|
|
PushConstant CP#17
|
|
StoreContextVar 4
|
|
Jump L5
|
|
L4:
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 14
|
|
Push r4
|
|
LoadContextParent
|
|
PushConstant CP#18
|
|
StoreContextVar 7
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 8
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 1
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 5
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 6
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 15
|
|
PushConstant CP#19
|
|
IndirectStaticCall 4, CP#9
|
|
PopLocal r13
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L14:
|
|
IfEqNull r2
|
|
Jump L6
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L6:
|
|
Push r4
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 14
|
|
Push r1
|
|
InstanceCall 2, CP#20
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 12
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 13
|
|
Throw 1
|
|
Drop1
|
|
Jump L3
|
|
L3:
|
|
Jump L7
|
|
Try #1 end:
|
|
Try #1 handler:
|
|
SetFrame 14
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 10
|
|
PopLocal r4
|
|
MoveSpecial r8, exception
|
|
MoveSpecial r9, stackTrace
|
|
Push r4
|
|
LoadContextParent
|
|
Push r8
|
|
StoreContextVar 12
|
|
Push r4
|
|
LoadContextParent
|
|
Push r9
|
|
StoreContextVar 13
|
|
PushConstant CP#21
|
|
PushConstant CP#22
|
|
IndirectStaticCall 1, CP#1
|
|
Drop1
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 14
|
|
Push r4
|
|
LoadContextParent
|
|
PushConstant CP#23
|
|
StoreContextVar 7
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 8
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 2
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 5
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 6
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 15
|
|
PushConstant CP#24
|
|
IndirectStaticCall 4, CP#9
|
|
PopLocal r12
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L15:
|
|
IfEqNull r2
|
|
Jump L8
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L8:
|
|
Push r4
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 14
|
|
Push r1
|
|
InstanceCall 2, CP#25
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 4
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
Jump L9
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 12
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 13
|
|
Throw 1
|
|
L5:
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 10
|
|
PopLocal r4
|
|
PushConstant CP#21
|
|
PushConstant CP#26
|
|
IndirectStaticCall 1, CP#1
|
|
Drop1
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 14
|
|
Push r4
|
|
LoadContextParent
|
|
PushConstant CP#27
|
|
StoreContextVar 7
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 8
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 2
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 5
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 6
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 15
|
|
PushConstant CP#28
|
|
IndirectStaticCall 4, CP#9
|
|
PopLocal r12
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L16:
|
|
IfEqNull r2
|
|
Jump L10
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L10:
|
|
Push r4
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 14
|
|
Push r1
|
|
InstanceCall 2, CP#29
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 4
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
Jump L9
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
Jump L9
|
|
L7:
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 10
|
|
PopLocal r4
|
|
PushConstant CP#21
|
|
PushConstant CP#30
|
|
IndirectStaticCall 1, CP#1
|
|
Drop1
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 14
|
|
Push r4
|
|
LoadContextParent
|
|
PushConstant CP#31
|
|
StoreContextVar 7
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 8
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 2
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 5
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 6
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 15
|
|
PushConstant CP#32
|
|
IndirectStaticCall 4, CP#9
|
|
PopLocal r12
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L17:
|
|
IfEqNull r2
|
|
Jump L11
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L11:
|
|
Push r4
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 14
|
|
Push r1
|
|
InstanceCall 2, CP#33
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextVar 0
|
|
StoreContextVar 4
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
Jump L9
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
L9:
|
|
Push r4
|
|
LoadContextVar 3
|
|
Push r4
|
|
LoadContextVar 4
|
|
PushConstant CP#34
|
|
IndirectStaticCall 2, CP#11
|
|
Drop1
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
Jump L12
|
|
Try #0 end:
|
|
Try #0 handler:
|
|
SetFrame 14
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 9
|
|
PopLocal r4
|
|
MoveSpecial r6, exception
|
|
MoveSpecial r7, stackTrace
|
|
Push r6
|
|
PopLocal r8
|
|
Push r7
|
|
PopLocal r9
|
|
Push r4
|
|
LoadContextVar 3
|
|
Push r8
|
|
Push r9
|
|
InstanceCall 3, CP#36
|
|
Drop1
|
|
Jump L12
|
|
L12:
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L1:
|
|
Push r4
|
|
LoadContextVar 8
|
|
PopLocal r4
|
|
Push r5
|
|
PushConstant CP#8
|
|
IfEqStrictNumTOS
|
|
Jump L13
|
|
Push r5
|
|
PushConstant CP#18
|
|
IfEqStrictNumTOS
|
|
Jump L14
|
|
Push r5
|
|
PushConstant CP#23
|
|
IfEqStrictNumTOS
|
|
Jump L15
|
|
Push r5
|
|
PushConstant CP#27
|
|
IfEqStrictNumTOS
|
|
Jump 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::Completer<core::int> :async_completer = asy::Completer::sync<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);
|
|
asy::Future::microtask<dynamic>(:async_op);
|
|
return :async_completer.{asy::Completer::future};
|
|
}
|
|
[@vm.bytecode=
|
|
Bytecode {
|
|
Entry 4
|
|
CheckStack
|
|
AllocateContext 2
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 0
|
|
Push r0
|
|
PushConstant CP#0
|
|
StoreContextVar 1
|
|
Allocate CP#26
|
|
StoreLocal r3
|
|
Push r3
|
|
PushConstant CP#7
|
|
StoreFieldTOS CP#27
|
|
Push r3
|
|
PushConstant CP#7
|
|
StoreFieldTOS CP#29
|
|
Push r3
|
|
PushConstant CP#31
|
|
StoreFieldTOS CP#32
|
|
Push r3
|
|
PushConstant CP#1
|
|
StoreFieldTOS CP#34
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#2
|
|
PopLocal r2
|
|
Push r2
|
|
ReturnTOS
|
|
PushConstant CP#7
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = Int 3
|
|
[1] = ClosureFunction nested () → dart.async::Future<dart.core::int> /* originally async */ ;
|
|
[2] = InstanceField dart.core::_Closure::_context
|
|
[3] = Reserved
|
|
[4] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
|
|
[5] = ArgDesc num-args 1, num-type-args 0, names []
|
|
[6] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#5
|
|
[7] = Null
|
|
[8] = Int 0
|
|
[9] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
|
|
[10] = Int 4
|
|
[11] = Int 5
|
|
[12] = Int 1
|
|
[13] = ArgDesc num-args 4, num-type-args 0, names []
|
|
[14] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#13
|
|
[15] = ArgDesc num-args 2, num-type-args 0, names []
|
|
[16] = ICData target-name '+', arg-desc CP#15
|
|
[17] = Type dynamic
|
|
[18] = String 'fin'
|
|
[19] = StaticICData target 'dart.core::print', arg-desc CP#5
|
|
[20] = StaticICData target 'dart.core::print', arg-desc CP#5
|
|
[21] = StaticICData target 'dart.core::print', arg-desc CP#5
|
|
[22] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#15
|
|
[23] = ArgDesc num-args 3, num-type-args 0, names []
|
|
[24] = ICData target-name 'completeError', arg-desc CP#23
|
|
[25] = EndClosureFunctionScope
|
|
[26] = Class dart.core::_Closure
|
|
[27] = InstanceField dart.core::_Closure::_instantiator_type_arguments
|
|
[28] = Reserved
|
|
[29] = InstanceField dart.core::_Closure::_function_type_arguments
|
|
[30] = Reserved
|
|
[31] = EmptyTypeArguments
|
|
[32] = InstanceField dart.core::_Closure::_delayed_type_arguments
|
|
[33] = Reserved
|
|
[34] = InstanceField dart.core::_Closure::_function
|
|
[35] = Reserved
|
|
[36] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#5
|
|
[37] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#5
|
|
[38] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#5
|
|
[39] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
|
|
[40] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#15
|
|
[41] = ICData get target-name 'future', arg-desc CP#5
|
|
[42] = EndClosureFunctionScope
|
|
}
|
|
Closure CP#9 {
|
|
EntryOptional 1, 3, 0
|
|
LoadConstant r1, CP#7
|
|
LoadConstant r2, CP#7
|
|
LoadConstant r3, CP#7
|
|
Frame 8
|
|
CheckStack
|
|
Push r0
|
|
LoadFieldTOS CP#2
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 4
|
|
StoreLocal r5
|
|
PushConstant CP#8
|
|
IfNeStrictNumTOS
|
|
Jump L1
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 6
|
|
Try #0 start:
|
|
AllocateContext 1
|
|
StoreLocal r5
|
|
Push r5
|
|
Push r4
|
|
StoreContextParent
|
|
PopLocal r4
|
|
Push r4
|
|
PushConstant CP#10
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 7
|
|
Try #1 start:
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
PushConstant CP#11
|
|
StoreContextVar 1
|
|
Push r4
|
|
LoadContextParent
|
|
PushConstant CP#12
|
|
StoreContextVar 4
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
StoreContextVar 5
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 2
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 3
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextVar 8
|
|
PushConstant CP#14
|
|
IndirectStaticCall 4, CP#13
|
|
PopLocal r11
|
|
PushConstant CP#7
|
|
ReturnTOS
|
|
L7:
|
|
IfEqNull r2
|
|
Jump L2
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L2:
|
|
Push r4
|
|
Push r1
|
|
StoreContextVar 0
|
|
Push r4
|
|
LoadContextParent
|
|
Push r4
|
|
LoadContextParent
|
|
LoadContextParent
|
|
LoadContextVar 1
|
|
Push r4
|
|
LoadContextVar 0
|
|
InstanceCall 2, CP#16
|
|
StoreContextVar 1
|
|
Jump L3
|
|
Jump L4
|
|
Try #1 end:
|
|
Try #1 handler:
|
|
SetFrame 12
|
|
Push r0
|
|
LoadFieldTOS CP#2
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 7
|
|
PopLocal r4
|
|
MoveSpecial r8, exception
|
|
MoveSpecial r9, stackTrace
|
|
PushConstant CP#18
|
|
PushConstant CP#19
|
|
IndirectStaticCall 1, CP#5
|
|
Drop1
|
|
Push r8
|
|
Push r9
|
|
Throw 1
|
|
L3:
|
|
Push r0
|
|
LoadFieldTOS CP#2
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 7
|
|
PopLocal r4
|
|
PushConstant CP#18
|
|
PushConstant CP#20
|
|
IndirectStaticCall 1, CP#5
|
|
Drop1
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
Jump L5
|
|
L4:
|
|
Push r0
|
|
LoadFieldTOS CP#2
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 7
|
|
PopLocal r4
|
|
PushConstant CP#18
|
|
PushConstant CP#21
|
|
IndirectStaticCall 1, CP#5
|
|
Drop1
|
|
Push r4
|
|
LoadContextParent
|
|
PopLocal r4
|
|
L5:
|
|
Push r4
|
|
LoadContextVar 0
|
|
Push r4
|
|
LoadContextVar 1
|
|
PushConstant CP#22
|
|
IndirectStaticCall 2, CP#15
|
|
Drop1
|
|
PushConstant CP#7
|
|
ReturnTOS
|
|
Jump L6
|
|
Try #0 end:
|
|
Try #0 handler:
|
|
SetFrame 12
|
|
Push r0
|
|
LoadFieldTOS CP#2
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 6
|
|
PopLocal r4
|
|
MoveSpecial r6, exception
|
|
MoveSpecial r7, stackTrace
|
|
Push r6
|
|
PopLocal r8
|
|
Push r7
|
|
PopLocal r9
|
|
Push r4
|
|
LoadContextVar 0
|
|
Push r8
|
|
Push r9
|
|
InstanceCall 3, CP#24
|
|
Drop1
|
|
Jump L6
|
|
L6:
|
|
PushConstant CP#7
|
|
ReturnTOS
|
|
L1:
|
|
Push r4
|
|
LoadContextVar 5
|
|
PopLocal r4
|
|
Jump L7
|
|
|
|
}
|
|
|
|
Closure CP#1 {
|
|
EntryFixed 1, 4
|
|
CheckStack
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#2
|
|
PopLocal r0
|
|
AllocateContext 9
|
|
StoreLocal r1
|
|
Push r1
|
|
Push r0
|
|
StoreContextParent
|
|
PopLocal r0
|
|
Push r0
|
|
PushConstant CP#4
|
|
PushConstant CP#6
|
|
IndirectStaticCall 1, CP#5
|
|
StoreContextVar 0
|
|
Push r0
|
|
PushConstant CP#7
|
|
StoreContextVar 1
|
|
PushConstant CP#7
|
|
PopLocal r2
|
|
Push r0
|
|
PushConstant CP#7
|
|
StoreContextVar 2
|
|
Push r0
|
|
PushConstant CP#7
|
|
StoreContextVar 3
|
|
Push r0
|
|
PushConstant CP#8
|
|
StoreContextVar 4
|
|
Push r0
|
|
PushConstant CP#7
|
|
StoreContextVar 5
|
|
Push r0
|
|
PushConstant CP#7
|
|
StoreContextVar 6
|
|
Push r0
|
|
PushConstant CP#7
|
|
StoreContextVar 7
|
|
Push r0
|
|
Allocate CP#26
|
|
StoreLocal r3
|
|
Push r3
|
|
PushConstant CP#7
|
|
StoreFieldTOS CP#27
|
|
Push r3
|
|
PushConstant CP#7
|
|
StoreFieldTOS CP#29
|
|
Push r3
|
|
PushConstant CP#31
|
|
StoreFieldTOS CP#32
|
|
Push r3
|
|
PushConstant CP#9
|
|
StoreFieldTOS CP#34
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#2
|
|
StoreContextVar 8
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#36
|
|
IndirectStaticCall 1, CP#5
|
|
PopLocal r2
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#37
|
|
IndirectStaticCall 1, CP#5
|
|
StoreContextVar 2
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#38
|
|
IndirectStaticCall 1, CP#5
|
|
StoreContextVar 3
|
|
PushConstant CP#39
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#40
|
|
IndirectStaticCall 2, CP#15
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 0
|
|
InstanceCall 1, CP#41
|
|
ReturnTOS
|
|
Push r0
|
|
LoadContextParent
|
|
PopLocal r0
|
|
PushConstant CP#7
|
|
ReturnTOS
|
|
|
|
}
|
|
]static method closure(asy::Future<core::int> a) → dynamic {
|
|
core::int x = 3;
|
|
function nested() → asy::Future<core::int> /* originally async */ {
|
|
final asy::Completer<core::int> :async_completer = asy::Completer::sync<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);
|
|
asy::Future::microtask<dynamic>(:async_op);
|
|
return :async_completer.{asy::Completer::future};
|
|
}
|
|
return nested;
|
|
}
|
|
[@vm.bytecode=
|
|
Bytecode {
|
|
Entry 4
|
|
CheckStack
|
|
AllocateContext 9
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 0
|
|
Push r0
|
|
PushConstant CP#0
|
|
PushConstant CP#2
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 1
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 2
|
|
PushConstant CP#3
|
|
PopLocal r2
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 3
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 4
|
|
Push r0
|
|
PushConstant CP#4
|
|
StoreContextVar 5
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 6
|
|
Push r0
|
|
PushConstant CP#3
|
|
StoreContextVar 7
|
|
Push r0
|
|
Allocate CP#22
|
|
StoreLocal r3
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#23
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#25
|
|
Push r3
|
|
PushConstant CP#27
|
|
StoreFieldTOS CP#28
|
|
Push r3
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#30
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#6
|
|
StoreContextVar 8
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#32
|
|
IndirectStaticCall 1, CP#1
|
|
PopLocal r2
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#33
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 3
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#34
|
|
IndirectStaticCall 1, CP#1
|
|
StoreContextVar 4
|
|
PushConstant CP#35
|
|
Push r0
|
|
LoadContextVar 8
|
|
PushConstant CP#36
|
|
IndirectStaticCall 2, CP#12
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 1
|
|
InstanceCall 1, CP#37
|
|
ReturnTOS
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
|
|
[1] = ArgDesc num-args 1, num-type-args 0, names []
|
|
[2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
|
|
[3] = Null
|
|
[4] = Int 0
|
|
[5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
|
|
[6] = InstanceField dart.core::_Closure::_context
|
|
[7] = Reserved
|
|
[8] = Int 1
|
|
[9] = ArgDesc num-args 4, num-type-args 0, names []
|
|
[10] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
|
|
[11] = Int 42
|
|
[12] = ArgDesc num-args 2, num-type-args 0, names []
|
|
[13] = ICData target-name '==', arg-desc CP#12
|
|
[14] = Bool true
|
|
[15] = ArgDesc num-args 3, num-type-args 0, names []
|
|
[16] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#15
|
|
[17] = Int 7
|
|
[18] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#12
|
|
[19] = Type dynamic
|
|
[20] = ICData target-name 'completeError', arg-desc CP#15
|
|
[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.async::_asyncStackTraceHelper', arg-desc CP#1
|
|
[33] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
|
|
[34] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
|
|
[35] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
|
|
[36] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#12
|
|
[37] = ICData get target-name 'future', arg-desc CP#1
|
|
}
|
|
Closure CP#5 {
|
|
EntryOptional 1, 3, 0
|
|
LoadConstant r1, CP#3
|
|
LoadConstant r2, CP#3
|
|
LoadConstant r3, CP#3
|
|
Frame 6
|
|
CheckStack
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 5
|
|
StoreLocal r5
|
|
PushConstant CP#4
|
|
IfNeStrictNumTOS
|
|
Jump L1
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 7
|
|
Try #0 start:
|
|
JumpIfNoAsserts L2
|
|
Push r4
|
|
PushConstant CP#8
|
|
StoreContextVar 5
|
|
Push r4
|
|
Push r4
|
|
StoreContextVar 6
|
|
Push r4
|
|
LoadContextVar 0
|
|
Push r4
|
|
LoadContextVar 3
|
|
Push r4
|
|
LoadContextVar 4
|
|
Push r4
|
|
LoadContextVar 8
|
|
PushConstant CP#10
|
|
IndirectStaticCall 4, CP#9
|
|
PopLocal r8
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L6:
|
|
IfEqNull r2
|
|
Jump L3
|
|
Push r2
|
|
Push r3
|
|
Throw 1
|
|
L3:
|
|
JumpIfNoAsserts L2
|
|
Push r1
|
|
PushConstant CP#11
|
|
InstanceCall 2, CP#13
|
|
AssertBoolean 0
|
|
PushConstant CP#14
|
|
IfEqStrictTOS
|
|
Jump L2
|
|
PushConstant CP#4
|
|
PushConstant CP#4
|
|
PushConstant CP#3
|
|
PushConstant CP#16
|
|
IndirectStaticCall 3, CP#15
|
|
Drop1
|
|
L2:
|
|
Push r4
|
|
PushConstant CP#17
|
|
StoreContextVar 2
|
|
Jump L4
|
|
L4:
|
|
Push r4
|
|
LoadContextVar 1
|
|
Push r4
|
|
LoadContextVar 2
|
|
PushConstant CP#18
|
|
IndirectStaticCall 2, CP#12
|
|
Drop1
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
Jump L5
|
|
Try #0 end:
|
|
Try #0 handler:
|
|
SetFrame 10
|
|
Push r0
|
|
LoadFieldTOS CP#6
|
|
PopLocal r4
|
|
Push r4
|
|
LoadContextVar 7
|
|
PopLocal r4
|
|
MoveSpecial r6, exception
|
|
MoveSpecial r7, stackTrace
|
|
Push r6
|
|
PopLocal r8
|
|
Push r7
|
|
PopLocal r9
|
|
Push r4
|
|
LoadContextVar 1
|
|
Push r8
|
|
Push r9
|
|
InstanceCall 3, CP#20
|
|
Drop1
|
|
Jump L5
|
|
L5:
|
|
PushConstant CP#3
|
|
ReturnTOS
|
|
L1:
|
|
Push r4
|
|
LoadContextVar 6
|
|
PopLocal r4
|
|
Jump L6
|
|
|
|
}
|
|
]static method testAssert(asy::Future<core::int> a) → asy::Future<core::int> /* originally async */ {
|
|
final asy::Completer<core::int> :async_completer = asy::Completer::sync<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);
|
|
asy::Future::microtask<dynamic>(:async_op);
|
|
return :async_completer.{asy::Completer::future};
|
|
}
|
|
[@vm.bytecode=
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack
|
|
PushConstant CP#0
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = Null
|
|
}
|
|
]static method main() → dynamic {}
|