Stdlib: lower ldap_count_entries through JIT helper bridge (#32172) - #32209
Merged
Conversation
JIT/AOT no longer throw LogicException for ldap_count_entries(); lowering reuses VmLdapNative::countEntries via a Result handle map, matching php-src ext/ldap/ldap.c. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
added a commit
that referenced
this pull request
Aug 18, 2026
…nclude (#32203) (#32212) * Trust: sync bootstrap-inventory + spine after SoapParam/ldap/stream-include (#32203) Construct-flag drift on soap units plus 7 vm.php-path files missing from compiler_lib_spine_smoke. Regenerated inventory/profile in Docker and appended the requires; no gen-0 sidecar restamp. Co-authored-by: Cursor <cursoragent@cursor.com> * Trust: refresh inventory construct flags after ldap_count_entries (#32203) Rebase onto #32209 grew JitLdapResult/LdapResultJitHelper/VmLdapResult method counts. Regenerated docs/bootstrap-inventory.md in Docker; spine coverage unchanged at 7588/7590. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: PurHur <PurHur@users.noreply.github.com> 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
LogicExceptionforldap_count_entries(); lowering goes throughJitLdapResult::invokeCountEntries+LdapResultJitHelper::countEntriesArgvand reusesVmLdapNative::countEntries(php-srcext/ldap/ldap.c).LDAP\Resulthandles from JITldap_bind_ext()are registered the same wayldap_connect()registers connections, so compiled count/walk APIs can look up live results.$ldap/$resultmatch the VM path.Closes #32172
php-src reference
PHP_FUNCTION(ldap_count_entries))PHP implementation
ext/ldap/ldap_search_builtins.php—call()→JitLdapResult::invokeCountEntriesext/ldap/JitLdapResult.php/ext/ldap/LdapResultJitHelper.php— LLVM lowering + helperext/ldap/VmLdapResult.php— JIT result handle maplib/JIT/Builtin/LdapRuntime.php—__compiler_ldap_count_entries/__compiler_ldap_result_registerruntime/*.cTest plan
phpc build; standalone has no libldap FFI so connect skips)LdapCountEntries*,LdapRuntimeShrinkTest)Verification
Standalone AOT has no OpenLDAP FFI (
ldap_connect()cannot create a session handle), so the AOT binary skips the live count path after compilingldap_count_entries(noLogicException). VM/JIT exercise the TypeError path in-process.