Stdlib: split process JIT helpers for AOT exec capture (#10492)#16478
Merged
Conversation
Split ProcessJitHelper nested-JIT units (phpc_run_command iterateKeyed, exec capture hashtable build) into lazy-linked helpers with phpc_native_ht_* for AOT. Fix ObOutput bridge insert-block restore on nested ensureLinked. shell_exec/exec AOT compile green; passthru+ob LLVM verify remains. Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
Maintainer triage 2026-07-05: VM repro + unit tests green per PR body; AOT |
Owner
Author
|
Maintainer triage 2026-07-05: VM repro + unit tests pass per PR body; merge blocked on AOT |
) Route exec stdout through __phpc_ob_append_bytes with correct string structGep lowering, lazy-link ObOutputExecCaptureJitHelper for user-script AOT (avoids full ObOutputJitHelper nested JIT / HashTable::popLast), and fix JitExec CFG so stdout write loops do not terminate proc_ok early. AOT compile of system_passthru_ob reaches link-only (LLVM verify green); VM repro unchanged green. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve conflicts keeping lazy ObOutputExecCaptureRuntime ob stack and JitExec CFG/append_bytes lowering from #10492 work. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
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
ProcessJitHelperinto lazy-linked units:ProcessPhpcRunCommandJitHelper(iterateKeyed env),ProcessExecCaptureNativeJitHelper(phpc_native_ht_* + shell_exec capture), keeping shell/escape helpers in a minimalProcessJitHelper.php.phpc_native_ht_set_string_key_long+ParseStrNativeOpsJit::setStringKeyLongfor native hashtable status fields.ObOutputJitBridge/ObOutputUserScriptLlvminsert-block restore whenensureLinked()is called nested fromJitExec::writeLinesToStdout.Root cause
AOT compile of any script using
shell_exec/exec/passthru/systemnested-JITed all ofProcessJitHelper.php, hittingHashTable::iterateKeyed()(object::iteratekeyed) and VMHashTable::add()in stream loops. Master fails at compile withCall to undefined method object::iteratekeyed().Verification
Remaining blocker (not merged)
passthru()/system()AOT compile reachesJitExec::writeLinesToStdoutbut LLVM verify fails (AddrSpaceCast source must be a pointer) when routing captured lines through user-script ob echo (ObOutputUserScriptLlvm). Next: align__phpc_ob_echo_substrarg lowering withEmbedObEchoBridgein user-script AOT mode.Closes #10492 when
system_passthru_obAOT fixture is green.Made with Cursor