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