Initialize a `Arc ` (as created by `RecGroupEntry::new_inner`) and wrap it into a `RecGroupEntry`.
(
mut inner: Arc<RecGroupEntryInner>,
key: WasmRecGroup,
shared_types: Box<[VMSharedTypeIndex]>,
)
| 557 | /// Initialize a `Arc<RecGroupEntryInner>` (as created by |
| 558 | /// `RecGroupEntry::new_inner`) and wrap it into a `RecGroupEntry`. |
| 559 | fn init( |
| 560 | mut inner: Arc<RecGroupEntryInner>, |
| 561 | key: WasmRecGroup, |
| 562 | shared_types: Box<[VMSharedTypeIndex]>, |
| 563 | ) -> Self { |
| 564 | debug_assert!(key.is_canonicalized_for_hash_consing()); |
| 565 | |
| 566 | let RecGroupEntryInner { |
| 567 | hash_consing_key, |
| 568 | shared_type_indices, |
| 569 | registrations: _, |
| 570 | unregistered: _, |
| 571 | } = Arc::get_mut(&mut inner).expect("must have the only handle to this inner entry"); |
| 572 | |
| 573 | debug_assert!(shared_type_indices.is_empty()); |
| 574 | *shared_type_indices = shared_types; |
| 575 | |
| 576 | debug_assert!(hash_consing_key.types.is_empty()); |
| 577 | *hash_consing_key = key; |
| 578 | |
| 579 | RecGroupEntry(inner) |
| 580 | } |
| 581 | |
| 582 | /// Increment the registration count. |
| 583 | fn incref(&self, why: &str) { |