Hash AOT: defer nested hash_algos/hash_equals on user-script standalone (#3357)#18717
Hash AOT: defer nested hash_algos/hash_equals on user-script standalone (#3357)#18717PurHur wants to merge 1 commit into
Conversation
…ne (#3357) Use inline HashAlgosRegistry LLVM and stub __compiler_hash_equals during user-script standalone init instead of nested HashAlgosJitHelper / HashEquals lowering that emits invalid __hashtable__ bridge IR. php-src: ext/hash/hash.c Co-authored-by: Cursor <cursoragent@cursor.com>
|
Maintainer verify (2026-07-13): not merge-ready on current branch. Master now has #18726 — standalone hash AOT compile+run is green ( Next: rebase onto current |
|
claim: PHP Runtime → PHP — continuing hash standalone defer on fresh branch from master (PR #18717 branch is stale vs master). |
…s JIT (#18717) (#18770) * Hash AOT: defer nested hash_algos/hash_equals on user-script standalone (#3357) Use inline HashAlgosRegistry LLVM and stub __compiler_hash_equals during user-script standalone init instead of nested HashAlgosJitHelper / HashEquals lowering that emits invalid __hashtable__ bridge IR. php-src: ext/hash/hash.c Co-authored-by: Cursor <cursoragent@cursor.com> * php-in-php: hash standalone defer — skip nested hash_algos/hash_equals JIT (#18717) User-script standalone AOT uses inline HashAlgosRegistry LLVM and a thin hash_equals stub instead of nested helpers that emit invalid __hashtable__ bridge IR during minimal init. Embed path still routes through HashAlgosJitHelper / HashEqualsJitHelper PHP. Verification: - vendor/bin/phpunit test/unit/StringHashAlgosRuntimeShrinkTest.php - vendor/bin/phpunit test/unit/StringHashCryptoRuntimeShrinkTest.php - vendor/bin/phpunit test/unit/JIT/StringHashCryptoRuntimeStandaloneTest.php - make bootstrap-selfhost-vm-driver-execute-probe Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Merged via #18770 (fresh branch PHP-in-PHP / LLVM shrink:
Verification: ./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/unit/StringHashAlgosRuntimeShrinkTest.php test/unit/StringHashCryptoRuntimeShrinkTest.php test/unit/JIT/StringHashCryptoRuntimeStandaloneTest.php'
# OK (6 tests)
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter "HashModuleTest|hash_context_incremental"'
# OK (12 tests)
make bootstrap-selfhost-vm-driver-execute-probe
# OKFollow-up: separate master |
Summary
Prepare user-script standalone AOT hash init for #3357 by avoiding nested PHP JIT helpers that emit invalid
__hashtable__bridge IR during minimal standalone init.StringHashAlgos: whenUserScriptAotDeferNestedJit→ inlineHashAlgosRegistryLLVM (same pattern asStringHashHmacAlgos)StringHashCryptoJit: when deferring →StringHashCryptoLlvmEVP path + stub__compiler_hash_equals(skip nestedHashEqualsJitHelper)php-src ref:
ext/hash/hash.cBlocker (master)
User-script AOT compile currently fails LLVM module verify for all scripts (including
echo "hi";), not only hash:Disabling
StringHashCrypto::ensureStandaloneBodiesinContext::ensureMinimalUserStandaloneBodiesdoes not unblock — separate master regression needs bisect before merge.Verification
Closes #3357 when master AOT verify is green and hash fixtures pass.
Made with Cursor