Skip to content

php-in-php: session_encode()/session_decode() JIT/AOT lowering (phase 2 of #6086) #8252

@PurHur

Description

@PurHur

Category

php-in-php | stdlib | bootstrap

Problem

#6086 landed VM session_encode() / session_decode() via VmSessionSerializer.php, but JIT/AOT call() still throws LogicException('session_encode() not implemented for JIT'). docs/capabilities.md and docs/stdlib-jit-audit.md list both as JIT=no.

Web/session middleware compiled with bin/jit.php cannot snapshot or restore $_SESSION blobs.

php-src reference

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/jit.php -r "session_start(); \$_SESSION[\"k\"]=\"v\"; echo session_encode();"
'

Expect: k|s:1:"v"; — today: LogicException

Scope

Layer Path
JIT LLVM lib/JIT/Builtin/SessionEncodeRuntime.phpphpc_session_encode_wire / phpc_session_decode_wire
Ext ext/standard/JitSessionEncode.php, JitSessionDecode.php; wire session_encode.php / session_decode.php call()
Tests test/compliance/cases/stdlib/session_encode_decode_jit.phpt
Matrix script/capability-matrix.php

Done when

  • JIT repro prints wire blob without LogicException
  • Round-trip compliance PHPT green on JIT
  • ./script/ci-fast.sh --filter session_encode green
  • No new runtime/*.c — LLVM only in lib/JIT/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions