Add back wasmtime-wast support for V128 (#442)

Accidentally left removed #434 when I meant to add it back in! Updates
the `wast` crate dependency and adds support for translating
`v128.const` instructions to a `RuntimeValue`

Closes #441
This commit is contained in:
Alex Crichton
2019-10-21 17:51:59 -05:00
committed by Dan Gohman
parent 9947bc5209
commit e37168a88d
2 changed files with 2 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ cranelift-wasm = { version = "0.46.1", features = ["enable-serde"] }
wasmtime-jit = { path = "../wasmtime-jit" }
wasmtime-runtime = { path = "../wasmtime-runtime" }
wasmtime-environ = { path = "../wasmtime-environ" }
wast = "2.0.0"
wast = "3.0.0"
target-lexicon = "0.8.1"
failure = { version = "0.1.3", default-features = false }

View File

@@ -19,6 +19,7 @@ fn runtime_value(v: &wast::Expression<'_>) -> RuntimeValue {
I64Const(x) => RuntimeValue::I64(*x),
F32Const(x) => RuntimeValue::F32(x.bits),
F64Const(x) => RuntimeValue::F64(x.bits),
V128Const(x) => RuntimeValue::V128(x.to_le_bytes()),
other => panic!("couldn't convert {:?} to a runtime value", other),
}
}