mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
wasm_interp: implement calls with arguments
This commit is contained in:
parent
3aeab0dbd7
commit
6523b38847
5 changed files with 160 additions and 74 deletions
|
@ -256,6 +256,12 @@ impl<'a> TypeSection<'a> {
|
|||
pub fn is_empty(&self) -> bool {
|
||||
self.bytes.is_empty()
|
||||
}
|
||||
|
||||
pub fn look_up_arg_count(&self, sig_index: u32) -> u32 {
|
||||
let mut offset = self.offsets[sig_index as usize];
|
||||
offset += 1; // separator
|
||||
u32::parse((), &self.bytes, &mut offset).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Section<'a> for TypeSection<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue