Migrate the last sections: Type and Function

This commit is contained in:
Brian Carroll 2021-11-03 10:24:03 +00:00
parent 6fca1caee5
commit 59757d638a
8 changed files with 102 additions and 121 deletions

View file

@ -71,11 +71,7 @@ impl WasmLayout {
}
}
#[allow(dead_code)]
pub fn stack_memory(&self) -> u32 {
match self {
Self::StackMemory { size, .. } => *size,
_ => 0,
}
pub fn is_stack_memory(&self) -> bool {
matches!(self, Self::StackMemory { .. })
}
}