Skip to content

Commit 2518ec1

Browse files
authored
restore some additional function references (JuliaLang#28108)
This improves startup latency a bit.
1 parent bee0b95 commit 2518ec1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/codegen.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6661,10 +6661,16 @@ extern "C" void jl_fptr_to_llvm(void *fptr, jl_method_instance_t *lam, int specs
66616661
Function *f = Function::Create(jl_func_sig, Function::ExternalLinkage, funcName.str());
66626662
add_named_global(f, fptr);
66636663
const char **fdecl;
6664-
if (specsig)
6664+
if (specsig) {
66656665
fdecl = &lam->functionObjectsDecls.specFunctionObject;
6666-
else
6666+
if (lam->invoke == jl_fptr_args)
6667+
lam->functionObjectsDecls.functionObject = "jl_fptr_args";
6668+
else if (lam->invoke == jl_fptr_sparam)
6669+
lam->functionObjectsDecls.functionObject = "jl_fptr_sparam";
6670+
}
6671+
else {
66676672
fdecl = &lam->functionObjectsDecls.functionObject;
6673+
}
66686674
assert(!*fdecl);
66696675
*fdecl = strdup(f->getName().str().c_str());
66706676
delete f;

0 commit comments

Comments
 (0)