Right now, regalloc2 uses an entity-component-system sort of pattern with toplevel Vecs of LiveBundle, VRegData, and the like, and newtype'd index wrappers like LiveBundleIndex, VRegIndex, etc. We have a whole bunch of instances of self.bundles[bundle.index()]....
Ideally we would make bundles a Vec-wrapper type that has an Index implementation that natively takes LiveBundleIndex, and then we could make all of these sites slightly less verbose.
Right now, regalloc2 uses an entity-component-system sort of pattern with toplevel
Vecs ofLiveBundle,VRegData, and the like, and newtype'd index wrappers likeLiveBundleIndex,VRegIndex, etc. We have a whole bunch of instances ofself.bundles[bundle.index()]....Ideally we would make
bundlesaVec-wrapper type that has anIndeximplementation that natively takesLiveBundleIndex, and then we could make all of these sites slightly less verbose.