[−][src]Struct cranelift_reader::SourceMap
Mapping from entity names to source locations.
Methods
impl SourceMap
[src]
impl SourceMap
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]
impl SourceMap
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( | [src] |
Define an entity. This can be used for instructions whose numbers never appear in source, or implicitly defined signatures.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |