pub enum Relocation {
RelativeStatementId(StatementIdx),
EndOfProgram,
Const(ConcreteTypeId),
}
Variants§
RelativeStatementId(StatementIdx)
Adds program_offset(StatementIdx) and subtracts the program offset of the casm instruction that is being relocated.
EndOfProgram
Adds the offset between the current statement index and the end of the program code segment.
Const(ConcreteTypeId)
Adds the offset of the const type in the const segment, assuming the const segment is at the end of the program.
Implementations§
source§impl Relocation
impl Relocation
pub fn apply( &self, instruction_offset: CodeOffset, statement_offsets: &[CodeOffset], const_segment_info: &ConstSegmentInfo, instruction: &mut Instruction )
Trait Implementations§
source§impl Debug for Relocation
impl Debug for Relocation
source§impl PartialEq for Relocation
impl PartialEq for Relocation
source§fn eq(&self, other: &Relocation) -> bool
fn eq(&self, other: &Relocation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Relocation
impl StructuralPartialEq for Relocation
Auto Trait Implementations§
impl RefUnwindSafe for Relocation
impl Send for Relocation
impl Sync for Relocation
impl Unpin for Relocation
impl UnwindSafe for Relocation
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.