Skip to content

Test: scope #36190 undef-var guard assertions to user @fn bodies - #36287

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-36190-test-hybrid-flags
Sep 2, 2026
Merged

Test: scope #36190 undef-var guard assertions to user @fn bodies#36287
PurHur merged 1 commit into
masterfrom
agent/issue-36190-test-hybrid-flags

Conversation

@PurHur

@PurHur PurHur commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Follow-up to JIT: per-frame undef-var flags and skip guards on formals (#36190) #36285 hybrid undef-var flags: {main} script CVs keep module globals (phpc_scope_var_init_*) so init and @main share one slot; user-function CVs use per-activation entry allocas.
  • UndefinedVariableParameterGuardTest was asserting whole-module IR has no phpc_scope_var_init, which fails whenever {main} echo materialization exists. Assertions now scope to @fibo_r / @f bodies only.

Root cause

#36285 landed the hybrid fix (aot-smoke 9/9 including miniwebapp) but left unit tests written for the all-alloca design.

Verification

./script/phpunit.sh --filter UndefinedVariableParameterGuardTest
# OK (2 tests, 12 assertions)

./script/aot-smoke.sh
# aot-smoke: 9 passed, 0 failed
# aot-smoke: size gate OK (<= 10% growth vs baseline)

Closes #36190

Made with Cursor

)

{main} script CVs intentionally keep module globals for __init__/@main
sharing; unit tests must not treat whole-module IR as user-function allocas.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 126a95d into master Sep 2, 2026
@PurHur
PurHur deleted the agent/issue-36190-test-hybrid-flags branch September 2, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant