fix all warning, cargo test OK

This commit is contained in:
Patrick Ventuzelo
2019-12-05 13:16:02 +01:00
parent b8f33c3c94
commit 07c850051d
2 changed files with 512 additions and 222 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -128,7 +128,7 @@ where
.map(|t| t.to_microwasm_type())
.collect::<Vec<_>>();
ctx.start_function(params.iter().cloned());
ctx.start_function(params.iter().cloned())?;
let mut blocks = HashMap::<BrTarget<L>, Block>::new();
@@ -274,10 +274,10 @@ where
// TODO: We can `take` this if it's a `Right`
match block.calling_convention.as_ref() {
Some(Left(cc)) => {
ctx.apply_cc(cc);
ctx.apply_cc(cc)?;
}
Some(Right(virt)) => {
ctx.set_state(virt.clone());
ctx.set_state(virt.clone())?;
}
_ => assert_eq!(block.params as usize, ctx.block_state.stack.len()),
}
@@ -665,7 +665,7 @@ where
Operator::Lt(SF64) => ctx.f64_lt()?,
Operator::Le(SF64) => ctx.f64_le()?,
Operator::Drop(range) => ctx.drop(range)?,
Operator::Const(val) => ctx.const_(val),
Operator::Const(val) => ctx.const_(val)?,
Operator::I32WrapFromI64 => ctx.i32_wrap_from_i64()?,
Operator::I32ReinterpretFromF32 => ctx.i32_reinterpret_from_f32()?,
Operator::I64ReinterpretFromF64 => ctx.i64_reinterpret_from_f64()?,