mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Generate roc_alloc etc in dev_num tests
This commit is contained in:
parent
0b3715ebee
commit
595c704e88
4 changed files with 90 additions and 0 deletions
|
@ -341,6 +341,16 @@ impl<
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Used for generating wrappers for malloc/realloc/free
|
||||
fn build_wrapped_jmp(&mut self) -> Result<(&'a [u8], u64), String> {
|
||||
let mut out = bumpalo::vec![in self.env.arena];
|
||||
|
||||
ASM::jmp_imm32(&mut out, 0);
|
||||
|
||||
let offset = out.len() as u64 - 4;
|
||||
Ok((out.into_bump_slice(), offset))
|
||||
}
|
||||
|
||||
fn build_fn_call(
|
||||
&mut self,
|
||||
dst: &Symbol,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue