Skip to content

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

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, peer #32879 / #32882; trust class #32122)

Problem

Builtin\Type::register() still addFunctions empty always-on shells for __compiler_addcslashes and __compiler_stripcslashes on every JIT/AOT module. StringCslashes already owns those ABIs (getNamedFunction first + JitVmHelperLink::ensureBridge), but leftover Type empty decls can mint addcslashes.1 when Runtime ABI drift lands (#31894 / #32122 class).

php-src reference

PHP implementation target

  • lib/JIT/Builtin/Type.php — remove always-on addcslashes/stripcslashes rows; Type::initialize ensureLinkeds StringCslashes (and ensureStripcslashes / ensureStandaloneBodies as needed)
  • Keep StringCslashes / CslashesJitHelper; no new runtime/*.c
  • Leave __compiler_convert_uuencode Type rows alone (sentinel for peer shrink tests)

Repro

grep -n "__compiler_addcslashes\|__compiler_stripcslashes" lib/JIT/Builtin/Type.php

Done when

  • Type no longer always-declares/registers the two ABIs
  • Type::initialize ensureLinks StringCslashes
  • ./script/aot-smoke.sh stays 8/8
  • Targeted phpunit shrink test green
  • AOT addcslashes/stripcslashes still match Zend

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