Get lots of Num lowlevel ops working

This commit is contained in:
Brian Carroll 2021-11-10 14:21:32 +00:00
parent 6421ff07a5
commit 7c95189e4a
7 changed files with 532 additions and 61 deletions

View file

@ -71,6 +71,14 @@ impl WasmLayout {
}
}
pub fn size(&self) -> u32 {
match self {
Self::Primitive(_, size) => *size,
Self::StackMemory { size, .. } => *size,
Self::HeapMemory => PTR_SIZE,
}
}
pub fn is_stack_memory(&self) -> bool {
matches!(self, Self::StackMemory { .. })
}