fix: Revert a file that wasn't a commit candidate.

This commit is contained in:
Ivan Enderlin 2020-03-10 15:58:27 +01:00
parent 52312ff0ad
commit c1e40f165e

View File

@ -323,17 +323,12 @@ impl<'a> DynamicFunc<'a> {
.iter() .iter()
.enumerate() .enumerate()
.map(|(i, t)| { .map(|(i, t)| {
let i = i as isize + 1; // skip vmctx let i = i + 1; // skip vmctx
match *t { match *t {
Type::I32 => Value::I32(*args.offset(i) as i32), Type::I32 => Value::I32(*args.offset(i as _) as i32),
Type::I64 => Value::I64(*args.offset(i) as i64), Type::I64 => Value::I64(*args.offset(i as _) as i64),
Type::F32 => { Type::F32 => Value::F32(f32::from_bits(*args.offset(i as _) as u32)),
eprintln!("{:?}", 3.0f32.to_le_bytes()); Type::F64 => Value::F64(f64::from_bits(*args.offset(i as _) as u64)),
eprintln!("{:#064x}", *args.offset(i));
Value::F32(f32::from_bits(*args.offset(i) as u32))
}
Type::F64 => Value::F64(f64::from_bits(*args.offset(i) as u64)),
Type::V128 => { Type::V128 => {
todo!("enter_host_polymorphic: 128-bit types are not supported") todo!("enter_host_polymorphic: 128-bit types are not supported")
} }
@ -341,7 +336,6 @@ impl<'a> DynamicFunc<'a> {
}) })
.collect(); .collect();
let rets = (ctx.func)(vmctx, &args); let rets = (ctx.func)(vmctx, &args);
if rets.len() == 0 { if rets.len() == 0 {
0 0
} else if rets.len() == 1 { } else if rets.len() == 1 {