Skip to content

Commit

Permalink
Fix interpreter-disabling on older Julia versions (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy authored Jul 22, 2022
1 parent 2cc1dbb commit 0f3db0c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions SnoopPrecompile/src/SnoopPrecompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ macro precompile_all_calls(ex::Expr)
end
else
# Use the hack on earlier Julia versions that blocks the interpreter
pushfirst!(ex.args, :(while false end))
ex = quote
while false end
$ex
end
end
if have_inference_tracking
ex = quote
local err, bt
err = bt = nothing
Core.Compiler.Timings.reset_timings()
Core.Compiler.__set_measure_typeinf(true)
try
Expand Down

2 comments on commit 0f3db0c

@timholy
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=SnoopPrecompile

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/64746

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a SnoopPrecompile-v1.0.0 -m "<description of version>" 0f3db0c33a7eb648b87f967998661b0e257cfcd4
git push origin SnoopPrecompile-v1.0.0

Please sign in to comment.