Category
php-in-php · compile-pipeline / AOT standalone
Problem
AOT standalone link still emits a large hand-written LLVM implementation of strip_tags() in lib/JIT/Builtin/StringStripTagsStandaloneLlvm.php (~980 lines of tag parsing, allowed-tag tables, libc bridges).
The JIT path already routes through ext/standard/StripTagsJitHelper.php + JitStripTags.php (#9196 closed for JIT). Standalone AOT keeps the LLVM duplicate because “compiled PHP static storage is not yet reliable in native link” — same rationale as LastErrorRuntimeLlvm (#9607) and CloneWithReinitRuntimeLlvm (#9717).
Goal: one PHP SSOT for strip_tags semantics; delete or stub the standalone LLVM body.
php-src reference (semantics only)
Repro (LLVM path active today)
# JIT uses PHP helper (green):
./script/docker-exec.sh php bin/jit.php -r 'echo strip_tags("<b>x</b>", "<b>");'
# AOT standalone link still pulls StringStripTagsStandaloneLlvm symbols:
rg 'StringStripTagsStandaloneLlvm|__phpc_st_|__compiler_strip_tags' lib/JIT/Builtin/
wc -l lib/JIT/Builtin/StringStripTagsStandaloneLlvm.php
After fix: standalone AOT binary calls compiled StripTagsJitHelper::stripTags() (or thin ABI trampoline), and StringStripTagsStandaloneLlvm.php shrinks to link stub or is deleted.
Scope
| Path |
Work |
lib/JIT/Builtin/StringStripTagsStandaloneLlvm.php |
delete LLVM bodies after PHP path links |
ext/standard/StripTagsJitHelper.php |
ensure standalone emit-helper can link compiled helper |
lib/JIT/Builtin/StripTagsJitHelper wiring |
mirror LastErrorRuntime → ErrorLastJitHelper pattern (#9607) |
lib/AOT/ |
register compiled helper in standalone bundle policy |
runtime/ |
remove any __compiler_strip_tags C symbols if present |
Done when
Related
Category
php-in-php· compile-pipeline / AOT standaloneProblem
AOT standalone link still emits a large hand-written LLVM implementation of
strip_tags()inlib/JIT/Builtin/StringStripTagsStandaloneLlvm.php(~980 lines of tag parsing, allowed-tag tables, libc bridges).The JIT path already routes through
ext/standard/StripTagsJitHelper.php+JitStripTags.php(#9196 closed for JIT). Standalone AOT keeps the LLVM duplicate because “compiled PHP static storage is not yet reliable in native link” — same rationale asLastErrorRuntimeLlvm(#9607) andCloneWithReinitRuntimeLlvm(#9717).Goal: one PHP SSOT for strip_tags semantics; delete or stub the standalone LLVM body.
php-src reference (semantics only)
ext/standard/string.c—PHP_FUNCTION(strip_tags)ext/standard/strip_tags.php+StripTagsJitHelper.phpin this repoRepro (LLVM path active today)
After fix: standalone AOT binary calls compiled
StripTagsJitHelper::stripTags()(or thin ABI trampoline), andStringStripTagsStandaloneLlvm.phpshrinks to link stub or is deleted.Scope
lib/JIT/Builtin/StringStripTagsStandaloneLlvm.phpext/standard/StripTagsJitHelper.phplib/JIT/Builtin/StripTagsJitHelperwiringLastErrorRuntime→ErrorLastJitHelperpattern (#9607)lib/AOT/runtime/__compiler_strip_tagsC symbols if presentDone when
StringStripTagsStandaloneLlvm.phpreduced to thin stub or removed; ≥800 lines LLVM deletedstrip_tags()output matches VM/JIT on compliance fixture./script/ci-fast.sh --filter strip_tagsgreen; AOT fixture if presentRelated