feat(ast): add a dummy `node_id` field to all visitable AST types.
Part of #5689
A few places are creating these nodes without AstBuilder; For now I've assigned them directly but should be taken care of as part of making types non_exhaustive.
Your org has enabled the Graphite merge queue for merging into main
Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.
You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.
[!WARNING] This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. Learn more
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @rzvxa and the rest of your teammates on
Graphite
CodSpeed Performance Report
Merging oxc-project/oxc#5775 will degrade performances by 3.87%
Comparing 09-15-feat_ast_add_a_dummy_node_id_field_to_all_visitable_ast_types (f5344f9) with 09-15-fix_ast_tools_fix_miscalculation_of_enum_layouts (ea1c733)
Summary
❌ 4 regressions
✅ 25 untouched benchmarks
:warning: Please fix the performance issues or acknowledge them on CodSpeed.
Benchmarks breakdown
| Benchmark | 09-15-fix_ast_tools_fix_miscalculation_of_enum_layouts |
09-15-feat_ast_add_a_dummy_node_id_field_to_all_visitable_ast_types |
Change | |
|---|---|---|---|---|
| ❌ | codegen[checker.ts] |
20.8 ms | 21.7 ms | -3.87% |
| ❌ | isolated-declarations[vue-id.ts] |
391.8 ms | 404.8 ms | -3.19% |
| ❌ | parser[RadixUIAdoptionSection.jsx] |
77.3 µs | 79.7 µs | -3.04% |
| ❌ | parser[cal.com.tsx] |
24.5 ms | 25.2 ms | -3.08% |
CodSpeed Performance Report
Merging oxc-project/oxc#5775 will degrade performances by 3.87%
Comparing
09-15-feat_ast_add_a_dummy_node_id_field_to_all_visitable_ast_types(00ce823) with09-15-fix_ast_tools_fix_miscalculation_of_enum_layouts(ea1c733)Summary
❌ 3regressions✅ 26untouched benchmarks⚠️ Please fix the performance issues or acknowledge them on CodSpeed.
Benchmarks breakdown
Benchmark
09-15-fix_ast_tools_fix_miscalculation_of_enum_layouts09-15-feat_ast_add_a_dummy_node_id_field_to_all_visitable_ast_typesChange ❌codegen[checker.ts]20.8 ms 21.7 ms -3.87% ❌isolated-declarations[vue-id.ts]391.8 ms 404.7 ms -3.17% ❌parser[cal.com.tsx]24.5 ms 25.2 ms -3.07%
Not bad!!
A few places are creating these nodes without AstBuilder; For now I've assigned them directly but should be taken care of as part of making types non_exhaustive.
I cleaned up the parser a few days, let me ask @Dunqing to refactor the transformer 😀
Let's do non_exhaustive first https://github.com/oxc-project/oxc/pull/5778
Merging oxc-project/oxc#5775 will degrade performances by 3.87%
Not bad!!
We can win most of this perf back if we optimize field layouts later on.