Skip to content

php-in-php: StringCaseCompare NestedJIT → JitVmHelperLink::ensureCompiled (#23862) - #23863

Merged
PurHur merged 1 commit into
masterfrom
agent/runtime-php-casecompare
Jul 27, 2026
Merged

php-in-php: StringCaseCompare NestedJIT → JitVmHelperLink::ensureCompiled (#23862)#23863
PurHur merged 1 commit into
masterfrom
agent/runtime-php-casecompare

Conversation

@PurHur

@PurHur PurHur commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace hand-rolled NestedJitCompileScope::run + parseAndCompile in StringCaseCompare.php with JitVmHelperLink::ensureCompiled + lookupCompiled (peer StringStrtotime php-in-php: StringStrtotime NestedJIT → JitVmHelperLink::ensureCompiled (#1492) #23832).
  • Add shrink guard in StrcasecmpRuntimeShrinkTest asserting no hand-rolled NestedJIT remains.
  • Net −12 lines in StringCaseCompare.php (removed duplicate compile loop; helper-runtime cache path now shared).

Closes #23862

php-src reference

  • ext/standard/string.cPHP_FUNCTION(strcasecmp|strncasecmp)

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/StrcasecmpRuntimeShrinkTest.php --filter testStringCaseCompareUsesJitVmHelperLink
make bootstrap-selfhost-vm-driver-execute-probe
'

Output:

OK (1 test, 8 assertions)
bootstrap-selfhost-vm-driver-execute-probe: OK /compiler/build/selfhost-lib-spine-smoke

Also ran (pre-change baseline):

make bootstrap-selfhost-link  → OK /compiler/build/selfhost
php script/bootstrap-inventory.php --check  → inventory green

Not covered

  • Full north-star5-verify-fast (change is isolated JIT helper link; VM driver probe green)
  • Differential sweep (no argument/call lowering change — compile-path refactor only)

Made with Cursor

Replace hand-rolled NestedJitCompileScope::run in strcasecmp/strncasecmp
lowering with JitVmHelperLink::ensureCompiled + lookupCompiled so helper
compile matches peer migrations (StringStrtotime #23862) and gains helper-
runtime cache hits.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit b63fc40 into master Jul 27, 2026
@PurHur
PurHur deleted the agent/runtime-php-casecompare branch July 27, 2026 14:06
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: StringCaseCompare NestedJIT → JitVmHelperLink::ensureCompiled (#1492)

1 participant