Language: by-reference parameters JIT/AOT lowering (#3161) - #3169
Merged
Merged
Conversation
Alias callee formals to caller __value__* slots (Zend zend_compile_param by_ref), promote native call arguments to boxed lvalues, and read/write through valueBoxAliasPtr in Helper/JIT assign paths. Co-authored-by: Cursor <cursoragent@cursor.com>
3 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
function f(&$x)), closing the gap after VM work in Language: Reference assignment and by-ref parameters #140.__value__*storage viavalueBoxAliasPtr(same model as closureuse (&$x)/ foreach by-ref).Helper::loadValueandassignOperandread/write through aliases.php-src reference
Zend/zend_compile.c—zend_compile_param()by_refZend/zend_execute.c—ZVAL_MAKE_REF, argument binding by referenceVerification
Note: This harness Docker image currently segfaults on
bin/jit.phpMCJIT execute even forecho 42(exit 139); the ref-param repro compiles without the priorUnsupported cast … __value__*/valuePtrFromVariablefailures. Full JIT execute green needs the LLVM 9 dev image /make testpath fromscript/ci-local.sh.Test plan
ref_param.phptref_param_jit.phptaddeddocs/capabilities-syntax.md— by-ref row JIT/AOT yesmake test/./script/ci-local.sh --filter ref_paramon LLVM host when availableCloses #3161
Made with Cursor