Skip to content

Commit a8d8ded

Browse files
committed
fix a puzzlingly pre-existing bug that should have been making compile-all unhappy
1 parent 99d216c commit a8d8ded

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/alloc.c

-4
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,6 @@ JL_DLLEXPORT jl_lambda_info_t *jl_get_specialized(jl_method_t *m, jl_tupletype_t
490490
// copy fptr from the template method definition
491491
new_linfo->fptr = linfo->fptr;
492492
new_linfo->jlcall_api = linfo->jlcall_api;
493-
new_linfo->functionObjectsDecls.functionObject = linfo->functionObjectsDecls.functionObject;
494-
new_linfo->functionObjectsDecls.specFunctionObject = linfo->functionObjectsDecls.specFunctionObject;
495-
new_linfo->functionID = linfo->functionID;
496-
new_linfo->specFunctionID = linfo->functionID;
497493
if (jl_options.compile_enabled == JL_OPTIONS_COMPILE_OFF && new_linfo->fptr == NULL) {
498494
jl_printf(JL_STDERR,"code missing for ");
499495
jl_static_show(JL_STDERR, (jl_value_t*)new_linfo);

src/codegen.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -869,9 +869,8 @@ static void to_function(jl_lambda_info_t *li)
869869
li->functionID = jl_assign_functionID(f, 0);
870870
if (specf)
871871
li->specFunctionID = jl_assign_functionID(specf, 1);
872-
if (f->getFunctionType() != jl_func_sig)
873-
// mark the pointer as jl_fptr_sparam_t calling convention
874-
li->jlcall_api = 1;
872+
// mark the pointer calling convention
873+
li->jlcall_api = (f->getFunctionType() == jl_func_sig ? 0 : 1);
875874

876875
// done compiling: restore global state
877876
if (old != NULL) {

0 commit comments

Comments
 (0)