Repository navigation
Conversation
Any collection may have a name. A collection's name scopes the regions inside it in the result of the pointer, and a named list also scopes each element by its index. Expressions do not see collection names. The reference implementation gives each region a `path`: the names of the named collections that contain it, outermost first, with the element index after each named list's name.
Contributor
|
Hazimehhassan
approved these changes
Nov 12, 2026
This branch has not been deployed
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.
Stacked on #411.
Today a pointer's result is a flat list of regions, so when two parts of a pointer use the same template, their regions have the same names and a consumer cannot tell them apart unless the producer renames every region with
yields.This lets any collection (group, list, conditional, scope, reference, templates) carry an optional
name, an ethdebug/format/pointer/identifier. A collection's name scopes the regions inside it in the result of the pointer. A named list also scopes each element by its index, so the regions of one element stay together. Collection names affect only the result:~read,.offset,.lengthand.slotsee region names only, exactly as before, andyieldsrenames regions only. A consumer that ignores collection names gets the same regions with the same names.In the pointers package, each output region gets a
path: the names of the named collections that contain it, outermost first, with the element index after each named list's name. For example, a list nameditemswhoseisis a group namedelemgives["items", 0, "elem"],["items", 1, "elem"].pathis omitted when no named collection contains the region, so pointers without collection names give exactly the regions they gave before.The new ethdebug/format/pointer example describes
struct Line { Point a; Point b; }in storage with onepointtemplate referenced twice, distinguished only by the names of the two references. An integration test runs it against a real solc trace and reads each member'sxandyby path.