mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[vm] Enable new implementation of async/await in AOT mode
The new implementation results in a much smaller overhead of async/await on AOT snapshot size. The savings depend on how often async/await is used. On a large Flutter app (customer: money) AOT snapshot size -13.7% (arm64), -12.86% (arm) Another large Flutter app AOT snapshot size -8.69% (arm64). Part 1 (kernel): https://dart-review.googlesource.com/c/sdk/+/241842 Part 2 (vm): https://dart-review.googlesource.com/c/sdk/+/242000 TEST=ci Issue: https://github.com/dart-lang/sdk/issues/48378 Change-Id: Idf99bb98725a1ffb21a15b111f03f5461ed2c9d9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242384 Reviewed-by: Siva Annamalai <asiva@google.com> Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
bf4bb95308
commit
c4c9dc5994
|
@ -540,7 +540,7 @@ class FrontendCompiler implements CompilerInterface {
|
|||
nullSafety: compilerOptions.nnbdMode == NnbdMode.Strong,
|
||||
supportMirrors: options['support-mirrors'] ??
|
||||
!(options['aot'] || options['minimal-kernel']),
|
||||
compactAsync: options['compact-async'] ?? false /*options['aot']*/,
|
||||
compactAsync: options['compact-async'] ?? options['aot'],
|
||||
);
|
||||
if (compilerOptions.target == null) {
|
||||
print('Failed to create front-end target ${options['target']}.');
|
||||
|
|
|
@ -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'] ?? false /*aot*/;
|
||||
final bool compactAsync = options['compact-async'] ?? aot;
|
||||
|
||||
final bool minimalKernel = options['minimal-kernel'];
|
||||
final bool treeShakeWriteOnlyFields = options['tree-shake-write-only-fields'];
|
||||
|
|
Loading…
Reference in a new issue