pub enum Relocation {
RelativeStatementId(StatementIdx),
SegmentStart(u32),
ConstStart(u32, ConcreteTypeId),
CircuitStart(ConcreteTypeId),
EndOfProgram,
}
Variants§
RelativeStatementId(StatementIdx)
Adds program_offset(StatementIdx) and subtracts the program offset of the casm instruction that is being relocated.
SegmentStart(u32)
Adds the offset of the constant segment with this id.
ConstStart(u32, ConcreteTypeId)
Adds the offset of the constant value in the const segments.
CircuitStart(ConcreteTypeId)
Adds the offset of the circuit with the given type.
EndOfProgram
Adds the offset between the current statement index and the end of the program code segment (which includes the const segment at its end).
Implementations§
source§impl Relocation
impl Relocation
pub fn apply( &self, instruction_offset: CodeOffset, statement_offsets: &[CodeOffset], consts_info: &ConstsInfo, instruction: &mut Instruction, )
Trait Implementations§
source§impl Debug for Relocation
impl Debug for Relocation
source§impl PartialEq for Relocation
impl PartialEq for Relocation
impl Eq for Relocation
impl StructuralPartialEq for Relocation
Auto Trait Implementations§
impl Freeze for Relocation
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.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more