perf(ast_tools): reduce data passing between functions#20579
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 20, 2026
Merged
Conversation
Member
Author
This was referenced Mar 20, 2026
This was referenced Mar 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors tasks/ast_tools parsing to reduce parallel data plumbing by embedding the is_meta flag inside StructSkeleton / EnumSkeleton and exposing common accessors on Skeleton.
Changes:
- Add
Skeleton::name()andSkeleton::is_meta()accessors and storeis_metaon both skeleton variants. - Simplify
load_fileto returnVec<Skeleton>(instead of(name, skeleton, is_meta)tuples) via aparse_itemhelper. - Update phase-1 collection logic and downstream parsing destructures to align with the new skeleton shapes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/ast_tools/src/parse/skeleton.rs | Adds name()/is_meta() on Skeleton and embeds is_meta into struct/enum skeleton types. |
| tasks/ast_tools/src/parse/load.rs | Refactors file loading/parsing to return Skeleton directly and centralizes item parsing. |
| tasks/ast_tools/src/parse/mod.rs | Updates phase-1 merging logic to use Skeleton accessors and new return type from load_file. |
| tasks/ast_tools/src/parse/parse.rs | Updates skeleton destructuring patterns to ignore the new is_meta field. |
93f5bde to
c66b283
Compare
677b327 to
b94ce6b
Compare
Contributor
Merge activity
|
Refactor `ast_tools`. Simplify code by storing `is_meta` flag in `StructSkeleton` and `EnumSkeleton` types, instead of passing around a `bool` separately.
c66b283 to
82a136f
Compare
b94ce6b to
b4da52f
Compare
Base automatically changed from
om/02-14-perf_ast_tools_parse_files_in_parallel
to
main
March 20, 2026 22:23
costajohnt
pushed a commit
to costajohnt/oxc
that referenced
this pull request
Mar 22, 2026
…0579) Refactor `ast_tools`. Simplify code by storing `is_meta` flag in `StructSkeleton` and `EnumSkeleton` types, instead of passing around a `bool` separately.
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.

Refactor
ast_tools. Simplify code by storingis_metaflag inStructSkeletonandEnumSkeletontypes, instead of passing around aboolseparately.