Skip to content

Commit 1fae15a

Browse files
oschulzKristofferC
authored andcommitted
Reactivate automatic nospecialize for unused arguments
1 parent 6ce51d3 commit 1fae15a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/method.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -859,10 +859,8 @@ JL_DLLEXPORT void jl_method_set_source(jl_method_t *m, jl_code_info_t *src)
859859
for (j = 1; j < m->nargs && j <= sizeof(m->nospecialize) * 8; j++) {
860860
jl_value_t *ai = jl_array_ptr_ref(src->slotnames, j);
861861
if (ai == (jl_value_t*)jl_unused_sym) {
862-
// TODO: enable this. currently it triggers a bug on arguments like
863-
// ::Type{>:Missing}
864-
//int sn = j-1;
865-
//m->nospecialize |= (1 << sn);
862+
int sn = j-1;
863+
m->nospecialize |= (1 << sn);
866864
continue;
867865
}
868866
if (j <= 8) {

0 commit comments

Comments
 (0)