Skip to content

transpile: Create new context.rs module and split ExprContext into multiple types - #1990

Draft
Rua wants to merge 17 commits into
immunant:masterfrom
Rua:exprcontext-decl
Draft

Rua wants to merge 17 commits into
immunant:masterfrom
Rua:exprcontext-decl

Conversation

@Rua

@Rua Rua commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Some context flags don't apply to all possible child nodes, so the split avoids accidentally passing/inheriting them when not needed. That helps deal with #1973 (comment), though there are further changes that are needed after this, to "reset" the ExprContext specific flags for each subexpression.

The reason that needs_address got renamed is mainly for easier naming of the new getter functions. If getters for booleans are to be named is_*, then is_needs_address doesn't work very well, while is_address_needed works much better. The decay_ref flag was left public because it's going to be removed by #1982 anyway, so there's no point in investing extra time thinking of a way to make it fit the rest of the refactor.

@Rua
Rua marked this pull request as draft September 2, 2026 13:27
@Rua
Rua force-pushed the exprcontext-decl branch 3 times, most recently from 9f13e26 to f2c82a3 Compare September 4, 2026 15:35
@Rua
Rua marked this pull request as ready for review September 4, 2026 15:35
@Rua
Rua marked this pull request as draft September 4, 2026 16:05
@Rua
Rua force-pushed the exprcontext-decl branch 2 times, most recently from e51a7f7 to aa81e3b Compare September 7, 2026 18:32
@Rua
Rua force-pushed the exprcontext-decl branch 2 times, most recently from 110d8d6 to 4c0cbd0 Compare October 2, 2026 10:30
@Rua Rua changed the title transpile: Don't pass ExprContext to most decls transpile: Create new context.rs module and split ExprContext into multiple types Oct 2, 2026
@Rua
Rua force-pushed the exprcontext-decl branch from 4c0cbd0 to 855874d Compare October 2, 2026 18:20
@Rua
Rua force-pushed the exprcontext-decl branch from 855874d to 8c4f866 Compare October 3, 2026 18:08
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.

1 participant