Skip to content

Commit 3e0abdb

Browse files
alexmarkovCommit Bot
authored and
Commit Bot
committed
Reland "[vm] Enable new implementation of async/async* in JIT mode"
TEST=ci Issue: #48378 Change-Id: I5b8720b8ef5b8d28773d26c7e94c2e78d876c9d2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247603 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Alexander Markov <[email protected]> Reviewed-by: Slava Egorov <[email protected]>
1 parent e505ab1 commit 3e0abdb

File tree

50 files changed

+338
-930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+338
-930
lines changed

pkg/frontend_server/lib/frontend_server.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ ArgParser argParser = ArgParser(allowTrailingOptions: true)
5858
'supported when --aot and --minimal-kernel are not used.',
5959
defaultsTo: null)
6060
..addFlag('compact-async',
61-
help: 'Enable new compact async/await implementation.', defaultsTo: null)
61+
help: 'Enable new compact async/await implementation.', defaultsTo: true)
6262
..addFlag('tfa',
6363
help:
6464
'Enable global type flow analysis and related transformations in AOT mode.',
@@ -541,7 +541,7 @@ class FrontendCompiler implements CompilerInterface {
541541
nullSafety: compilerOptions.nnbdMode == NnbdMode.Strong,
542542
supportMirrors: options['support-mirrors'] ??
543543
!(options['aot'] || options['minimal-kernel']),
544-
compactAsync: options['compact-async'] ?? options['aot'],
544+
compactAsync: options['compact-async'],
545545
);
546546
if (compilerOptions.target == null) {
547547
print('Failed to create front-end target ${options['target']}.');

pkg/kernel/lib/target/targets.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TargetFlags {
2222
{this.trackWidgetCreation = false,
2323
this.enableNullSafety = false,
2424
this.supportMirrors = true,
25-
this.compactAsync = false});
25+
this.compactAsync = true});
2626

2727
@override
2828
bool operator ==(other) {
@@ -786,8 +786,7 @@ class TestTargetFlags extends TargetFlags {
786786
this.unsupportedDartLibraries: const {}})
787787
: super(
788788
trackWidgetCreation: trackWidgetCreation,
789-
enableNullSafety: enableNullSafety,
790-
compactAsync: true);
789+
enableNullSafety: enableNullSafety);
791790
}
792791

793792
mixin TestTargetMixin on Target {

pkg/vm/lib/kernel_front_end.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void declareCompilerOptions(ArgParser args) {
8181
'supported when --aot and --minimal-kernel are not used.',
8282
defaultsTo: null);
8383
args.addFlag('compact-async',
84-
help: 'Enable new compact async/await implementation.', defaultsTo: null);
84+
help: 'Enable new compact async/await implementation.', defaultsTo: true);
8585
args.addOption('depfile', help: 'Path to output Ninja depfile');
8686
args.addOption('from-dill',
8787
help: 'Read existing dill file instead of compiling from sources',
@@ -202,7 +202,7 @@ Future<int> runCompiler(ArgResults options, String usage) async {
202202
final String? manifestFilename = options['manifest'];
203203
final String? dataDir = options['component-name'] ?? options['data-dir'];
204204
final bool? supportMirrors = options['support-mirrors'];
205-
final bool compactAsync = options['compact-async'] ?? aot;
205+
final bool compactAsync = options['compact-async'];
206206

207207
final bool minimalKernel = options['minimal-kernel'];
208208
final bool treeShakeWriteOnlyFields = options['tree-shake-write-only-fields'];
@@ -617,7 +617,7 @@ Target? createFrontEndTarget(String targetName,
617617
{bool trackWidgetCreation = false,
618618
bool nullSafety = false,
619619
bool supportMirrors = true,
620-
bool compactAsync = false}) {
620+
bool compactAsync = true}) {
621621
// Make sure VM-specific targets are available.
622622
installAdditionalTargets();
623623

0 commit comments

Comments
 (0)