perf(estree/tokens): use strings from AST for identifier tokens#19744
Draft
overlookmotel wants to merge 1 commit intomainfrom
Draft
perf(estree/tokens): use strings from AST for identifier tokens#19744overlookmotel wants to merge 1 commit intomainfrom
overlookmotel wants to merge 1 commit intomainfrom
Conversation
This was referenced Feb 26, 2026
8f936b9 to
be57855
Compare
aec3c03 to
7d3b668
Compare
This was referenced Feb 26, 2026
7d3b668 to
e162e09
Compare
e162e09 to
af6b068
Compare
This was referenced Feb 26, 2026
a25d804 to
b7e17fa
Compare
a6a2335 to
7374d6c
Compare
7374d6c to
a5484d1
Compare
576c090 to
573af00
Compare
graphite-app bot
pushed a commit
that referenced
this pull request
Feb 26, 2026
In `ESTree` trait, expose the buffer and formatter to callers. Usually callers use the standard APIs for serialization (`serializer.serialize_struct()` etc), exposing the underlying primitives allows callers to manually construct the JSON themselves where it's useful to do that for perf. This is used in #19744 to net a +9% perf gain in ESTree token serialization.
573af00 to
14f62f7
Compare
a5484d1 to
94e842a
Compare
graphite-app bot
pushed a commit
that referenced
this pull request
Feb 27, 2026
Refactor. Add a `TokenType` type which represents the type of a token. It's purely a wrapper around a `&'static str`, except that it enforces a maximum length on the string. This invariant is used in #19744 to avoid overflow checks when calling `CodeBuffer::print_strs_array`.
94e842a to
e95d9b3
Compare
14f62f7 to
9ced342
Compare
e95d9b3 to
569d6a0
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.
No description provided.