Category
php-in-php · runtime-shrink (#1492, peer #20571 / #20553)
Problem
After #20553 / #20571, stream inventory kernels and Context string helpers already gate on isThinStandaloneAotMain() / isStandaloneInitPhase() — not the broad StreamIo M3 defer bag. StreamIoRuntime::shouldDeferHeavyStreamIoEmitters() still folds $standaloneInitPhase into the M3 bag, and StreamIoJit relies on that coupling.
Separately, JitStreamIoKernel::implement() (+ its local shouldDeferHeavyStreamIoEmitters / deferred-stub emitters) is dead: only implementForUserScriptLowering() is called from StreamIoJit / StreamIoRuntime.
| Path |
Today |
Target |
| Thin user-script AOT |
isThinStandaloneAotMain → kernel |
unchanged |
| Context standalone init |
defer via bag's $standaloneInitPhase |
StreamIoJit checks isStandaloneInitPhase() explicitly |
| M3 inventory / bootstrap-aot-link |
shouldDeferHeavyStreamIoEmitters env flags |
M3 flags only (no init-phase) |
Dead kernel implement() |
unused LLVM stub path |
delete |
php-src reference
PHP implementation target
lib/JIT/Builtin/StreamIoJit.php — isStandaloneInitPhase() \|\| shouldDeferHeavy… before NestedJIT
lib/JIT/Builtin/StreamIoRuntime.php — shouldDeferHeavyStreamIoEmitters = M3 env flags only
ext/standard/JitStreamIoKernel.php — delete dead implement + stub emitters + local shouldDefer
- Shrink/unit guards + Context comment cleanup
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/StreamIoRuntimeShrinkTest.php
vendor/bin/phpunit test/unit/ContextStandaloneBodiesRuntimeShrinkTest.php
vendor/bin/phpunit --filter testStreamIoDefersNestedJitForUserScriptAot
make bootstrap-selfhost-vm-driver-execute-probe
'
Done when
Refs #1492, #20553, #20571
Category
php-in-php· runtime-shrink (#1492, peer #20571 / #20553)Problem
After #20553 / #20571, stream inventory kernels and Context string helpers already gate on
isThinStandaloneAotMain()/isStandaloneInitPhase()— not the broad StreamIo M3 defer bag.StreamIoRuntime::shouldDeferHeavyStreamIoEmitters()still folds$standaloneInitPhaseinto the M3 bag, andStreamIoJitrelies on that coupling.Separately,
JitStreamIoKernel::implement()(+ its localshouldDeferHeavyStreamIoEmitters/ deferred-stub emitters) is dead: onlyimplementForUserScriptLowering()is called fromStreamIoJit/StreamIoRuntime.isThinStandaloneAotMain→ kernel$standaloneInitPhaseStreamIoJitchecksisStandaloneInitPhase()explicitlyshouldDeferHeavyStreamIoEmittersenv flagsimplement()php-src reference
PHP implementation target
lib/JIT/Builtin/StreamIoJit.php—isStandaloneInitPhase() \|\| shouldDeferHeavy…before NestedJITlib/JIT/Builtin/StreamIoRuntime.php—shouldDeferHeavyStreamIoEmitters= M3 env flags onlyext/standard/JitStreamIoKernel.php— delete deadimplement+ stub emitters + local shouldDeferRepro
Done when
shouldDeferHeavyStreamIoEmittersno longer reads$standaloneInitPhaseStreamIoJitgates init-phase explicitly viaisStandaloneInitPhase()JitStreamIoKernel::implement(+ stub helpers) deletedRefs #1492, #20553, #20571