Skip to content

php-in-php: drop leftover Type always-on env_local/putenv ABI shells (ext/standard/basic_functions.c) #32729

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, peer #32665 / #32721 / re-#32122)

Problem

Builtin\Type::register() still ensureExternalFunctions empty always-on shells for __compiler_env_local_lookup and __compiler_env_register_putenv on every JIT/AOT module. Runtime owner already declares module-locally via JitEnvLocalKernel (getNamedFunction first) and Type::register() already calls EnvLocalRuntime::ensureLinked():

  • EnvLocalRuntime / JitEnvLocalKernel — env overlay lookup + putenv register

Leftover Type empty decls vs Runtime ABI drift mints name.1 (#31894 / #32122 class). These two are the last forever-on Type $libcFns-era table after #32202/#32665.

php-src reference

PHP implementation target

  • lib/JIT/Builtin/Type.php — remove always-on __compiler_env_local_* rows + dead ensureExternalFunction
  • ext/standard/JitEnvLocalKernel.php — keep ABI ownership (getNamedFunction first)
  • unit shrink test peer TypeDeadGetenvAbiRuntimeShrinkTest

Done when

  • Type.php does not always-declare the two ABI names
  • JitEnvLocalKernel still owns the ABI
  • aot-smoke.sh stays 8/8
  • No new runtime/*.c

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