Skip to content

Conversation

@boriel
Copy link
Collaborator

@boriel boriel commented Jan 1, 2026

What / Why

Ensure that builtin functions USR, IN and RND are always called, even in optimized variable assignations like:

LET c = USR 32750

because these functions have side-effects and these must always be taken into account.

Fixes #1027

boriel added 2 commits January 1, 2026 19:39
Sentences like:
 LET c = USR(x)
are optimized if c var is not used. But
the built-in call must be executed if it has side-effects.

Thse builtins are: IN, RND and USR
@boriel boriel merged commit 245fb10 into main Jan 1, 2026
1 check passed
@boriel boriel deleted the fix/USR_not_called branch January 1, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: USR call is removed by optimizer

2 participants