Skip to main content

Module body_mut

Module body_mut 

Source
Expand description

The exclusive mutation backing for a function pass (BodyMut).

BodyView gives the read layer a Copy static provider that routes arena reads to the pass’s own function. BodyMut is its mutable sibling: a single function’s arenas borrowed &mut in place from Context.bodies[id] for exclusive mutation by one worker (the driver’s Context::split hands out disjoint body borrows).

All shared data (types, varnodes, spaces, registers, name map) stays behind the &Shared view, reachable read-only. The inherent verb + read methods below route each write to the borrowed function’s arena; a function pass must not mutate another function (asserted). The module-scope twin of every verb is an inherent method on Context; the shorter-lived reborrow needed to hand the host to a value that owns it by value (a Builder or a mutation BaseRef) is BodyMut::reborrow.

Structs§

BodyMut
A single function borrowed &mut in place from Context.bodies[id] for exclusive mutation (its interface stays in Context.interfaces[id], reachable read-only through interfaces).