Skip to content

Self-host M2: union-type parse + static array literal fold for spine smoke - #2504

Merged
PurHur merged 1 commit into
masterfrom
agent/selfhost-union-type-bootstrap
May 26, 2026
Merged

Self-host M2: union-type parse + static array literal fold for spine smoke#2504
PurHur merged 1 commit into
masterfrom
agent/selfhost-union-type-bootstrap

Conversation

@PurHur

@PurHur PurHur commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Apply vendor patches (php-cfg-union-type, etc.) automatically in ci_apply_llvm_memory_env() so bootstrap/AOT gates no longer fail with Unknown type node: UnionType when make bootstrap-selfhost-lib-spine-smoke runs outside full CI.
  • Extend compileFunctionStaticVar() to fold list-style array literals (e.g. VmString::soundex lookup table) into compile-time constants, unblocking the next spine compile failure after union types.

Test plan

  • BOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smokecompiler_lib_spine_smoke bundle OK
  • make bootstrap-selfhost-link → OK
  • ./script/bootstrap-loop-probe.sh --dry-run → exit 0 (M2 prereq passes)
  • vendor/bin/phpunit test/unit/UnionTypeParseTest.php
  • VM: static $table = [0, '1', 2] returns 012 (with script/apply-patches.sh)
  • Added test/compliance/cases/language/static_local_array_literal.phpt

Closes #2499

Made with Cursor

…ray literals

Ensure php-cfg union-type patches run before AOT bootstrap compile (fixes #2499
spine smoke Unknown type node: UnionType). Extend function-local static lowering
to fold list-style array literals at compile time for VmString::soundex (#2286).

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Self-host M2: php-cfg UnionType parser — compiler_lib_spine_smoke compile fails

1 participant