Skip to content

refactor(ast): enum conversion methods use NonNull#23962

Merged
graphite-app[bot] merged 1 commit into
mainfrom
om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_
Jun 30, 2026
Merged

refactor(ast): enum conversion methods use NonNull#23962
graphite-app[bot] merged 1 commit into
mainfrom
om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_

Conversation

@overlookmotel

@overlookmotel overlookmotel commented Jun 30, 2026

Copy link
Copy Markdown
Member

Refactor. Enum conversion methods (Expression::as_member_expression etc) use NonNull pointers for casting from one type to another, instead of const / *mut pointers.

This is more readable, and may also be slightly more performant - it may allow compiler to remove null pointer checks.

overlookmotel commented Jun 30, 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.

@codspeed-hq

codspeed-hq Bot commented Jun 30, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 55 untouched benchmarks
⏩ 16 skipped benchmarks1


Comparing om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_ (a8f8e9c) with main (26dd9e2)

Open in CodSpeed

Footnotes

  1. 16 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 force-pushed the om/06-29-feat_ast_add_method_to_widen_inherited_enum_ref_to_parent_ref branch from e8aff21 to 58c3c49 Compare June 30, 2026 00:34
@overlookmotel
overlookmotel force-pushed the om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_ branch from f4886c3 to 9eb73e7 Compare June 30, 2026 00:34
@overlookmotel overlookmotel self-assigned this Jun 30, 2026
@overlookmotel
overlookmotel marked this pull request as ready for review June 30, 2026 10:12
Copilot AI review requested due to automatic review settings June 30, 2026 10:12

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@overlookmotel
overlookmotel force-pushed the om/06-29-feat_ast_add_method_to_widen_inherited_enum_ref_to_parent_ref branch from 58c3c49 to f04cece Compare June 30, 2026 10:12
@overlookmotel
overlookmotel force-pushed the om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_ branch from 9eb73e7 to a6718bb Compare June 30, 2026 10:12
@overlookmotel

Copy link
Copy Markdown
Member Author

@claude review

@graphite-app

graphite-app Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Merge activity

@graphite-app
graphite-app Bot force-pushed the om/06-29-feat_ast_add_method_to_widen_inherited_enum_ref_to_parent_ref branch from f04cece to 4d22941 Compare June 30, 2026 13:12
graphite-app Bot pushed a commit that referenced this pull request Jun 30, 2026
Refactor. Enum conversion methods (`Expression::as_member_expression` etc) use `NonNull` pointers for casting from one type to another, instead of _const /_ `*mut` pointers.

This is more readable, and may also be slightly more performant - it may allow compiler to remove null pointer checks.
@graphite-app
graphite-app Bot force-pushed the om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_ branch from a6718bb to a33a71d Compare June 30, 2026 13:12
@camc314

camc314 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: a33a71dba6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@overlookmotel
overlookmotel force-pushed the om/06-29-feat_ast_add_method_to_widen_inherited_enum_ref_to_parent_ref branch from 4d22941 to a3019cb Compare June 30, 2026 14:47
overlookmotel added a commit that referenced this pull request Jun 30, 2026
Refactor. Enum conversion methods (`Expression::as_member_expression` etc) use `NonNull` pointers for casting from one type to another, instead of _const /_ `*mut` pointers.

This is more readable, and may also be slightly more performant - it may allow compiler to remove null pointer checks.
@overlookmotel
overlookmotel force-pushed the om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_ branch from a33a71d to 5a93062 Compare June 30, 2026 14:47
Refactor. Enum conversion methods (`Expression::as_member_expression` etc) use `NonNull` pointers for casting from one type to another, instead of _const /_ `*mut` pointers.

This is more readable, and may also be slightly more performant - it may allow compiler to remove null pointer checks.
@graphite-app
graphite-app Bot force-pushed the om/06-29-feat_ast_add_method_to_widen_inherited_enum_ref_to_parent_ref branch from a3019cb to 26dd9e2 Compare June 30, 2026 16:33
@graphite-app
graphite-app Bot force-pushed the om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_ branch from 5a93062 to a8f8e9c Compare June 30, 2026 16:34
Base automatically changed from om/06-29-feat_ast_add_method_to_widen_inherited_enum_ref_to_parent_ref to main June 30, 2026 16:44
@graphite-app
graphite-app Bot merged commit a8f8e9c into main Jun 30, 2026
39 of 40 checks passed
@graphite-app
graphite-app Bot deleted the om/06-30-refactor_ast_enum_conversion_methods_use_nonnull_ branch June 30, 2026 16:45
camc314 pushed a commit that referenced this pull request Jul 3, 2026
Refactor. Enum conversion methods (`Expression::as_member_expression` etc) use `NonNull` pointers for casting from one type to another, instead of _const /_ `*mut` pointers.

This is more readable, and may also be slightly more performant - it may allow compiler to remove null pointer checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST A-ast-tools Area - AST tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants