[php-src] PR #13233: Avoid new var for SSA for ASSIGN_OBJ_REF without RC inference
| From: | iluuu1994 | Date: | Tue, 23 Jan 2024 18:30:36 +0000 |
| Subject: | [php-src] PR #13233: Avoid new var for SSA for ASSIGN_OBJ_REF without RC inference | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-24879@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13233
Author: iluuu1994
Previously, this variable was necessary because of auto-vivification on UNDEF/NULL/false. It's
now only used for RC inference. However, auto-vivification has been removed.
This implicitly solves an inference problem for $obj->bar &= $obj; where we get a new
variable for both literal references to $obj, with the first one getting the RCn flag, and the
second one getting the MAY_BE_REFERENCE flag. Thus, the first variable will be missing the reference
type, causing a false-positive type inference warning.
If we want to verify RC inference at some point we'll need a better solution.
For reference: https://github.com/php/php-src/actions/runs/7619720239/job/20753304348