Skip to content

AOT: mb_detect_encoding() runtime haystack via NestedJIT (#34358) - #34359

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-34358-mb-detect-encoding-runtime
Aug 24, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-34358-mb-detect-encoding-runtime

Conversation

@PurHur

@PurHur PurHur commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire JitMbDetectEncoding::invoke() for runtime $string with compile-time encodings list / $strict (2–3 arg forms).
  • Add MbDetectEncodingJitHelper + MbDetectEncodingRuntime NestedJIT bridge; letter-order logic stays inlined in detectArgv (NestedJIT === on helper params and int< between indices both misfire).
  • Repro + MbDetectEncodingRuntimeAotTest; spine requires for helper/runtime link.

Closes #34358.

Test plan

  • ./script/phpunit.sh --filter MbDetectEncodingRuntimeAotTest — AOT output matches Zend
  • ./script/aot-smoke.sh — 8/8
  • php script/check-selfhost-spine-coverage-sync.php — OK
  • Full compliance / differential sweep not run (mbstring builtin only)

Made with Cursor

Wire JitMbDetectEncoding::invoke for runtime $string plus compile-time
encodings list/strict; MbDetectEncodingJitHelper inlines letter-order walks
(NestedJIT === on helper params and int< misfire). Closes #34358.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit ce5b3a1 into master Aug 24, 2026
0 of 2 checks passed
@PurHur
PurHur deleted the agent/issue-34358-mb-detect-encoding-runtime branch August 24, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AOT: mb_detect_encoding() refuses runtime strings — LogicException 1-arg NestedJIT (leftover of #3075, ext/mbstring/mbstring.c)

1 participant