@@ -49,8 +49,9 @@ function code_typed(@nospecialize(job::CompilerJob); interactive::Bool=false, kw
49
49
# call Cthulhu without introducing a dependency on Cthulhu
50
50
mod = get (Base. loaded_modules, Cthulhu, nothing )
51
51
mod=== nothing && error (" Interactive code reflection requires Cthulhu; please install and load this package first." )
52
+ interp = get_interpreter (job)
52
53
descend_code_typed = getfield (mod, :descend_code_typed )
53
- descend_code_typed (job. source. f, job. source. tt; kwargs... )
54
+ descend_code_typed (job. source. f, job. source. tt; interp, kwargs... )
54
55
elseif VERSION >= v " 1.7-"
55
56
interp = get_interpreter (job)
56
57
InteractiveUtils. code_typed (job. source. f, job. source. tt; interp, kwargs... )
@@ -66,8 +67,9 @@ function code_warntype(io::IO, @nospecialize(job::CompilerJob); interactive::Boo
66
67
# call Cthulhu without introducing a dependency on Cthulhu
67
68
mod = get (Base. loaded_modules, Cthulhu, nothing )
68
69
mod=== nothing && error (" Interactive code reflection requires Cthulhu; please install and load this package first." )
70
+ interp = get_interpreter (job)
69
71
descend_code_warntype = getfield (mod, :descend_code_warntype )
70
- descend_code_warntype (job. source. f, job. source. tt; kwargs... )
72
+ descend_code_warntype (job. source. f, job. source. tt; interp, kwargs... )
71
73
elseif VERSION >= v " 1.7-"
72
74
interp = get_interpreter (job)
73
75
InteractiveUtils. code_warntype (io, job. source. f, job. source. tt; interp, kwargs... )
@@ -187,8 +189,8 @@ See also: `InteractiveUtils.@code_typed`
187
189
macro device_code_typed (ex... )
188
190
quote
189
191
output = Dict {CompilerJob,Any} ()
190
- function hook (job:: CompilerJob )
191
- output[job] = code_typed (job)
192
+ function hook (job:: CompilerJob ; kwargs ... )
193
+ output[job] = code_typed (job; kwargs ... )
192
194
end
193
195
$ (emit_hooked_compilation (:hook , ex... ))
194
196
output
0 commit comments