Skip to content

Commit 0878d18

Browse files
committed
support for inference heuristic spoofing (ref JuliaLang/julia#24852)
1 parent 635ccb7 commit 0878d18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/overdub/execution.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ for N in 0:MAX_ARGS
170170
Any[:f, arg_names...],
171171
Any[:F, :C, :M, :world, :debug],
172172
@__LINE__,
173-
QuoteNode(Symbol(@__FILE__)))
173+
QuoteNode(Symbol(@__FILE__)),
174+
true)
174175
@eval begin
175176
function _overdub_generator(::Type{F}, ::Type{C}, ::Type{M}, world, debug, f, $(arg_names...)) where {F,C,M}
176177
ftype = unbox(C, F)
@@ -180,6 +181,7 @@ for N in 0:MAX_ARGS
180181
if isa(method_body, CodeInfo)
181182
method_body = overdub_new!(overdub_calls!(getpass(C, M)(signature, method_body)))
182183
method_body.inlineable = true
184+
method_body.signature_for_inference_heuristics = Core.svec(ftype, atypes, world)
183185
else
184186
arg_names = $arg_names
185187
method_body = quote

0 commit comments

Comments
 (0)