Skip to content

Commit

Permalink
support for inference heuristic spoofing (ref JuliaLang/julia#24852)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrevels committed Jan 2, 2018
1 parent 635ccb7 commit 0878d18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/overdub/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ for N in 0:MAX_ARGS
Any[:f, arg_names...],
Any[:F, :C, :M, :world, :debug],
@__LINE__,
QuoteNode(Symbol(@__FILE__)))
QuoteNode(Symbol(@__FILE__)),
true)
@eval begin
function _overdub_generator(::Type{F}, ::Type{C}, ::Type{M}, world, debug, f, $(arg_names...)) where {F,C,M}
ftype = unbox(C, F)
Expand All @@ -180,6 +181,7 @@ for N in 0:MAX_ARGS
if isa(method_body, CodeInfo)
method_body = overdub_new!(overdub_calls!(getpass(C, M)(signature, method_body)))
method_body.inlineable = true
method_body.signature_for_inference_heuristics = Core.svec(ftype, atypes, world)
else
arg_names = $arg_names
method_body = quote
Expand Down

0 comments on commit 0878d18

Please sign in to comment.