Merge branch 'main' into clippy-1.74

This commit is contained in:
Ayaz 2023-12-02 20:09:06 -06:00 committed by GitHub
commit aaba3f4d82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
320 changed files with 11155 additions and 18862 deletions

View file

@ -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,