Skip to content

fix(compiler): spell startForcingThrottle limits 0 and 1 as False and True under optimizeForSize - #382

Merged
Teakowa merged 1 commit into
mainfrom
fix/size-optimization-param-coercions
Sep 25, 2026
Merged

Teakowa merged 1 commit into
mainfrom
fix/size-optimization-param-coercions

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Under #!optimizeForSize pinned OverPy 9.7.10 writes the six startForcingThrottle limits (canReplace0ByFalse / canReplace1ByTrue) as False/True. opy-rs left them numeric, so Bastion's startForcingThrottle(0, 0, 0, 0, 0, 0) differed from OverPy on the production main.opy.

This follows the existing per-function pattern (chase_call). The catalog's paramCoercions are acceptance flags and are broader than OverPy's replacement flags (for example Skip If), so applying them generically changes correct output and breaks the oracle tests. Other OverPy canReplace* parameters remain uncovered; none occur in Bastion's production entries.

Verification: fmt, clippy -D warnings, workspace tests pass. Wright 0.2.37 with a provider built from this branch compiles Bastion main.opy (zh-CN) and externalMain.opy (en-US); the canonical Wright-vs-OverPy diff is 0 lines for both.

… True under optimizeForSize

Pinned OverPy 9.7.10 marks the six throttle limits canReplace0ByFalse and canReplace1ByTrue, so #!optimizeForSize writes them as False and True. Bastion's startForcingThrottle(0, 0, 0, 0, 0, 0) compiled to numeric zeros, the last remaining difference from OverPy on its production entries.
@Teakowa
Teakowa merged commit 5fd52b4 into main Sep 25, 2026
5 checks passed
@Teakowa
Teakowa deleted the fix/size-optimization-param-coercions branch September 25, 2026 18:42
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