mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +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
|
@ -22,6 +22,7 @@ pub struct Env<'a> {
|
|||
pub interns: Interns,
|
||||
pub exposed_to_host: MutSet<Symbol>,
|
||||
pub lazy_literals: bool,
|
||||
pub generate_allocators: bool,
|
||||
}
|
||||
|
||||
// These relocations likely will need a length.
|
||||
|
@ -67,6 +68,9 @@ where
|
|||
// The backend should track these args so it can use them as needed.
|
||||
fn load_args(&mut self, args: &'a [(Layout<'a>, Symbol)]) -> Result<(), String>;
|
||||
|
||||
/// Used for generating wrappers for malloc/realloc/free
|
||||
fn build_wrapped_jmp(&mut self) -> Result<(&'a [u8], u64), String>;
|
||||
|
||||
/// build_proc creates a procedure and outputs it to the wrapped object writer.
|
||||
fn build_proc(&mut self, proc: Proc<'a>) -> Result<(&'a [u8], &[Relocation]), String> {
|
||||
self.reset();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue