Skip to main content

Summary

Struct Summary 

Source
pub struct Summary { /* private fields */ }
Expand description

What a function does to memory.

Implementations§

Source§

impl Summary

Source

pub fn nothing(arity: usize) -> Self

A function that touches no memory at all, taking this many parameters.

Source

pub fn everything(arity: usize) -> Self

A function nothing is known about, taking this many parameters.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn arity(&self) -> usize

How many parameters it has an answer for.

Source

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.

Source

pub fn writes_nothing(&self) -> bool

Whether it writes nothing anywhere, which is readonly worked out rather than declared.

Source

pub fn touches_nothing(&self) -> bool

Whether it touches nothing anywhere, which is readnone.

Trait Implementations§

Source§

impl Clone for Summary

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Summary

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Summary

Source§

impl PartialEq for Summary

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Summary

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.