Skip to content

Commit

Permalink
Update invalidations.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored Mar 4, 2024
1 parent aed0a88 commit 29941e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/invalidations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Recompile any invalidations that occur within the given expression. This is gene
by users in creating "Startup" packages to ensure that the code compiled by package authors is not invalidated.
"""
macro recompile_invalidations(expr)
# use QuoteNode instead of Expr(:quote) so that $ is not permitted as usual (instead of having this macro work like `@eval`)
# use QuoteNode instead of esc(Expr(:quote)) so that $ is not permitted as usual (instead of having this macro work like `@eval`)
return :(recompile_invalidations($__module__, $(QuoteNode(expr))))
end

function recompile_invalidations(__module__::Module, @nospecialize expr)
list = ccall(:jl_debug_method_invalidation, Any, (Cint,), 1)
try
eval(__module__, expr)
Core.eval(__module__, expr)
finally
ccall(:jl_debug_method_invalidation, Any, (Cint,), 0)
end
Expand Down

0 comments on commit 29941e7

Please sign in to comment.