Skip to content

Commit

Permalink
move type-signature correction to a separate function
Browse files Browse the repository at this point in the history
this allows us to correct the type signature before passing it to the generated function
or returning it from ml_matches

this also improves the fix for #11840 to cover Unions of the offending types
  • Loading branch information
vtjnash committed Apr 12, 2016
1 parent a0ed9c1 commit 7c297d5
Show file tree
Hide file tree
Showing 5 changed files with 241 additions and 125 deletions.
6 changes: 4 additions & 2 deletions src/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ static void jl_serialize_methtable_from_mod(ios_t *s, jl_methtable_t *mt, int8_t
jl_serialize_value(s, name);
write_int8(s, iskw);
jl_serialize_value(s, ml->sig);
jl_serialize_value(s, ml->simplesig);
jl_serialize_value(s, ml->func);
jl_serialize_value(s, ml->tvars);
}
Expand Down Expand Up @@ -1712,10 +1713,11 @@ static void jl_deserialize_lambdas_from_mod(ios_t *s)
int8_t iskw = read_int8(s);
if (iskw)
gf = jl_get_kwsorter(((jl_datatype_t*)jl_typeof(gf))->name);
jl_tupletype_t *types = (jl_tupletype_t*)jl_deserialize_value(s, NULL);
jl_tupletype_t *type = (jl_tupletype_t*)jl_deserialize_value(s, NULL);
jl_tupletype_t *simpletype = (jl_tupletype_t*)jl_deserialize_value(s, NULL);
jl_lambda_info_t *meth = (jl_lambda_info_t*)jl_deserialize_value(s, NULL);
jl_svec_t *tvars = (jl_svec_t*)jl_deserialize_value(s, NULL);
jl_method_table_insert(jl_gf_mtable(gf), types, meth, tvars);
jl_method_table_insert(jl_gf_mtable(gf), type, simpletype, meth, tvars);
}
}

Expand Down
Loading

0 comments on commit 7c297d5

Please sign in to comment.