Skip to content

Commit 543f240

Browse files
committed
support UnionAll types in invoke
fixes #25341, fixes #24460, fixes #22554
1 parent 0abc263 commit 543f240

File tree

9 files changed

+78
-63
lines changed

9 files changed

+78
-63
lines changed

base/inference.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ function invoke_tfunc(@nospecialize(f), @nospecialize(types), @nospecialize(argt
16811681
return Bottom
16821682
end
16831683
ft = type_typeof(f)
1684-
types = Tuple{ft, types.parameters...}
1684+
types = rewrap_unionall(Tuple{ft, unwrap_unionall(types).parameters...}, types)
16851685
argtype = Tuple{ft, argtype.parameters...}
16861686
entry = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt), types, sv.params.world)
16871687
if entry === nothing
@@ -4649,8 +4649,8 @@ function inlineable(@nospecialize(f), @nospecialize(ft), e::Expr, atypes::Vector
46494649
invoke_tt.parameters[1] <: Tuple)
46504650
return NF
46514651
end
4652-
invoke_tt_params = invoke_tt.parameters[1].parameters
4653-
invoke_types = Tuple{ft, invoke_tt_params...}
4652+
invoke_tt = invoke_tt.parameters[1]
4653+
invoke_types = rewrap_unionall(Tuple{ft, unwrap_unionall(invoke_tt).parameters...}, invoke_tt)
46544654
invoke_entry = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt),
46554655
invoke_types, sv.params.world)
46564656
invoke_entry === nothing && return NF

src/builtins.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -903,12 +903,6 @@ JL_CALLABLE(jl_f_apply_type)
903903

904904
// generic function reflection ------------------------------------------------
905905

906-
static void jl_check_type_tuple(jl_value_t *t, jl_sym_t *name, const char *ctx)
907-
{
908-
if (!jl_is_tuple_type(t))
909-
jl_type_error_rt(jl_symbol_name(name), ctx, (jl_value_t*)jl_type_type, t);
910-
}
911-
912906
JL_CALLABLE(jl_f_applicable)
913907
{
914908
JL_NARGSV(applicable, 1);
@@ -922,11 +916,12 @@ JL_CALLABLE(jl_f_invoke)
922916
JL_NARGSV(invoke, 2);
923917
jl_value_t *argtypes = args[1];
924918
JL_GC_PUSH1(&argtypes);
925-
jl_check_type_tuple(args[1], jl_gf_name(args[0]), "invoke");
919+
if (!jl_is_tuple_type(jl_unwrap_unionall(args[1])))
920+
jl_type_error_rt(jl_symbol_name(jl_gf_name(args[0])), "invoke", (jl_value_t*)jl_type_type, args[1]);
926921
if (!jl_tuple_isa(&args[2], nargs-2, (jl_datatype_t*)argtypes))
927922
jl_error("invoke: argument type error");
928923
args[1] = args[0]; // move function directly in front of arguments
929-
jl_value_t *res = jl_gf_invoke((jl_tupletype_t*)argtypes, &args[1], nargs-1);
924+
jl_value_t *res = jl_gf_invoke(argtypes, &args[1], nargs-1);
930925
JL_GC_POP();
931926
return res;
932927
}

