Skip to content

php-in-php: drop shouldDeferHeavyStreamIoEmitters from RequestParseBody — thin via isThinStandaloneAotMain (#1492) #20521

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, peer IncludePath #20308 / JitEnv #20499 / ObOutput #20443)

Problem

RequestParseBodyRuntime and ext/standard/request_parse_body.php still gate user-script / thin AOT on StreamIoRuntime::shouldDeferHeavyStreamIoEmitters() (inventory-emit + NestedJit defer bag). Peer builtins already use Context::isThinStandaloneAotMain() for the same thin-standalone constraint (#16075).

Mode Today Target
Embed / non-thin RequestParseBodyJitHelper NestedJIT unchanged
User-script / bootstrap thin AOT shouldDeferHeavyStreamIoEmitters → JitRequestParseBodyKernel isThinStandaloneAotMain() → same kernel
Inventory emit / M3 driver deferred via StreamIo defer bag (skips NestedJIT) NestedJIT when not thin-standalone

php-src reference

PHP implementation target

  • lib/JIT/Builtin/RequestParseBodyRuntime.php — drop shouldDeferHeavyStreamIoEmitters; gate thin/user-script on isThinStandaloneAotMain()
  • ext/standard/request_parse_body.php — same gate for kernel vs NestedJIT helper
  • test/unit/RequestParseBodyRuntimeShrinkTest.php — assert isThinStandaloneAotMain, no shouldDeferHeavyStreamIoEmitters

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/RequestParseBodyRuntimeShrinkTest.php
make bootstrap-selfhost-vm-driver-execute-probe
'

Done when

  • shouldDeferHeavyStreamIoEmitters removed from RequestParseBodyRuntime + request_parse_body.php
  • Thin path gated on isThinStandaloneAotMain only (kernel retained)
  • Shrink test green
  • make bootstrap-selfhost-vm-driver-execute-probe green
  • PR body cites defer-gate lines removed

Refs #1492, #16927, #19466, #5965, #20308, #20499

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:compilerCompiler / CFG / JITenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions