Skip to content

php-in-php: hex2bin() JIT via Hex2binJitHelper PHP — drop inline LLVM in JitHex2bin.php #14627

Description

@PurHur

Category

php-in-php · php-src-strict

Problem

hex2bin() VM uses VmString::hex2bin() but JIT/AOT still lowers through ~253-line JitHex2bin.php LLVM monolith (warnings + decode loop).

php-src reference

  • ext/standard/string.c — PHP_FUNCTION(hex2bin)

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/jit.php -r "var_export(hex2bin(\"616263\"));"'
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php vendor/bin/phpunit --filter hex2bin'

Scope

Path Work
ext/standard/Hex2binJitHelper.php JIT SSOT delegating to VmString + TriggerErrorJitHelper
lib/JIT/Builtin/StringHex2bin.php Thin __compiler_hex2bin bridge
ext/standard/hex2bin.php Route call() through bridge
Shrink Delete ext/standard/JitHex2bin.php

Done when

  • JIT/AOT hex2bin matches Zend on compliance tests (warnings, strict, false)
  • JitHex2bin.php deleted; PR notes LLVM lines removed
  • make bootstrap-selfhost-vm-driver-execute-probe green

Pairs #14603 (bin2hex). Refs #1492

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

    enhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions