History log of /PHP-8.0/ext/opcache/Optimizer/zend_ssa.c (Results 1 – 25 of 113)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 6f42c073 10-Dec-2021 Dmitry Stogov

Remove range inference for booleans.

Range inference for bolleans and longs comparison was incorrect.

Fizes oss-fuzz #fuzz-42161.php


# 535a0553 08-Nov-2021 Dmitry Stogov

Fixed incorrect reference counter inference


# 22ef1fb8 05-Oct-2021 Dmitry Stogov

Fixed SSA construction


# 178bbe34 06-May-2021 Nikita Popov

Fixed bug #81015

Make sure that the previous opline is part of the same block,
otherwise it may be non-dominating.

The test case does not fail on PHP-7.4, but I think the genera

Fixed bug #81015

Make sure that the previous opline is part of the same block,
otherwise it may be non-dominating.

The test case does not fail on PHP-7.4, but I think the general
problem can appear on 7.4 as well, so I'm applying the patch to
that branch.

show more ...


Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1
# d971b670 09-Nov-2020 Nikita Popov

Fix phi use chain management when renaming variable

If there is a previous use of the new variable in the phi, we need
to NULL out the use chain of the new source we're adding.

Fix phi use chain management when renaming variable

If there is a previous use of the new variable in the phi, we need
to NULL out the use chain of the new source we're adding.

Test case is reduced from an assertion failure in the Symfony Demo.

show more ...


Revision tags: php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10
# 37612936 01-Sep-2020 Nikita Popov

Fix pi node removal when removing predecessor

We can't just remove the uses, we need to replace uses.

The test case only fails on master with SSA integrity violations,
but I bel

Fix pi node removal when removing predecessor

We can't just remove the uses, we need to replace uses.

The test case only fails on master with SSA integrity violations,
but I believe the root issue also existed previously.

show more ...


Revision tags: php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# 9bf11983 24-May-2020 Ilija Tovilo

Implement nullsafe ?-> operator

RFC: https://wiki.php.net/rfc/nullsafe_operator

Closes GH-5619.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>


