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.
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
feat: location tree for debug_info #7034
base: master
Are you sure you want to change the base?
feat: location tree for debug_info #7034
Changes from 15 commits
cf0eeb9
17ff57d
eeb1e9f
aa74a7b
0984da7
a3eb219
fb962e0
3548030
70f5563
9c06c93
ca52a8e
4283acf
8683746
354b075
b3332d5
22357be
41a9c09
60a4fdc
6b38614
bed3b77
0ce7133
3db55aa
f57145d
201d371
0220c80
c8fae47
07d8d7f
df0abf3
5e96be1
d2ae968
6f23a8c
b273687
91496e4
27ed000
37bfadb
0f43935
5262488
b326ea8
edb58b8
5b0fedb
0e037ec
5e94272
5a74021
54b6de7
f4c4ec4
7be438e
a549811
06a233f
7cbfca7
9f98cba
f9a3205
6c330a6
389f701
302d7d2
865da61
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Can you give an explainer on how exactly these fit together? I'm thinking that we're storing unnecessary data in
location_map
now.My understanding is that:
brillig_locations
stores for each brillig function a mapping from each opcode index to a callstack idlocation_tree
to get the associate callstack for any brillig opcode.location_map
stores a mapping from(acir_opcode_index, brillig_index)
to a callstack id which we can use withlocation_tree
.Why do we need to track
(acir_opcode_index, brillig_index)
inlocation_map
now? If we fail inside of a brillig call we can tell which brillig function we're executing from the ACIR opcode we've halted on, we thenThere 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.
In theory this makes sense, in practice I don't see where those brillig locations are inserted in the location_map.
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.
Hmm, true we seem to have removed the insertion of any
OpcodeLocation::Brillig
a while back.It still stands that we don't need to keep this enum in the build artifact anymore though as it's currently tech debt. We've kept this enum around just to keep the program serialization format the same but as we're changing it now anyway, now's a good time to clear up this tech debt.
noir/acvm-repo/acir/src/circuit/mod.rs
Lines 139 to 147 in 0512ee6
#5792
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.
Done.
What I did is create a new AcirOpcodeLocation type and use it inside DebugInfo LocationMap, instead of OpcodeLocation, converting between the 2 when necessary.
I did not touch the other usage of OpcodeLocation, which is used also with BrilligFlavor if a crash occur during ACVM execution.