struct ModuleTracer<'module> {
module: &'module Module,
types_used: HandleSet<Type>,
constants_used: HandleSet<Constant>,
overrides_used: HandleSet<Override>,
global_expressions_used: HandleSet<Expression>,
}
Fields§
§module: &'module Module
§types_used: HandleSet<Type>
§constants_used: HandleSet<Constant>
§overrides_used: HandleSet<Override>
§global_expressions_used: HandleSet<Expression>
Implementations§
source§impl<'module> ModuleTracer<'module>
impl<'module> ModuleTracer<'module>
fn new(module: &'module Module) -> Self
fn trace_special_types(&mut self, special_types: &SpecialTypes)
sourcefn type_expression_tandem(&mut self)
fn type_expression_tandem(&mut self)
Traverse types and global expressions in tandem to determine which are used.
Assuming that all types and global expressions used by other parts of
the module have been added to types_used
and
global_expressions_used
, expand those sets to include all types and
global expressions reachable from those.
fn as_type(&mut self) -> TypeTracer<'_>
fn as_const_expression(&mut self) -> ExpressionTracer<'_>
pub fn as_function<'tracer>( &'tracer mut self, function: &'tracer Function, ) -> FunctionTracer<'tracer>
Trait Implementations§
source§impl From<ModuleTracer<'_>> for ModuleMap
impl From<ModuleTracer<'_>> for ModuleMap
source§fn from(used: ModuleTracer<'_>) -> Self
fn from(used: ModuleTracer<'_>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'module> Freeze for ModuleTracer<'module>
impl<'module> RefUnwindSafe for ModuleTracer<'module>
impl<'module> Send for ModuleTracer<'module>
impl<'module> Sync for ModuleTracer<'module>
impl<'module> Unpin for ModuleTracer<'module>
impl<'module> UnwindSafe for ModuleTracer<'module>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more