mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
gen_dev: generate all functions they may be need if a function pointer is used
This commit is contained in:
parent
95be1a1b6d
commit
c609df2d74
2 changed files with 1 additions and 14 deletions
|
@ -23,14 +23,6 @@ pub struct Env<'a> {
|
|||
pub lazy_literals: bool,
|
||||
}
|
||||
|
||||
// INLINED_SYMBOLS is a set of all of the functions we automatically inline if seen.
|
||||
const INLINED_SYMBOLS: [Symbol; 4] = [
|
||||
Symbol::NUM_ABS,
|
||||
Symbol::NUM_ADD,
|
||||
Symbol::NUM_SUB,
|
||||
Symbol::BOOL_EQ,
|
||||
];
|
||||
|
||||
// These relocations likely will need a length.
|
||||
// They may even need more definition, but this should be at least good enough for how we will use elf.
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::generic64::{aarch64, x86_64, Backend64Bit};
|
||||
use crate::{Backend, Env, Relocation, INLINED_SYMBOLS};
|
||||
use crate::{Backend, Env, Relocation};
|
||||
use bumpalo::collections::Vec;
|
||||
use object::write;
|
||||
use object::write::{Object, StandardSection, Symbol, SymbolSection};
|
||||
|
@ -84,11 +84,6 @@ fn build_object<'a, B: Backend<'a>>(
|
|||
let mut layout_ids = roc_mono::layout::LayoutIds::default();
|
||||
let mut procs = Vec::with_capacity_in(procedures.len(), env.arena);
|
||||
for ((sym, layout), proc) in procedures {
|
||||
// This is temporary until we support passing args to functions.
|
||||
if INLINED_SYMBOLS.contains(&sym) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let fn_name = layout_ids
|
||||
.get(sym, &layout)
|
||||
.to_symbol_string(sym, &env.interns);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue