Skip to content

Add JIT/AOT lowering for strxfrm() via libc strxfrm(3) (#4376) - #7861

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-strxfrm-aot
Jun 10, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/stdlib-strxfrm-aot

Conversation

@PurHur

@PurHur PurHur commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement JIT/AOT lowering for strxfrm() in ext/standard/strxfrm.php using libc strxfrm(3) two-pass sizing (php-src: ext/standard/string.c).
  • Register strxfrm libc symbol in ext/standard/Module.php alongside strcoll.
  • Add JIT compliance (strxfrm_jit.phpt) and AOT fixture (test/fixtures/aot/cases/strxfrm.phpt).

Closes #4376

Verification

./script/docker-exec.sh -- bash -lc 'php script/capability-matrix.php'
./script/docker-exec.sh -- bash -lc './vendor/bin/phpunit --filter "strcoll_strxfrm|strxfrm"'
./script/docker-exec.sh -- bash -lc './vendor/bin/phpunit --filter "AotTest.*strxfrm"'
./script/docker-exec.sh -- bash -lc 'php bin/compile.php -l test/fixtures/aot/compile-only/strcoll_strxfrm.php'

Output:

OK (8 tests, 13 assertions)   # VM + JIT compliance
OK (1 test, 5 assertions)     # AOT fixture

Made with Cursor

Wire two-pass strxfrm sizing in ext/standard/strxfrm.php (matching VmLocaleCollate),
register the libc symbol in Module.php, and add JIT/AOT compliance fixtures.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 86bfe9b into master Jun 10, 2026
@PurHur
PurHur deleted the agent/stdlib-strxfrm-aot branch June 10, 2026 09:47
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.

Stdlib: strcoll()/strxfrm() locale collation parity

1 participant