Skip to content

Pragma for short-circuit evaluation#26

Merged
phobos2077 merged 2 commits intomasterfrom
feature/pragma-sce
Mar 8, 2026
Merged

Pragma for short-circuit evaluation#26
phobos2077 merged 2 commits intomasterfrom
feature/pragma-sce

Conversation

@phobos2077
Copy link
Copy Markdown
Contributor

@phobos2077 phobos2077 commented Mar 7, 2026

Added support for #pragma sce for convenient enabling of short-circuit evaluation on a per-script basis

Testing methods:

  • Looked at int2ssl dump of the script with and without pragma to confirm SCE opcode patterns.
  • In-game test of the same script with and without pragma that checks for side effects in procedure that's not called with SCE enabled.

@phobos2077 phobos2077 requested a review from NovaRain March 7, 2026 18:26
@phobos2077
Copy link
Copy Markdown
Contributor Author

=== Errors found in the following files: ===
./sierra/wiretscn.ssl=RETURNCODE
./maps/rndparih.ssl=RETURNCODE
./maps/rndbhead.ssl=RETURNCODE
./newreno/ncjules.ssl=RETURNCODE

These RPU scripts fail to compile in webassembly and Linux versions, I'm not sure why. Since windows build and my local build (also windows) works without issue with these scripts, I assume it is some OS specific or RPU specific problem. I can't debug that on my system.

@NovaRain
Copy link
Copy Markdown
Collaborator

NovaRain commented Mar 8, 2026

Perhaps @roginvs can help with looking into the compile failure?

@roginvs
Copy link
Copy Markdown
Contributor

roginvs commented Mar 8, 2026

@phobos2077 I just tried locally using this branch and tests passed. Maybe cache is outdated, let's try first to bump cache version (i.e. just replace v1004 into something else)

@phobos2077 phobos2077 merged commit 4962d3c into master Mar 8, 2026
6 checks passed
@phobos2077 phobos2077 deleted the feature/pragma-sce branch March 8, 2026 16:45
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.

3 participants