Skip to content

php-in-php: drop leftover Type always-on strtr ABI shells (ext/standard/string.c) #32858

Description

@PurHur

Category

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

Problem

Builtin\Type::register() still addFunctions empty always-on shells for __compiler_strtr and __compiler_strtr_array on every JIT/AOT module. StringStrtr already owns these ABIs module-locally via getNamedFunction first + addFunction when absent, but leftover Type empty decls can mint strtr.1 / strtr_array.1 when Runtime ABI drift lands (#31894 / #32122 class).

Peer #32855 removed password crypto shells and left __compiler_strtr* as the next always-on cluster (asserted in TypeDeadPasswordCryptoAbiRuntimeShrinkTest).

php-src reference

PHP implementation target

  • lib/JIT/Builtin/StringStrtr.php — already declares ABIs module-locally; keep getNamedFunction first
  • lib/JIT/Builtin/Type.php — remove always-on __compiler_strtr / __compiler_strtr_array rows; StringStrtr::ensureLinked from Type::initialize
  • Keep StrtrTwoStringJitHelper / StrtrArrayJitHelper / user-script strtr() path
  • unit shrink test peer TypeDeadPasswordCryptoAbiRuntimeShrinkTest

Done when

  • Type.php does not always-declare the two strtr ABIs
  • StringStrtr owns the ABIs module-locally; Type::initialize ensureLinks it
  • ./script/aot-smoke.sh stays 8/8
  • No new runtime/*.c

Parent

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