Type Definition bytecode::access_path::AbsAddr
source · pub type AbsAddr = SetDomain<Addr>;
Expand description
Abstraction of an address: non-empty set of constant or footprint address values
Implementations§
source§impl AbsAddr
impl AbsAddr
sourcepub fn footprint(ap: AccessPath) -> Self
pub fn footprint(ap: AccessPath) -> Self
Create a footprint address from access path ap
sourcepub fn formal(formal_index: TempIndex, func_env: &FunctionEnv<'_>) -> Self
pub fn formal(formal_index: TempIndex, func_env: &FunctionEnv<'_>) -> Self
Create a footprint address read from formal temp_index
sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Return true
if self
is a constant
sourcepub fn is_statically_known(&self) -> bool
pub fn is_statically_known(&self) -> bool
Return true
if self
consists only of statically known constants
sourcepub fn substitute_footprint(
&mut self,
actuals: &[TempIndex],
type_actuals: &[Type],
func_env: &FunctionEnv<'_>,
sub_map: &dyn AccessPathMap<AbsAddr>
)
pub fn substitute_footprint( &mut self, actuals: &[TempIndex], type_actuals: &[Type], func_env: &FunctionEnv<'_>, sub_map: &dyn AccessPathMap<AbsAddr> )
Substitute all occurences of Footprint(ap) in self
by resolving the accesss path
ap
in sub_map
sourcepub fn add_struct_offset(
self,
mid: &ModuleId,
sid: StructId,
types: Vec<Type>
) -> Self
pub fn add_struct_offset( self, mid: &ModuleId, sid: StructId, types: Vec<Type> ) -> Self
Return a new abstract address by adding the offset mid::sid<types>
to each element
of self
sourcepub fn add_offset(&self, offset: Offset) -> Self
pub fn add_offset(&self, offset: Offset) -> Self
Return a new abstract address by adding the offset offset
to each element of self
sourcepub fn prepend(self, prefix: AccessPath) -> Self
pub fn prepend(self, prefix: AccessPath) -> Self
Produce a new version of self
with prefix
prepended to each footprint
value
sourcepub fn footprint_paths(&self) -> impl Iterator<Item = &AccessPath>
pub fn footprint_paths(&self) -> impl Iterator<Item = &AccessPath>
return an iterator over the footprint paths in self
sourcepub fn get_concrete_addresses(&self) -> Vec<AccountAddress> ⓘ
pub fn get_concrete_addresses(&self) -> Vec<AccountAddress> ⓘ
Return an iterator over the concrete addresses in self
sourcepub fn display<'a>(&'a self, env: &'a FunctionEnv<'_>) -> AbsAddrDisplay<'a>
pub fn display<'a>(&'a self, env: &'a FunctionEnv<'_>) -> AbsAddrDisplay<'a>
Return a wrapper of self
that implements Display
using env