Skip to content

php-in-php: route version_compare JIT through VersionCompareJitHelper PHP (#9813) - #9838

Merged
PurHur merged 1 commit into
masterfrom
agent/runtime-php-version-compare-jit
Jun 19, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/runtime-php-version-compare-jit

Conversation

@PurHur

@PurHur PurHur commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

C runtime shrink

No new C. Remaining duplicate was LLVM-only (StringVersionCompareJit.php); phpc_version_compare.c was already deleted.

php-src reference

  • ext/standard/versioning.c — php_version_compare
  • PHP SSOT: ext/standard/VmInfo.php

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter VersionCompare'
# OK (10 tests, 29 assertions)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php test/repro/maintainer_version_compare_jit.php
php bin/jit.php test/repro/maintainer_version_compare_jit.php'
# 1.0.0 < 1.0.1 => true OK
# 1.0.0 = 1.0.0 => true OK
# 1.0.0-dev < 1.0.0 => true OK
# 8.2.0 < 8.10.0 => true OK
# -1  (operator-less int return)

make bootstrap-selfhost-vm-driver-execute-probe
# bootstrap-selfhost-vm-driver-execute-probe: OK

php script/check-selfhost-spine-coverage-sync.php
# OK (spine covers all 2792 inventory files)

Closes #9813

Made with Cursor

… PHP (#9813)

Replace ~800-line StringVersionCompareJit LLVM with thin bridge into VmInfo SSOT; delete duplicate tokenization logic.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit c0ba8a5 into master Jun 19, 2026
@PurHur
PurHur deleted the agent/runtime-php-version-compare-jit branch June 19, 2026 01:02
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.

php-in-php: JIT StringVersionCompareJit — route version_compare() through VmInfo PHP not ~800-line LLVM (#1492)

1 participant