Skip to content

Commit

Permalink
debuginfo: store location of loop boundary (#41857)
Browse files Browse the repository at this point in the history
Since lowering always inserts gotos and other instructions after loop
bodies, this allows debuggers to give a more useful location for these
instructions.

fixes JuliaDebug/JuliaInterpreter.jl#485
  • Loading branch information
simeonschaub authored Aug 25, 2021
1 parent d060255 commit 7173fa5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ macro distributed(args...)
var = loop.args[1].args[1]
r = loop.args[1].args[2]
body = loop.args[2]
if Meta.isexpr(body, :block) && body.args[end] isa LineNumberNode
resize!(body.args, length(body.args) - 1)
end
if na==1
syncvar = esc(Base.sync_varname)
return quote
Expand Down

0 comments on commit 7173fa5

Please sign in to comment.