mmtk-core
mmtk-core copied to clipboard
BarrierSelector #[repr(u8)]
https://github.com/mmtk/mmtk-core/blob/master/src/plan/barriers.rs#L22
Should BarrierSelector
be decorated with #[repr(u8)]
to safely convert to unique u8
values?
Yes. We should. If we have more than 256 variants in the enum, the casting to u8
will wrap around.