Category
php-in-php — session serializer LLVM → ext/session PHP
Problem
lib/JIT/Builtin/SessionEncodeRuntime.php (~530 lines) lowers session_encode() / session_decode() into bespoke LLVM (php_session_encode / decode paths). VM session logic already lives in ext/session/ PHP modules; JIT should call the same PHP implementations via trampoline, not duplicate serializer state machines in LLVM.
Pairs with #9411 (SessionGcRuntime → VmSession PHP) and #9360 (PendingHeadersRuntime).
php-src reference
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r '"'"'session_start(); $_SESSION["k"]="v"; echo session_encode();'"'"''
Today JIT path may diverge or require SessionEncodeRuntime::ensureLinked() LLVM. After migration, bin/jit.php with same snippet must match VM output byte-for-byte.
Scope
Done when
Related
#1492, #9411, #9376, #9360.
Category
php-in-php— session serializer LLVM →ext/sessionPHPProblem
lib/JIT/Builtin/SessionEncodeRuntime.php(~530 lines) lowerssession_encode()/session_decode()into bespoke LLVM (php_session_encode / decode paths). VM session logic already lives inext/session/PHP modules; JIT should call the same PHP implementations via trampoline, not duplicate serializer state machines in LLVM.Pairs with #9411 (
SessionGcRuntime→ VmSession PHP) and #9360 (PendingHeadersRuntime).php-src reference
php_session_encode()/php_session_decode()session_encode/session_decodeuserland wrappersRepro
Today JIT path may diverge or require
SessionEncodeRuntime::ensureLinked()LLVM. After migration,bin/jit.phpwith same snippet must match VM output byte-for-byte.Scope
ext/session/— exposeVmSession::encode()/decode()SSOT if not already callable from JITlib/JIT/Builtin/SessionEncodeRuntime.php— replace LLVM bodies with PHP trampoline (JitSessionEncode.php)Done when
session_encode()/session_decode()share one PHP implementation.session_encode_roundtrip.phptif missing).SessionEncodeRuntime.php.runtime/for session serialization.Related
#1492, #9411, #9376, #9360.