Category
php-in-php · runtime-shrink (#1492, peer PendingHeaders #20420 / CliArgv #20401 / StringFormat #20395)
Problem
ObOutputJitBridge::implementObStack still gates deferred inventory ABI stubs on StreamIoRuntime::shouldDeferHeavyStreamIoEmitters() (inventory-emit + NestedJit defer bag). Peer PendingHeadersJitBridge (#20420) already uses Context::isThinStandaloneAotMain() for the same thin-standalone constraint (#16075 / #13571). Under M3 inventory emit / standaloneInitPhase the StreamIo defer bag forces stub __phpc_ob_* bodies instead of honest ObOutputJitHelper NestedJIT when not thin-standalone.
Thin user-script AOT already routes through JitObOutputKernel via ObOutputRuntime::ensureObStackLinked — this change only widens when the bridge emits honest NestedJIT helpers vs inventory stubs.
| Mode |
Today |
Target |
| Embed / non-thin |
ObOutputJitHelper NestedJIT bridges |
unchanged |
| User-script / bootstrap thin AOT |
shouldDeferHeavyStreamIoEmitters → implementDeferredInventoryStubs |
isThinStandaloneAotMain() → same thin stubs (kernel path elsewhere) |
| Inventory emit / M3 driver / standaloneInitPhase |
deferred via StreamIo defer bag (stubs) |
honest NestedJIT helper bridges when not thin |
php-src reference
PHP implementation target
lib/JIT/Builtin/ObOutputJitBridge.php — gate implementDeferredInventoryStubs on $context->isThinStandaloneAotMain(); drop shouldDeferHeavyStreamIoEmitters
test/unit/ObOutputRuntimeShrinkTest.php — assert isThinStandaloneAotMain on bridge, no shouldDeferHeavyStreamIoEmitters
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/ObOutputRuntimeShrinkTest.php
make bootstrap-selfhost-vm-driver-execute-probe
'
Done when
Refs #1492, #9268, #12951, #19422, #20420, #20401, #20395
Category
php-in-php· runtime-shrink (#1492, peer PendingHeaders #20420 / CliArgv #20401 / StringFormat #20395)Problem
ObOutputJitBridge::implementObStackstill gates deferred inventory ABI stubs onStreamIoRuntime::shouldDeferHeavyStreamIoEmitters()(inventory-emit + NestedJit defer bag). PeerPendingHeadersJitBridge(#20420) already usesContext::isThinStandaloneAotMain()for the same thin-standalone constraint (#16075 / #13571). Under M3 inventory emit /standaloneInitPhasethe StreamIo defer bag forces stub__phpc_ob_*bodies instead of honestObOutputJitHelperNestedJIT when not thin-standalone.Thin user-script AOT already routes through
JitObOutputKernelviaObOutputRuntime::ensureObStackLinked— this change only widens when the bridge emits honest NestedJIT helpers vs inventory stubs.ObOutputJitHelperNestedJIT bridgesshouldDeferHeavyStreamIoEmitters→implementDeferredInventoryStubsisThinStandaloneAotMain()→ same thin stubs (kernel path elsewhere)php-src reference
ext/standard/output.c—ob_*/ output bufferingPHP implementation target
lib/JIT/Builtin/ObOutputJitBridge.php— gateimplementDeferredInventoryStubson$context->isThinStandaloneAotMain(); dropshouldDeferHeavyStreamIoEmitterstest/unit/ObOutputRuntimeShrinkTest.php— assertisThinStandaloneAotMainon bridge, noshouldDeferHeavyStreamIoEmittersRepro
Done when
shouldDeferHeavyStreamIoEmittersremoved from ObOutputJitBridgeisThinStandaloneAotMainonly (stubs retained)make bootstrap-selfhost-vm-driver-execute-probegreenRefs #1492, #9268, #12951, #19422, #20420, #20401, #20395