Skip to content

Commit c81e6ba

Browse files
authored
Don't look up the method age during deferred compilation. (#405)
1 parent aee2628 commit c81e6ba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/driver.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,12 @@ end
201201

202202
@generated function deferred_codegen(::Val{ft}, ::Val{tt}) where {ft,tt}
203203
id = length(deferred_codegen_jobs) + 1
204-
deferred_codegen_jobs[id] = FunctionSpec(ft, tt)
204+
deferred_codegen_jobs[id] = FunctionSpec(ft, tt, 0)
205+
# don't bother looking up the method's world, as we'll override it during codegen.
206+
#
207+
# this also works around an issue on <1.10, where we don't know the world age of
208+
# generated functions so use the current world counter, which may be too new
209+
# for the world we're compiling for.
205210

206211
pseudo_ptr = reinterpret(Ptr{Cvoid}, id)
207212
quote

0 commit comments

Comments
 (0)