Skip to main content

PcodeLoweringContext

Trait PcodeLoweringContext 

Source
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§

Source

fn default_space(&self) -> SpaceId

The specification’s default address space.

Source

fn unique_space(&self) -> SpaceId

The unique address space used for deterministic temporary varnodes.

Source

fn register_varnode(&self, id: RegisterId) -> Option<Varnode>

Returns the storage varnode for a register identifier.

Source

fn bitrange_info(&self, id: BitRangeFieldId) -> Option<BitRangeInfo>

Returns metadata for a named register bit range.

Source

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".

Implementors§