mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:45:06 +00:00
7cfbfc6a25
This CL replaces `late Finalizable` variables with the original and a nullable non-late variable. Every assignment is done first to the late variable, and the immediately to the nullable non-late shadow variable. The reachability fences are then inserted only for the nullable non-late shadow variable. The advantage of this is that the semantics are fully valid and none of the further compiler pipeline has to know about late Finalizables. (1) We remove the special casing in the VM. (2) The TFA logic with finalizables is no longer blocked. The downside of this approach is that we use more memory, we need two fields at runtime, one storing a null and the other storing a sentinel on initiazation. Moreover, we get some extra store instructions. TEST=pkg/vm/testcases/transformations/ffi/finalizable_late.dart TEST=pkg/vm/testcases/transformations/ffi/finalizable_late_2.dart TEST=tests/language/vm/regress_49005_test.dart Closes: https://github.com/dart-lang/sdk/issues/51511 Change-Id: Ifedd3387a368233a2d01e1bcaa9f5e3eceb76856 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286782 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> |
||
---|---|---|
.. | ||
bin | ||
docs | ||
include | ||
lib | ||
observatory | ||
observatory_2 | ||
platform | ||
tests | ||
third_party | ||
tools | ||
vm | ||
.clang-tidy | ||
.gitignore | ||
BUILD.gn | ||
codereview.settings | ||
configs.gni | ||
CPPLINT.cfg | ||
OWNERS | ||
PRESUBMIT.py | ||
runtime_args.gni |