Skip to content

php-in-php: base64_encode()/base64_decode() JIT via Base64JitHelper PHP (#17234) - #17236

Merged
PurHur merged 3 commits into
masterfrom
agent/runtime-php-base64-jit
Jul 7, 2026
Merged

PurHur merged 3 commits into
masterfrom
agent/runtime-php-base64-jit

Conversation

@PurHur

@PurHur PurHur commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #17234

C runtime shrink

  • No new C TUs; LLVM monolith bypassed on hot path.
  • ext/standard/JitBase64Encode.php (204 LOC) and JitBase64Decode.php (233 LOC) retained only for defer/standalone LLVM fallback.

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter Base64RuntimeShrinkTest'
# OK (4 tests, 22 assertions)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter "Base64BuiltinTest|Base64RuntimeShrinkTest"'
# OK (6 tests, 32 assertions)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "echo base64_encode(\"foo\"), \"\\n\"; echo base64_decode(\"Zm9v\"), \"\\n\";"'
# Zm9v
# foo

php script/check-selfhost-spine-coverage-sync.php
# check-selfhost-spine-coverage-sync: OK (spine covers all 4228 inventory files)

make bootstrap-selfhost-vm-driver-execute-probe
# bootstrap-selfhost-vm-driver-execute-probe: OK

Note: AotTest enum-case base64_*_enum_case_type_error fixtures still fail on master with HashTable::append() during helper-runtime cache hit — pre-existing, unrelated to this bridge.

Made with Cursor

PurHur and others added 3 commits July 7, 2026 15:45
…HP (#17234)

Route runtime JIT/AOT through Base64EncodeJitHelper and Base64DecodeJitHelper
delegating to VmString, with LLVM defer paths for user-script standalone AOT.
Hot path no longer emits inline LLVM from JitBase64Encode/JitBase64Decode.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate bootstrap-inventory/profile and spine footnotes (4229 files).

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

php-in-php: base64_encode()/base64_decode() JIT via Base64JitHelper PHP — drop inline LLVM in JitBase64*.php (#1492)

1 participant