@@ -1006,7 +1006,7 @@ static const auto jlgenericfunction_func = new JuliaFunction<>{
10061006 auto T_jlvalue = JuliaType::get_jlvalue_ty (C);
10071007 auto T_pjlvalue = PointerType::get (T_jlvalue, 0 );
10081008 auto T_prjlvalue = PointerType::get (T_jlvalue, AddressSpace::Tracked);
1009- return FunctionType::get (T_prjlvalue, {T_pjlvalue, T_pjlvalue, T_pjlvalue }, false );
1009+ return FunctionType::get (T_prjlvalue, {T_pjlvalue, T_pjlvalue}, false );
10101010 },
10111011 nullptr ,
10121012};
@@ -6866,8 +6866,6 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaidx_
68666866 jl_value_t *mn = args[0 ];
68676867 assert (jl_is_symbol (mn) || jl_is_slotnumber (mn) || jl_is_globalref (mn));
68686868
6869- Value *bp = NULL , *name;
6870- jl_binding_t *bnd = NULL ;
68716869 bool issym = jl_is_symbol (mn);
68726870 bool isglobalref = !issym && jl_is_globalref (mn);
68736871 jl_module_t *mod = ctx.module ;
@@ -6876,26 +6874,11 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaidx_
68766874 mod = jl_globalref_mod (mn);
68776875 mn = (jl_value_t *)jl_globalref_name (mn);
68786876 }
6879- JL_TRY {
6880- if (jl_symbol_name ((jl_sym_t *)mn)[0 ] == ' @' )
6881- jl_errorf (" macro definition not allowed inside a local scope" );
6882- name = literal_pointer_val (ctx, mn);
6883- bnd = jl_get_binding_for_method_def (mod, (jl_sym_t *)mn);
6884- }
6885- JL_CATCH {
6886- jl_value_t *e = jl_current_exception (jl_current_task);
6887- // errors. boo. :(
6888- JL_GC_PUSH1 (&e);
6889- e = jl_as_global_root (e, 1 );
6890- JL_GC_POP ();
6891- raise_exception (ctx, literal_pointer_val (ctx, e));
6892- return ghostValue (ctx, jl_nothing_type);
6893- }
6894- bp = julia_binding_gv (ctx, bnd);
68956877 jl_cgval_t gf = mark_julia_type (
68966878 ctx,
6897- ctx.builder .CreateCall (prepare_call (jlgenericfunction_func), { bp,
6898- literal_pointer_val (ctx, (jl_value_t *)mod), name
6879+ ctx.builder .CreateCall (prepare_call (jlgenericfunction_func), {
6880+ literal_pointer_val (ctx, (jl_value_t *)mod),
6881+ literal_pointer_val (ctx, (jl_value_t *)mn)
68996882 }),
69006883 true ,
69016884 jl_function_type);
0 commit comments