debugging 1

This commit is contained in:
Graham Kelly 2024-02-04 14:40:37 -05:00
parent 492ebc7cab
commit eca2e83f59

View file

@ -32,7 +32,11 @@ pub fn reorder_funcs(m: &mut Module, fs: &BTreeMap<Func, Func>) {
for t in m.tables.values_mut() {
if let Some(e) = t.func_elements.as_mut() {
for e in e.iter_mut() {
*e = *fs.get(&*e).unwrap();
let Some(f) = fs.get(&*e) else{
let f = *e;
panic!("invalid func: {f}; {}",m.funcs[f].name())
};
*e = *f;
}
}
}