Skip to main content

Module base_ref

Module base_ref 

Source

Structs§

BaseRef
A generic wrapper struct for referencing an ID with a context. This is the basis for all *Ref and *MutRef.

Traits§

AsShared
Narrows a module handle to its Shared IR state, so the shared-leaf wrapper-ref constructors (Varnode::from_id, Space::from_id, LiteralRef/BytesRef) accept either a whole &Context (module scope) or a bare &Shared (pass scope, via QCodeView::shared() / BodyMut::shr()) with no call-site churn (context-split stage 5b-ii item #1). The leaf refs themselves store only a &Shared.
WithCtx
WithCtxMut
WithShared
The shared-leaf twin of WithCtx: a ref that can yield the module’s Shared IR state (interners, spaces, registers, name map) for its read methods. Implemented by the shared-leaf wrapper refs (literal, bytes, varnode) — which now carry only a &Shared — and by their &mut Context mutation twins (which narrow through self.ctx.shared). This replaces the leaf refs’ old WithCtx dependency: a shared-leaf value never needs the whole &Context, only its shared part (context-split stage 5b-ii item #1).