History log of /php-src/Zend/Optimizer/dfa_pass.c (Results 1 – 25 of 54)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 631bc816 06-Feb-2024 Ilija Tovilo

Implement stackless internal function calls

Co-authored-by: Dmitry Stogov <dmitry@zend.com>

Closes GH-12461


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3
# 0b1d750d 11-Aug-2022 Ilija Tovilo

Allow arbitrary expressions in static variable initializer

Closes GH-9301


# 3a76f795 26-Apr-2023 Ilija Tovilo

Fix incorrect match default branch optimization

Fixes GH-11134
Closes GH-11135


# d5c649b3 23-Feb-2023 Max Kellermann

zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621)

`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers. This is misleadi

zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621)

`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers. This is misleading, so let's use a
C99 integer instead.

On all architectures currently supported by PHP, `zend_uchar` and
`uint8_t` are identical. This change is only about code readability.

show more ...


# 4d4a53be 09-Jan-2023 Dmitry Stogov

Fix incorrect optimization of ASSIGN_OP may lead to incorrect result (sub assign -> pre dec conversion for null values)


# 6d9d2eb3 17-Dec-2022 Ilija Tovilo

Optimize JMP[N]Z_EX to BOOL instead of QM_ASSIGN (#10108)

&& and || should always evaluate to a boolean instead of the lhs/rhs.

This optimization never gets triggered for any of our

Optimize JMP[N]Z_EX to BOOL instead of QM_ASSIGN (#10108)

&& and || should always evaluate to a boolean instead of the lhs/rhs.

This optimization never gets triggered for any of our tests.
Additionally, even if triggered this instruction gets optimized away
because the else branch of the JMP instruction will overwrite the tmp
value.

show more ...


# f31f464c 07-Nov-2022 Dmitry Stogov

Fix memory leak

Fixes oss-fuzz #52999


# 218da70b 29-Aug-2022 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix memory leak


# 172ac0a4 29-Aug-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix memory leak


Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22
# 21507ef2 01-Aug-2022 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix SSA reconstruction when body of "foreach" loop is removed


# 4b19b85e 01-Aug-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix SSA reconstruction when body of "foreach" loop is removed


Revision tags: php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# f9055907 08-Jul-2022 George Peter Banyard

Add support for Disjoint Normal Form (DNF) types (#8725)

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

This allows to combine union and intersection types together in the following form (

Add support for Disjoint Normal Form (DNF) types (#8725)

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

This allows to combine union and intersection types together in the following form (A&B)|(X&Y)|T but not of the form (X|A)&(Y|B) or (X|A)&(Y|B)|T.

* Improve union type parsing

Co-authored-by: Sara Golemon <pollita@php.net>

show more ...

Revision tags: php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30
# 8685a7f0 27-May-2022 George Peter Banyard

Remove custom alloca() (#8513)

* Use arena in DCE instead of multiple alloca()
This requires passing the optimizer context

* Use our do_alloca() instead of alloca()

*

Remove custom alloca() (#8513)

* Use arena in DCE instead of multiple alloca()
This requires passing the optimizer context

* Use our do_alloca() instead of alloca()

* Use emalloc in DEBUG builds instead of stack allocations for do_alloca()
This helps detecting that we correctly free do_alloca()

show more ...

Revision tags: php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1
# ace00fad 18-Feb-2022 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Disable ASSIGN optimization for values inferred for fatal errors.


# 7e8257fb 18-Feb-2022 Dmitry Stogov

Disable ASSIGN optimization for values inferred for fatal errors.

Revision tags: php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1
# 4543cd32 30-Dec-2021 Nikita Popov

Remove JMPZNZ opcode

While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negat

Remove JMPZNZ opcode

While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negative effect. It also adds additional
complexity for optimizations.

Drop JMPZNZ in favor of JMPZ+JMP or JMPNZ+JMP.

Closes GH-7857.

show more ...

# eb43f8a4 27-Dec-2021 Dmitry Stogov

Eliminate more VERIFY_RETURN_TYPE instructions

# 2cf93032 25-Dec-2021 Nikita Popov

Sink op_array scope case into get_class_entry()

This handles references to the current class through its name
rather than self (and for cases where is is not linked yet and
thus not

Sink op_array scope case into get_class_entry()

This handles references to the current class through its name
rather than self (and for cases where is is not linked yet and
thus not covered by the context lookup). Rather than handling this
only for FETCH_CLASS_CONSTANT optimization, integrate this into
the generic get_class_entry() utility.

show more ...

# e4cf3f74 20-Dec-2021 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix incorrect optimization of ASSIGN_OP that may lead to memory leak


# ca3f7b0a 20-Dec-2021 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix incorrect optimization of ASSIGN_OP that may lead to memory leak


Revision tags: php-8.0.14, php-8.1.1, php-7.4.27
# abcf6838 09-Dec-2021 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix incorrect JMP optimization


# 363434ba 09-Dec-2021 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix incorrect JMP optimization


Revision tags: php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1
# 71b2f467 24-Nov-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix bug #81652


# 51ae5c53 24-Nov-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix bug #81652


Revision tags: php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6
# e506564e 08-Nov-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Drop pi nodes for both old/new pred in replace_predecessor


123