Skip to content

Commit 7d4caa1

Browse files
committed
precompile_utils: Don't enqueue macro methods for pre-compilation
Despite disabling the runtime from compiling `macro` functions in `gf.c`, the pre-compilation code was adding macro code anyway to the workqueue.
1 parent bbb0596 commit 7d4caa1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/precompile_utils.c

+4
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ static void jl_compile_all_defs(jl_array_t *mis, int all)
170170
size_t i, l = jl_array_nrows(allmeths);
171171
for (i = 0; i < l; i++) {
172172
jl_method_t *m = (jl_method_t*)jl_array_ptr_ref(allmeths, i);
173+
int is_macro_method = jl_symbol_name(m->name)[0] == '@';
174+
if (is_macro_method)
175+
continue; // Avoid inference / pre-compilation for macros
176+
173177
if (jl_is_datatype(m->sig) && jl_isa_compileable_sig((jl_tupletype_t*)m->sig, jl_emptysvec, m)) {
174178
// method has a single compilable specialization, e.g. its definition
175179
// signature is concrete. in this case we can just hint it.

0 commit comments

Comments
 (0)