Skip to content

Label asconst and machdep arguments to avoid mixups#230

Draft
sim642 wants to merge 4 commits into
developfrom
machdep-labeled
Draft

Label asconst and machdep arguments to avoid mixups#230
sim642 wants to merge 4 commits into
developfrom
machdep-labeled

Conversation

@sim642

@sim642 sim642 commented May 22, 2026

Copy link
Copy Markdown
Member

While reviewing things for #215, I noticed something odd: doExp has a bool argument meaning asconst, while constFold has one meaning machdep. In one place, the value of asconst is passed to be machdep:

CEExp (se, if !lowerConstants then constFold asconst e else e)

I find this strange: why should machdep be considered when converting to a constant, but not when converting a normal expression? This seems like a mixup.

To check this, I made both arguments labeled and indeed it's the only place this is mixed up like this.

@sim642 sim642 force-pushed the machdep-labeled branch from 9dd3f74 to 56278ce Compare May 22, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant