Skip to content

Propagate nullness through branches and inlined enum arguments - #1544

Merged
Frotty merged 1 commit into
masterfrom
codex/propagate-null-check-facts
Oct 22, 2026
Merged

Frotty merged 1 commit into
masterfrom
codex/propagate-null-check-facts

Conversation

@Frotty

@Frotty Frotty commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Inlined Lua native wrappers retain nil checks already established by the caller, and enum guards survive when inlining exposes a common.j constant. Propagate nullness along CFG branch edges and share the existing non-null constant proof with constant/copy propagation. The coordinate repro goes from three unit checks to one; the enum repro drops its unnecessary ConvertUnitState(0) branch while retaining the unit guard.

This is a scoped emission improvement, with no claimed whole-map speedup. The position-wrapper chain already inlines on the current optimized compiler and now has a regression test. Assignments, joins, loops, mutable storage, and Jass behavior are covered; remove the completed enum-guard backlog item.

Validation: 509 tests passed on Windows across LuaBackendAuditTests (297), OptimizerTests (179), and DeterministicChecks (33), including Jass/Lua execution and shuffled compilation-unit order. Both new emission regressions failed before the fix.

.\gradlew.bat test --tests tests.wurstscript.tests.LuaBackendAuditTests --tests tests.wurstscript.tests.OptimizerTests --tests tests.wurstscript.tests.DeterministicChecks -PskipStdLibFetch -PskipErrorProne --console=plain

Linux/macOS and in-game performance remain unverified.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T18:25:56.900775Z 98594f3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty
Frotty merged commit a8e5a91 into master Oct 22, 2026
2 checks passed
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