wasm_interp: Make ValueStack a dumb Vec<Value> => Zig test 146.3->124.6ms

This commit is contained in:
Brian Carroll 2022-12-07 08:41:27 +00:00
parent 1f90286d64
commit 8c7d9dbff8
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
5 changed files with 156 additions and 304 deletions

View file

@ -94,23 +94,26 @@ fn main() -> io::Result<()> {
});
// Run
// let end= 10000;
let end = 1;
for _ in 0..end {
let result = inst.call_export_from_cli(&module, start_fn_name, &wasi_argv);
let result = inst.call_export_from_cli(&module, start_fn_name, &wasi_argv);
// Print out return value, if any
// Print out return value, if any
match result {
Ok(Some(val)) => {
if is_hex_format {
println!("{:#x?}", val)
} else {
println!("{:?}", val)
match result {
Ok(Some(val)) => {
if is_hex_format {
println!("{:#x?}", val)
} else {
println!("{:?}", val)
}
}
Ok(None) => {}
Err(e) => {
eprintln!("{}", e);
process::exit(3);
}
}
Ok(None) => {}
Err(e) => {
eprintln!("{}", e);
process::exit(3);
}
}