php-in-php: hash standalone defer — skip nested hash_algos/hash_equals JIT (#18717)#18770
Merged
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>
…s 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebases the #18717 hash standalone defer work onto current
master(stale PR #18717 branch had 185-file drift).StringHashCryptoJit:implementDeferred()usesStringHashCryptoLlvm+ inline registry +hash_equalsstub whenUserScriptAotDeferNestedJit— avoids nestedHashAlgosJitHelper/HashEqualsJitHelpercompile that emits invalid__hashtable__bridge IR in minimal user-script standalone init.StringHashAlgos: defer path builds__compiler_hash_algosfromHashAlgosRegistry::ALL_ALGOSinline LLVM (same pattern asStringHashHmacAlgos).HashAlgosJitHelper/HashEqualsJitHelper/HashCryptoJitHelperPHP.php-src ref:
ext/hash/hash.cLLVM / PHP shrink
hash_algos+hash_equalson user-script standalone init (replaces broken nested bridge with thin LLVM registry walk + stub).StringHashCryptoLlvmas documented thin libcrypto EVP bridge for standalone digest (Stdlib: hash_init() / hash_update() / hash_final() / hash_copy() — incremental ext/hash API #3357).Verification
Note: Full user-script AOT
bin/compile.php -r 'echo hash("sha256","hello");'may still hit the separate master__value__writeHashtablemodule-verify regression documented on #18717 — this PR fixes the hash-specific nested-JIT defer path only.Closes #18717
Made with Cursor