pub struct CompiledInvocationBuilder<'a> {
pub program_info: ProgramInfo<'a>,
pub invocation: &'a Invocation,
pub libfunc: &'a CoreConcreteLibfunc,
pub idx: StatementIdx,
pub refs: &'a [ReferenceValue],
pub environment: Environment,
pub const_segment_info_builder: &'a mut ConstSegmentInfoBuilder,
}
Expand description
Helper for building compiled invocations.
Fields§
§program_info: ProgramInfo<'a>
§invocation: &'a Invocation
§libfunc: &'a CoreConcreteLibfunc
§idx: StatementIdx
§refs: &'a [ReferenceValue]
The arguments of the libfunc.
environment: Environment
§const_segment_info_builder: &'a mut ConstSegmentInfoBuilder
Implementations§
source§impl CompiledInvocationBuilder<'_>
impl CompiledInvocationBuilder<'_>
sourcepub fn try_get_refs<const COUNT: usize>(
&self
) -> Result<[&ReferenceExpression; COUNT], InvocationError>
pub fn try_get_refs<const COUNT: usize>( &self ) -> Result<[&ReferenceExpression; COUNT], InvocationError>
Returns the reference expressions if the size is correct.
sourcepub fn try_get_single_cells<const COUNT: usize>(
&self
) -> Result<[&CellExpression; COUNT], InvocationError>
pub fn try_get_single_cells<const COUNT: usize>( &self ) -> Result<[&CellExpression; COUNT], InvocationError>
Returns the reference expressions, assuming all contains one cell if the size is correct.
Trait Implementations§
source§impl<'a> InvocationApChangeInfoProvider for CompiledInvocationBuilder<'a>
impl<'a> InvocationApChangeInfoProvider for CompiledInvocationBuilder<'a>
source§fn type_size(&self, ty: &ConcreteTypeId) -> usize
fn type_size(&self, ty: &ConcreteTypeId) -> usize
Provides the sizes of types.
source§fn token_usages(&self, token_type: CostTokenType) -> usize
fn token_usages(&self, token_type: CostTokenType) -> usize
Number of tokens provided by the libfunc invocation (currently only relevant for
withdraw_gas_all
).source§impl<'a> InvocationCostInfoProvider for CompiledInvocationBuilder<'a>
impl<'a> InvocationCostInfoProvider for CompiledInvocationBuilder<'a>
source§fn type_size(&self, ty: &ConcreteTypeId) -> usize
fn type_size(&self, ty: &ConcreteTypeId) -> usize
Provides the sizes of types.
source§fn ap_change_var_value(&self) -> usize
fn ap_change_var_value(&self) -> usize
Provides the ap change variable value of the current statement.
source§fn token_usages(&self, token_type: CostTokenType) -> usize
fn token_usages(&self, token_type: CostTokenType) -> usize
Number of tokens provided by the libfunc invocation (currently only relevant for
withdraw_gas_all
).Auto Trait Implementations§
impl<'a> RefUnwindSafe for CompiledInvocationBuilder<'a>
impl<'a> Send for CompiledInvocationBuilder<'a>
impl<'a> Sync for CompiledInvocationBuilder<'a>
impl<'a> Unpin for CompiledInvocationBuilder<'a>
impl<'a> !UnwindSafe for CompiledInvocationBuilder<'a>
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<InfoProvider> CostInfoProvider for InfoProviderwhere
InfoProvider: InvocationCostInfoProvider,
impl<InfoProvider> CostInfoProvider for InfoProviderwhere
InfoProvider: InvocationCostInfoProvider,
source§fn type_size(&self, ty: &ConcreteTypeId) -> usize
fn type_size(&self, ty: &ConcreteTypeId) -> usize
Provides the sizes of types.