mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:29:48 +00:00
ff34fd8110
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. * Field is not removed if it has a non-trivial initializer as it may have side-effects. * 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). Fixes https://github.com/dart-lang/sdk/issues/35310 Change-Id: I79c00158b8eb658081a647c5dbdecde481fddb41 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134204 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> |
||
---|---|---|
.. | ||
.dart_tool | ||
angular | ||
co19 | ||
co19_2 | ||
compiler | ||
corelib | ||
corelib_2 | ||
dart | ||
ffi | ||
ffi_2 | ||
kernel | ||
language | ||
language_2 | ||
lib | ||
lib_2 | ||
modular | ||
search | ||
standalone | ||
standalone_2 | ||
legacy_status_dart2js.csv | ||
light_unittest.dart | ||
README.md |
This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.