Skip to content

feat: add internal spec for debug-info#16780

Open
djolertrk wants to merge 17 commits into
argotorg:developfrom
walnuthq:feature/internal-spec
Open

feat: add internal spec for debug-info#16780
djolertrk wants to merge 17 commits into
argotorg:developfrom
walnuthq:feature/internal-spec

Conversation

@djolertrk

Copy link
Copy Markdown
Contributor

This introduces the compiler-side model for carrying Solidity semantic debug info through the Yul pipeline, including AST-ID based reattachment across Yul reparse.
Current scope is intentionally narrow and we will add more entries into it once we are okay with the proposal on a high-level.

See docs/internals/ethdebug_internal_metadata.rst for more detailed explanation of the design.

@djolertrk djolertrk marked this pull request as draft June 5, 2026 15:50
@djolertrk

Copy link
Copy Markdown
Contributor Author

cc @nikola-matic @clonker

@nikola-matic nikola-matic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the build (the comment I left below should do it), and then can you drop a solc-bench in here.

Comment thread liblangutil/SemanticDebugData.h Outdated
using ConstPtr = std::shared_ptr<SemanticDebugData const>;

std::optional<int64_t> lexicalScopeID;
std::vector<SemanticDebugVariable> variableDefinitions;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::vector<SemanticDebugVariable> variableDefinitions;
std::vector<SemanticDebugVariable> variableDefinitions = {};

Since you're using named initializers, this should fix the build.

@djolertrk

Copy link
Copy Markdown
Contributor Author

@nikola-matic I fixed the build and here is the solc-bench output:

Benchmark          Metric         ir-ethdebug           ir                   Δ%        winner
-----------------  -------------  --------------------  -------------------  --------  ------
prb-math-4.1.1     cpu_time       12.1321s ± 0.4704s    10.0406s ± 0.3165s   +20.83%   ir
                   creation_size  592,270 ± 0           592,270 ± 0          0.0%      tie
                   peak_rss       2044080 ± 96536 MiB   1295600 ± 52003 MiB  +57.77%   ir
                   runtime_size   589,640 ± 0           589,640 ± 0          0.0%      tie
                   wall_time      12.8027s ± 0.6464s    10.4773s ± 0.4362s   +22.2%    ir
                   ethdebug_size  44.80 MiB ± 0.00 MiB  n/a                  N/A       n/a

forge-std-1.16.1   cpu_time       11.8554s ± 0.2979s    10.2449s ± 0.1482s   +15.72%   ir
                   creation_size  725,280 ± 0           725,280 ± 0          0.0%      tie
                   peak_rss       1554816 ± 70351 MiB   796144 ± 9474 MiB    +95.29%   ir
                   runtime_size   698,851 ± 0           698,851 ± 0          0.0%      tie
                   wall_time      12.1417s ± 0.3452s    10.4575s ± 0.1829s   +16.1%    ir
                   ethdebug_size  44.94 MiB ± 0.00 MiB  n/a                  N/A       n/a

morpho-blue-1.0.0  cpu_time       16.3965s ± 0.7634s    14.7222s ± 1.0004s   +11.37%   ~noise
                   creation_size  1,261,421 ± 0         1,261,421 ± 0        0.0%      tie
                   peak_rss       1824912 ± 50816 MiB   921792 ± 34683 MiB   +97.97%   ir
                   runtime_size   1,251,246 ± 0         1,251,246 ± 0        0.0%      tie
                   wall_time      16.9356s ± 0.9110s    15.0786s ± 1.1852s   +12.32%   ~noise
                   ethdebug_size  57.38 MiB ± 0.00 MiB  n/a                  N/A       n/a

solmate-6          cpu_time       6.9523s ± 0.1573s     6.0532s ± 0.3605s    +14.85%   ir
                   creation_size  540,758 ± 0           540,758 ± 0          0.0%      tie
                   peak_rss       919888 ± 33125 MiB    379440 ± 18556 MiB   +142.43%  ir
                   runtime_size   523,577 ± 0           523,577 ± 0          0.0%      tie
                   wall_time      7.1106s ± 0.1848s     6.2070s ± 0.4427s    +14.56%   ir
                   ethdebug_size  30.92 MiB ± 0.00 MiB  n/a                  N/A       n/a

Thank you!

@djolertrk djolertrk force-pushed the feature/internal-spec branch from 9101b5d to 033cc91 Compare June 10, 2026 13:13
@djolertrk djolertrk force-pushed the feature/internal-spec branch from 9fd16e7 to d08f715 Compare June 11, 2026 07:21
@djolertrk djolertrk marked this pull request as ready for review June 11, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants