Skip to content

php-in-php: StringSoundex hand-rolled NestedJIT → JitVmHelperLink::ensureBridge (Metaphone #21342 shape) (#1492) #21362

Closed

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, peer #21342 / #13448)

Problem

lib/JIT/Builtin/StringSoundex.php still uses hand-rolled NestedJitCompileScope::run + parseAndCompile + new JIT() (~90 LOC). #21342 migrated StringMetaphone to JitVmHelperLink::ensureBridge (HelperRuntimeCache + user-script env clear).

php-src reference

PHP implementation target

  • lib/JIT/Builtin/StringSoundex.php — JitVmHelperLink::ensureBridge (drop hand-rolled NestedJIT loop)
  • test/unit/SoundexRuntimeShrinkTest.php — guard ensureBridge, no parseAndCompile / new JIT(

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/SoundexRuntimeShrinkTest.php
'

Done when

  • StringSoundex uses JitVmHelperLink::ensureBridge only
  • SoundexRuntimeShrinkTest green; no hand-rolled NestedJIT in StringSoundex
  • Self-host spine still lists SoundexJitHelper + StringSoundex

Activity

  1. added
    enhancementNew feature or request
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jul 20, 2026
  2. PurHur commented on Jul 20, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Runtime → PHP — starting this run (StringSoundex → JitVmHelperLink::ensureBridge, peer #21342).

  3. PurHur commented on Jul 20, 2026

    @PurHur
    OwnerAuthor

    Merged via #21363.

    Verification:

    • vendor/bin/phpunit test/unit/SoundexRuntimeShrinkTest.php — OK (3 tests)
    • vendor/bin/phpunit test/unit/MetaphoneRuntimeShrinkTest.php — OK (peer regression)
    • make bootstrap-selfhost-vm-driver-execute-probe — OK

    StringSoundex now uses JitVmHelperLink::ensureBridge only (−71 LOC hand-rolled NestedJIT).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:compilerCompiler / CFG / JITenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions