Repository navigation
php-in-php: get_resource_type/get_resources LLVM — shrink phpc_stream.c (#6821) - #7610
Merged
Merged
Conversation
…am.c (#6821) Lower __compiler_get_resource_type and __compiler_get_resources via StreamResourceJit LLVM (mirrors ext/standard VmFs parity paths) so AOT standalone no longer needs those symbols in phpc_stream.c. C shrink: 43 lines removed from lib/AOT/runtime/phpc_stream.c (771→728); phpc_stream_was_used exported for LLVM closed-handle Unknown probe. Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
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
__compiler_get_resource_typeand__compiler_get_resourcesfromlib/AOT/runtime/phpc_stream.cinto PHP LLVM (lib/JIT/Builtin/StreamResourceJit.php).phpc_stream_was_used[]for LLVM closed-handleUnknownprobe (Stdlib: get_resource_type() on closed stream — must return Unknown (ext/standard/file.c) #5179 parity).phpc_stream.c(771 → 728).php-src ref:
ext/standard/file.c(get_resource_type),ext/standard/basic_functions.c(get_resources).Verification
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter "StreamResourceRuntimeStandalone|StreamCapsRuntimeStandalone|get_resources_jit"'wc -l lib/AOT/runtime/phpc_stream.c # 728 (was 771)Note:
AotTest::testCases get_resourcescompile failure (Unknown how to assign to a value) reproduces on master before this PR — pre-existing JIT lowering blocker, not introduced here.Closes #6821 (partial — handle table still in C; further
phpc_stream.cmigration tracked there).Made with Cursor