Skip to content

Commit

Permalink
Add world age and interpreter arguments to code_warntype.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Jun 9, 2021
1 parent f442e42 commit 3bd6b3e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stdlib/InteractiveUtils/src/codeview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ Keyword argument `debuginfo` may be one of `:source` or `:none` (default), to sp
See [`@code_warntype`](@ref man-code-warntype) for more information.
"""
function code_warntype(io::IO, @nospecialize(f), @nospecialize(t); debuginfo::Symbol=:default, optimize::Bool=false)
function code_warntype(io::IO, @nospecialize(f), @nospecialize(t);
debuginfo::Symbol=:default, optimize::Bool=false,
world = Base.get_world_counter(),
interp = Core.Compiler.NativeInterpreter(world))
debuginfo = Base.IRShow.debuginfo(debuginfo)
lineprinter = Base.IRShow.__debuginfo[debuginfo]
for (src, rettype) in code_typed(f, t, optimize=optimize)
for (src, rettype) in code_typed(f, t; optimize, world, interp)
lambda_io::IOContext = io
p = src.parent
nargs::Int = 0
Expand Down

0 comments on commit 3bd6b3e

Please sign in to comment.