Skip to content

Commit

Permalink
Revert "[vm] Enable new implementation of async/async* in JIT mode"
Browse files Browse the repository at this point in the history
This reverts commit b3544c4.

Reason for revert: avoid incompatibility between Dart->kernel compiler
and Dart VM during Dart and Flutter rolls (b/234850964).

TEST=ci

Original change's description:
> [vm] Enable new implementation of async/async* in JIT mode
>
> TEST=ci
>
> Issue: #48378
> Change-Id: I0fc069508cb1ce5648deb6604171dfdcd5bcb5c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246082
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

TBR=vegorov@google.com,kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,johnniwinther@google.com

Change-Id: I6157623857dbfa9bb07eb1f620d100f5b24314d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: #48378
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247243
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
  • Loading branch information
alexmarkov authored and Commit Bot committed Jun 7, 2022
1 parent eb12216 commit 3e10d8c
Show file tree
Hide file tree
Showing 48 changed files with 926 additions and 334 deletions.
4 changes: 2 additions & 2 deletions pkg/frontend_server/lib/frontend_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ArgParser argParser = ArgParser(allowTrailingOptions: true)
'supported when --aot and --minimal-kernel are not used.',
defaultsTo: null)
..addFlag('compact-async',
help: 'Enable new compact async/await implementation.', defaultsTo: true)
help: 'Enable new compact async/await implementation.', defaultsTo: null)
..addFlag('tfa',
help:
'Enable global type flow analysis and related transformations in AOT mode.',
Expand Down Expand Up @@ -541,7 +541,7 @@ class FrontendCompiler implements CompilerInterface {
nullSafety: compilerOptions.nnbdMode == NnbdMode.Strong,
supportMirrors: options['support-mirrors'] ??
!(options['aot'] || options['minimal-kernel']),
compactAsync: options['compact-async'],
compactAsync: options['compact-async'] ?? options['aot'],
);
if (compilerOptions.target == null) {
print('Failed to create front-end target ${options['target']}.');
Expand Down
5 changes: 3 additions & 2 deletions pkg/kernel/lib/target/targets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TargetFlags {
{this.trackWidgetCreation = false,
this.enableNullSafety = false,
this.supportMirrors = true,
this.compactAsync = true});
this.compactAsync = false});

@override
bool operator ==(other) {
Expand Down Expand Up @@ -786,7 +786,8 @@ class TestTargetFlags extends TargetFlags {
this.unsupportedDartLibraries: const {}})
: super(
trackWidgetCreation: trackWidgetCreation,
enableNullSafety: enableNullSafety);
enableNullSafety: enableNullSafety,
compactAsync: true);
}

mixin TestTargetMixin on Target {
Expand Down
6 changes: 3 additions & 3 deletions pkg/vm/lib/kernel_front_end.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void declareCompilerOptions(ArgParser args) {
'supported when --aot and --minimal-kernel are not used.',
defaultsTo: null);
args.addFlag('compact-async',
help: 'Enable new compact async/await implementation.', defaultsTo: true);
help: 'Enable new compact async/await implementation.', defaultsTo: null);
args.addOption('depfile', help: 'Path to output Ninja depfile');
args.addOption('from-dill',
help: 'Read existing dill file instead of compiling from sources',
Expand Down Expand Up @@ -202,7 +202,7 @@ Future<int> runCompiler(ArgResults options, String usage) async {
final String? manifestFilename = options['manifest'];
final String? dataDir = options['component-name'] ?? options['data-dir'];
final bool? supportMirrors = options['support-mirrors'];
final bool compactAsync = options['compact-async'];
final bool compactAsync = options['compact-async'] ?? aot;

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

Expand Down
Loading

0 comments on commit 3e10d8c

Please sign in to comment.