[][src]Struct cranelift_reader::SourceMap

pub struct SourceMap { /* fields omitted */ }

Mapping from entity names to source locations.

Methods

impl SourceMap[src]

Read-only interface which is exposed outside the parser crate.

pub fn contains_value(&self, v: Value) -> bool[src]

Look up a value entity.

pub fn contains_ebb(&self, ebb: Ebb) -> bool[src]

Look up a EBB entity.

pub fn contains_ss(&self, ss: StackSlot) -> bool[src]

Look up a stack slot entity.

pub fn contains_gv(&self, gv: GlobalValue) -> bool[src]

Look up a global value entity.

pub fn contains_heap(&self, heap: Heap) -> bool[src]

Look up a heap entity.

pub fn contains_table(&self, table: Table) -> bool[src]

Look up a table entity.

pub fn contains_sig(&self, sig: SigRef) -> bool[src]

Look up a signature entity.

pub fn contains_fn(&self, fn_: FuncRef) -> bool[src]

Look up a function entity.

pub fn contains_jt(&self, jt: JumpTable) -> bool[src]

Look up a jump table entity.

pub fn lookup_str(&self, name: &str) -> Option<AnyEntity>[src]

Look up an entity by source name. Returns the entity reference corresponding to name, if it exists.

pub fn location(&self, entity: AnyEntity) -> Option<Location>[src]

Get the source location where an entity was defined.

impl SourceMap[src]

pub fn new() -> Self[src]

Create a new empty SourceMap.

pub fn def_value(&mut self, entity: Value, loc: Location) -> ParseResult<()>[src]

Define the value entity.

pub fn def_ebb(&mut self, entity: Ebb, loc: Location) -> ParseResult<()>[src]

Define the ebb entity.

pub fn def_ss(&mut self, entity: StackSlot, loc: Location) -> ParseResult<()>[src]

Define the stack slot entity.

pub fn def_gv(&mut self, entity: GlobalValue, loc: Location) -> ParseResult<()>[src]

Define the global value entity.

pub fn def_heap(&mut self, entity: Heap, loc: Location) -> ParseResult<()>[src]

Define the heap entity.

pub fn def_table(&mut self, entity: Table, loc: Location) -> ParseResult<()>[src]

Define the table entity.

pub fn def_sig(&mut self, entity: SigRef, loc: Location) -> ParseResult<()>[src]

Define the signature entity.

pub fn def_fn(&mut self, entity: FuncRef, loc: Location) -> ParseResult<()>[src]

Define the external function entity.

pub fn def_jt(&mut self, entity: JumpTable, loc: Location) -> ParseResult<()>[src]

Define the jump table entity.

pub fn def_entity(
    &mut self,
    entity: AnyEntity,
    loc: Location
) -> ParseResult<()>
[src]

Define an entity. This can be used for instructions whose numbers never appear in source, or implicitly defined signatures.

Trait Implementations

impl Debug for SourceMap[src]

impl Default for SourceMap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.