You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
body += StoreIndexedTypedData(typed_data_cid, /*index_scale=*/1,
/*index_unboxed=*/true, alignment);
Currently, we:
force optimize them
prevent them from being inlined (by being force optimized)
Preventing inlining gives us enough confidence that code motion doesn't move any GCing instructions in between currently.
If we start inlining these, we need to take special care that code motion doesn't move an instruction that can trigger GC in between those instructions:
Edit: For the two existing cases running GC is fine, they happen to be idempotent, for the new case it is not. Having this NoGC-scope clarifies the difference.
The text was updated successfully, but these errors were encountered:
dcharkes
added
the
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
label
Mar 8, 2022
We have at least two places (soon to be three) where we rely in IL that the GC doesn't run between certain IL instructions.
sdk/runtime/vm/compiler/frontend/kernel_to_il.cc
Lines 1303 to 1308 in 7d115ed
sdk/runtime/vm/compiler/frontend/kernel_to_il.cc
Lines 1416 to 1436 in 7d115ed
Currently, we:
Preventing inlining gives us enough confidence that code motion doesn't move any GCing instructions in between currently.
If we start inlining these, we need to take special care that code motion doesn't move an instruction that can trigger GC in between those instructions:
We should consider adding a
NoGC
-scope construct that:kNoGC
are added to that scopekNoGC
instructions out of that scope and prevents code motion of any non-kNoGC
into that scope.cc @mkustermann @mraleph (I don't believe we had a tracking issue yet.)
Edit: For the two existing cases running GC is fine, they happen to be idempotent, for the new case it is not. Having this
NoGC
-scope clarifies the difference.The text was updated successfully, but these errors were encountered: