Skip to content

transpile: Refactor and merge convert_condition and match_bool - #2018

Merged
ahomescu merged 7 commits into
immunant:masterfrom
Rua:convert_condition-refactor
Oct 23, 2026
Merged

ahomescu merged 7 commits into
immunant:masterfrom
Rua:convert_condition-refactor

Conversation

@Rua

@Rua Rua commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

This introduces a new enum IdOrExpr that functions can take, to allow them to accept either a yet-to-be-translated C CExprId or an already-translated Rust Box<Expr>. That in turn allows some functions to perform both roles.

@Rua
Rua force-pushed the convert_condition-refactor branch from fa29a94 to 51cf76e Compare September 21, 2026 13:15
@Rua
Rua marked this pull request as draft September 21, 2026 13:15
@Rua
Rua force-pushed the convert_condition-refactor branch 2 times, most recently from 2671d93 to a8751c9 Compare September 21, 2026 13:58
@Rua
Rua force-pushed the convert_condition-refactor branch 3 times, most recently from d99cfb3 to 9cb73f0 Compare October 8, 2026 11:10
@Rua
Rua marked this pull request as ready for review October 8, 2026 11:10

@ahomescu ahomescu 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.

I only had time for a quick look, will do a deeper review tomorrow.

Comment thread c2rust-transpile/src/translator/mod.rs Resolved
Comment thread c2rust-transpile/src/translator/mod.rs Resolved
@Rua
Rua force-pushed the convert_condition-refactor branch 2 times, most recently from ccb93c9 to 281f52e Compare October 21, 2026 09:27
Comment thread c2rust-transpile/src/translator/mod.rs Resolved
Comment thread c2rust-transpile/src/with_stmts.rs Resolved
@ahomescu

Copy link
Copy Markdown
Contributor

Are the snapshots identical?

@Rua
Rua force-pushed the convert_condition-refactor branch from 281f52e to c337a9f Compare October 22, 2026 10:11
@Rua

Rua commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

They should be, this is supposed to be a refactor and not a fix/improvement to the output.

@Rua
Rua force-pushed the convert_condition-refactor branch from c337a9f to 9bf91c8 Compare October 22, 2026 10:28
@Rua
Rua force-pushed the convert_condition-refactor branch from 9bf91c8 to 34bcc18 Compare October 22, 2026 15:09
@ahomescu
ahomescu merged commit b99495c into immunant:master Oct 23, 2026
11 checks passed
@Rua
Rua deleted the convert_condition-refactor branch October 23, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants