pub struct Summary { /* private fields */ }Expand description
What a function does to memory.
Implementations§
Source§impl Summary
impl Summary
Sourcepub fn nothing(arity: usize) -> Self
pub fn nothing(arity: usize) -> Self
A function that touches no memory at all, taking this many parameters.
Sourcepub fn everything(arity: usize) -> Self
pub fn everything(arity: usize) -> Self
A function nothing is known about, taking this many parameters.
Sourcepub fn doing(outside: Effect, params: &[Touch]) -> Self
pub fn doing(outside: Effect, params: &[Touch]) -> Self
A function that does this to what it was not handed and that to each of its parameters.
The general one, for a caller that has worked the answer out rather than read it off an attribute. The common shapes have their own names above and below this.
Sourcepub fn reading(arity: usize) -> Self
pub fn reading(arity: usize) -> Self
A function that reads whatever it likes and writes nothing, taking this many parameters.
readonly, which is __attribute__((pure)) written as an effect. The addresses are kept
rather than dropped: a function that does not write cannot have put one anywhere a later
call could find it, but it can hand one back, and returning it is not writing.
Sourcepub fn through_arguments(arity: usize) -> Self
pub fn through_arguments(arity: usize) -> Self
A function that does what it likes to what it was handed and nothing to anything else, taking this many parameters.
argmemonly. It says where and not what, so everything that can happen to an argument is
taken to have happened to every one of them.
Sourcepub fn outside(&self) -> Effect
pub fn outside(&self) -> Effect
What it does to memory it was not handed: the globals, and anything reached through an address that did not arrive as an argument.
Sourcepub fn param(&self, index: usize) -> Touch
pub fn param(&self, index: usize) -> Touch
What it does to the object the parameter in this position points at.
A position past the end is an argument no parameter stands for, which is a variadic call, and the answer for one of those is that anything may have happened to it.
Sourcepub fn only_through_arguments(&self) -> bool
pub fn only_through_arguments(&self) -> bool
Whether everything it touches, it reached through an argument.
This is __attribute__((access))’s promise and the IR’s argmemonly, worked out rather
than declared, and it is what lets crate::alias ask about the arguments one at a time
instead of giving up.
Sourcepub fn writes_nothing(&self) -> bool
pub fn writes_nothing(&self) -> bool
Whether it writes nothing anywhere, which is readonly worked out rather than declared.
Sourcepub fn touches_nothing(&self) -> bool
pub fn touches_nothing(&self) -> bool
Whether it touches nothing anywhere, which is readnone.