diff --git a/base/opaque_closure.jl b/base/opaque_closure.jl index 9891db20249fb..08196f20a3099 100644 --- a/base/opaque_closure.jl +++ b/base/opaque_closure.jl @@ -61,6 +61,8 @@ function Core.OpaqueClosure(ir::IRCode, @nospecialize env...; do_compile::Bool = true) # NOTE: we need ir.argtypes[1] == typeof(env) ir = Core.Compiler.copy(ir) + # if the user didn't specify a definition MethodInstance or filename Symbol to use for the debuginfo, set a filename now + @something ir.debuginfo.def ir.debuginfo.def=var"generated IR for OpaqueClosure" nargs = length(ir.argtypes)-1 sig = compute_oc_signature(ir, nargs, isva) rt = compute_ir_rettype(ir) diff --git a/test/compiler/interpreter_exec.jl b/test/compiler/interpreter_exec.jl index e76cd70361931..afa81a871839f 100644 --- a/test/compiler/interpreter_exec.jl +++ b/test/compiler/interpreter_exec.jl @@ -81,7 +81,7 @@ let m = Meta.@lower 1 + 1 QuoteNode(:b), GlobalRef(@__MODULE__, :test29262), # block 2 - EnterNode(11), + EnterNode(12), # block 3 UpsilonNode(), UpsilonNode(), @@ -91,11 +91,13 @@ let m = Meta.@lower 1 + 1 UpsilonNode(SSAValue(1)), # block 5 Expr(:throw_undef_if_not, :expected, false), + ReturnNode(), # unreachable # block 6 PhiCNode(Any[SSAValue(5), SSAValue(7), SSAValue(9)]), # NULL, :a, :b PhiCNode(Any[SSAValue(6)]), # NULL + Expr(:pop_exception, SSAValue(4)), # block 7 - ReturnNode(SSAValue(11)), + ReturnNode(SSAValue(12)), ] nstmts = length(src.code) src.ssavaluetypes = nstmts @@ -106,4 +108,5 @@ let m = Meta.@lower 1 + 1 @test :a === @eval $m global test29262 = false @test :b === @eval $m + @test isempty(Base.catch_stack()) end