Repository navigation
Compiler: fix var_export after void setIteratorClass() inline arg (#16794) - #16803
Merged
Merged
Conversation
Wire hoisted MethodCall producers via operand slots in sibling inline call-arg resolution so var_export($ao->getIteratorClass(), true) after setIteratorClass() no longer steals the ctor NEW EXEC_RETURN slot. 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
var_export($ao->getIteratorClass(), true)when a voidsetIteratorClass()statement precedes the hoisted MethodCall producer (Stdlib: ArrayObject::getIteratorClass() returns null after void setIteratorClass() in expression (ext/spl/spl_array.c) #10778 regression, re-Regression: ArrayObject::getIteratorClass() — var_export after setIteratorClass() returns __set_state (re-#10778, ext/spl/spl_array.c) #16794).MethodCall/StaticCallsibling producers and bind via operand slots inresolveSiblingInlineCallArgProducerSlot— avoids stealing the ctorNEWFUNCCALL_EXEC_RETURNslot ($ao) forvar_exportarg #0.var_exportarg-#0 producer matching to prefer value-supplyingMethodCallproducers.php-src reference
ext/spl/spl_array.c—spl_array_getIteratorClass/spl_array_setIteratorClassPHP implementation
lib/Compiler.php— sibling inline call-arg resolution (no C runtime changes)Verification
Closes #16794
Made with Cursor