pub enum InstructionIR {
Match(MatchIR),
Call(CallIR),
Return(ReturnIR),
Trampoline(TrampolineIR),
}Expand description
Pre-layout instruction with symbolic references.
Variants§
Implementations§
Source§impl InstructionIR
impl InstructionIR
Sourcepub fn successors(&self) -> Vec<Label>
pub fn successors(&self) -> Vec<Label>
Get all successor labels (for graph building).
Sourcepub fn resolve<F, G, R>(
&self,
map: &BTreeMap<Label, StepAddr>,
lookup_member: F,
get_member_base: G,
lookup_regex: R,
) -> Vec<u8> ⓘ
pub fn resolve<F, G, R>( &self, map: &BTreeMap<Label, StepAddr>, lookup_member: F, get_member_base: G, lookup_regex: R, ) -> Vec<u8> ⓘ
Resolve labels and serialize to bytecode bytes.
lookup_member: maps (field_name Symbol, field_type TypeId) to member indexget_member_base: maps parent TypeId to member base indexlookup_regex: maps pattern to RegexTable index (for predicate regexes)
Trait Implementations§
Source§impl Clone for InstructionIR
impl Clone for InstructionIR
Source§fn clone(&self) -> InstructionIR
fn clone(&self) -> InstructionIR
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstructionIR
impl Debug for InstructionIR
Source§impl From<CallIR> for InstructionIR
impl From<CallIR> for InstructionIR
Source§impl From<MatchIR> for InstructionIR
impl From<MatchIR> for InstructionIR
Source§impl From<ReturnIR> for InstructionIR
impl From<ReturnIR> for InstructionIR
Source§impl From<TrampolineIR> for InstructionIR
impl From<TrampolineIR> for InstructionIR
Source§fn from(t: TrampolineIR) -> Self
fn from(t: TrampolineIR) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InstructionIR
impl RefUnwindSafe for InstructionIR
impl Send for InstructionIR
impl Sync for InstructionIR
impl Unpin for InstructionIR
impl UnwindSafe for InstructionIR
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more