B3 ref model

Remi Forax forax at univ-mlv.fr
Mon Apr 25 21:08:51 UTC 2022


Ok, maybe i've not understood correctly how B3 model works,
for me being a B3 is a runtime property, not a type property.

By example, if there is an Object but the VM knows the only possible type is a B3 and the value is not null then the VM is free to emit several stores, because it's a B3, so tearing can occur.

Said differently, B3 allows tearing, so B3.val and B3.ref allow tearing.

If i do not want tearing, then B3 has to be stored in a field volatile or i have to declare the class as a B2.

Did i get it right ?

Rémi


More information about the valhalla-spec-experts mailing list