Merge pull request #2517 from rtfeldman/repl-www

Web REPL initial version
This commit is contained in:
Brian Carroll 2022-02-21 13:58:23 +00:00 committed by GitHub
commit e8571de1ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 915 additions and 391 deletions

View file

@ -489,10 +489,7 @@ where
match test_wrapper.call(&[]) {
Err(e) => Err(format!("call to `test_wrapper`: {:?}", e)),
Ok(result) => {
let address = match result[0] {
wasmer::Value::I32(a) => a,
_ => panic!(),
};
let address = result[0].unwrap_i32();
let output = <T as crate::helpers::llvm::FromWasmerMemory>::decode(
memory,

View file

@ -194,10 +194,7 @@ where
match test_wrapper.call(&[]) {
Err(e) => Err(format!("{:?}", e)),
Ok(result) => {
let address = match result[0] {
wasmer::Value::I32(a) => a,
_ => panic!(),
};
let address = result[0].unwrap_i32();
if false {
println!("test_wrapper returned 0x{:x}", address);
@ -239,10 +236,7 @@ where
let init_result = init_refcount_test.call(&[wasmer::Value::I32(expected_len)]);
let refcount_vector_addr = match init_result {
Err(e) => return Err(format!("{:?}", e)),
Ok(result) => match result[0] {
wasmer::Value::I32(a) => a,
_ => panic!(),
},
Ok(result) => result[0].unwrap_i32(),
};
// Run the test