diff --git a/src/compact/expressions.rs b/src/compact/expressions.rs index 4ccf559c4e..c1326e92be 100644 --- a/src/compact/expressions.rs +++ b/src/compact/expressions.rs @@ -271,7 +271,6 @@ impl ModuleMap { adjust(sampler); adjust(coordinate); operand_map.adjust_option(array_index); - // TEST: try adjusting this with plain operand_map if let Some(ref mut offset) = *offset { self.const_expressions.adjust(offset); } diff --git a/src/compact/functions.rs b/src/compact/functions.rs index 08ca289a5e..35f4e7b348 100644 --- a/src/compact/functions.rs +++ b/src/compact/functions.rs @@ -2,16 +2,16 @@ use super::handle_set_map::HandleSet; use super::{FunctionMap, ModuleMap}; use crate::arena::Handle; -pub(super) struct FunctionTracer<'a> { - pub(super) module: &'a crate::Module, - pub(super) function: &'a crate::Function, +pub struct FunctionTracer<'a> { + pub module: &'a crate::Module, + pub function: &'a crate::Function, - pub(super) types_used: &'a mut HandleSet, - pub(super) constants_used: &'a mut HandleSet, - pub(super) const_expressions_used: &'a mut HandleSet, + pub types_used: &'a mut HandleSet, + pub constants_used: &'a mut HandleSet, + pub const_expressions_used: &'a mut HandleSet, /// Function-local expressions used. - pub(super) expressions_used: HandleSet, + pub expressions_used: HandleSet, } impl<'a> FunctionTracer<'a> { @@ -27,7 +27,6 @@ impl<'a> FunctionTracer<'a> { for (_, local) in self.function.local_variables.iter() { self.trace_type(local.ty); if let Some(init) = local.init { - // TEST: try changing this to trace_expression self.trace_const_expression(init); } } @@ -55,12 +54,6 @@ impl<'a> FunctionTracer<'a> { .trace_expression(expr); } - /* - pub fn trace_const_expression(&mut self, const_expr: Handle) { - self.as_expression().as_const_expression().trace_expression(const_expr); - } - */ - fn as_type(&mut self) -> super::types::TypeTracer { super::types::TypeTracer { types: &self.module.types,