Files
sdk/runtime/vm
Alexander Markov 6c9a830fda [vm/compiler] Ensure that write barriers are not eliminated across LoadField which can call initializer directly
Write barriers should not be eliminated for a StoreInstanceField
if there is a Dart call between store and object allocation.
This is implemented using Instruction::CanCallDart()
predicate, which is overridden for TemplateDartCall.

However, LoadField instructions for late fields with initializers can
also call initializer function directly without entering runtime.

This change introduces LoadFieldInstr::CanCallDart() to avoid
incorrect write barrier elimination across such LoadField instructions.

TEST=vm/cc/IRTest_WriteBarrierElimination_LoadLateField

Bug: b/204355807
Change-Id: Ibd9fe61e9723f1f4ecc9e4f5cedc3024d9d03c75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218583
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-10-29 16:48:13 +00:00
..
2019-10-07 18:13:06 +00:00
2021-07-13 01:55:45 +00:00
2021-07-13 01:55:45 +00:00
2021-10-18 10:44:11 +00:00
2020-06-26 09:39:15 +00:00
2019-10-27 18:18:29 +00:00
2021-10-20 09:29:01 +00:00
2021-10-20 09:29:01 +00:00
2021-07-09 13:48:25 +00:00
2021-10-14 00:10:12 +00:00
2021-10-14 00:10:12 +00:00
2020-05-04 21:15:27 +00:00
2021-07-13 01:55:45 +00:00
2021-06-17 16:05:02 +00:00
2021-10-18 10:44:11 +00:00
2021-06-14 20:45:18 +00:00
2021-06-14 20:45:18 +00:00
2021-06-14 20:45:18 +00:00
2021-06-14 20:45:18 +00:00
2020-05-04 21:15:27 +00:00
2020-08-06 19:55:12 +00:00
2021-10-14 00:10:12 +00:00
2021-10-14 00:10:12 +00:00
2021-10-14 00:10:12 +00:00