bytecodealliance / bytecodealliance/regalloc2

Replace manual use of index newtypes `bundles[bundle.index()]` with `Index` impls and typed `Vec` wrappers

Aperta
#62 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
265
Fork
53
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Right now, regalloc2 uses an entity-component-system sort of pattern with toplevel `Vec`s 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.