wasm_interp: Print out return value(s), if any

This commit is contained in:
Brian Carroll 2022-11-25 00:11:35 +00:00
parent 9d77c474d9
commit dd93e2e46f
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0

View file

@ -77,5 +77,13 @@ fn main() -> io::Result<()> {
while let Action::Continue = state.execute_next_instruction(&module) {}
// Print out return value(s), if any
match state.value_stack.len() {
0 => {}
1 => println!("{:?}", state.value_stack.pop()),
_ => println!("{:?}", &state.value_stack),
}
Ok(())
}