-
-
Notifications
You must be signed in to change notification settings - Fork 869
feat[tool]: add extra debugging output #4718
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
Merged
charles-cooper
merged 14 commits into
vyperlang:master
from
Certora:jtoman/debug-info-ext
Sep 19, 2025
Merged
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e0eeb81
feat[tool]: Add extra debugging output
jtoman 6b62f91
Adds test as suggested
jtoman db89f1a
Merge remote-tracking branch 'origin/master' into jtoman/debug-info-ext
jtoman c00fc16
Fixes test, impl
jtoman 5e28ef7
Lint fixup
jtoman f920c1c
Merge branch 'master' into jtoman/debug-info-ext
jtoman 7ac1316
Merge remote-tracking branch 'origin/master' into jtoman/debug-info-ext
jtoman 4b33607
Merge remote-tracking branch 'certora-origin/jtoman/debug-info-ext' i…
jtoman 29dd092
Type fix, fix merge
jtoman 34191a4
Lint...
jtoman 3753797
Merge remote-tracking branch 'origin/master' into jtoman/debug-info-ext
jtoman c9192a9
Merge remote-tracking branch 'origin/master' into jtoman/debug-info-ext
jtoman f3aac5e
update output comment
jtoman e30c64d
Make lint happy
jtoman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| from vyper.compiler import compile_code | ||
| from vyper.compiler.settings import Settings | ||
|
|
||
|
|
||
| TEST_CODE = """ | ||
| @internal | ||
| def foo(a: uint256) -> uint256: | ||
| return a + 1 | ||
|
|
||
| # force foo to not be inlined | ||
| @external | ||
| def bar(a: uint256) -> uint256: | ||
| return self.foo(a) | ||
|
|
||
| @external | ||
| def baz(a: uint256) -> uint256: | ||
| return self.foo(a + 1) | ||
| """ | ||
|
|
||
|
|
||
| def test_simple_map(): | ||
| code = TEST_CODE | ||
| output = compile_code( | ||
| code, | ||
| output_formats=["symbol_map_runtime", "metadata"], | ||
| settings=Settings(experimental_codegen=True), | ||
| ) | ||
| meta = output["metadata"] | ||
| symbol_map = output["symbol_map_runtime"] | ||
| foo_meta_ent = None | ||
| assert "function_info" in meta, "missing function info in metadata" | ||
| function_infos = meta["function_info"] | ||
| assert isinstance(function_infos, dict), "function info is not a dict" | ||
| for _, v in function_infos.items(): | ||
| if v["name"] == "foo" and v["visibility"] == "internal": | ||
| foo_meta_ent = v | ||
| break | ||
| assert foo_meta_ent is not None, "didn't find entry for foo" | ||
| assert "venom_via_stack" in foo_meta_ent, "no stack info" | ||
| assert foo_meta_ent.get("venom_return_via_stack", False), "unexpected non-stack return" | ||
| assert foo_meta_ent["venom_via_stack"] == ["a"] | ||
| foo_id = foo_meta_ent["_ir_identifier"] | ||
| symbol_map_key = foo_id + "_runtime" | ||
| assert symbol_map_key in symbol_map, "missing constant start for foo()" |
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
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
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
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
Oops, something went wrong.
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.
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.
typo