Skip to content

Commit f769e41

Browse files
committed
fix #9883, #10085
apparently some compilers don't like my previous attempts to generate conditional alloca gcframes
1 parent 470cacb commit f769e41

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/builtins.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,14 @@ JL_CALLABLE(jl_f_apply)
432432
}
433433
}
434434
jl_value_t **newargs;
435-
if (n > jl_page_size/sizeof(jl_value_t*)) {
435+
int onstack = (n < jl_page_size/sizeof(jl_value_t*));
436+
JL_GC_PUSHARGS(newargs, onstack ? n : 1);
437+
if (!onstack) {
436438
// put arguments on the heap if there are too many
437439
jl_value_t *argarr = (jl_value_t*)jl_alloc_cell_1d(n);
438-
JL_GC_PUSH1(&argarr);
440+
newargs[0] = argarr;
439441
newargs = jl_cell_data(argarr);
440442
}
441-
else {
442-
JL_GC_PUSHARGS(newargs, n);
443-
}
444443
n = 0;
445444
for(i=1; i < nargs; i++) {
446445
if (jl_is_tuple(args[i])) {

0 commit comments

Comments
 (0)