Struct snarkvm_compiler::FinalizeRegisters
source · [−]pub struct FinalizeRegisters<N: Network> { /* private fields */ }Implementations
sourceimpl<N: Network> FinalizeRegisters<N>
impl<N: Network> FinalizeRegisters<N>
sourcepub fn load_literal(
&self,
stack: &Stack<N>,
operand: &Operand<N>
) -> Result<Literal<N>>
pub fn load_literal(
&self,
stack: &Stack<N>,
operand: &Operand<N>
) -> Result<Literal<N>>
Loads the literal of a given operand from the registers.
Errors
This method will halt if the given operand is not a literal. This method will halt if the register locator is not found. In the case of register members, this method will halt if the member is not found.
sourcepub fn load_plaintext(
&self,
stack: &Stack<N>,
operand: &Operand<N>
) -> Result<Plaintext<N>>
pub fn load_plaintext(
&self,
stack: &Stack<N>,
operand: &Operand<N>
) -> Result<Plaintext<N>>
Loads the plaintext of a given operand from the registers.
Errors
This method will halt if the given operand is not a plaintext. This method will halt if the register locator is not found. In the case of register members, this method will halt if the member is not found.
sourceimpl<N: Network> FinalizeRegisters<N>
impl<N: Network> FinalizeRegisters<N>
sourcepub fn store_literal(
&mut self,
stack: &Stack<N>,
register: &Register<N>,
literal: Literal<N>
) -> Result<()>
pub fn store_literal(
&mut self,
stack: &Stack<N>,
register: &Register<N>,
literal: Literal<N>
) -> Result<()>
Assigns the given literal to the given register, assuming the register is not already assigned.
Errors
This method will halt if the given register is a register member. This method will halt if the given register is an input register. This method will halt if the register is already used.
sourcepub fn store(
&mut self,
stack: &Stack<N>,
register: &Register<N>,
stack_value: Value<N>
) -> Result<()>
pub fn store(
&mut self,
stack: &Stack<N>,
register: &Register<N>,
stack_value: Value<N>
) -> Result<()>
Assigns the given value to the given register, assuming the register is not already assigned.
Errors
This method will halt if the given register is a register member. This method will halt if the given register is an input register. This method will halt if the register is already used.
sourceimpl<N: Network> FinalizeRegisters<N>
impl<N: Network> FinalizeRegisters<N>
sourcepub fn new(finalize_types: FinalizeTypes<N>) -> Self
pub fn new(finalize_types: FinalizeTypes<N>) -> Self
Initializes a new set of registers, given the finalize types.
Trait Implementations
sourceimpl<N: Clone + Network> Clone for FinalizeRegisters<N>
impl<N: Clone + Network> Clone for FinalizeRegisters<N>
sourcefn clone(&self) -> FinalizeRegisters<N>
fn clone(&self) -> FinalizeRegisters<N>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl<N> RefUnwindSafe for FinalizeRegisters<N> where
N: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
impl<N> Send for FinalizeRegisters<N>
impl<N> Sync for FinalizeRegisters<N>
impl<N> Unpin for FinalizeRegisters<N> where
N: Unpin,
<N as Environment>::Field: Unpin,
<N as Environment>::Projective: Unpin,
<N as Environment>::Scalar: Unpin,
impl<N> UnwindSafe for FinalizeRegisters<N> where
N: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more