History log of /PHP-8.0/ext/opcache/tests/opt/sccp_in_array.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# fdb05b92 30-Nov-2020 Nikita Popov

Only replace IN_ARRAY result type for JMPZ/JMPNZ

Replacing the result type in the general case is dangerous,
because not all opcodes support both VAR and TMP. One common case
is the

Only replace IN_ARRAY result type for JMPZ/JMPNZ

Replacing the result type in the general case is dangerous,
because not all opcodes support both VAR and TMP. One common case
is the in_array() result being passed to SEND_VAR, which would
have to be changed to SEND_VAL.

Rather than complicating this logic, reduce the scope to only
doing the type replacement for JMPZ and JMPNZ. The only reason
we're doing this in the first place is to enable the smart branch
optimization, so we can limit it to the relevant opcodes. Replacing
the result type may be marginally useful in other cases as well
(as it may avoid reference checks), but not worth the bother.

show more ...