Skip to content

php-in-php: drop leftover Type always-on utf8_encode/utf8_decode ABI shells (ext/standard/utf8.c) #32879

Description

@PurHur

Category

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

Problem

Builtin\Type::register() still addFunctions empty always-on shells for __compiler_utf8_encode and __compiler_utf8_decode on every JIT/AOT module. StringUtf8Latin1 already owns those ABIs (getNamedFunction first + NestedJIT bridge), but leftover Type empty decls can mint utf8_encode.1 when Runtime ABI drift lands (#31894 / #32122 class).

php-src reference

PHP implementation target

  • lib/JIT/Builtin/Type.php — remove always-on utf8_encode/utf8_decode rows; Type::initialize ensureLinkeds StringUtf8Latin1
  • Keep StringUtf8Latin1 / Utf8Latin1JitHelper; no new runtime/*.c
  • Leave convert_uuencode Type rows alone (sentinel for peer shrink tests)

Repro

grep -n "__compiler_utf8_encode\|__compiler_utf8_decode" lib/JIT/Builtin/Type.php

Done when

  • Type no longer always-declares/registers the two ABIs
  • Type::initialize ensureLinks StringUtf8Latin1
  • ./script/aot-smoke.sh stays 8/8
  • Targeted phpunit shrink test green
  • AOT utf8_encode/utf8_decode still match Zend (ignoring deprecation)

Parent

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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