[vm/kernel] Enable sync-async in pkg/vm tests
Change-Id: I7fc4a9ad503cb47a0c1b8b37ffdcdb754e2e7200
Reviewed-on: https://dart-review.googlesource.com/c/87608
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart
index 888e87d..046d479 100644
--- a/pkg/vm/lib/kernel_front_end.dart
+++ b/pkg/vm/lib/kernel_front_end.dart
@@ -472,7 +472,7 @@
// Make sure VM-specific targets are available.
installAdditionalTargets();
- final TargetFlags targetFlags = new TargetFlags(syncAsync: true);
+ final TargetFlags targetFlags = new TargetFlags();
return getTarget(targetName, targetFlags);
}
diff --git a/pkg/vm/test/common_test_utils.dart b/pkg/vm/test/common_test_utils.dart
index 3423be9..9669536 100644
--- a/pkg/vm/test/common_test_utils.dart
+++ b/pkg/vm/test/common_test_utils.dart
@@ -32,7 +32,7 @@
{Target target, bool enableSuperMixins: false}) async {
final platformKernel =
computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
- target ??= new TestingVmTarget(new TargetFlags(syncAsync: false))
+ target ??= new TestingVmTarget(new TargetFlags())
..enableSuperMixins = enableSuperMixins;
final options = new CompilerOptions()
..target = target
diff --git a/pkg/vm/test/incremental_compiler_test.dart b/pkg/vm/test/incremental_compiler_test.dart
index ab74b2a..4050a60 100644
--- a/pkg/vm/test/incremental_compiler_test.dart
+++ b/pkg/vm/test/incremental_compiler_test.dart
@@ -29,7 +29,7 @@
final sdkRoot = computePlatformBinariesLocation();
final options = new CompilerOptions()
..sdkRoot = sdkRoot
- ..target = new VmTarget(new TargetFlags(syncAsync: false))
+ ..target = new VmTarget(new TargetFlags())
..linkedDependencies = <Uri>[platformKernel]
..onDiagnostic = (DiagnosticMessage message) {
fail("Compilation error: ${message.plainTextFormatted.join('\n')}");
diff --git a/pkg/vm/test/transformations/type_flow/summary_collector_test.dart b/pkg/vm/test/transformations/type_flow/summary_collector_test.dart
index c12ecc6..1ec8d87 100644
--- a/pkg/vm/test/transformations/type_flow/summary_collector_test.dart
+++ b/pkg/vm/test/transformations/type_flow/summary_collector_test.dart
@@ -49,7 +49,7 @@
}
runTestCase(Uri source) async {
- final Target target = new TestingVmTarget(new TargetFlags(syncAsync: false));
+ final Target target = new TestingVmTarget(new TargetFlags());
final Component component = await compileTestCaseToKernelProgram(source);
final Library library = component.mainMethod.enclosingLibrary;
final CoreTypes coreTypes = new CoreTypes(component);
diff --git a/pkg/vm/test/transformations/type_flow/transformer_test.dart b/pkg/vm/test/transformations/type_flow/transformer_test.dart
index e12c97f..d031f10 100644
--- a/pkg/vm/test/transformations/type_flow/transformer_test.dart
+++ b/pkg/vm/test/transformations/type_flow/transformer_test.dart
@@ -18,7 +18,7 @@
final String pkgVmDir = Platform.script.resolve('../../..').toFilePath();
runTestCase(Uri source) async {
- final target = new TestingVmTarget(new TargetFlags(syncAsync: false));
+ final target = new TestingVmTarget(new TargetFlags());
Component component =
await compileTestCaseToKernelProgram(source, target: target);
diff --git a/pkg/vm/testcases/bytecode/async.dart.expect b/pkg/vm/testcases/bytecode/async.dart.expect
index dc84539..115e062 100644
--- a/pkg/vm/testcases/bytecode/async.dart.expect
+++ b/pkg/vm/testcases/bytecode/async.dart.expect
@@ -7,20 +7,20 @@
Bytecode {
Entry 3
CheckStack 0
- Allocate CP#20
+ Allocate CP#21
StoreLocal r2
Push r2
PushNull
- StoreFieldTOS CP#21
+ StoreFieldTOS CP#22
Push r2
PushNull
- StoreFieldTOS CP#23
+ StoreFieldTOS CP#24
Push r2
- PushConstant CP#25
- StoreFieldTOS CP#26
+ PushConstant CP#26
+ StoreFieldTOS CP#27
Push r2
PushConstant CP#0
- StoreFieldTOS CP#28
+ StoreFieldTOS CP#29
Push r2
Push r0
StoreFieldTOS CP#1
@@ -33,36 +33,36 @@
[3] = Type dart:async::Future < dart:core::int >
[4] = String 'x'
[5] = SubtypeTestCache
- [6] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::Null]
- [7] = ArgDesc num-args 1, num-type-args 0, names []
- [8] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#7
- [9] = ClosureFunction 1
- [10] = Null
- [11] = ArgDesc num-args 4, num-type-args 0, names []
- [12] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#11
- [13] = ArgDesc num-args 2, num-type-args 0, names []
- [14] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#13
- [15] = Type dynamic
- [16] = ArgDesc num-args 3, num-type-args 0, names []
- [17] = InterfaceCall target-name 'completeError', arg-desc CP#16
- [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] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#7
- [31] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#7
- [32] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#7
- [33] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
- [34] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#13
- [35] = InterfaceCall get target-name 'get:future', arg-desc CP#7
+ [6] = Class dart:async::_AsyncAwaitCompleter
+ [7] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::Null]
+ [8] = ArgDesc num-args 1, num-type-args 0, names []
+ [9] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#8
+ [10] = ClosureFunction 1
+ [11] = Null
+ [12] = ArgDesc num-args 4, num-type-args 0, names []
+ [13] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#12
+ [14] = ArgDesc num-args 2, num-type-args 0, names []
+ [15] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#14
+ [16] = Type dynamic
+ [17] = ArgDesc num-args 3, num-type-args 0, names []
+ [18] = InterfaceCall target-name 'completeError', arg-desc CP#17
+ [19] = Reserved
+ [20] = EndClosureFunctionScope
+ [21] = Class dart:core::_Closure
+ [22] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+ [23] = Reserved
+ [24] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+ [25] = Reserved
+ [26] = EmptyTypeArguments
+ [27] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+ [28] = Reserved
+ [29] = InstanceField dart:core::_Closure::_function (field)
+ [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] = ICData dynamic target-name 'start', arg-desc CP#14
+ [35] = InterfaceCall get target-name 'get:future', arg-desc CP#8
[36] = Reserved
[37] = EndClosureFunctionScope
}
@@ -86,15 +86,20 @@
AssertAssignable 0, CP#5
Drop1
Push r0
+ PushConstant CP#7
PushConstant CP#6
- PushConstant CP#8
- IndirectStaticCall 1, CP#7
+ AllocateT
+ StoreLocal r2
+ Push r2
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#8
+ Drop1
StoreContextVar 0, 1
Push r0
PushNull
StoreContextVar 0, 2
PushNull
- PopLocal r2
+ PopLocal r3
Push r0
PushNull
StoreContextVar 0, 3
@@ -111,46 +116,46 @@
PushNull
StoreContextVar 0, 7
Push r0
- Allocate CP#20
- StoreLocal r3
- Push r3
+ Allocate CP#21
+ StoreLocal r2
+ Push r2
PushNull
- StoreFieldTOS CP#21
- Push r3
+ StoreFieldTOS CP#22
+ Push r2
PushNull
- StoreFieldTOS CP#23
- Push r3
- PushConstant CP#25
- StoreFieldTOS CP#26
- Push r3
- PushConstant CP#9
- StoreFieldTOS CP#28
- Push r3
+ StoreFieldTOS CP#24
+ Push r2
+ PushConstant CP#26
+ StoreFieldTOS CP#27
+ Push r2
+ PushConstant CP#10
+ StoreFieldTOS CP#29
+ Push r2
Push r0
StoreFieldTOS CP#1
StoreContextVar 0, 8
Push r0
LoadContextVar 0, 8
- PushConstant CP#30
- IndirectStaticCall 1, CP#7
- PopLocal r2
- Push r0
- Push r0
- LoadContextVar 0, 8
PushConstant CP#31
- IndirectStaticCall 1, CP#7
- StoreContextVar 0, 3
+ IndirectStaticCall 1, CP#8
+ PopLocal r3
Push r0
Push r0
LoadContextVar 0, 8
PushConstant CP#32
- IndirectStaticCall 1, CP#7
- StoreContextVar 0, 4
- PushConstant CP#33
+ IndirectStaticCall 1, CP#8
+ StoreContextVar 0, 3
+ Push r0
Push r0
LoadContextVar 0, 8
- PushConstant CP#34
- IndirectStaticCall 2, CP#13
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#8
+ StoreContextVar 0, 4
+ Push r0
+ LoadContextVar 0, 1
+ Push r0
+ LoadContextVar 0, 8
+ DynamicCall 2, CP#34
Drop1
Push r0
LoadContextVar 0, 1
@@ -162,9 +167,9 @@
Closure #lib::asyncInFieldInitializer (field)::Closure/0:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
ClosureBytecode {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#10
- LoadConstant r2, CP#10
- LoadConstant r3, CP#10
+ LoadConstant r1, CP#11
+ LoadConstant r2, CP#11
+ LoadConstant r3, CP#11
Frame 6
CheckStack 0
Push r0
@@ -193,8 +198,8 @@
LoadContextVar 0, 4
Push r4
LoadContextVar 0, 8
- PushConstant CP#12
- IndirectStaticCall 4, CP#11
+ PushConstant CP#13
+ IndirectStaticCall 4, CP#12
PopLocal r8
PushNull
ReturnTOS
@@ -211,8 +216,8 @@
LoadContextVar 0, 1
Push r4
LoadContextVar 0, 2
- PushConstant CP#14
- IndirectStaticCall 2, CP#13
+ PushConstant CP#15
+ IndirectStaticCall 2, CP#14
Drop1
PushNull
ReturnTOS
@@ -235,7 +240,7 @@
LoadContextVar 0, 1
Push r8
Push r9
- InterfaceCall 3, CP#17
+ InterfaceCall 3, CP#18
Drop1
Jump L3
L3:
@@ -249,7 +254,7 @@
}
]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>();
+ 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;
@@ -273,7 +278,7 @@
: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);
+ :async_completer.start(:async_op);
return :async_completer.{asy::Completer::future};
};
[@vm.bytecode=
@@ -283,59 +288,64 @@
AllocateContext 0, 4
PopLocal r0
Push r0
+ PushConstant CP#1
PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
+ AllocateT
+ StoreLocal r2
+ Push r2
+ PushConstant CP#3
+ IndirectStaticCall 1, CP#2
+ Drop1
StoreContextVar 0, 0
Push r0
PushNull
StoreContextVar 0, 1
PushNull
- PopLocal r2
- 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 r6
- Push r6
+ Allocate CP#15
+ StoreLocal r2
+ Push r2
PushNull
- StoreFieldTOS CP#15
- Push r6
+ StoreFieldTOS CP#16
+ Push r2
PushNull
- StoreFieldTOS CP#17
- Push r6
- PushConstant CP#19
- StoreFieldTOS CP#20
- Push r6
- PushConstant CP#3
- StoreFieldTOS CP#22
- Push r6
+ StoreFieldTOS CP#18
+ Push r2
+ PushConstant CP#20
+ StoreFieldTOS CP#21
+ Push r2
+ PushConstant CP#4
+ StoreFieldTOS CP#23
+ Push r2
Push r0
- StoreFieldTOS CP#5
- PopLocal r5
- Push r5
- PushConstant CP#24
- IndirectStaticCall 1, CP#1
- PopLocal r2
- Push r5
+ StoreFieldTOS CP#6
+ PopLocal r6
+ Push r6
PushConstant CP#25
- IndirectStaticCall 1, CP#1
+ IndirectStaticCall 1, CP#2
PopLocal r3
- Push r5
+ Push r6
PushConstant CP#26
- IndirectStaticCall 1, CP#1
+ IndirectStaticCall 1, CP#2
PopLocal r4
+ Push r6
PushConstant CP#27
- Push r5
- PushConstant CP#28
- IndirectStaticCall 2, CP#7
+ IndirectStaticCall 1, CP#2
+ PopLocal r5
+ Push r0
+ LoadContextVar 0, 0
+ Push r6
+ DynamicCall 2, CP#28
Drop1
Push r0
LoadContextVar 0, 0
@@ -343,48 +353,48 @@
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 (constructor)', arg-desc CP#1
- [3] = ClosureFunction 0
- [4] = Null
- [5] = InstanceField dart:core::_Closure::_context (field)
- [6] = Reserved
- [7] = ArgDesc num-args 2, num-type-args 0, names []
- [8] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#7
- [9] = Type dynamic
- [10] = ArgDesc num-args 3, num-type-args 0, names []
- [11] = InterfaceCall target-name 'completeError', arg-desc CP#10
- [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] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
- [25] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
- [26] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
- [27] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
- [28] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#7
- [29] = InterfaceCall get target-name 'get:future', arg-desc CP#1
+ [0] = Class dart:async::_AsyncAwaitCompleter
+ [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+ [4] = ClosureFunction 0
+ [5] = Null
+ [6] = InstanceField dart:core::_Closure::_context (field)
+ [7] = Reserved
+ [8] = ArgDesc num-args 2, num-type-args 0, names []
+ [9] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#8
+ [10] = Type dynamic
+ [11] = ArgDesc num-args 3, num-type-args 0, names []
+ [12] = InterfaceCall target-name 'completeError', arg-desc CP#11
+ [13] = Reserved
+ [14] = EndClosureFunctionScope
+ [15] = Class dart:core::_Closure
+ [16] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+ [17] = Reserved
+ [18] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+ [19] = Reserved
+ [20] = EmptyTypeArguments
+ [21] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+ [22] = Reserved
+ [23] = InstanceField dart:core::_Closure::_function (field)
+ [24] = Reserved
+ [25] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+ [26] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+ [27] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+ [28] = ICData dynamic target-name 'start', arg-desc CP#8
+ [29] = InterfaceCall get target-name 'get:future', arg-desc CP#2
[30] = Reserved
}
Closure #lib::foo:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
ClosureBytecode {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#4
- LoadConstant r2, CP#4
- LoadConstant r3, CP#4
+ LoadConstant r1, CP#5
+ LoadConstant r2, CP#5
+ LoadConstant r3, CP#5
Frame 6
CheckStack 0
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 2
@@ -403,8 +413,8 @@
LoadContextVar 0, 0
Push r4
LoadContextVar 0, 1
- PushConstant CP#8
- IndirectStaticCall 2, CP#7
+ PushConstant CP#9
+ IndirectStaticCall 2, CP#8
Drop1
PushNull
ReturnTOS
@@ -423,7 +433,7 @@
LoadContextVar 0, 0
Push r8
Push r9
- InterfaceCall 3, CP#11
+ InterfaceCall 3, CP#12
Drop1
Jump L3
L3:
@@ -434,7 +444,7 @@
}
]static method foo() → asy::Future<core::int> /* originally async */ {
- final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+ 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;
@@ -457,7 +467,7 @@
: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);
+ :async_completer.start(:async_op);
return :async_completer.{asy::Completer::future};
}
[@vm.bytecode=
@@ -473,15 +483,20 @@
Push FP[-5]
StoreContextVar 0, 1
Push r0
+ PushConstant CP#1
PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
+ AllocateT
+ StoreLocal r2
+ Push r2
+ PushConstant CP#3
+ IndirectStaticCall 1, CP#2
+ Drop1
StoreContextVar 0, 2
Push r0
PushNull
StoreContextVar 0, 3
PushNull
- PopLocal r2
+ PopLocal r3
Push r0
PushNull
StoreContextVar 0, 4
@@ -501,46 +516,46 @@
PushNull
StoreContextVar 0, 9
Push r0
- Allocate CP#19
- StoreLocal r3
- Push r3
+ Allocate CP#20
+ StoreLocal r2
+ Push r2
PushNull
- StoreFieldTOS CP#20
- Push r3
+ StoreFieldTOS CP#21
+ Push r2
PushNull
- StoreFieldTOS CP#22
- Push r3
- PushConstant CP#24
- StoreFieldTOS CP#25
- Push r3
- PushConstant CP#3
- StoreFieldTOS CP#27
- Push r3
+ 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#5
+ StoreFieldTOS CP#6
StoreContextVar 0, 10
Push r0
LoadContextVar 0, 10
- PushConstant CP#29
- IndirectStaticCall 1, CP#1
- PopLocal r2
- Push r0
- Push r0
- LoadContextVar 0, 10
PushConstant CP#30
- IndirectStaticCall 1, CP#1
- StoreContextVar 0, 4
+ IndirectStaticCall 1, CP#2
+ PopLocal r3
Push r0
Push r0
LoadContextVar 0, 10
PushConstant CP#31
- IndirectStaticCall 1, CP#1
- StoreContextVar 0, 5
- PushConstant CP#32
+ IndirectStaticCall 1, CP#2
+ StoreContextVar 0, 4
+ Push r0
Push r0
LoadContextVar 0, 10
- PushConstant CP#33
- IndirectStaticCall 2, CP#10
+ PushConstant CP#32
+ IndirectStaticCall 1, CP#2
+ StoreContextVar 0, 5
+ Push r0
+ LoadContextVar 0, 2
+ Push r0
+ LoadContextVar 0, 10
+ DynamicCall 2, CP#33
Drop1
Push r0
LoadContextVar 0, 2
@@ -548,53 +563,53 @@
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 (constructor)', arg-desc CP#1
- [3] = ClosureFunction 0
- [4] = Null
- [5] = InstanceField dart:core::_Closure::_context (field)
- [6] = Reserved
- [7] = ArgDesc num-args 4, num-type-args 0, names []
- [8] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
- [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
- [10] = ArgDesc num-args 2, num-type-args 0, names []
- [11] = InterfaceCall target-name '+', arg-desc CP#10
- [12] = Reserved
- [13] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#10
- [14] = Type dynamic
- [15] = ArgDesc num-args 3, num-type-args 0, names []
- [16] = InterfaceCall target-name 'completeError', arg-desc CP#15
- [17] = Reserved
- [18] = EndClosureFunctionScope
- [19] = Class dart:core::_Closure
- [20] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
- [21] = Reserved
- [22] = InstanceField dart:core::_Closure::_function_type_arguments (field)
- [23] = Reserved
- [24] = EmptyTypeArguments
- [25] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
- [26] = Reserved
- [27] = InstanceField dart:core::_Closure::_function (field)
- [28] = Reserved
- [29] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
- [30] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
- [31] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
- [32] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
- [33] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#10
- [34] = InterfaceCall get target-name 'get:future', arg-desc CP#1
+ [0] = Class dart:async::_AsyncAwaitCompleter
+ [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+ [4] = ClosureFunction 0
+ [5] = Null
+ [6] = InstanceField dart:core::_Closure::_context (field)
+ [7] = Reserved
+ [8] = ArgDesc num-args 4, num-type-args 0, names []
+ [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+ [10] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+ [11] = ArgDesc num-args 2, num-type-args 0, names []
+ [12] = InterfaceCall target-name '+', arg-desc CP#11
+ [13] = Reserved
+ [14] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#11
+ [15] = Type dynamic
+ [16] = ArgDesc num-args 3, num-type-args 0, names []
+ [17] = InterfaceCall target-name 'completeError', arg-desc CP#16
+ [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] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+ [31] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+ [32] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+ [33] = ICData dynamic target-name 'start', arg-desc CP#11
+ [34] = InterfaceCall get target-name 'get:future', arg-desc CP#2
[35] = Reserved
}
Closure #lib::simpleAsyncAwait:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
ClosureBytecode {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#4
- LoadConstant r2, CP#4
- LoadConstant r3, CP#4
+ LoadConstant r1, CP#5
+ LoadConstant r2, CP#5
+ LoadConstant r3, CP#5
Frame 6
CheckStack 0
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 6
@@ -619,8 +634,8 @@
LoadContextVar 0, 5
Push r4
LoadContextVar 0, 10
- PushConstant CP#8
- IndirectStaticCall 4, CP#7
+ PushConstant CP#9
+ IndirectStaticCall 4, CP#8
PopLocal r8
PushNull
ReturnTOS
@@ -648,8 +663,8 @@
LoadContextVar 0, 5
Push r4
LoadContextVar 0, 10
- PushConstant CP#9
- IndirectStaticCall 4, CP#7
+ PushConstant CP#10
+ IndirectStaticCall 4, CP#8
PopLocal r9
PushNull
ReturnTOS
@@ -664,7 +679,7 @@
Push r4
LoadContextVar 0, 9
Push r1
- InterfaceCall 2, CP#11
+ InterfaceCall 2, CP#12
StoreContextVar 0, 3
Jump L4
L4:
@@ -672,8 +687,8 @@
LoadContextVar 0, 2
Push r4
LoadContextVar 0, 3
- PushConstant CP#13
- IndirectStaticCall 2, CP#10
+ PushConstant CP#14
+ IndirectStaticCall 2, CP#11
Drop1
PushNull
ReturnTOS
@@ -681,7 +696,7 @@
Try #0 handler:
SetFrame 10
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 8
@@ -696,7 +711,7 @@
LoadContextVar 0, 2
Push r8
Push r9
- InterfaceCall 3, CP#16
+ InterfaceCall 3, CP#17
Drop1
Jump L5
L5:
@@ -713,7 +728,7 @@
}
]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>();
+ 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;
@@ -741,7 +756,7 @@
: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);
+ :async_completer.start(:async_op);
return :async_completer.{asy::Completer::future};
}
[@vm.bytecode=
@@ -754,15 +769,20 @@
Push FP[-5]
StoreContextVar 0, 0
Push r0
+ PushConstant CP#1
PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
+ AllocateT
+ StoreLocal r2
+ Push r2
+ PushConstant CP#3
+ IndirectStaticCall 1, CP#2
+ Drop1
StoreContextVar 0, 1
Push r0
PushNull
StoreContextVar 0, 2
PushNull
- PopLocal r2
+ PopLocal r3
Push r0
PushNull
StoreContextVar 0, 3
@@ -785,46 +805,46 @@
PushNull
StoreContextVar 0, 9
Push r0
- Allocate CP#26
- StoreLocal r3
- Push r3
+ Allocate CP#27
+ StoreLocal r2
+ Push r2
PushNull
- StoreFieldTOS CP#27
- Push r3
+ StoreFieldTOS CP#28
+ Push r2
PushNull
- StoreFieldTOS CP#29
- Push r3
- PushConstant CP#31
- StoreFieldTOS CP#32
- Push r3
- PushConstant CP#3
- StoreFieldTOS CP#34
- Push r3
+ StoreFieldTOS CP#30
+ Push r2
+ PushConstant CP#32
+ StoreFieldTOS CP#33
+ Push r2
+ PushConstant CP#4
+ StoreFieldTOS CP#35
+ Push r2
Push r0
- StoreFieldTOS CP#5
+ StoreFieldTOS CP#6
StoreContextVar 0, 10
Push r0
LoadContextVar 0, 10
- PushConstant CP#36
- IndirectStaticCall 1, CP#1
- PopLocal r2
- Push r0
- Push r0
- LoadContextVar 0, 10
PushConstant CP#37
- IndirectStaticCall 1, CP#1
- StoreContextVar 0, 3
+ IndirectStaticCall 1, CP#2
+ PopLocal r3
Push r0
Push r0
LoadContextVar 0, 10
PushConstant CP#38
- IndirectStaticCall 1, CP#1
- StoreContextVar 0, 4
- PushConstant CP#39
+ IndirectStaticCall 1, CP#2
+ StoreContextVar 0, 3
+ Push r0
Push r0
LoadContextVar 0, 10
- PushConstant CP#40
- IndirectStaticCall 2, CP#17
+ PushConstant CP#39
+ IndirectStaticCall 1, CP#2
+ StoreContextVar 0, 4
+ Push r0
+ LoadContextVar 0, 1
+ Push r0
+ LoadContextVar 0, 10
+ DynamicCall 2, CP#40
Drop1
Push r0
LoadContextVar 0, 1
@@ -832,60 +852,60 @@
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 (constructor)', arg-desc CP#1
- [3] = ClosureFunction 0
- [4] = Null
- [5] = InstanceField dart:core::_Closure::_context (field)
- [6] = Reserved
- [7] = InterfaceCall get target-name 'get:iterator', arg-desc CP#1
- [8] = Reserved
- [9] = InterfaceCall target-name 'moveNext', arg-desc CP#1
- [10] = Reserved
- [11] = InterfaceCall get target-name 'get:current', arg-desc CP#1
- [12] = Reserved
- [13] = ArgDesc num-args 0, num-type-args 0, names []
- [14] = StaticICData target '#lib::foo', arg-desc CP#13
- [15] = ArgDesc num-args 4, num-type-args 0, names []
- [16] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#15
- [17] = ArgDesc num-args 2, num-type-args 0, names []
- [18] = InterfaceCall target-name '+', arg-desc CP#17
- [19] = Reserved
- [20] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#17
- [21] = Type dynamic
- [22] = ArgDesc num-args 3, num-type-args 0, names []
- [23] = InterfaceCall target-name 'completeError', arg-desc CP#22
- [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] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
- [37] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
- [38] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
- [39] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
- [40] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#17
- [41] = InterfaceCall get target-name 'get:future', arg-desc CP#1
+ [0] = Class dart:async::_AsyncAwaitCompleter
+ [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+ [4] = ClosureFunction 0
+ [5] = Null
+ [6] = InstanceField dart:core::_Closure::_context (field)
+ [7] = Reserved
+ [8] = InterfaceCall get target-name 'get:iterator', arg-desc CP#2
+ [9] = Reserved
+ [10] = InterfaceCall target-name 'moveNext', arg-desc CP#2
+ [11] = Reserved
+ [12] = InterfaceCall get target-name 'get:current', arg-desc CP#2
+ [13] = Reserved
+ [14] = ArgDesc num-args 0, num-type-args 0, names []
+ [15] = StaticICData target '#lib::foo', arg-desc CP#14
+ [16] = ArgDesc num-args 4, num-type-args 0, names []
+ [17] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#16
+ [18] = ArgDesc num-args 2, num-type-args 0, names []
+ [19] = InterfaceCall target-name '+', arg-desc CP#18
+ [20] = Reserved
+ [21] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#18
+ [22] = Type dynamic
+ [23] = ArgDesc num-args 3, num-type-args 0, names []
+ [24] = InterfaceCall target-name 'completeError', arg-desc CP#23
+ [25] = Reserved
+ [26] = EndClosureFunctionScope
+ [27] = Class dart:core::_Closure
+ [28] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+ [29] = Reserved
+ [30] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+ [31] = Reserved
+ [32] = EmptyTypeArguments
+ [33] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+ [34] = Reserved
+ [35] = InstanceField dart:core::_Closure::_function (field)
+ [36] = Reserved
+ [37] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+ [38] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+ [39] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+ [40] = ICData dynamic target-name 'start', arg-desc CP#18
+ [41] = InterfaceCall get target-name 'get:future', arg-desc CP#2
[42] = Reserved
}
Closure #lib::loops:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
ClosureBytecode {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#4
- LoadConstant r2, CP#4
- LoadConstant r3, CP#4
+ LoadConstant r1, CP#5
+ LoadConstant r2, CP#5
+ LoadConstant r3, CP#5
Frame 7
CheckStack 0
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 5
@@ -925,7 +945,7 @@
LoadContextParent
LoadContextParent
LoadContextVar 0, 0
- InterfaceCall 1, CP#7
+ InterfaceCall 1, CP#8
PopLocal r8
Push r4
Push r8
@@ -935,7 +955,7 @@
Push r4
LoadContextVar 2, 1
StoreLocal r8
- InterfaceCall 1, CP#9
+ InterfaceCall 1, CP#10
JumpIfFalse L3
AllocateContext 3, 1
StoreLocal r5
@@ -945,7 +965,7 @@
PopLocal r4
Push r4
Push r8
- InterfaceCall 1, CP#11
+ InterfaceCall 1, CP#12
StoreContextVar 3, 0
Push r4
LoadContextParent
@@ -979,8 +999,8 @@
LoadContextParent
Push r4
StoreContextVar 0, 6
- PushConstant CP#14
- IndirectStaticCall 0, CP#13
+ PushConstant CP#15
+ IndirectStaticCall 0, CP#14
Push r4
LoadContextParent
LoadContextParent
@@ -996,8 +1016,8 @@
LoadContextParent
LoadContextParent
LoadContextVar 0, 10
- PushConstant CP#16
- IndirectStaticCall 4, CP#15
+ PushConstant CP#17
+ IndirectStaticCall 4, CP#16
PopLocal r10
PushNull
ReturnTOS
@@ -1022,8 +1042,8 @@
LoadContextParent
LoadContextVar 0, 8
Push r1
- InterfaceCall 2, CP#18
- InterfaceCall 2, CP#18
+ InterfaceCall 2, CP#19
+ InterfaceCall 2, CP#19
StoreContextVar 1, 0
Push r4
LoadContextParent
@@ -1082,8 +1102,8 @@
LoadContextVar 0, 1
Push r4
LoadContextVar 0, 2
- PushConstant CP#20
- IndirectStaticCall 2, CP#17
+ PushConstant CP#21
+ IndirectStaticCall 2, CP#18
Drop1
PushNull
ReturnTOS
@@ -1091,7 +1111,7 @@
Try #0 handler:
SetFrame 11
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 7
@@ -1106,7 +1126,7 @@
LoadContextVar 0, 1
Push r8
Push r9
- InterfaceCall 3, CP#23
+ InterfaceCall 3, CP#24
Drop1
Jump L10
L10:
@@ -1120,7 +1140,7 @@
}
]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>();
+ 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;
@@ -1158,7 +1178,7 @@
: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);
+ :async_completer.start(:async_op);
return :async_completer.{asy::Completer::future};
}
[@vm.bytecode=
@@ -1177,15 +1197,20 @@
Push FP[-5]
StoreContextVar 0, 2
Push r0
+ PushConstant CP#1
PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
+ AllocateT
+ StoreLocal r2
+ Push r2
+ PushConstant CP#3
+ IndirectStaticCall 1, CP#2
+ Drop1
StoreContextVar 0, 3
Push r0
PushNull
StoreContextVar 0, 4
PushNull
- PopLocal r2
+ PopLocal r3
Push r0
PushNull
StoreContextVar 0, 5
@@ -1217,46 +1242,46 @@
PushNull
StoreContextVar 0, 14
Push r0
- Allocate CP#29
- StoreLocal r3
- Push r3
+ Allocate CP#30
+ StoreLocal r2
+ Push r2
PushNull
- StoreFieldTOS CP#30
- Push r3
+ StoreFieldTOS CP#31
+ Push r2
PushNull
- StoreFieldTOS CP#32
- Push r3
- PushConstant CP#34
- StoreFieldTOS CP#35
- Push r3
- PushConstant CP#3
- StoreFieldTOS CP#37
- Push r3
+ StoreFieldTOS CP#33
+ Push r2
+ PushConstant CP#35
+ StoreFieldTOS CP#36
+ Push r2
+ PushConstant CP#4
+ StoreFieldTOS CP#38
+ Push r2
Push r0
- StoreFieldTOS CP#5
+ StoreFieldTOS CP#6
StoreContextVar 0, 15
Push r0
LoadContextVar 0, 15
- PushConstant CP#39
- IndirectStaticCall 1, CP#1
- PopLocal r2
- Push r0
- Push r0
- LoadContextVar 0, 15
PushConstant CP#40
- IndirectStaticCall 1, CP#1
- StoreContextVar 0, 5
+ IndirectStaticCall 1, CP#2
+ PopLocal r3
Push r0
Push r0
LoadContextVar 0, 15
PushConstant CP#41
- IndirectStaticCall 1, CP#1
- StoreContextVar 0, 6
- PushConstant CP#42
+ IndirectStaticCall 1, CP#2
+ StoreContextVar 0, 5
+ Push r0
Push r0
LoadContextVar 0, 15
- PushConstant CP#43
- IndirectStaticCall 2, CP#9
+ PushConstant CP#42
+ IndirectStaticCall 1, CP#2
+ StoreContextVar 0, 6
+ Push r0
+ LoadContextVar 0, 3
+ Push r0
+ LoadContextVar 0, 15
+ DynamicCall 2, CP#43
Drop1
Push r0
LoadContextVar 0, 3
@@ -1264,63 +1289,63 @@
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 (constructor)', arg-desc CP#1
- [3] = ClosureFunction 0
- [4] = Null
- [5] = InstanceField dart:core::_Closure::_context (field)
- [6] = Reserved
- [7] = ArgDesc num-args 4, num-type-args 0, names []
- [8] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
- [9] = ArgDesc num-args 2, num-type-args 0, names []
- [10] = InterfaceCall target-name '+', arg-desc CP#9
- [11] = Reserved
- [12] = Type dynamic
- [13] = Type dart:core::Error
- [14] = InterfaceCall target-name '_simpleInstanceOf', arg-desc CP#9
- [15] = Reserved
- [16] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
- [17] = String 'fin'
- [18] = StaticICData target 'dart:core::print', arg-desc CP#1
- [19] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
- [20] = StaticICData target 'dart:core::print', arg-desc CP#1
- [21] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
- [22] = StaticICData target 'dart:core::print', arg-desc CP#1
- [23] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
- [24] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#9
- [25] = ArgDesc num-args 3, num-type-args 0, names []
- [26] = InterfaceCall target-name 'completeError', arg-desc CP#25
- [27] = Reserved
- [28] = EndClosureFunctionScope
- [29] = Class dart:core::_Closure
- [30] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
- [31] = Reserved
- [32] = InstanceField dart:core::_Closure::_function_type_arguments (field)
- [33] = Reserved
- [34] = EmptyTypeArguments
- [35] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
- [36] = Reserved
- [37] = InstanceField dart:core::_Closure::_function (field)
- [38] = Reserved
- [39] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
- [40] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
- [41] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
- [42] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
- [43] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#9
- [44] = InterfaceCall get target-name 'get:future', arg-desc CP#1
+ [0] = Class dart:async::_AsyncAwaitCompleter
+ [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+ [4] = ClosureFunction 0
+ [5] = Null
+ [6] = InstanceField dart:core::_Closure::_context (field)
+ [7] = Reserved
+ [8] = ArgDesc num-args 4, num-type-args 0, names []
+ [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+ [10] = ArgDesc num-args 2, num-type-args 0, names []
+ [11] = InterfaceCall target-name '+', arg-desc CP#10
+ [12] = Reserved
+ [13] = Type dynamic
+ [14] = Type dart:core::Error
+ [15] = InterfaceCall target-name '_simpleInstanceOf', arg-desc CP#10
+ [16] = Reserved
+ [17] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+ [18] = String 'fin'
+ [19] = StaticICData target 'dart:core::print', arg-desc CP#2
+ [20] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+ [21] = StaticICData target 'dart:core::print', arg-desc CP#2
+ [22] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+ [23] = StaticICData target 'dart:core::print', arg-desc CP#2
+ [24] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+ [25] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#10
+ [26] = ArgDesc num-args 3, num-type-args 0, names []
+ [27] = InterfaceCall target-name 'completeError', arg-desc CP#26
+ [28] = Reserved
+ [29] = EndClosureFunctionScope
+ [30] = Class dart:core::_Closure
+ [31] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+ [32] = Reserved
+ [33] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+ [34] = Reserved
+ [35] = EmptyTypeArguments
+ [36] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+ [37] = Reserved
+ [38] = InstanceField dart:core::_Closure::_function (field)
+ [39] = Reserved
+ [40] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+ [41] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+ [42] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+ [43] = ICData dynamic target-name 'start', arg-desc CP#10
+ [44] = InterfaceCall get target-name 'get:future', arg-desc CP#2
[45] = Reserved
}
Closure #lib::tryCatchRethrow:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
ClosureBytecode {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#4
- LoadConstant r2, CP#4
- LoadConstant r3, CP#4
+ LoadConstant r1, CP#5
+ LoadConstant r2, CP#5
+ LoadConstant r3, CP#5
Frame 10
CheckStack 0
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 7
@@ -1375,8 +1400,8 @@
Push r4
LoadContextParent
LoadContextVar 0, 15
- PushConstant CP#8
- IndirectStaticCall 4, CP#7
+ PushConstant CP#9
+ IndirectStaticCall 4, CP#8
PopLocal r13
PushNull
ReturnTOS
@@ -1392,14 +1417,14 @@
LoadContextParent
LoadContextVar 0, 14
Push r1
- InterfaceCall 2, CP#10
+ InterfaceCall 2, CP#11
StoreContextVar 1, 0
Jump L3
Try #2 end:
Try #2 handler:
SetFrame 14
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 11
@@ -1419,8 +1444,8 @@
StoreContextVar 1, 1
Push r4
LoadContextVar 1, 1
- PushConstant CP#13
- InterfaceCall 2, CP#14
+ PushConstant CP#14
+ InterfaceCall 2, CP#15
JumpIfFalse L4
Push r4
LoadContextParent
@@ -1453,8 +1478,8 @@
Push r4
LoadContextParent
LoadContextVar 0, 15
- PushConstant CP#16
- IndirectStaticCall 4, CP#7
+ PushConstant CP#17
+ IndirectStaticCall 4, CP#8
PopLocal r13
PushNull
ReturnTOS
@@ -1470,7 +1495,7 @@
LoadContextParent
LoadContextVar 0, 14
Push r1
- InterfaceCall 2, CP#10
+ InterfaceCall 2, CP#11
StoreContextVar 1, 0
Push r4
LoadContextParent
@@ -1485,7 +1510,7 @@
Try #1 handler:
SetFrame 14
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 10
@@ -1500,9 +1525,9 @@
LoadContextParent
Push r9
StoreContextVar 0, 13
- PushConstant CP#17
PushConstant CP#18
- IndirectStaticCall 1, CP#1
+ PushConstant CP#19
+ IndirectStaticCall 1, CP#2
Drop1
Push r4
LoadContextParent
@@ -1529,8 +1554,8 @@
Push r4
LoadContextParent
LoadContextVar 0, 15
- PushConstant CP#19
- IndirectStaticCall 4, CP#7
+ PushConstant CP#20
+ IndirectStaticCall 4, CP#8
PopLocal r12
PushNull
ReturnTOS
@@ -1546,7 +1571,7 @@
LoadContextParent
LoadContextVar 0, 14
Push r1
- InterfaceCall 2, CP#10
+ InterfaceCall 2, CP#11
StoreContextVar 1, 0
Push r4
LoadContextParent
@@ -1559,14 +1584,14 @@
Jump L9
L5:
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 10
PopLocal r4
- PushConstant CP#17
- PushConstant CP#20
- IndirectStaticCall 1, CP#1
+ PushConstant CP#18
+ PushConstant CP#21
+ IndirectStaticCall 1, CP#2
Drop1
Push r4
LoadContextParent
@@ -1593,8 +1618,8 @@
Push r4
LoadContextParent
LoadContextVar 0, 15
- PushConstant CP#21
- IndirectStaticCall 4, CP#7
+ PushConstant CP#22
+ IndirectStaticCall 4, CP#8
PopLocal r12
PushNull
ReturnTOS
@@ -1610,7 +1635,7 @@
LoadContextParent
LoadContextVar 0, 14
Push r1
- InterfaceCall 2, CP#10
+ InterfaceCall 2, CP#11
StoreContextVar 1, 0
Push r4
LoadContextParent
@@ -1623,14 +1648,14 @@
Jump L9
L7:
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 10
PopLocal r4
- PushConstant CP#17
- PushConstant CP#22
- IndirectStaticCall 1, CP#1
+ PushConstant CP#18
+ PushConstant CP#23
+ IndirectStaticCall 1, CP#2
Drop1
Push r4
LoadContextParent
@@ -1657,8 +1682,8 @@
Push r4
LoadContextParent
LoadContextVar 0, 15
- PushConstant CP#23
- IndirectStaticCall 4, CP#7
+ PushConstant CP#24
+ IndirectStaticCall 4, CP#8
PopLocal r12
PushNull
ReturnTOS
@@ -1674,7 +1699,7 @@
LoadContextParent
LoadContextVar 0, 14
Push r1
- InterfaceCall 2, CP#10
+ InterfaceCall 2, CP#11
StoreContextVar 1, 0
Push r4
LoadContextParent
@@ -1690,8 +1715,8 @@
LoadContextVar 0, 3
Push r4
LoadContextVar 0, 4
- PushConstant CP#24
- IndirectStaticCall 2, CP#9
+ PushConstant CP#25
+ IndirectStaticCall 2, CP#10
Drop1
PushNull
ReturnTOS
@@ -1699,7 +1724,7 @@
Try #0 handler:
SetFrame 14
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 9
@@ -1714,7 +1739,7 @@
LoadContextVar 0, 3
Push r8
Push r9
- InterfaceCall 3, CP#26
+ InterfaceCall 3, CP#27
Drop1
Jump L12
L12:
@@ -1740,7 +1765,7 @@
}
]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>();
+ 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;
@@ -1792,7 +1817,7 @@
: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);
+ :async_completer.start(:async_op);
return :async_completer.{asy::Completer::future};
}
[@vm.bytecode=
@@ -1807,20 +1832,20 @@
Push r0
PushInt 3
StoreContextVar 0, 1
- Allocate CP#20
+ Allocate CP#21
StoreLocal r3
Push r3
PushNull
- StoreFieldTOS CP#21
+ StoreFieldTOS CP#22
Push r3
PushNull
- StoreFieldTOS CP#23
+ StoreFieldTOS CP#24
Push r3
- PushConstant CP#25
- StoreFieldTOS CP#26
+ PushConstant CP#26
+ StoreFieldTOS CP#27
Push r3
PushConstant CP#0
- StoreFieldTOS CP#28
+ StoreFieldTOS CP#29
Push r3
Push r0
StoreFieldTOS CP#1
@@ -1832,39 +1857,39 @@
[0] = ClosureFunction 0
[1] = InstanceField dart:core::_Closure::_context (field)
[2] = Reserved
- [3] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::int]
- [4] = ArgDesc num-args 1, num-type-args 0, names []
- [5] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#4
- [6] = ClosureFunction 1
- [7] = Null
- [8] = ArgDesc num-args 4, num-type-args 0, names []
- [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
- [10] = Type dynamic
- [11] = String 'fin'
- [12] = StaticICData target 'dart:core::print', arg-desc CP#4
- [13] = StaticICData target 'dart:core::print', arg-desc CP#4
- [14] = ArgDesc num-args 2, num-type-args 0, names []
- [15] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#14
- [16] = ArgDesc num-args 3, num-type-args 0, names []
- [17] = InterfaceCall target-name 'completeError', arg-desc CP#16
- [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] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#4
- [31] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#4
- [32] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#4
- [33] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
- [34] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#14
- [35] = InterfaceCall get target-name 'get:future', arg-desc CP#4
+ [3] = Class dart:async::_AsyncAwaitCompleter
+ [4] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+ [5] = ArgDesc num-args 1, num-type-args 0, names []
+ [6] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#5
+ [7] = ClosureFunction 1
+ [8] = Null
+ [9] = ArgDesc num-args 4, num-type-args 0, names []
+ [10] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#9
+ [11] = Type dynamic
+ [12] = String 'fin'
+ [13] = StaticICData target 'dart:core::print', arg-desc CP#5
+ [14] = StaticICData target 'dart:core::print', arg-desc CP#5
+ [15] = ArgDesc num-args 2, num-type-args 0, names []
+ [16] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#15
+ [17] = ArgDesc num-args 3, num-type-args 0, names []
+ [18] = InterfaceCall target-name 'completeError', arg-desc CP#17
+ [19] = Reserved
+ [20] = EndClosureFunctionScope
+ [21] = Class dart:core::_Closure
+ [22] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+ [23] = Reserved
+ [24] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+ [25] = Reserved
+ [26] = EmptyTypeArguments
+ [27] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+ [28] = Reserved
+ [29] = InstanceField dart:core::_Closure::_function (field)
+ [30] = Reserved
+ [31] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#5
+ [32] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#5
+ [33] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#5
+ [34] = ICData dynamic target-name 'start', arg-desc CP#15
+ [35] = InterfaceCall get target-name 'get:future', arg-desc CP#5
[36] = Reserved
[37] = EndClosureFunctionScope
}
@@ -1882,15 +1907,20 @@
StoreContextParent
PopLocal r0
Push r0
+ PushConstant CP#4
PushConstant CP#3
- PushConstant CP#5
- IndirectStaticCall 1, CP#4
+ AllocateT
+ StoreLocal r2
+ Push r2
+ PushConstant CP#6
+ IndirectStaticCall 1, CP#5
+ Drop1
StoreContextVar 1, 0
Push r0
PushNull
StoreContextVar 1, 1
PushNull
- PopLocal r2
+ PopLocal r3
Push r0
PushNull
StoreContextVar 1, 2
@@ -1910,46 +1940,46 @@
PushNull
StoreContextVar 1, 7
Push r0
- Allocate CP#20
- StoreLocal r3
- Push r3
+ Allocate CP#21
+ StoreLocal r2
+ Push r2
PushNull
- StoreFieldTOS CP#21
- Push r3
+ StoreFieldTOS CP#22
+ Push r2
PushNull
- StoreFieldTOS CP#23
- Push r3
- PushConstant CP#25
- StoreFieldTOS CP#26
- Push r3
- PushConstant CP#6
- StoreFieldTOS CP#28
- Push r3
+ StoreFieldTOS CP#24
+ Push r2
+ PushConstant CP#26
+ StoreFieldTOS CP#27
+ Push r2
+ PushConstant CP#7
+ StoreFieldTOS CP#29
+ Push r2
Push r0
StoreFieldTOS CP#1
StoreContextVar 1, 8
Push r0
LoadContextVar 1, 8
- PushConstant CP#30
- IndirectStaticCall 1, CP#4
- PopLocal r2
- Push r0
- Push r0
- LoadContextVar 1, 8
PushConstant CP#31
- IndirectStaticCall 1, CP#4
- StoreContextVar 1, 2
+ IndirectStaticCall 1, CP#5
+ PopLocal r3
Push r0
Push r0
LoadContextVar 1, 8
PushConstant CP#32
- IndirectStaticCall 1, CP#4
- StoreContextVar 1, 3
- PushConstant CP#33
+ IndirectStaticCall 1, CP#5
+ StoreContextVar 1, 2
+ Push r0
Push r0
LoadContextVar 1, 8
- PushConstant CP#34
- IndirectStaticCall 2, CP#14
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#5
+ StoreContextVar 1, 3
+ Push r0
+ LoadContextVar 1, 0
+ Push r0
+ LoadContextVar 1, 8
+ DynamicCall 2, CP#34
Drop1
Push r0
LoadContextVar 1, 0
@@ -1961,9 +1991,9 @@
Closure #lib::closure::Closure/0:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
ClosureBytecode {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#7
- LoadConstant r2, CP#7
- LoadConstant r3, CP#7
+ LoadConstant r1, CP#8
+ LoadConstant r2, CP#8
+ LoadConstant r3, CP#8
Frame 8
CheckStack 0
Push r0
@@ -2018,8 +2048,8 @@
Push r4
LoadContextParent
LoadContextVar 1, 8
- PushConstant CP#9
- IndirectStaticCall 4, CP#8
+ PushConstant CP#10
+ IndirectStaticCall 4, CP#9
PopLocal r11
PushNull
ReturnTOS
@@ -2055,9 +2085,9 @@
PopLocal r4
MoveSpecial exception, r8
MoveSpecial stackTrace, r9
- PushConstant CP#11
PushConstant CP#12
- IndirectStaticCall 1, CP#4
+ PushConstant CP#13
+ IndirectStaticCall 1, CP#5
Drop1
Push r8
Push r9
@@ -2069,9 +2099,9 @@
Push r4
LoadContextVar 1, 7
PopLocal r4
- PushConstant CP#11
- PushConstant CP#13
- IndirectStaticCall 1, CP#4
+ PushConstant CP#12
+ PushConstant CP#14
+ IndirectStaticCall 1, CP#5
Drop1
Push r4
LoadContextParent
@@ -2082,8 +2112,8 @@
LoadContextVar 1, 0
Push r4
LoadContextVar 1, 1
- PushConstant CP#15
- IndirectStaticCall 2, CP#14
+ PushConstant CP#16
+ IndirectStaticCall 2, CP#15
Drop1
PushNull
ReturnTOS
@@ -2106,7 +2136,7 @@
LoadContextVar 1, 0
Push r8
Push r9
- InterfaceCall 3, CP#17
+ InterfaceCall 3, CP#18
Drop1
Jump L5
L5:
@@ -2122,7 +2152,7 @@
]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>();
+ 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;
@@ -2156,7 +2186,7 @@
: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);
+ :async_completer.start(:async_op);
return :async_completer.{asy::Completer::future};
}
return nested;
@@ -2171,15 +2201,20 @@
Push FP[-5]
StoreContextVar 0, 0
Push r0
+ PushConstant CP#1
PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
+ AllocateT
+ StoreLocal r2
+ Push r2
+ PushConstant CP#3
+ IndirectStaticCall 1, CP#2
+ Drop1
StoreContextVar 0, 1
Push r0
PushNull
StoreContextVar 0, 2
PushNull
- PopLocal r2
+ PopLocal r3
Push r0
PushNull
StoreContextVar 0, 3
@@ -2196,46 +2231,46 @@
PushNull
StoreContextVar 0, 7
Push r0
- Allocate CP#19
- StoreLocal r3
- Push r3
+ Allocate CP#20
+ StoreLocal r2
+ Push r2
PushNull
- StoreFieldTOS CP#20
- Push r3
+ StoreFieldTOS CP#21
+ Push r2
PushNull
- StoreFieldTOS CP#22
- Push r3
- PushConstant CP#24
- StoreFieldTOS CP#25
- Push r3
- PushConstant CP#3
- StoreFieldTOS CP#27
- Push r3
+ 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#5
+ StoreFieldTOS CP#6
StoreContextVar 0, 8
Push r0
LoadContextVar 0, 8
- PushConstant CP#29
- IndirectStaticCall 1, CP#1
- PopLocal r2
- Push r0
- Push r0
- LoadContextVar 0, 8
PushConstant CP#30
- IndirectStaticCall 1, CP#1
- StoreContextVar 0, 3
+ IndirectStaticCall 1, CP#2
+ PopLocal r3
Push r0
Push r0
LoadContextVar 0, 8
PushConstant CP#31
- IndirectStaticCall 1, CP#1
- StoreContextVar 0, 4
- PushConstant CP#32
+ IndirectStaticCall 1, CP#2
+ StoreContextVar 0, 3
+ Push r0
Push r0
LoadContextVar 0, 8
- PushConstant CP#33
- IndirectStaticCall 2, CP#9
+ PushConstant CP#32
+ IndirectStaticCall 1, CP#2
+ StoreContextVar 0, 4
+ Push r0
+ LoadContextVar 0, 1
+ Push r0
+ LoadContextVar 0, 8
+ DynamicCall 2, CP#33
Drop1
Push r0
LoadContextVar 0, 1
@@ -2243,53 +2278,53 @@
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 (constructor)', arg-desc CP#1
- [3] = ClosureFunction 0
- [4] = Null
- [5] = InstanceField dart:core::_Closure::_context (field)
- [6] = Reserved
- [7] = ArgDesc num-args 4, num-type-args 0, names []
- [8] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
- [9] = ArgDesc num-args 2, num-type-args 0, names []
- [10] = InterfaceCall target-name '==', arg-desc CP#9
- [11] = Reserved
- [12] = ArgDesc num-args 3, num-type-args 0, names []
- [13] = StaticICData target 'dart:core::_AssertionError::_throwNew', arg-desc CP#12
- [14] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#9
- [15] = Type dynamic
- [16] = InterfaceCall target-name 'completeError', arg-desc CP#12
- [17] = Reserved
- [18] = EndClosureFunctionScope
- [19] = Class dart:core::_Closure
- [20] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
- [21] = Reserved
- [22] = InstanceField dart:core::_Closure::_function_type_arguments (field)
- [23] = Reserved
- [24] = EmptyTypeArguments
- [25] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
- [26] = Reserved
- [27] = InstanceField dart:core::_Closure::_function (field)
- [28] = Reserved
- [29] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
- [30] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
- [31] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
- [32] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
- [33] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#9
- [34] = InterfaceCall get target-name 'get:future', arg-desc CP#1
+ [0] = Class dart:async::_AsyncAwaitCompleter
+ [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+ [4] = ClosureFunction 0
+ [5] = Null
+ [6] = InstanceField dart:core::_Closure::_context (field)
+ [7] = Reserved
+ [8] = ArgDesc num-args 4, num-type-args 0, names []
+ [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+ [10] = ArgDesc num-args 2, num-type-args 0, names []
+ [11] = InterfaceCall target-name '==', arg-desc CP#10
+ [12] = Reserved
+ [13] = ArgDesc num-args 3, num-type-args 0, names []
+ [14] = StaticICData target 'dart:core::_AssertionError::_throwNew', arg-desc CP#13
+ [15] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#10
+ [16] = Type dynamic
+ [17] = InterfaceCall target-name 'completeError', arg-desc CP#13
+ [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] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+ [31] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+ [32] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+ [33] = ICData dynamic target-name 'start', arg-desc CP#10
+ [34] = InterfaceCall get target-name 'get:future', arg-desc CP#2
[35] = Reserved
}
Closure #lib::testAssert:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
ClosureBytecode {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#4
- LoadConstant r2, CP#4
- LoadConstant r3, CP#4
+ LoadConstant r1, CP#5
+ LoadConstant r2, CP#5
+ LoadConstant r3, CP#5
Frame 6
CheckStack 0
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 5
@@ -2315,8 +2350,8 @@
LoadContextVar 0, 4
Push r4
LoadContextVar 0, 8
- PushConstant CP#8
- IndirectStaticCall 4, CP#7
+ PushConstant CP#9
+ IndirectStaticCall 4, CP#8
PopLocal r8
PushNull
ReturnTOS
@@ -2330,14 +2365,14 @@
JumpIfNoAsserts L2
Push r1
PushInt 42
- InterfaceCall 2, CP#10
+ InterfaceCall 2, CP#11
AssertBoolean 0
JumpIfTrue L2
PushInt 0
PushInt 0
PushNull
- PushConstant CP#13
- IndirectStaticCall 3, CP#12
+ PushConstant CP#14
+ IndirectStaticCall 3, CP#13
Drop1
L2:
Push r4
@@ -2349,8 +2384,8 @@
LoadContextVar 0, 1
Push r4
LoadContextVar 0, 2
- PushConstant CP#14
- IndirectStaticCall 2, CP#9
+ PushConstant CP#15
+ IndirectStaticCall 2, CP#10
Drop1
PushNull
ReturnTOS
@@ -2358,7 +2393,7 @@
Try #0 handler:
SetFrame 10
Push r0
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
LoadContextVar 0, 7
@@ -2373,7 +2408,7 @@
LoadContextVar 0, 1
Push r8
Push r9
- InterfaceCall 3, CP#16
+ InterfaceCall 3, CP#17
Drop1
Jump L5
L5:
@@ -2387,7 +2422,7 @@
}
]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>();
+ 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;
@@ -2415,7 +2450,7 @@
: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);
+ :async_completer.start(:async_op);
return :async_completer.{asy::Completer::future};
}
[@vm.bytecode=