Conversation
Read label names, and use the names when building the IR. Blocks and loops can hold names directly. `if`, `try` and `try_table` cannot, so for them the name is only a hint: we use it when a branch to the scope means we have to create a wrapper block anyhow, and otherwise drop it, so that reading these names never changes the shape of the IR.
vouillon
force-pushed
the
label-names
branch
from
September 28, 2026 18:13
cb552ac to
7ddcda1
Compare
Write the label subsection (id 3) next to the function and local names when debug info is enabled. Only explicit names are written: the ones that came from the text format, from the name section, or through the C API, and not the ones we generate ourselves. Functions therefore gain an `explicitLabelNames` set, filled by IRBuilder when a label comes from outside rather than from makeFresh(). Keeping this next to `localNames` and `debugLocations` rather than on the expressions themselves is how the rest of our debug info is stored, and it has two advantages: ExpressionAnalyzer never sees it, so two otherwise-identical blocks cannot stop comparing equal because of debug info; and since label names are unique within a function, it keeps identifying the right labels as optimizations replace the expressions that carry them.
vouillon
force-pushed
the
label-names
branch
from
September 28, 2026 19:41
7ddcda1 to
01f2737
Compare
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.
This is the only section of the Extended Name Section proposal which is currently not handled.