feat: centralize mbstring support across native and eval backends - #952
Draft
nahime0 wants to merge 11 commits into
Draft
feat: centralize mbstring support across native and eval backends#952nahime0 wants to merge 11 commits into
nahime0 wants to merge 11 commits into
Conversation
nahime0
force-pushed
the
feat/mbstring
branch
2 times, most recently
from
September 11, 2026 10:54
b79ffa2 to
9ae2b99
Compare
Preserve native callable return ownership, balance eval scope synchronization, and retain callback metadata through borrowed values. Update focused runtime regressions and CI fixtures for the corrected behavior.
Balance eval and native ownership transfers, preserve property array COW, and use target-local mbstring assembly labels. Split timeout-prone aggregate cases while retaining their original coverage. Validated with warning-free builds, focused ownership and CI regressions, all-target mbstring assembly, and the seven builtin documentation gates.
Preserve boxed array and reflection ownership across AOT and eval boundaries. Balance callback, by-reference, constructor, and exception cleanup while keeping runtime symbol emission target-aware. Add focused GC, property, managed-native, and cross-target regression coverage.
nahime0
force-pushed
the
feat/mbstring
branch
from
September 11, 2026 12:33
9ae2b99 to
392f031
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and result
Centralizes the mbstring implementation across the builtin contract, native AOT lowering, Magician eval, web/configuration paths, and the five supported targets. It adds the
elephc-mbstringbridge, managed Oniguruma support, generated encoding and Unicode data, callback and reference adapters, tests, examples, and generated builtin documentation.WIP status
This draft currently binds 63 of PHP 8.5.10's 65 public mbstring functions and all 9 constants.
mb_convert_variablesandmb_send_mailare still absent. Five-target adapter assembly is implemented, with the complete target matrix left for CI verification.Known gaps:
retained_ownerscallback GC regression still fails with one extra string owner per callback invocation.plans/mbstring-extension.mdValidation
Focused local checks completed before integrating the latest
main:cargo build -p elephcArgumentCountError, eval callback error, and generic callable arity regressions passedPost-integration generation and integrity checks:
git diff --checkpassed, with no unresolved merge entriesFollow-up checks for the first CI findings:
cargo test -p elephc-builtin-contract --features curl, 49 passedcargo build --bin elephcpassed after completing the mbstring bridge descriptorSTEP1 CI preparation checks:
elephc-mbstringtest targets compiled withcargo test -p elephc-mbstring --tests --no-runIntegration status
13457798d: all three Build & Archive jobs passed, and 129 downstream test jobs started.b9b05c427and published at79ad2639f; its tree matches the independently reviewed merge-tree result. Fresh CI is running on the rebased head.The complete supported-target and Rust test matrix is delegated to pull request CI on the integrated head.
Known failing validation:
test_mbstring_regex_callback_retained_owners.Related work: #895, #898, #899, #900, #902.