Repository navigation
Conversation
Collaborator
Author
|
cc @cameel |
djolertrk
added this pull request to stack #6
October 1, 2026 18:56
djolertrk
force-pushed
the
feature/ethdebug-data-table
branch
3 times, most recently
from
October 9, 2026 12:45
79e6567 to
090c641
Compare
djolertrk
force-pushed
the
feature/ethdebug-data-table
branch
from
October 16, 2026 12:00
090c641 to
0f663ff
Compare
The semantic debug info side table lives in liblangutil, next to the DebugData of Yul nodes that will carry its records, and is expressed in the ethdebug type and pointer structures. Those therefore move down from libevmasm, which keeps producing the program and resources outputs from them under the same schema namespace.
Add the reading direction for the ethdebug type and pointer structures: type documents, pointer expressions, pointers and pointer templates are parsed from JSON and checked against the schema, with every violation reported as a util::JsonValidationError whose message names the offending location. The generic part of that checking, i.e. object and array requirements, member presence, unknown members and typed member access, goes into libsolutil's JSON helpers next to isOfType(), so that the other JSON importers can use it as well. A new isoltest flavour, ethdebugDocumentTests, reads an ethdebug JSON document, validates it and writes it back, so that the expectation is either the document as the compiler writes it or the validation error.
Add the compiler structures of the semantic debug info specified in docs/internals/ethdebug_internal_debug_info.rst: scope records keyed by a scope ID (the AST ID of the source-language scope and an instance discriminator for cloned code), with variables carrying their identity, declaration range, type reference, phase and ethdebug pointer, plus the variable updates optimizer passes will produce. The side table keeps the records together with the type and pointer template resources they reference. Stack values are expressed over generated Yul locals until Yul is compiled to EVM, so the pointer expressions gain one compiler-internal form, YulLocal, written as $$yulLocal in the sidecar only; readers accept it on request and the public resources writer rejects it. The sidecar serialization writes the table as a versioned JSON document and reads it back with the same validation as the resources: unknown formats and members, malformed scope keys, variables whose phase and pointer disagree, unresolvable template references and internal expressions in the resources are reported with their location. The ethdebug document tests cover the sidecar round trip and the validation errors.
djolertrk
force-pushed
the
feature/ethdebug-data-table
branch
from
October 19, 2026 15:28
0f663ff to
74b357c
Compare
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
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.
A few things addressed:
liblangutil