Struct cretonne_reader::SourceMap [−][src]
pub struct SourceMap { /* fields omitted */ }
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]
pub fn contains_value(&self, v: Value) -> bool
Look up a value entity.
pub fn contains_ebb(&self, ebb: Ebb) -> bool
[src]
pub fn contains_ebb(&self, ebb: Ebb) -> bool
Look up a EBB entity.
pub fn contains_ss(&self, ss: StackSlot) -> bool
[src]
pub fn contains_ss(&self, ss: StackSlot) -> bool
Look up a stack slot entity.
pub fn contains_gv(&self, gv: GlobalValue) -> bool
[src]
pub fn contains_gv(&self, gv: GlobalValue) -> bool
Look up a global value entity.
pub fn contains_heap(&self, heap: Heap) -> bool
[src]
pub fn contains_heap(&self, heap: Heap) -> bool
Look up a heap entity.
pub fn contains_sig(&self, sig: SigRef) -> bool
[src]
pub fn contains_sig(&self, sig: SigRef) -> bool
Look up a signature entity.
pub fn contains_fn(&self, fn_: FuncRef) -> bool
[src]
pub fn contains_fn(&self, fn_: FuncRef) -> bool
Look up a function entity.
pub fn contains_jt(&self, jt: JumpTable) -> bool
[src]
pub fn contains_jt(&self, jt: JumpTable) -> bool
Look up a jump table entity.
pub fn lookup_str(&self, name: &str) -> Option<AnyEntity>
[src]
pub fn lookup_str(&self, name: &str) -> Option<AnyEntity>
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]
pub fn location(&self, entity: AnyEntity) -> Option<Location>
Get the source location where an entity was defined.
impl SourceMap
[src]
impl SourceMap
pub fn new() -> Self
[src]
pub fn new() -> Self
Create a new empty SourceMap
.
pub fn def_value(&mut self, entity: Value, loc: Location) -> ParseResult<()>
[src]
pub fn def_value(&mut self, entity: Value, loc: Location) -> ParseResult<()>
Define the value entity
.
pub fn def_ebb(&mut self, entity: Ebb, loc: Location) -> ParseResult<()>
[src]
pub fn def_ebb(&mut self, entity: Ebb, loc: Location) -> ParseResult<()>
Define the ebb entity
.
pub fn def_ss(&mut self, entity: StackSlot, loc: Location) -> ParseResult<()>
[src]
pub fn def_ss(&mut self, entity: StackSlot, loc: Location) -> ParseResult<()>
Define the stack slot entity
.
pub fn def_gv(&mut self, entity: GlobalValue, loc: Location) -> ParseResult<()>
[src]
pub fn def_gv(&mut self, entity: GlobalValue, loc: Location) -> ParseResult<()>
Define the global value entity
.
pub fn def_heap(&mut self, entity: Heap, loc: Location) -> ParseResult<()>
[src]
pub fn def_heap(&mut self, entity: Heap, loc: Location) -> ParseResult<()>
Define the heap entity
.
pub fn def_sig(&mut self, entity: SigRef, loc: Location) -> ParseResult<()>
[src]
pub fn def_sig(&mut self, entity: SigRef, loc: Location) -> ParseResult<()>
Define the signature entity
.
pub fn def_fn(&mut self, entity: FuncRef, loc: Location) -> ParseResult<()>
[src]
pub fn def_fn(&mut self, entity: FuncRef, loc: Location) -> ParseResult<()>
Define the external function entity
.
pub fn def_jt(&mut self, entity: JumpTable, loc: Location) -> ParseResult<()>
[src]
pub fn def_jt(&mut self, entity: JumpTable, loc: Location) -> ParseResult<()>
Define the jump table entity
.
pub fn def_entity(
&mut self,
entity: AnyEntity,
loc: Location
) -> ParseResult<()>
[src]
pub fn def_entity(
&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
impl Debug for SourceMap
[src]
impl Debug for SourceMap
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for SourceMap
[src]
impl Default for SourceMap