Category
php-in-php | stdlib
Problem
lib/JIT/Builtin/ProcessRuntime.php (~1,332 lines) reimplements process helpers in LLVM (__compiler_shell_exec, __compiler_escapeshellarg, __compiler_escapeshellcmd, __compiler_process_exec_capture, __phpc_process_*). VM paths already use PHP (ext/standard/VmProcess*.php, VmExecNative.php).
JIT/AOT should call the existing PHP builtins (or shared VmProcess helpers) via the normal compile pipeline — same pattern as #9268 ObOutputRuntime, #9247 StreamIoJit.
php-src reference
Repro (LLVM duplication today)
wc -l lib/JIT/Builtin/ProcessRuntime.php
grep -c '__compiler_' lib/JIT/Builtin/ProcessRuntime.php
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/unit/ExecJitRuntimeShrinkTest.php test/unit/JIT/ProcessRuntimeStandaloneTest.php'
Done signal: JIT link uses PHP lowering stubs; ProcessRuntime.php shrinks to thin registration (target >80% line reduction).
Scope
| Module |
Path |
| Delete/shrink LLVM |
lib/JIT/Builtin/ProcessRuntime.php, lib/JIT/Builtin/ProcessOpenJit.php (capture only if duplicated) |
| PHP VM (keep/extend) |
ext/standard/shell_exec.php, escapeshellarg.php, escapeshellcmd.php, VmExecNative.php |
| JIT registration |
lib/JIT/Builtin/Type.php — route to compiled PHP handlers |
| Self-host spine |
test/selfhost/compiler_lib_spine_smoke/main.php if symbols drop |
| Tests |
existing exec/shell JIT PHPTs + shrink tests |
No new runtime/*.c. If libc FFI is unavoidable for a hot path, document proof in PR; default is PHP VmProcess + existing FFI wrappers in ext/.
Done when
Related
Category
php-in-php|stdlibProblem
lib/JIT/Builtin/ProcessRuntime.php(~1,332 lines) reimplements process helpers in LLVM (__compiler_shell_exec,__compiler_escapeshellarg,__compiler_escapeshellcmd,__compiler_process_exec_capture,__phpc_process_*). VM paths already use PHP (ext/standard/VmProcess*.php,VmExecNative.php).JIT/AOT should call the existing PHP builtins (or shared
VmProcesshelpers) via the normal compile pipeline — same pattern as #9268ObOutputRuntime, #9247StreamIoJit.php-src reference
ext/standard/exec.c—shell_exec,escapeshellarg,escapeshellcmdext/standard/proc_open.c— capture helpers used byexec/systemRepro (LLVM duplication today)
wc -l lib/JIT/Builtin/ProcessRuntime.php grep -c '__compiler_' lib/JIT/Builtin/ProcessRuntime.php./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/unit/ExecJitRuntimeShrinkTest.php test/unit/JIT/ProcessRuntimeStandaloneTest.php'Done signal: JIT link uses PHP lowering stubs;
ProcessRuntime.phpshrinks to thin registration (target >80% line reduction).Scope
lib/JIT/Builtin/ProcessRuntime.php,lib/JIT/Builtin/ProcessOpenJit.php(capture only if duplicated)ext/standard/shell_exec.php,escapeshellarg.php,escapeshellcmd.php,VmExecNative.phplib/JIT/Builtin/Type.php— route to compiled PHP handlerstest/selfhost/compiler_lib_spine_smoke/main.phpif symbols dropNo new
runtime/*.c. If libc FFI is unavoidable for a hot path, document proof in PR; default is PHPVmProcess+ existing FFI wrappers inext/.Done when
shell_exec/escapeshellarg/escapeshellcmdJIT/AOT call PHP implementation (no__compiler_shell_execbody in LLVM module)test/unit/ExecJitRuntimeShrinkTest.phpupdated — asserts LLVM symbol count dropmake north-star5-verify-fastgreen; self-host spine sync ifmain.phpchangesProcessRuntime.phpRelated