-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[libSyntax] Require RawSyntax to always live inside a SyntaxArena #35648
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
Conversation
@swift-ci Please smoke test |
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.
Clever idea
b00d184
to
30b4677
Compare
Good catches @rintaro. I thought I changed those places already but that must have been on another branch. |
Checking if we didn’t regress compilation performance and whether my instruction counter from the linked LLVM PR work. @swift-ci Please smoke test compiler performance |
This way, we will later be able to store additional information about the node inside the same arena with a guarantee that they will always be alive as long as the node is alive. These additional information will include a) the token's text (which can be a StringRef into a copy of the source code that lives inside the SyntaxArena) b) the token's unparsed trivia, which can be decomposed into pieces when needed.
30b4677
to
15949dc
Compare
@swift-ci Please test |
Build failed |
15949dc
to
803499e
Compare
@swift-ci Please test |
This way, we will later be able to store additional information about the node inside the same arena with a guarantee that they will always be alive as long as the node is alive.
These additional information will include
a) the token's text (which can be a StringRef into a copy of the source code that lives inside the SyntaxArena)
b) the token's unparsed trivia, which can be decomposed into pieces when needed.
Performance checklist (performed on my local machine)