# 92c4b065 16-Jun-2020 Christoph M. Becker

Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0)

Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce
`ZEND_UNREACHABLE()`, so that MSVC which does not consider `asser

Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0)

Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce
`ZEND_UNREACHABLE()`, so that MSVC which does not consider `assert(0)`
to mark unreachable code does no longer trigger C4715[1] warnings in
debug builds. This may be useful for other compilers as well.

[1] <https://docs.microsoft.com/de-de/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4715?view=vs-2019>

show more ...


Revision tags: php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16
# 29bf7902 13-Mar-2020 Dmitry Stogov

Fixed RC inference for ZEND_ASSIGN_STATIC_PROP and removed useless checks during RC inference


# 4bf2d09e 13-Mar-2020 Dmitry Stogov

Tracing JIT (it doesn't support register allocation yet)

Use opcache.jit=1255 to swith it on (the third digit 5 really matters)
Use opcache.jit_debug=0xff001 to see how it works and what

Tracing JIT (it doesn't support register allocation yet)

Use opcache.jit=1255 to swith it on (the third digit 5 really matters)
Use opcache.jit_debug=0xff001 to see how it works and what code it generates

show more ...


# d9c45d86 09-Mar-2020 Nikita Popov

Improve type inference for COALESCE

Place a pi node on the non-null edge to remove a spurious
undef/null type.

Additionally, adjust the profitability heuristic to be more
ac

Improve type inference for COALESCE

Place a pi node on the non-null edge to remove a spurious
undef/null type.

Additionally, adjust the profitability heuristic to be more
accurate if the "other predecessor" writes to the variable.
Ideally this should not just consider the direct predecessors,
but it's sufficient for this case.

This partially addresses bug #79353 by removing the discrepancy
between ?? and ??=.

show more ...


Revision tags: php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28
# 64b40f69 07-Feb-2020 Dmitry Stogov

Make ASSIGN, ASSIGN_OP, INC and DEC opcodes to return IS_TMP_VAR instead of IS_VAR.

This helps to avoid unnecessary IS_REFERENCE checks.
This changes some notices "Only variables should

Make ASSIGN, ASSIGN_OP, INC and DEC opcodes to return IS_TMP_VAR instead of IS_VAR.

This helps to avoid unnecessary IS_REFERENCE checks.
This changes some notices "Only variables should be passed by reference" to exception "Cannot pass parameter %d by reference".

Also, for consistency, compile-time fatal error "Only variables can be passed by reference" was converted to exception "Cannot pass parameter %d by reference"

show more ...


Revision tags: php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14
# 99db00b1 19-Jan-2020 Máté Kocsis

Fix #78880 Another round


Revision tags: php-7.3.14RC1, php-7.4.2RC1
# 43719022 30-Dec-2019 Nikita Popov

Improve SSA representation of FE_FETCH

The op2 of FE_FETCH is only written if the loop edge is taken.
Fix up the SSA form to use the pre-assignment value if the exit
edge is taken.

Improve SSA representation of FE_FETCH

The op2 of FE_FETCH is only written if the loop edge is taken.
Fix up the SSA form to use the pre-assignment value if the exit
edge is taken.

This allows us to properly infer the type of the loop variable,
without letting the pre-loop type leak in.

Closes GH-5040.

show more ...


# 0b4778c3 16-Jan-2020 Máté Kocsis

Fix #78880: Another bunch of spelling errors


# 6c6d36bb 30-Dec-2019 Nikita Popov

Fix SSA construction for ADD_ARRAY_ELEMENT in RC_INFERENCE mode

This was broken in cc29cbe80c0944097f8980384f883907d46512ce.


# cc29cbe8 26-Dec-2019 Dmitry Stogov

cleanup


# dabc28d1 21-Dec-2019 Christoph M. Becker

Fix #78880: Spelling error report

We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.

Fix #78880: Spelling error report

We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.

show more ...


Revision tags: php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12
# 36afe4e3 12-Nov-2019 Dmitry Stogov

Optimize $x === null into is_null($x)


# 9083e178 12-Nov-2019 Dmitry Stogov

Fixed wrong constant usage


Revision tags: php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4
# 2068ce9a 11-Oct-2019 Dmitry Stogov

Use RT_CONSTANT() or CT_CONSTANT() macro depending on ZEND_ACC_DONE_PASS_TWO flag


Revision tags: php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# a66c60cc 26-Sep-2019 Nikita Popov

Throw Error when writing property of non-object

This removes object auto-vivification support.

This also means that we can remove the corresponding special
handling for typed pr

Throw Error when writing property of non-object

This removes object auto-vivification support.

This also means that we can remove the corresponding special
handling for typed properites: We no longer need to check that a
property is convertible to stdClass if such a conversion might
take place indirectly due to a nested property write.

Additionally OBJ_W style operations now no longer modify the
object operand, and as such we no longer need to treat op1 as a
def in SSA form.

The next step would be to actually compile the whole LHS of OBJ_W
operations in R rather than W mode, but that causes issues with
SimpleXML, whose object handlers depend on the current compilation
structure.

Part of https://wiki.php.net/rfc/engine_warnings.

show more ...


Revision tags: php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3
# 48ca5a1e 05-Jul-2019 Dmitry Stogov

Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP


Revision tags: php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3
# 3a97b8b4 19-Jun-2019 Nikita Popov

Backport "Avoid UB in overflow checks"

Cherry-pick of bb940d9969e08853d92a09f7a02adc3228cf1c2c without
the JIT parts.


# bb940d99 19-Jun-2019 Nikita Popov

Avoid UB in overflow checks

Some of the overflow checks in zend_may_overflow were optimized
away by clang, causing JIT failures on release macos.


12345