mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Wasm: implement dead code elimination
This commit is contained in:
parent
98400cae1b
commit
8a01c3f98a
6 changed files with 230 additions and 66 deletions
|
@ -37,6 +37,18 @@ impl Serialize for ValueType {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<u8> for ValueType {
|
||||
fn from(x: u8) -> Self {
|
||||
match x {
|
||||
0x7f => Self::I32,
|
||||
0x7e => Self::I64,
|
||||
0x7d => Self::F32,
|
||||
0x7c => Self::F64,
|
||||
_ => internal_error!("Invalid ValueType 0x{:02x}", x),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const BLOCK_NO_RESULT: u8 = 0x40;
|
||||
|
||||
/// A control block in our model of the VM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue