[−][src]Struct cranelift_reader::SourceMap
Mapping from entity names to source locations.
Implementations
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_block(&self, block: Block) -> bool
[src]
Look up a block 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 contains_constant(&self, c: Constant) -> bool
[src]
Look up a constant 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_block(&mut self, entity: Block, loc: Location) -> ParseResult<()>
[src]
Define the block 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_constant(
&mut self,
entity: Constant,
loc: Location
) -> ParseResult<()>
[src]
&mut self,
entity: Constant,
loc: Location
) -> ParseResult<()>
Define the jump table entity
.
pub fn def_entity(
&mut self,
entity: AnyEntity,
loc: Location
) -> ParseResult<()>
[src]
&mut self,
entity: AnyEntity,
loc: Location
) -> ParseResult<()>
Define an entity. This can be used for instructions whose numbers never appear in source, or implicitly defined signatures.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SourceMap
[src]
impl Send for SourceMap
[src]
impl Sync for SourceMap
[src]
impl Unpin for SourceMap
[src]
impl UnwindSafe for SourceMap
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,