1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix RC inference for DECLARE_LAMBDA_FUNCTION

It doesn't seem like the VM can return RCn. However, the JIT fails without it.
I'll need to look into this more closely.
This commit is contained in:
Ilija Tovilo
2024-02-05 12:19:18 +01:00
parent 79e8f20e56
commit f91833d297

View File

@@ -3967,7 +3967,7 @@ static zend_always_inline zend_result _zend_update_type_info(
UPDATE_SSA_TYPE(MAY_BE_BOOL, ssa_op->result_def);
break;
case ZEND_DECLARE_LAMBDA_FUNCTION:
UPDATE_SSA_TYPE(MAY_BE_OBJECT|MAY_BE_RC1, ssa_op->result_def);
UPDATE_SSA_TYPE(MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN, ssa_op->result_def);
UPDATE_SSA_OBJ_TYPE(zend_ce_closure, /* is_instanceof */ false, ssa_op->result_def);
break;
case ZEND_PRE_DEC_STATIC_PROP: