php-in-php: route spaceship object/hashtable JIT through CompareJitHelper (#9476) - #11552
Merged
Merged
Conversation
…lper (#9476) JIT embed now calls compiled CompareJitHelper::objectSpaceship and hashtableSpaceship instead of hand-written LLVM walks; standalone AOT keeps LLVM until nested link supports HashTable/ObjectEntry helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 25, 2026
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
CompareJitHelper::objectSpaceship()andhashtableSpaceship()delegating toObjectEntry::compareSpaceship()/HashTable::compareSpaceship()(php-src:Zend/zend_operators.c,zend_compare_objects,zend_compare_arrays)__object__compareSpaceship/__hashtable__compareSpaceshipthrough thin LLVM bridges calling compiled PHP helpers (php-in-php: JIT SpaceshipCompareJit — route <=> through CompareJitHelper PHP not ~1.2k-line LLVM (#1492) #9476)SpaceshipRuntimecompiles new helpers underNestedJitCompileScope(Audit php-in-PHP JIT helpers: require NestedJitCompileScope on master #10529)Closes #9476
php-src reference
Zend/zend_operators.c— compare_function / spaceshipZend/zend_object_handlers.c— object compareZend/zend_hash.c— array comparePHP implementation
lib/VM/CompareJitHelper.php— SSOT for scalar + object + hashtable spaceshiplib/JIT/Builtin/SpaceshipCompareJit.php— embed bridges (emitObjectCompareSpaceshipBridge,emitHashtableCompareSpaceshipBridge)Verification
Follow-up
Standalone AOT LLVM object/hashtable walkers (~350 lines) can move to
SpaceshipCompareStandaloneLlvm.phponce nested standalone compile accepts ObjectEntry/HashTable helpers.Made with Cursor