mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
wasm_interp: use Value::from in more places
This commit is contained in:
parent
78fbc75249
commit
8e15d49720
2 changed files with 30 additions and 29 deletions
|
@ -733,6 +733,18 @@ impl From<u64> for Value {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<i32> for Value {
|
||||
fn from(x: i32) -> Self {
|
||||
Value::I32(x)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<i64> for Value {
|
||||
fn from(x: i64) -> Self {
|
||||
Value::I64(x)
|
||||
}
|
||||
}
|
||||
|
||||
/// Wasm memory alignment for load/store instructions.
|
||||
/// Rust representation matches Wasm encoding.
|
||||
/// It's an error to specify alignment higher than the "natural" alignment of the instruction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue