Skip to content

Commit 9a7c37a

Browse files
committed
Implement our OOM-handling SecondaryMap from scratch
I realized we need to adjust its `V: Clone` bound into `V: TryClone` which means that we can no longer actually just wrap an inner `cranelift_entity::SecondaryMap<K, V>` and need to instead implement our own. This also made me realize that we need `remove` to be fallible because, when the entry being removed is in bounds, it overwrites the entry with the default value, but that default value needs to be `TryClone`d now which is, of course, a fallible operation.
1 parent 308e2ba commit 9a7c37a

3 files changed

Lines changed: 530 additions & 70 deletions

File tree

0 commit comments

Comments
 (0)