Skip to content

php-in-php: delete StringHashAlgos/HmacAlgos NestedJit defer — thin standalone via JitHashAlgosKernel (re-#19355) #20050

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, re-#19355 / #20028)

Problem

lib/JIT/Builtin/StringHashAlgos.php and StringHashHmacAlgos.php still gate the thin JitHashAlgosKernel registry behind UserScriptAotDeferNestedJit::shouldDefer() (env PHP_COMPILER_AOT_USER_SCRIPT). #20028 / StringRename replaced that NestedJit defer gate with Context::isThinStandaloneAotMain() so bootstrap thin standalone and user-script AOT share one path without the NestedJit audit surface.

php-src reference

PHP implementation target

  • lib/JIT/Builtin/StringHashAlgos.php — replace UserScriptAotDeferNestedJit::shouldDefer with $context->isThinStandaloneAotMain(); keep JitHashAlgosKernel::emitAlgosBody for thin path; embed/non-thin stays JitVmHelperLink → HashAlgosJitHelper
  • lib/JIT/Builtin/StringHashHmacAlgos.php — same for hmac
  • test/unit/StringHashAlgosRuntimeShrinkTest.php / StringHashHmacAlgosRuntimeShrinkTest.php — assert no UserScriptAotDeferNestedJit; assert isThinStandaloneAotMain

Repro

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

Done when

Refs #1492, #19355, #20028, #10533

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