-
Notifications
You must be signed in to change notification settings - Fork 1
Improve DebugInfo
source provenance
#54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
serenity4
wants to merge
23
commits into
JuliaComputing:main
Choose a base branch
from
serenity4:more-debuginfo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+363
−313
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
serenity4
commented
Jun 9, 2025
Comment on lines
+75
to
+83
# Work around `show` functions requiring `invokelatest` queries | ||
# that may be problematic to execute from within generated functions. | ||
local inst | ||
try | ||
inst = string(stmt[:inst]) | ||
catch e | ||
isa(e, UndefVarError) && continue | ||
rethrow() | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a bit of a hack, though calling show
is kind of UB from generated functions. I'm only allowing UndefVarError
here which are currently caused by binding lookups in certain cases, but it's not impossible that we later discover that other exceptions may be thrown.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR accomplishes better
DebugInfo
tracing via the following changes:DebugInfo
was changed to be on top of otherDebugInfo
nodes. This notably allows Add codegen option to associate debuginfo with statement number at a particular stage #39 to retain source information.@insert_node_here
uses its__source__
implicit macro argument to insert additionalDebugInfo
information, if theinsert_stmt_debuginfo
setting is enabled.replace_call!
now takes a source and a settings struct to conditionally insert additionalDebugInfo
.insert_node_here!
calls were converted to the macro form,@insert_node_here
. Those that remain in function form use additional source and settings arguments to indicate provenance for optionalDebugInfo
.slotnames
information has been added to the ODE/DAE RHS codegen, and to the factory IR.I also included a refactor for the naming of locals in the ODE codegen while I was at it; see 676875a. I find it clearer, but if it's just me I am open to reverting that.
To do:
test/ipo.jl
.