Skip to content

refactor(ast): remove AstBuilder::alloc calls#23708

Merged
graphite-app[bot] merged 1 commit into
mainfrom
om/06-21-refactor_ast_remove_astbuilder_alloc_calls
Jun 22, 2026
Merged

refactor(ast): remove AstBuilder::alloc calls#23708
graphite-app[bot] merged 1 commit into
mainfrom
om/06-21-refactor_ast_remove_astbuilder_alloc_calls

Conversation

@overlookmotel

@overlookmotel overlookmotel commented Jun 22, 2026

Copy link
Copy Markdown
Member

Pure refactor. Use shorter alloc_* methods of AstBuilder instead of using methods which build an owned type, and then calling ast.alloc(...) separately.

overlookmotel commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors AstBuilder convenience helpers to use the shorter arena-allocation helpers (alloc_*) directly, instead of building an owned node first and then calling AstBuilder::alloc(...).

Changes:

  • Replace self.alloc(self.unary_expression(...)) with self.alloc_unary_expression(...) in void_0.
  • Replace self.alloc(self.export_named_declaration(...)) with self.alloc_export_named_declaration(...) in plain_export_named_declaration* helpers.

@codspeed-hq

codspeed-hq Bot commented Jun 22, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 9 skipped benchmarks1


Comparing om/06-21-refactor_ast_remove_astbuilder_alloc_calls (c8df7fb) with main (c4be770)

Open in CodSpeed

Footnotes

  1. 9 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@overlookmotel overlookmotel self-assigned this Jun 22, 2026
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jun 22, 2026

overlookmotel commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

Merge activity

Pure refactor. Use shorter `alloc_*` methods of `AstBuilder` instead of using methods which build an owned type, and then calling `ast.alloc(...)` separately.
@graphite-app graphite-app Bot force-pushed the om/06-21-refactor_ast_remove_astbuilder_alloc_calls branch from c8df7fb to cf5e47e Compare June 22, 2026 12:49
@graphite-app graphite-app Bot merged commit cf5e47e into main Jun 22, 2026
29 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Jun 22, 2026
@graphite-app graphite-app Bot deleted the om/06-21-refactor_ast_remove_astbuilder_alloc_calls branch June 22, 2026 12:54
camc314 pushed a commit that referenced this pull request Jul 3, 2026
Pure refactor. Use shorter `alloc_*` methods of `AstBuilder` instead of using methods which build an owned type, and then calling `ast.alloc(...)` separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants