mirror of
https://github.com/fluencelabs/wasm-utils
synced 2025-03-15 03:00:49 +00:00
commit
ae412c45f1
@ -853,9 +853,9 @@ mod tests {
|
||||
let rtype = &**rfunc.type_ref.read();
|
||||
let elements::Type::Function(ref ftype) = rtype;
|
||||
|
||||
/// import deleted so now it's func #0
|
||||
// import deleted so now it's func #0
|
||||
assert_eq!(rfunc.order(), Some(0));
|
||||
/// type should be the same, #1
|
||||
// type should be the same, #1
|
||||
assert_eq!(ftype.params().len(), 1);
|
||||
}
|
||||
}
|
||||
@ -981,4 +981,4 @@ mod tests {
|
||||
"Call should be recalculated to 1"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ impl<T> RefList<T> {
|
||||
}
|
||||
|
||||
fn done_delete(&mut self, indices: &[usize]) {
|
||||
for mut entry in self.items.iter_mut() {
|
||||
for entry in self.items.iter_mut() {
|
||||
let mut entry = entry.write();
|
||||
let total_less = indices.iter()
|
||||
.take_while(|x| **x < entry.order().expect("Items in the list always have order; qed"))
|
||||
@ -209,7 +209,7 @@ impl<T> RefList<T> {
|
||||
|
||||
let mut total_removed = 0;
|
||||
for idx in indices {
|
||||
let mut detached = self.items.remove(*idx - total_removed);
|
||||
let detached = self.items.remove(*idx - total_removed);
|
||||
detached.write().index = EntryOrigin::Detached;
|
||||
total_removed += 1;
|
||||
}
|
||||
@ -559,4 +559,4 @@ mod tests {
|
||||
assert_eq!(item50.order(), Some(6));
|
||||
assert_eq!(item60.order(), Some(7));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ fn instrument_functions(ctx: &mut Context, module: &mut elements::Module) -> Res
|
||||
for section in module.sections_mut() {
|
||||
if let elements::Section::Code(ref mut code_section) = *section {
|
||||
for func_body in code_section.bodies_mut() {
|
||||
let mut opcodes = func_body.code_mut();
|
||||
let opcodes = func_body.code_mut();
|
||||
instrument_function(ctx, opcodes)?;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user