Skip to content

refactor(parser): remove Modifier::is_static()#20736

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/03-23-refactor_parser_remove_modifier_is_static_
Mar 25, 2026
Merged

refactor(parser): remove Modifier::is_static()#20736
graphite-app[bot] merged 1 commit intomainfrom
om/03-23-refactor_parser_remove_modifier_is_static_

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Mar 25, 2026

Refactor. Remove Modifier::is_static method. It's very simple logic and only used in one place, so just inline it into its one call site.

Copy link
Copy Markdown
Member Author

overlookmotel commented Mar 25, 2026


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.

@github-actions github-actions bot added A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Mar 25, 2026
@overlookmotel overlookmotel marked this pull request as ready for review March 25, 2026 15:36
Copilot AI review requested due to automatic review settings March 25, 2026 15:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the Modifier::is_static() helper from oxc_parser and inlines its logic at the only in-repo call site in the modifier parsing loop.

Changes:

  • Removed pub fn is_static(&self) -> bool from Modifier.
  • Updated modifier parsing to check modifier.kind == ModifierKind::Static directly.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 25, 2026

Merging this PR will not alter performance

✅ 53 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/03-23-refactor_parser_remove_modifier_is_static_ (f35979d) with main (434a5c4)

Open in CodSpeed

Footnotes

  1. 3 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.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Mar 25, 2026
@graphite-app graphite-app bot changed the base branch from om/03-23-refactor_parser_remove_dead_code_from_modifier_parsing to graphite-base/20736 March 25, 2026 17:13
Copy link
Copy Markdown
Contributor

camc314 commented Mar 25, 2026

Merge activity

  • Mar 25, 5:14 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 25, 5:14 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Mar 25, 5:18 PM UTC: The Graphite merge queue couldn't merge this PR because it had merge conflicts.
  • Mar 25, 5:18 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 25, 5:19 PM UTC: The merge label '0-merge' was removed. This PR will no longer be merged by the Graphite merge queue
  • Mar 25, 5:19 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.
  • Mar 25, 5:21 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 25, 5:21 PM UTC: The merge label '0-merge' was removed. This PR will no longer be merged by the Graphite merge queue
  • Mar 25, 5:24 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 25, 5:24 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Mar 25, 5:38 PM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot changed the base branch from graphite-base/20736 to main March 25, 2026 17:18
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 25, 2026
@camc314 camc314 force-pushed the om/03-23-refactor_parser_remove_modifier_is_static_ branch from 5c42fe9 to f35979d Compare March 25, 2026 17:18
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Mar 25, 2026
Refactor. Remove `Modifier::is_static` method. It's very simple logic and only used in one place, so just inline it into its one call site.
@graphite-app graphite-app bot force-pushed the om/03-23-refactor_parser_remove_modifier_is_static_ branch from f35979d to c5c7210 Compare March 25, 2026 17:34
@graphite-app graphite-app bot merged commit c5c7210 into main Mar 25, 2026
27 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 25, 2026
@graphite-app graphite-app bot deleted the om/03-23-refactor_parser_remove_modifier_is_static_ branch March 25, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants