For incremental barriers we check if compartment()->needsBarrier to defer the cost when we are not in a GC cycle. We cannot do this for cross-generation barriers. We need to remove the checks on the post barriers and rename the enum to something more specific.
Created attachment 582152 [details] [diff] [review]
v1: more post barriers on base
The changes to flatten are straightforward. I do not think we need pre barriers on init, but do let me know if I am mistaken here.