Expand description
Builtin call models: API behaviour modelling when MIR is unavailable.
Each recognised standard-library API is described by a single table
row: a matcher (from crate::verify::api_classify) and an
effect builder. lookup_effect scans the table linearly (first match
wins) and converts the matched row into the effect summary consumed by the
VM; is_modeled reports whether a call is in the table (used by the path
graph to keep modelled calls opaque instead of inlining their branchy CFG).
Two layers:
- Matchers โ
crate::verify::api_classifyDefIdclassifiers. - Effect functions โ produce the
Vec<CallEffect>for a single API.
Macrosยง
- ED ๐
DefId-based matcher row (fn(Option<DefId>) -> bool).
Structsยง
Enumsยง
- PtrDirection ๐
- PtrGranularity ๐
Staticsยง
- REGISTRY ๐
Functionsยง
- dest_
is_ ๐pointer - eff_
alias_ ๐arg0 - eff_
alias_ ๐ptr - eff_
align_ ๐offset - eff_
align_ ๐to - eff_
box_ ๐alloc - eff_
box_ ๐from_ vec - eff_
cmp_ ๐min - eff_
drop_ ๐memory - eff_
exchange_ ๐malloc - eff_
from_ ๐raw_ parts - eff_
layout_ ๐align - eff_
layout_ ๐const - eff_len ๐
- eff_
mem_ ๐replace - eff_
new_ ๐allocation - eff_
new_ ๐allocation_ from_ cap - eff_
new_ ๐unchecked NonNull::new_unchecked(ptr): a transparent re-wrap that preservesptrโs value and provenance (element offset included), inheriting non-nullness from the source rather than asserting it.- eff_
none ๐ - eff_
option_ ๐scan_ index - eff_
overflowing_ ๐nz - eff_
ownership_ ๐recon - eff_
ptr_ ๐add - eff_
ptr_ ๐add_ byte - eff_
ptr_ ๐arith - Shared model for
ReturnPointerAdd/ReturnPointerSub. - eff_
ptr_ ๐sub - eff_
ptr_ ๐sub_ byte - eff_
return_ ๐abs - eff_
return_ ๐add - eff_
return_ ๐clamp - eff_
return_ ๐max - eff_
return_ ๐mul - eff_
return_ ๐neg - eff_
return_ ๐nonzero_ iff - eff_
return_ ๐option_ some_ add - eff_
return_ ๐option_ some_ mul - eff_
return_ ๐option_ some_ nonzero - eff_
return_ ๐option_ some_ nonzero_ iff - eff_
scan_ ๐length - eff_
select_ ๐unpredictable - eff_
slice_ ๐range - eff_
sliceindex_ ๐get_ unchecked SliceIndex::get_unchecked(self, slice)/get_unchecked_mut: returns an element pointer atslice + self(receiver is the index, slice pointer is argument 1). Element-strided add off argument 1, inheriting non-nullness from the slice.- eff_
split_ ๐at - eff_
vec_ ๐from_ box - eff_
write_ ๐mem - is_
modeled ๐ - True when
calleematches a hand-modelled API in the registry. The path graph uses this to keep such calls opaque (it must not inline their branchy CFG when the VM models their semantics more precisely). - layout_
call_ ๐ty - layout_
constant_ ๐effect - lookup_
effect ๐