dart-sdk/runtime
Alexander Markov 12c8b02c84 Reland "[vm/aot/tfa] Tree shake write-only fields"
This relands commit ff34fd8110,
but puts tree shaking of write-only fields under the flag which is
disabled by default.

So far tree shaking was removing fields which are not used at all.
This change improves tree shaking of fields so fields
which are only written or used as interface targets can be removed.

The following limitations apply:

* Field is not removed if there is a constant object with that field, as
  it may impact identity of constant objects which is an observable
  behavior.
* Instance field is not removed if it has a non-trivial initializer as
  it may have side-effects when executed by constructors.
* Late final fields are not removed, as writing such fields may have
  side-effect.
* When field is removed, we may need to introduce an abstract getter
  or abstract setter if field is used as a target of an interface call.
  If a field was written, then setter would be non-abstract (but empty).

Issue https://github.com/dart-lang/sdk/issues/35310

Change-Id: Iec75b8301892664f4f955a01e5960b17e6620531
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143286
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-04-16 18:24:05 +00:00
..
bin Reland "[ VM / DartDev ] Fixed issue where trying to find the directory of the Dart executable would fail if we encountered a relative symlink while trying to determine the absolute path." 2020-04-13 21:11:52 +00:00
docs Reland "[vm, gc] Parallel scavenge." 2020-04-10 19:27:04 +00:00
include [VM/NNBD] - Make the null safety flag be isolate specific. 2020-03-20 02:09:29 +00:00
lib Revert "Reland "[vm/isolates] Introduce fast isolate spawn in AOT."" 2020-04-14 20:37:29 +00:00
llvm_codegen [BUILD] - Format gn files, this is being done to ensure the unfork CL 2020-03-10 21:56:11 +00:00
observatory Reland "[vm/aot/tfa] Tree shake write-only fields" 2020-04-16 18:24:05 +00:00
platform Fix undefined behavior in UnboxedFieldBitmap 2020-04-14 14:58:29 +00:00
tests/vm [vm/aot] Drop more Function objects not needed at runtime when possible. 2020-04-16 14:26:04 +00:00
third_party
tools [ dartfuzz ] Regenerate type table now that TypeError does not implement AssertionError 2020-02-24 21:49:08 +00:00
vm [vm/aot] Drop more Function objects not needed at runtime when possible. 2020-04-16 14:26:04 +00:00
.clang-tidy
.gitignore
BUILD.gn [BUILD] - Format gn files, this is being done to ensure the unfork CL 2020-03-10 21:56:11 +00:00
codereview.settings
configs.gni
CPPLINT.cfg
PRESUBMIT.py [Presubmit] Fixes presubmit for breaking API change. 2020-03-03 13:30:20 +00:00
runtime_args.gni