diff --git a/src/alloc.c b/src/alloc.c index affcd4f0649c8..de99483e486fc 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -490,10 +490,6 @@ JL_DLLEXPORT jl_lambda_info_t *jl_get_specialized(jl_method_t *m, jl_tupletype_t // copy fptr from the template method definition new_linfo->fptr = linfo->fptr; new_linfo->jlcall_api = linfo->jlcall_api; - new_linfo->functionObjectsDecls.functionObject = linfo->functionObjectsDecls.functionObject; - new_linfo->functionObjectsDecls.specFunctionObject = linfo->functionObjectsDecls.specFunctionObject; - new_linfo->functionID = linfo->functionID; - new_linfo->specFunctionID = linfo->functionID; if (jl_options.compile_enabled == JL_OPTIONS_COMPILE_OFF && new_linfo->fptr == NULL) { jl_printf(JL_STDERR,"code missing for "); jl_static_show(JL_STDERR, (jl_value_t*)new_linfo); diff --git a/src/codegen.cpp b/src/codegen.cpp index 45330626e41ff..2651914f2296b 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -869,9 +869,8 @@ static void to_function(jl_lambda_info_t *li) li->functionID = jl_assign_functionID(f, 0); if (specf) li->specFunctionID = jl_assign_functionID(specf, 1); - if (f->getFunctionType() != jl_func_sig) - // mark the pointer as jl_fptr_sparam_t calling convention - li->jlcall_api = 1; + // mark the pointer calling convention + li->jlcall_api = (f->getFunctionType() == jl_func_sig ? 0 : 1); // done compiling: restore global state if (old != NULL) {