mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Get lots of Num lowlevel ops working
This commit is contained in:
parent
6421ff07a5
commit
7c95189e4a
7 changed files with 532 additions and 61 deletions
|
@ -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 { .. })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue