Skip to content

Commit 908016c

Browse files
committed
Reactivate automatic nospecialize for unused arguments
1 parent 210c5b5 commit 908016c

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
@@ -673,10 +673,8 @@ JL_DLLEXPORT void jl_method_set_source(jl_method_t *m, jl_code_info_t *src)
673673
for (j = 1; j < m->nargs && j <= sizeof(m->nospecialize) * 8; j++) {
674674
jl_value_t *ai = jl_array_ptr_ref(src->slotnames, j);
675675
if (ai == (jl_value_t*)jl_unused_sym) {
676-
// TODO: enable this. currently it triggers a bug on arguments like
677-
// ::Type{>:Missing}
678-
//int sn = j-1;
679-
//m->nospecialize |= (1 << sn);
676+
int sn = j-1;
677+
m->nospecialize |= (1 << sn);
680678
continue;
681679
}
682680
if (j <= 8) {

0 commit comments

Comments
 (0)