Skip to content

Commit

Permalink
Reland "[vm/aot] Enable tree-shaking of write-only fields by default"
Browse files Browse the repository at this point in the history
This is a reland of 9c50efc

There are no changes to the original CL.
Fixes for bugs revealed by this change are in separate CLs:

 * Crash in disassembler
   https://dart-review.googlesource.com/c/sdk/+/148942

 * Crash in --print_instructions_sizes_to
   https://dart-review.googlesource.com/c/sdk/+/149043

Original change's description:
> [vm/aot] Enable tree-shaking of write-only fields by default
>
> Tree-shaking of write only fields is implemented in
> https://dart-review.googlesource.com/c/sdk/+/143286
> This change just enables it by default.
>
> Flutter gallery in release mode
> armv7 app.so size -0.41% (gzip -0.24%, brotli -0.20%)
> armv8 app.so size -0.38% (gzip -0.23%, brotli -0.29%)
>
> Issue: #35310
>
> Change-Id: Iaae3e893b4a6bf4d468d6cd05aba5f8ee8810afc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148543
> Reviewed-by: Ryan Macnak <[email protected]>
> Commit-Queue: Alexander Markov <[email protected]>

Change-Id: I609db3fec8b0798f55aa2067127dfdc90a21ead4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149044
Reviewed-by: Vyacheslav Egorov <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
Commit-Queue: Alexander Markov <[email protected]>
  • Loading branch information
alexmarkov authored and [email protected] committed May 27, 2020
1 parent cbc6de6 commit dae51f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/frontend_server/lib/frontend_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ArgParser argParser = ArgParser(allowTrailingOptions: true)
defaultsTo: false)
..addFlag('tree-shake-write-only-fields',
help: 'Enable tree shaking of fields which are only written in AOT mode.',
defaultsTo: false)
defaultsTo: true)
..addFlag('protobuf-tree-shaker',
help: 'Enable protobuf tree shaker transformation in AOT mode.',
defaultsTo: false)
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/lib/kernel_front_end.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void declareCompilerOptions(ArgParser args) {
defaultsTo: true);
args.addFlag('tree-shake-write-only-fields',
help: 'Enable tree shaking of fields which are only written in AOT mode.',
defaultsTo: false);
defaultsTo: true);
args.addFlag('protobuf-tree-shaker',
help: 'Enable protobuf tree shaker transformation in AOT mode.',
defaultsTo: false);
Expand Down

0 comments on commit dae51f0

Please sign in to comment.