Repository navigation
php-in-php: delete phpc_json_decode.c, LLVM json_decode via StringJsonDecodeJit (#6202) - #7078
Merged
Merged
Conversation
…DecodeJit (#6202) Move __compiler_json_decode/__compiler_json_validate and json_last_error* from lib/AOT/runtime/phpc_json_decode.c into lib/JIT/Builtin/StringJsonDecodeJit.php so VM/JIT/AOT share one PHP-owned parser path. Removes 649 lines of C from Linker. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 6, 2026
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.
Summary
lib/AOT/runtime/phpc_json_decode.c(649 C lines removed fromlib/AOT/Linker.php).lib/JIT/Builtin/StringJsonDecodeJit.php— LLVM bodies for__compiler_json_decode,__compiler_json_validate,__compiler_json_last_error,__compiler_json_last_error_msg(mirrors former C parser; php-src ref:ext/json/php_json.c).StringJsonDecode::ensureLinked()inType/String_.php+JitJsonDecode.php(same pattern asStringUnserialize/ php-in-php: unserialize() parser — delete phpc_unserialize.c, VmUnserialize PHP path for VM+JIT+AOT #5991).C/runtime shrink
lib/AOT/runtime/phpc_json_decode.cVerification
Note:
bin/compile.php/AotTest json_decode_assocsegfault on this harness for all scripts including masterecho ok(pre-existing env issue, exit 139). JIT path is green.Closes #6202
Made with Cursor