[−][src]Struct rustc_borrowck::dataflow::DataFlowContext
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
tcx: TyCtxt<'a, 'tcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
analysis_name: &'static str
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
a name for the analysis using this dataflow instance
oper: O
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
the data flow operator
bits_per_id: usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
number of bits to propagate per id
words_per_id: usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
number of words we will use to store bits_per_id. equal to bits_per_id/usize::BITS rounded up.
local_id_to_index: FxHashMap<ItemLocalId, Vec<CFGIndex>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
gens: Vec<usize>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
bits generated as we exit the cfg node. Updated by add_gen()
.
scope_kills: Vec<usize>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
bits killed as we exit the cfg node, or non-locally jump over
it. Updated by add_kill(KillFrom::ScopeEnd)
.
action_kills: Vec<usize>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
bits killed as we exit the cfg node directly; if it is jumped
over, e.g. via break
, the kills are not reflected in the
jump's effects. Updated by add_kill(KillFrom::Execution)
.
on_entry: Vec<usize>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
bits that are valid on entry to the cfg node. Updated by
propagate()
.
Methods
impl<'a, 'tcx, O: DataFlowOperator> DataFlowContext<'a, 'tcx, O>
[src]
impl<'a, 'tcx, O: DataFlowOperator> DataFlowContext<'a, 'tcx, O>
fn has_bitset_for_local_id(&self, n: ItemLocalId) -> bool
[src]
fn has_bitset_for_local_id(&self, n: ItemLocalId) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'tcx, O: DataFlowOperator> DataFlowContext<'a, 'tcx, O>
[src]
impl<'a, 'tcx, O: DataFlowOperator> DataFlowContext<'a, 'tcx, O>
pub fn new(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
analysis_name: &'static str,
body: Option<&Body>,
cfg: &CFG,
oper: O,
id_range: IdRange,
bits_per_id: usize
) -> DataFlowContext<'a, 'tcx, O>
[src]
pub fn new(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
analysis_name: &'static str,
body: Option<&Body>,
cfg: &CFG,
oper: O,
id_range: IdRange,
bits_per_id: usize
) -> DataFlowContext<'a, 'tcx, O>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn add_gen(&mut self, id: ItemLocalId, bit: usize)
[src]
pub fn add_gen(&mut self, id: ItemLocalId, bit: usize)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Indicates that id
generates bit
pub fn add_kill(&mut self, kind: KillFrom, id: ItemLocalId, bit: usize)
[src]
pub fn add_kill(&mut self, kind: KillFrom, id: ItemLocalId, bit: usize)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Indicates that id
kills bit
fn apply_gen_kill(&self, cfgidx: CFGIndex, bits: &mut [usize])
[src]
fn apply_gen_kill(&self, cfgidx: CFGIndex, bits: &mut [usize])
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Applies the gen and kill sets for cfgidx
to bits
fn compute_id_range(&self, cfgidx: CFGIndex) -> (usize, usize)
[src]
fn compute_id_range(&self, cfgidx: CFGIndex) -> (usize, usize)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn each_bit_on_entry<F>(&self, id: ItemLocalId, f: F) -> bool where
F: FnMut(usize) -> bool,
[src]
pub fn each_bit_on_entry<F>(&self, id: ItemLocalId, f: F) -> bool where
F: FnMut(usize) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Iterates through each bit that is set on entry to id
.
Only useful after propagate()
has been called.
pub fn each_bit_for_node<F>(
&self,
e: EntryOrExit,
cfgidx: CFGIndex,
f: F
) -> bool where
F: FnMut(usize) -> bool,
[src]
pub fn each_bit_for_node<F>(
&self,
e: EntryOrExit,
cfgidx: CFGIndex,
f: F
) -> bool where
F: FnMut(usize) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Iterates through each bit that is set on entry/exit to cfgidx
.
Only useful after propagate()
has been called.
pub fn each_gen_bit<F>(&self, id: ItemLocalId, f: F) -> bool where
F: FnMut(usize) -> bool,
[src]
pub fn each_gen_bit<F>(&self, id: ItemLocalId, f: F) -> bool where
F: FnMut(usize) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Iterates through each bit in the gen set for id
.
fn each_bit<F>(&self, words: &[usize], f: F) -> bool where
F: FnMut(usize) -> bool,
[src]
fn each_bit<F>(&self, words: &[usize], f: F) -> bool where
F: FnMut(usize) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Helper for iterating over the bits in a bit set.
Returns false on the first call to f
that returns false;
if all calls to f
return true, then returns true.
pub fn add_kills_from_flow_exits(&mut self, cfg: &CFG)
[src]
pub fn add_kills_from_flow_exits(&mut self, cfg: &CFG)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Whenever you have a break
or continue
statement, flow
exits through any number of enclosing scopes on its way to
the new destination. This function infers the kill bits of
those control operators based on the kill bits associated
with those scopes.
This is usually called (if it is called at all), after all add_gen and add_kill calls, but before propagate.
impl<'a, 'tcx, O: DataFlowOperator + Clone + 'static> DataFlowContext<'a, 'tcx, O>
[src]
impl<'a, 'tcx, O: DataFlowOperator + Clone + 'static> DataFlowContext<'a, 'tcx, O>
pub fn propagate(&mut self, cfg: &CFG, body: &Body)
[src]
pub fn propagate(&mut self, cfg: &CFG, body: &Body)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Performs the data flow analysis.
Trait Implementations
impl<'a, 'tcx: 'a, O: Clone> Clone for DataFlowContext<'a, 'tcx, O>
[src]
impl<'a, 'tcx: 'a, O: Clone> Clone for DataFlowContext<'a, 'tcx, O>
fn clone(&self) -> DataFlowContext<'a, 'tcx, O>
[src]
fn clone(&self) -> DataFlowContext<'a, 'tcx, O>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a, 'tcx, O: DataFlowOperator> PpAnn for DataFlowContext<'a, 'tcx, O>
[src]
impl<'a, 'tcx, O: DataFlowOperator> PpAnn for DataFlowContext<'a, 'tcx, O>
fn nested(&self, state: &mut State, nested: Nested) -> Result<()>
[src]
fn nested(&self, state: &mut State, nested: Nested) -> Result<()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn pre(&self, ps: &mut State, node: AnnNode) -> Result<()>
[src]
fn pre(&self, ps: &mut State, node: AnnNode) -> Result<()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn post(&self, _state: &mut State, _node: AnnNode) -> Result<(), Error>
[src]
fn post(&self, _state: &mut State, _node: AnnNode) -> Result<(), Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn try_fetch_item(&self, NodeId) -> Option<&Item>
[src]
fn try_fetch_item(&self, NodeId) -> Option<&Item>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Auto Trait Implementations
impl<'a, 'tcx, O> !Send for DataFlowContext<'a, 'tcx, O>
impl<'a, 'tcx, O> !Send for DataFlowContext<'a, 'tcx, O>
impl<'a, 'tcx, O> !Sync for DataFlowContext<'a, 'tcx, O>
impl<'a, 'tcx, O> !Sync for DataFlowContext<'a, 'tcx, O>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T
impl<T> MaybeResult for T
[src]
impl<T> MaybeResult for T
fn from_ok(x: T) -> T
[src]
fn from_ok(x: T) -> T
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
[src]
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, T> Captures for T where
T: ?Sized,
[src]
impl<'a, T> Captures for T where
T: ?Sized,