Skip to content

php-in-php: delete JitRename libc defer bridge — route user-script AOT through JitVmHelperLink + RenameJitHelper PHP (#1492) #19215

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, re-#16734 / #15533)

Problem

ext/standard/JitRename.php still emits inline libc rename(2) LLVM when UserScriptAotDeferNestedJit::shouldDefer() — embed builds route through RenameJitHelper PHP, but user-script standalone AOT keeps a ~20-line C ABI shortcut. #19186 proved the same JitVmHelperLink::ensureBridge + prelinked helper-runtime pattern works for unlink() without nested-JIT init regressions.

php-src reference

PHP implementation target

  • lib/JIT/Builtin/StringRename.php — always JitVmHelperLink::ensureBridge (drop defer early-return)
  • ext/standard/JitRename.php — delete invokeLibc; always StringRename::invoke
  • test/unit/RenameRuntimeShrinkTest.php — guard no libc defer remains

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/RenameRuntimeShrinkTest.php
vendor/bin/phpunit test/unit/RenameBuiltinTest.php --filter testAotNativeBinaryMatchesPhpSubset
'

Done when

  • invokeLibc deleted from JitRename.php
  • UserScriptAotDeferNestedJit removed from rename bridge path
  • AOT RenameBuiltinTest green
  • make bootstrap-selfhost-vm-driver-execute-probe green
  • PR body cites lines removed

Refs #1492, #15533, #16734, #19186

Activity

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