Category
enhancement · php-in-php · runtime-shrink / NestedJIT · peer #34769 / #34513 · cold-build .1 mint class (#32122 / #31894)
Problem
Context::ensureMinimalUserStandaloneBodies still eagerly EnvLocalRuntime::ensureLinked (→ JitEnvLocalKernel NestedJIT of __compiler_env_local_lookup / __compiler_env_register_putenv + StringGetenv::ensureJitHelperCompiled).
Thin AOT hello-world NestedJITs that ABI on every compile even though no call site looks up __compiler_env_local_* anymore — getenv() / putenv() lower via StringGetenv / PutenvJitHelper / GetenvLookupJitHelper (#32665 / #23414 / #29313). Type always-on shells were already dropped (#32729 / #34513); Context ensureMinimal is the leftover always-on.
Leftover Context NestedJIT vs Runtime ABI drift mints env_local_lookup.1 (#31894 / #32122).
php-src reference
PHP implementation target
lib/JIT/Context.php — remove EnvLocalRuntime::ensureLinked from ensureMinimalUserStandaloneBodies (keep ensureBootstrapAotStubLinked on bootstrap-aot path)
- Call-site:
StringGetenv / JitEnv already own getenv/putenv; leave EnvLocalRuntime::ensureLinked callable for explicit use
- Unit shrink tests: stop requiring EnvLocal in minimal; add dedicated shrink test
- No new
lib/AOT/runtime/*.c (floor already empty; phpc_env_local.c must stay absent)
Repro / verify
./script/aot-smoke.sh
./script/docker-exec.sh -- bash -lc 'printf "%s\n" "<?php echo \"hello\n\";" > /tmp/h.php; PHP_COMPILER_HELPER_RUNTIME_O=0 php bin/compile.php -o /tmp/h.bin /tmp/h.php && /tmp/h.bin'
./script/phpunit.sh --filter ContextMinimalStandaloneLazyEnvLocal|TypeDeadEnvLocal|EnvLocalRuntimeShrink
Done when
Parent
Category
enhancement· php-in-php · runtime-shrink / NestedJIT · peer #34769 / #34513 · cold-build .1 mint class (#32122 / #31894)Problem
Context::ensureMinimalUserStandaloneBodiesstill eagerlyEnvLocalRuntime::ensureLinked(→JitEnvLocalKernelNestedJIT of__compiler_env_local_lookup/__compiler_env_register_putenv+StringGetenv::ensureJitHelperCompiled).Thin AOT hello-world NestedJITs that ABI on every compile even though no call site looks up
__compiler_env_local_*anymore —getenv()/putenv()lower viaStringGetenv/PutenvJitHelper/GetenvLookupJitHelper(#32665 / #23414 / #29313). Type always-on shells were already dropped (#32729 / #34513); Context ensureMinimal is the leftover always-on.Leftover Context NestedJIT vs Runtime ABI drift mints
env_local_lookup.1(#31894 / #32122).php-src reference
ext/standard/basic_functions.c—zif_getenv/zif_putenv(overlay is PHP helper SSOT; no C ABI required)PHP implementation target
lib/JIT/Context.php— removeEnvLocalRuntime::ensureLinkedfromensureMinimalUserStandaloneBodies(keepensureBootstrapAotStubLinkedon bootstrap-aot path)StringGetenv/JitEnvalready own getenv/putenv; leaveEnvLocalRuntime::ensureLinkedcallable for explicit uselib/AOT/runtime/*.c(floor already empty;phpc_env_local.cmust stay absent)Repro / verify
Done when
./script/aot-smoke.shstays 8/8lib/AOT/runtime/*.censureBootstrapAotStubLinkedParent