Fix bootstrap stdlib filesystem AOT and add stream JIT (#1116, #1117)#1134
Merged
Conversation
Enable real lowering for mkdir, file_put_contents, unlink, and rmdir under PHP_COMPILER_SELFHOST_AOT, and point the bootstrap fixture at a repo-local path instead of unimplemented sys_get_temp_dir/getmypid helpers. Add minimal fopen/fread/fclose JIT via phpc_stream.c runtime helpers and a compliance phpt covering the read/close path after file_put_contents. Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
Superseded by #1141 (fopen/fread/fclose JIT on master). Remaining stdlib_filesystem bootstrap fixes can be a fresh PR if still needed. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
Owner
Author
3 tasks
Resolve conflicts by taking master stream JIT and stdlib policy updates. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced May 23, 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
test/bootstrap-aot/stdlib_filesystem.phpby enabling real JIT lowering formkdir,file_put_contents,unlink, andrmdirunderPHP_COMPILER_SELFHOST_AOT, and by using a repo-local fixture path instead ofsys_get_temp_dir()/getmypid()(not available in AOT).fopen/fread/fcloseviaphpc_stream.cruntime helpers (__compiler_fopen,__compiler_fread,__compiler_fclose) following the existingfile_put_contents/fwritepattern.fopen_fread_fclose_jit.phptand extendSelfHostBuiltinPolicytests.Test plan
php bin/compile.php+ runtest/bootstrap-aot/stdlib_filesystem.phpwithPHP_COMPILER_SELFHOST_AOT=1(expected/actual11)phpunit test/unit/SelfHostBuiltinPolicyTest.phpmake bootstrap-aot-link(full gate; many unrelated targets still failing on master)make bootstrap-selfhost-probe(currently fails on master with LLVM ICmp type mismatch)Made with Cursor