mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Get tests passing
Add roc_dbg to some platforms. Also start updating some roc_panic impls.
This commit is contained in:
parent
e6cc43492a
commit
f5fb01fd53
17 changed files with 191 additions and 47 deletions
|
@ -296,6 +296,23 @@ fn generate_roc_panic<'a, B: Backend<'a>>(backend: &mut B, output: &mut Object)
|
|||
}
|
||||
}
|
||||
|
||||
fn generate_roc_dbg<'a, B: Backend<'a>>(_backend: &mut B, output: &mut Object) {
|
||||
let text_section = output.section_id(StandardSection::Text);
|
||||
let proc_symbol = Symbol {
|
||||
name: "roc_dbg".as_bytes().to_vec(),
|
||||
value: 0,
|
||||
size: 0,
|
||||
kind: SymbolKind::Text,
|
||||
scope: SymbolScope::Dynamic,
|
||||
weak: false,
|
||||
section: SymbolSection::Section(text_section),
|
||||
flags: SymbolFlags::None,
|
||||
};
|
||||
let _proc_id = output.add_symbol(proc_symbol);
|
||||
// TODO: Actually generate an impl instead of just an empty symbol.
|
||||
// At a minimum, it should just be a ret.
|
||||
}
|
||||
|
||||
fn generate_wrapper<'a, B: Backend<'a>>(
|
||||
backend: &mut B,
|
||||
output: &mut Object,
|
||||
|
@ -412,6 +429,10 @@ fn build_object<'a, B: Backend<'a>>(
|
|||
generate_longjmp(&mut backend, &mut output);
|
||||
}
|
||||
|
||||
if backend.env().mode.generate_roc_dbg() {
|
||||
generate_roc_dbg(&mut backend, &mut output);
|
||||
}
|
||||
|
||||
if backend.env().mode.generate_allocators() {
|
||||
generate_wrapper(
|
||||
&mut backend,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue