pub trait PcodeLoweringContext {
// Required methods
fn default_space(&self) -> SpaceId;
fn unique_space(&self) -> SpaceId;
fn register_varnode(&self, id: RegisterId) -> Option<Varnode>;
fn bitrange_info(&self, id: BitRangeFieldId) -> Option<BitRangeInfo>;
fn address_size(&self, space: SpaceId) -> Option<usize>;
}Expand description
Producer-specific information required to lower a source-shaped AST.
wazabin-pcode owns the lowering algorithm and calls this trait for
specification data. A SLEIGH compiler can implement it using its compiled
specification without making this crate depend on that compiler.
Required Methods§
Sourcefn default_space(&self) -> SpaceId
fn default_space(&self) -> SpaceId
The specification’s default address space.
Sourcefn unique_space(&self) -> SpaceId
fn unique_space(&self) -> SpaceId
The unique address space used for deterministic temporary varnodes.
Sourcefn register_varnode(&self, id: RegisterId) -> Option<Varnode>
fn register_varnode(&self, id: RegisterId) -> Option<Varnode>
Returns the storage varnode for a register identifier.
Sourcefn bitrange_info(&self, id: BitRangeFieldId) -> Option<BitRangeInfo>
fn bitrange_info(&self, id: BitRangeFieldId) -> Option<BitRangeInfo>
Returns metadata for a named register bit range.
Sourcefn address_size(&self, space: SpaceId) -> Option<usize>
fn address_size(&self, space: SpaceId) -> Option<usize>
Returns the byte width of offsets in space.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".