src/codegen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4523,7 +4523,7 @@ static Function *jl_cfunction_object(jl_function_t *ff, jl_value_t *declrt, jl_t
45234523
// check the cache
45244524
jl_typemap_entry_t *sf = NULL;
45254525
if (jl_cfunction_list.unknown != jl_nothing) {
4526-
sf = jl_typemap_assoc_by_type(jl_cfunction_list, (jl_tupletype_t*)cfunc_sig, NULL, /*subtype*/0, /*offs*/0, /*world*/1, /*max_world_mask*/0);
4526+
sf = jl_typemap_assoc_by_type(jl_cfunction_list, cfunc_sig, NULL, /*subtype*/0, /*offs*/0, /*world*/1, /*max_world_mask*/0);
45274527
if (sf) {
45284528
jl_value_t *v = sf->func.value;
45294529
if (v) {

src/dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2568,7 +2568,7 @@ static jl_method_t *jl_lookup_method_worldset(jl_methtable_t *mt, jl_datatype_t
25682568
jl_method_t *_new;
25692569
while (1) {
25702570
entry = jl_typemap_assoc_by_type(
2571-
mt->defs, sig, NULL, /*subtype*/0, /*offs*/0, world, /*max_world_mask*/0);
2571+
mt->defs, (jl_value_t*)sig, NULL, /*subtype*/0, /*offs*/0, world, /*max_world_mask*/0);
25722572
if (!entry)
25732573
break;
25742574
_new = (jl_method_t*)entry->func.value;
@@ -2581,7 +2581,7 @@ static jl_method_t *jl_lookup_method_worldset(jl_methtable_t *mt, jl_datatype_t
25812581
// If we failed to find a method (perhaps due to method deletion),
25822582
// grab anything
25832583
entry = jl_typemap_assoc_by_type(
2584-
mt->defs, sig, NULL, /*subtype*/0, /*offs*/0, /*world*/jl_world_counter, /*max_world_mask*/(~(size_t)0) >> 1);
2584+
mt->defs, (jl_value_t*)sig, NULL, /*subtype*/0, /*offs*/0, /*world*/jl_world_counter, /*max_world_mask*/(~(size_t)0) >> 1);
25852585
assert(entry);
25862586
assert(entry->max_world != ~(size_t)0);
25872587
*max_world = entry->max_world;

src/gf.c

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ JL_DLLEXPORT jl_method_instance_t *jl_specializations_get_linfo(jl_method_t *m,
146146
assert(world >= m->min_world && "typemap lookup is corrupted");
147147
JL_LOCK(&m->writelock);
148148
jl_typemap_entry_t *sf =
149-
jl_typemap_assoc_by_type(m->specializations, (jl_tupletype_t*)type, NULL, /*subtype*/0, /*offs*/0, world, /*max_world_mask*/0);
149+
jl_typemap_assoc_by_type(m->specializations, type, NULL, /*subtype*/0, /*offs*/0, world, /*max_world_mask*/0);
150150
if (sf && jl_is_method_instance(sf->func.value)) {
151151
jl_method_instance_t *linfo = (jl_method_instance_t*)sf->func.value;
152152
assert(linfo->min_world <= sf->min_world && linfo->max_world >= sf->max_world);
@@ -177,7 +177,7 @@ JL_DLLEXPORT jl_method_instance_t *jl_specializations_get_linfo(jl_method_t *m,
177177
return li;
178178
}
179179

180-
JL_DLLEXPORT jl_value_t *jl_specializations_lookup(jl_method_t *m, jl_tupletype_t *type, size_t world)
180+
JL_DLLEXPORT jl_value_t *jl_specializations_lookup(jl_method_t *m, jl_value_t *type, size_t world)
181181
{
182182
jl_typemap_entry_t *sf = jl_typemap_assoc_by_type(
183183
m->specializations, type, NULL, /*subtype*/0, /*offs*/0, world, /*max_world_mask*/0);
@@ -186,7 +186,7 @@ JL_DLLEXPORT jl_value_t *jl_specializations_lookup(jl_method_t *m, jl_tupletype_
186186
return sf->func.value;
187187
}
188188

189-
JL_DLLEXPORT jl_value_t *jl_methtable_lookup(jl_methtable_t *mt, jl_tupletype_t *type, size_t world)
189+
JL_DLLEXPORT jl_value_t *jl_methtable_lookup(jl_methtable_t *mt, jl_value_t *type, size_t world)
190190
{
191191
jl_typemap_entry_t *sf = jl_typemap_assoc_by_type(
192192
mt->defs, type, NULL, /*subtype*/0, /*offs*/0, world, /*max_world_mask*/0);
@@ -548,7 +548,7 @@ jl_value_t *jl_nth_slot_type(jl_value_t *sig, size_t i)
548548
// after intersection, the argument tuple type needs to be corrected to reflect the signature match
549549
// that occurred, if the arguments contained a Type but the signature matched on the kind
550550
// if sharp_match is returned as false, this tt may have matched only because of bug in subtyping
551-
static jl_tupletype_t *join_tsig(jl_tupletype_t *tt, jl_tupletype_t *sig, int *sharp_match)
551+
static jl_tupletype_t *join_tsig(jl_tupletype_t *tt, jl_value_t *sig, int *sharp_match)
552552
{
553553
jl_svec_t *newparams = NULL;
554554
JL_GC_PUSH1(&newparams);
@@ -1070,10 +1070,10 @@ static jl_method_instance_t *jl_mt_assoc_by_type(jl_methtable_t *mt, jl_datatype
10701070
jl_method_instance_t *nf = NULL;
10711071
JL_GC_PUSH4(&env, &entry, &func, &sig);
10721072

1073-
entry = jl_typemap_assoc_by_type(mt->defs, tt, &env, /*subtype*/1, /*offs*/0, world, /*max_world_mask*/0);
1073+
entry = jl_typemap_assoc_by_type(mt->defs, (jl_value_t*)tt, &env, /*subtype*/1, /*offs*/0, world, /*max_world_mask*/0);
10741074
if (entry != NULL) {
10751075
jl_method_t *m = entry->func.method;
1076-
if (!jl_has_call_ambiguities(tt, m)) {
1076+
if (!jl_has_call_ambiguities((jl_value_t*)tt, m)) {
10771077
#ifdef TRACE_COMPILE
10781078
if (!jl_has_free_typevars((jl_value_t*)tt)) {
10791079
jl_printf(JL_STDERR, "precompile(");
@@ -1082,7 +1082,7 @@ static jl_method_instance_t *jl_mt_assoc_by_type(jl_methtable_t *mt, jl_datatype
10821082
}
10831083
#endif
10841084
int sharp_match;
1085-
sig = join_tsig(tt, (jl_tupletype_t*)m->sig, &sharp_match);
1085+
sig = join_tsig(tt, m->sig, &sharp_match);
10861086
if (!mt_cache) {
10871087
nf = jl_specializations_get_linfo(m, (jl_value_t*)sig, env, world);
10881088
}
@@ -1167,7 +1167,7 @@ static int check_ambiguous_visitor(jl_typemap_entry_t *oldentry, struct typemap_
11671167
// (if type-morespecific made a mistake, this also might end up finding
11681168
// that isect == type or isect == sig and return the original match)
11691169
jl_typemap_entry_t *l = jl_typemap_assoc_by_type(
1170-
map, (jl_tupletype_t*)isect, NULL, /*subtype*/0, /*offs*/0,
1170+
map, isect, NULL, /*subtype*/0, /*offs*/0,
11711171
closure->newentry->min_world, /*max_world_mask*/0);
11721172
if (l != NULL) // ok, intersection is covered
11731173
return 1;
@@ -1637,15 +1637,15 @@ jl_tupletype_t *arg_type_tuple(jl_value_t **args, size_t nargs)
16371637
jl_method_instance_t *jl_method_lookup_by_type(jl_methtable_t *mt, jl_tupletype_t *types,
16381638
int cache, int allow_exec, size_t world)
16391639
{
1640-
jl_typemap_entry_t *entry = jl_typemap_assoc_by_type(mt->cache, types, NULL, /*subtype*/1, jl_cachearg_offset(mt), world, /*max_world_mask*/0);
1640+
jl_typemap_entry_t *entry = jl_typemap_assoc_by_type(mt->cache, (jl_value_t*)types, NULL, /*subtype*/1, jl_cachearg_offset(mt), world, /*max_world_mask*/0);
16411641
if (entry) {
16421642
jl_method_instance_t *linfo = (jl_method_instance_t*)entry->func.value;
16431643
assert(linfo->min_world <= entry->min_world && linfo->max_world >= entry->max_world &&
16441644
"typemap consistency error: MethodInstance doesn't apply to full range of its entry");
16451645
return linfo;
16461646
}
16471647
JL_LOCK(&mt->writelock);
1648-
entry = jl_typemap_assoc_by_type(mt->cache, types, NULL, /*subtype*/1, jl_cachearg_offset(mt), world, /*max_world_mask*/0);
1648+
entry = jl_typemap_assoc_by_type(mt->cache, (jl_value_t*)types, NULL, /*subtype*/1, jl_cachearg_offset(mt), world, /*max_world_mask*/0);
16491649
if (entry) {
16501650
jl_method_instance_t *linfo = (jl_method_instance_t*)entry->func.value;
16511651
assert(linfo->min_world <= entry->min_world && linfo->max_world >= entry->max_world &&
@@ -1808,12 +1808,12 @@ jl_method_instance_t *jl_get_specialization1(jl_tupletype_t *types, size_t world
18081808
jl_svec_t *env = (jl_svec_t*)jl_svecref(match, 1);
18091809
jl_tupletype_t *ti = (jl_tupletype_t*)jl_unwrap_unionall(jl_svecref(match, 0));
18101810
jl_method_instance_t *nf = NULL;
1811-
if (ti == types && !jl_has_call_ambiguities(types, m)) {
1811+
if (ti == types && !jl_has_call_ambiguities((jl_value_t*)types, m)) {
18121812
jl_datatype_t *dt = jl_first_argument_datatype(jl_unwrap_unionall((jl_value_t*)types));
18131813
assert(jl_is_datatype(dt));
18141814
jl_methtable_t *mt = dt->name->mt;
18151815
int sharp_match;
1816-
sig = join_tsig(ti, (jl_tupletype_t*)m->sig, &sharp_match);
1816+
sig = join_tsig(ti, m->sig, &sharp_match);
18171817
if (sharp_match) {
18181818
JL_LOCK(&mt->writelock);
18191819
nf = cache_method(mt, &mt->cache, (jl_value_t*)mt, sig, ti, m, world, env, /*allow_exec*/1);
@@ -1872,7 +1872,7 @@ JL_DLLEXPORT jl_value_t *jl_get_spec_lambda(jl_tupletype_t *types, size_t world)
18721872
}
18731873

18741874
// see if a call to m with computed from `types` is ambiguous
1875-
JL_DLLEXPORT int jl_is_call_ambiguous(jl_tupletype_t *types, jl_method_t *m)
1875+
JL_DLLEXPORT int jl_is_call_ambiguous(jl_value_t *types, jl_method_t *m)
18761876
{
18771877
if (m->ambig == jl_nothing)
18781878
return 0;
@@ -1886,21 +1886,22 @@ JL_DLLEXPORT int jl_is_call_ambiguous(jl_tupletype_t *types, jl_method_t *m)
18861886

18871887
// see if a call to m with a subtype of `types` might be ambiguous
18881888
// if types is from a call signature (approximated by isleaftype), this is the same as jl_is_call_ambiguous above
1889-
JL_DLLEXPORT int jl_has_call_ambiguities(jl_tupletype_t *types, jl_method_t *m)
1889+
JL_DLLEXPORT int jl_has_call_ambiguities(jl_value_t *types, jl_method_t *m)
18901890
{
18911891
if (m->ambig == jl_nothing)
18921892
return 0;
18931893
for (size_t i = 0; i < jl_array_len(m->ambig); i++) {
18941894
jl_method_t *mambig = (jl_method_t*)jl_array_ptr_ref(m->ambig, i);
1895-
if (!jl_has_empty_intersection((jl_value_t*)mambig->sig, (jl_value_t*)types))
1895+
if (!jl_has_empty_intersection(mambig->sig, types))
18961896
return 1;
18971897
}
18981898
return 0;
18991899
}
19001900

19011901
// add type of `f` to front of argument tuple type
1902-
jl_tupletype_t *jl_argtype_with_function(jl_function_t *f, jl_tupletype_t *types)
1902+
jl_value_t *jl_argtype_with_function(jl_function_t *f, jl_value_t *types0)
19031903
{
1904+
jl_value_t *types = jl_unwrap_unionall(types0);
19041905
size_t l = jl_nparams(types);
19051906
jl_value_t *tt = (jl_value_t*)jl_alloc_svec(1+l);
19061907
size_t i;
@@ -1912,8 +1913,9 @@ jl_tupletype_t *jl_argtype_with_function(jl_function_t *f, jl_tupletype_t *types
19121913
for(i=0; i < l; i++)
19131914
jl_svecset(tt, i+1, jl_tparam(types,i));
19141915
tt = (jl_value_t*)jl_apply_tuple_type((jl_svec_t*)tt);
1916+
tt = jl_rewrap_unionall(tt, types0);
19151917
JL_GC_POP();
1916-
return (jl_tupletype_t*)tt;
1918+
return tt;
19171919
}
19181920

19191921
#ifdef JL_TRACE
@@ -2083,9 +2085,9 @@ JL_DLLEXPORT jl_value_t *jl_apply_generic(jl_value_t **args, uint32_t nargs)
20832085
return verify_type(res);
20842086
}
20852087

2086-
JL_DLLEXPORT jl_value_t *jl_gf_invoke_lookup(jl_datatype_t *types, size_t world)
2088+
JL_DLLEXPORT jl_value_t *jl_gf_invoke_lookup(jl_value_t *types, size_t world)
20872089
{
2088-
jl_methtable_t *mt = ((jl_datatype_t*)jl_tparam0(types))->name->mt;
2090+
jl_methtable_t *mt = jl_first_argument_datatype(types)->name->mt;
20892091
jl_svec_t *env = jl_emptysvec;
20902092
JL_GC_PUSH1(&env);
20912093
jl_typemap_entry_t *entry = jl_typemap_assoc_by_type(
@@ -2107,21 +2109,21 @@ JL_DLLEXPORT jl_value_t *jl_gf_invoke_lookup(jl_datatype_t *types, size_t world)
21072109
// every definition has its own private method table for this purpose.
21082110
//
21092111
// NOTE: assumes argument type is a subtype of the lookup type.
2110-
jl_value_t *jl_gf_invoke(jl_tupletype_t *types0, jl_value_t **args, size_t nargs)
2112+
jl_value_t *jl_gf_invoke(jl_value_t *types0, jl_value_t **args, size_t nargs)
21112113
{
21122114
size_t world = jl_get_ptls_states()->world_age;
21132115
jl_svec_t *tpenv = jl_emptysvec;
21142116
jl_tupletype_t *tt = NULL;
2115-
jl_tupletype_t *types = NULL;
2117+
jl_value_t *types = NULL;
21162118
jl_tupletype_t *sig = NULL;
21172119
JL_GC_PUSH4(&types, &tpenv, &sig, &tt);
21182120
jl_value_t *gf = args[0];
2119-
types = (jl_datatype_t*)jl_argtype_with_function(gf, (jl_tupletype_t*)types0);
2121+
types = jl_argtype_with_function(gf, types0);
21202122
jl_methtable_t *mt = jl_gf_mtable(gf);
21212123
jl_typemap_entry_t *entry = (jl_typemap_entry_t*)jl_gf_invoke_lookup(types, world);
21222124

21232125
if ((jl_value_t*)entry == jl_nothing) {
2124-
jl_method_error_bare(gf, (jl_value_t*)types0, world);
2126+
jl_method_error_bare(gf, types0, world);
21252127
// unreachable
21262128
}
21272129

@@ -2154,7 +2156,7 @@ jl_value_t *jl_gf_invoke(jl_tupletype_t *types0, jl_value_t **args, size_t nargs
21542156
method->invokes.unknown = jl_nothing;
21552157

21562158
int sharp_match;
2157-
sig = join_tsig(tt, (jl_tupletype_t*)method->sig, &sharp_match);
2159+
sig = join_tsig(tt, method->sig, &sharp_match);
21582160
mfunc = cache_method(mt, &method->invokes, entry->func.value, sig, tt, method, world, tpenv, 1);
21592161
}
21602162
JL_UNLOCK(&method->writelock);
@@ -2197,10 +2199,10 @@ static int tupletype_has_datatype(jl_tupletype_t *tt, tupletype_stack_t *stack)
21972199

21982200
JL_DLLEXPORT jl_value_t *jl_get_invoke_lambda(jl_methtable_t *mt,
21992201
jl_typemap_entry_t *entry,
2200-
jl_tupletype_t *tt,
2202+
jl_value_t *tt,
22012203
size_t world)
22022204
{
2203-
if (!jl_is_leaf_type((jl_value_t*)tt) || tupletype_has_datatype(tt, NULL))
2205+
if (!jl_is_leaf_type((jl_value_t*)tt) || tupletype_has_datatype((jl_tupletype_t*)tt, NULL))
22042206
return jl_nothing;
22052207

22062208
jl_method_t *method = entry->func.method;
@@ -2228,7 +2230,7 @@ JL_DLLEXPORT jl_value_t *jl_get_invoke_lambda(jl_methtable_t *mt,
22282230
JL_GC_PUSH2(&tpenv, &sig);
22292231
if (jl_is_unionall(entry->sig)) {
22302232
jl_value_t *ti =
2231-
jl_type_intersection_env((jl_value_t*)tt, (jl_value_t*)entry->sig, &tpenv);
2233+
jl_type_intersection_env(tt, (jl_value_t*)entry->sig, &tpenv);
22322234
assert(ti != (jl_value_t*)jl_bottom_type);
22332235
(void)ti;
22342236
}
@@ -2237,9 +2239,9 @@ JL_DLLEXPORT jl_value_t *jl_get_invoke_lambda(jl_methtable_t *mt,
22372239
method->invokes.unknown = jl_nothing;
22382240

22392241
int sharp_match;
2240-
sig = join_tsig(tt, (jl_tupletype_t*)method->sig, &sharp_match);
2242+
sig = join_tsig((jl_tupletype_t*)tt, method->sig, &sharp_match);
22412243
jl_method_instance_t *mfunc = cache_method(mt, &method->invokes, entry->func.value,
2242-
sig, tt, method, world, tpenv, 1);
2244+
sig, (jl_tupletype_t*)tt, method, world, tpenv, 1);
22432245
JL_GC_POP();
22442246
JL_UNLOCK(&method->writelock);
22452247
return (jl_value_t*)mfunc;

src/julia_internal.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ STATIC_INLINE jl_value_t *jl_call_method_internal(jl_method_instance_t *meth, jl
399399
return jl_call_fptr_internal(&fptr, meth, args, nargs);
400400
}
401401

402-
jl_tupletype_t *jl_argtype_with_function(jl_function_t *f, jl_tupletype_t *types);
402+
jl_value_t *jl_argtype_with_function(jl_function_t *f, jl_value_t *types);
403403

404404
JL_DLLEXPORT jl_value_t *jl_apply_2va(jl_value_t *f, jl_value_t **args, uint32_t nargs);
405405

@@ -516,7 +516,7 @@ int jl_is_toplevel_only_expr(jl_value_t *e);
516516
jl_value_t *jl_call_scm_on_ast(const char *funcname, jl_value_t *expr, jl_module_t *inmodule);
517517

518518
jl_method_instance_t *jl_method_lookup(jl_methtable_t *mt, jl_value_t **args, size_t nargs, int cache, size_t world);
519-
jl_value_t *jl_gf_invoke(jl_tupletype_t *types, jl_value_t **args, size_t nargs);
519+
jl_value_t *jl_gf_invoke(jl_value_t *types, jl_value_t **args, size_t nargs);
520520
jl_method_instance_t *jl_lookup_generic(jl_value_t **args, uint32_t nargs, uint32_t callsite, size_t world);
521521
JL_DLLEXPORT jl_value_t *jl_matching_methods(jl_tupletype_t *types, int lim, int include_ambiguous,
522522
size_t world, size_t *min_valid, size_t *max_valid);
@@ -638,10 +638,10 @@ JL_DLLEXPORT jl_array_t *jl_idtable_rehash(jl_array_t *a, size_t newsz);
638638

639639
JL_DLLEXPORT jl_methtable_t *jl_new_method_table(jl_sym_t *name, jl_module_t *module);
640640
jl_method_instance_t *jl_get_specialization1(jl_tupletype_t *types, size_t world);
641-
JL_DLLEXPORT int jl_has_call_ambiguities(jl_tupletype_t *types, jl_method_t *m);
641+
JL_DLLEXPORT int jl_has_call_ambiguities(jl_value_t *types, jl_method_t *m);
642642
jl_method_instance_t *jl_get_specialized(jl_method_t *m, jl_value_t *types, jl_svec_t *sp);
643643
int jl_is_rettype_inferred(jl_method_instance_t *li);
644-
JL_DLLEXPORT jl_value_t *jl_methtable_lookup(jl_methtable_t *mt, jl_tupletype_t *type, size_t world);
644+
JL_DLLEXPORT jl_value_t *jl_methtable_lookup(jl_methtable_t *mt, jl_value_t *type, size_t world);
645645
JL_DLLEXPORT jl_method_instance_t *jl_specializations_get_linfo(jl_method_t *m, jl_value_t *type, jl_svec_t *sparams, size_t world);
646646
JL_DLLEXPORT void jl_method_instance_add_backedge(jl_method_instance_t *callee, jl_method_instance_t *caller);
647647
JL_DLLEXPORT void jl_method_table_add_backedge(jl_methtable_t *mt, jl_value_t *typ, jl_value_t *caller);
@@ -926,7 +926,7 @@ jl_typemap_entry_t *jl_typemap_insert(union jl_typemap_t *cache, jl_value_t *par
926926
jl_value_t **overwritten);
927927

928928
jl_typemap_entry_t *jl_typemap_assoc_by_type(
929-
union jl_typemap_t ml_or_cache, jl_tupletype_t *types, jl_svec_t **penv,
929+
union jl_typemap_t ml_or_cache, jl_value_t *types, jl_svec_t **penv,
930930
int8_t subtype, int8_t offs, size_t world, size_t max_world_mask);
931931
jl_typemap_entry_t *jl_typemap_level_assoc_exact(jl_typemap_level_t *cache, jl_value_t **args, size_t n, int8_t offs, size_t world);
932932
jl_typemap_entry_t *jl_typemap_entry_assoc_exact(jl_typemap_entry_t *mn, jl_value_t **args, size_t n, size_t world);

0 commit comments

Comments
 (0)