mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Tidy up lowlevel calls and implement a few more
This commit is contained in:
parent
5bfc0093ec
commit
1b5740cd5d
3 changed files with 131 additions and 98 deletions
|
@ -51,7 +51,16 @@ pub enum StoredValue {
|
|||
size: u32,
|
||||
alignment_bytes: u32,
|
||||
},
|
||||
// TODO: const data storage (fixed address)
|
||||
}
|
||||
|
||||
impl StoredValue {
|
||||
pub fn value_type(&self) -> ValueType {
|
||||
match self {
|
||||
Self::VirtualMachineStack { value_type, .. } => *value_type,
|
||||
Self::Local { value_type, .. } => *value_type,
|
||||
Self::StackMemory { .. } => ValueType::I32,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Helper structure for WasmBackend, to keep track of how values are stored,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue