bytecodealliance / bytecodealliance/regalloc2
Replace manual use of index newtypes `bundles[bundle.index()]` with `Index` impls and typed `Vec` wrappers
Đang mở
- Ngôn ngữ chính
- Rust
- Star
- 265
- Fork
- 53
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.