Skip to content

Commit

Permalink
Avoid finalizer to be compiled during test_jl_dump_compiles_toplevel_…
Browse files Browse the repository at this point in the history
…thunks
  • Loading branch information
tkf committed Mar 10, 2021
1 parent 4bcd695 commit 72fb012
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ function test_jl_dump_compiles_toplevel_thunks()
# Make sure to cause compilation of the eval function
# before calling it below.
Core.eval(Main, Any[:(nothing)][1])
GC.enable(false) # avoid finalizers to be compiled
topthunk = Meta.lower(Main, :(for i in 1:10; end))
ccall(:jl_dump_compiles, Cvoid, (Ptr{Cvoid},), io.handle)
Core.eval(Main, topthunk)
ccall(:jl_dump_compiles, Cvoid, (Ptr{Cvoid},), C_NULL)
close(io)
GC.enable(true)
tstats = stat(tfile)
tempty = tstats.size == 0
rm(tfile)
Expand Down

0 comments on commit 72fb012

Please sign in to comment.