mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
wasm_interp: pass arguments from CLI
This commit is contained in:
parent
fa1e0a8614
commit
a09fd95fd7
6 changed files with 92 additions and 36 deletions
|
@ -258,10 +258,11 @@ impl<'a> TypeSection<'a> {
|
|||
self.bytes.is_empty()
|
||||
}
|
||||
|
||||
pub fn look_up_arg_count(&self, sig_index: u32) -> u32 {
|
||||
pub fn look_up_arg_type_bytes(&self, sig_index: u32) -> &[u8] {
|
||||
let mut offset = self.offsets[sig_index as usize];
|
||||
offset += 1; // separator
|
||||
u32::parse((), &self.bytes, &mut offset).unwrap()
|
||||
let count = u32::parse((), &self.bytes, &mut offset).unwrap() as usize;
|
||||
&self.bytes[offset..][..count]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue