Category
php-in-php · runtime-shrink (#1492, peer #20553 / #20533 / #20420)
Problem
Context::ensureFullStandaloneBodies still gates NestedJIT string-helper ensureStandaloneBodies on StreamIoRuntime::shouldDeferHeavyStreamIoEmitters() (M3 inventory + bootstrap-aot-link + standalone init bag). Peer builtins already use the narrower thin-standalone / init-phase gates (#20553). This is the last Context call site of the broad StreamIo defer bag — removing it lets StreamIoJit keep M3-only defer without Context coupling.
| Mode |
Today |
Target |
| Full standalone Context init |
skip string helpers via shouldDeferHeavyStreamIoEmitters (always true in init phase) |
skip via isStandaloneInitPhase() (same observable) |
| Thin / user-script AOT |
N/A (ensureMinimalUserStandaloneBodies) |
unchanged |
| Outside init / non-thin |
ensure string helper bodies |
unchanged (!isThinStandaloneAotMain() && !isStandaloneInitPhase()) |
php-src reference
PHP implementation target
lib/JIT/Context.php — replace !StreamIoRuntime::shouldDeferHeavyStreamIoEmitters($this) with !$this->isThinStandaloneAotMain() && !StreamIoRuntime::isStandaloneInitPhase()
test/unit/ContextStandaloneBodiesRuntimeShrinkTest.php (new) — guard no shouldDeferHeavyStreamIoEmitters in Context; assert thin/init-phase gates
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/ContextStandaloneBodiesRuntimeShrinkTest.php \
test/unit/ExamplesHelloWorldAotRegressionTest.php --filter testContextMinimal
make bootstrap-selfhost-vm-driver-execute-probe
'
Done when
Refs #1492, #20553, #20533, #16075
Category
php-in-php· runtime-shrink (#1492, peer #20553 / #20533 / #20420)Problem
Context::ensureFullStandaloneBodiesstill gates NestedJIT string-helperensureStandaloneBodiesonStreamIoRuntime::shouldDeferHeavyStreamIoEmitters()(M3 inventory + bootstrap-aot-link + standalone init bag). Peer builtins already use the narrower thin-standalone / init-phase gates (#20553). This is the last Context call site of the broad StreamIo defer bag — removing it letsStreamIoJitkeep M3-only defer without Context coupling.shouldDeferHeavyStreamIoEmitters(always true in init phase)isStandaloneInitPhase()(same observable)ensureMinimalUserStandaloneBodies)!isThinStandaloneAotMain() && !isStandaloneInitPhase())php-src reference
PHP implementation target
lib/JIT/Context.php— replace!StreamIoRuntime::shouldDeferHeavyStreamIoEmitters($this)with!$this->isThinStandaloneAotMain() && !StreamIoRuntime::isStandaloneInitPhase()test/unit/ContextStandaloneBodiesRuntimeShrinkTest.php(new) — guard noshouldDeferHeavyStreamIoEmittersin Context; assert thin/init-phase gatesRepro
Done when
Context.phphas noshouldDeferHeavyStreamIoEmitterscallisThinStandaloneAotMain+isStandaloneInitPhasemake bootstrap-selfhost-vm-driver-execute-probegreenRefs #1492, #20553, #20533, #16075