History log of /php-src/Zend/Optimizer/zend_optimizer.c (Results 26 – 50 of 52)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 52676f2b 25-Dec-2021 Nikita Popov

Remove unnecessary wrapper function

This seems to date back to a time where zval_ptr_dtor was a macro
implicitly passing additional parameters.

# 08840484 25-Dec-2021 Nikita Popov

Don't exclude arrays from constant collection

These are supported as constants nowadays, so we can drop the
string check.

Also fix a potential leak, though I believe this doesn'

Don't exclude arrays from constant collection

These are supported as constants nowadays, so we can drop the
string check.

Also fix a potential leak, though I believe this doesn't matter in
current usage, as it will effectively be suppressed during persist.

show more ...

# 92e7cf59 25-Dec-2021 Nikita Popov

Move FETCH_CLASS+INSTANCEOF special case out of update_op1_const()

The generic code was rejecting this to go into a special code path
in SCCP. We should directly do that in SCCP instead,

Move FETCH_CLASS+INSTANCEOF special case out of update_op1_const()

The generic code was rejecting this to go into a special code path
in SCCP. We should directly do that in SCCP instead, to still allow
the generic (and valid) replacement.

show more ...

# 4ad9dbba 25-Dec-2021 Nikita Popov

Don't replace SEND opcodes with different by-ref behavior

update_op1_const() implements the right logic here -- these cannot
be replaced by different opcodes, as the by-ref passing behav

Don't replace SEND opcodes with different by-ref behavior

update_op1_const() implements the right logic here -- these cannot
be replaced by different opcodes, as the by-ref passing behavior
is not the same.

show more ...

# 46d1e503 25-Dec-2021 Nikita Popov

Remove redundant code in zend_optimizer_replace_by_const()

zend_optimizer_update_op1_const() already handles these cases.

Revision tags: php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33
# e1c56150 15-Nov-2021 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Optimize closures nested in other closures


# f313b65a 15-Nov-2021 Dmitry Stogov

Optimize closures nested in other closures

Revision tags: php-8.1.0RC6
# 90b7bde6 03-Nov-2021 Dmitry Stogov

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.

show more ...

Revision tags: php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25
# e7a5ec5f 19-Oct-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Handle operand replacement in JMP_NULL


# 1f19401f 19-Oct-2021 Nikita Popov

Handle operand replacement in JMP_NULL

In this case it's not sufficient to replace the JMP_NULL operand,
as it keeps the temporary alive and there may be more uses later.
Fix this by

Handle operand replacement in JMP_NULL

In this case it's not sufficient to replace the JMP_NULL operand,
as it keeps the temporary alive and there may be more uses later.
Fix this by generalizing existing handling for other similar opcodes
like CASE/SWITCH and LIST_R.

Fixes oss-fuzz 5820123475214336.

show more ...

Revision tags: php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1
# 6858ad12 30-Sep-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix cache slot assignment for ASSIGN_OBJ_OP


# 5cdbfa89 30-Sep-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix cache slot assignment for ASSIGN_OBJ_OP


Revision tags: php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31
# f345f6d5 20-Sep-2021 George Peter Banyard

Voidify zend_optimize_script()

It always returned 1

As a consequence voidify preload_optimize()

# 278efe3b 20-Sep-2021 George Peter Banyard

Voidify zend_build_call_graph()

It always returned SUCCESS

# 53d5420d 20-Sep-2021 George Peter Banyard

Use more appropriate types in Optimizer

Mainly using zend_result and bool instead of int

# fb4405d3 15-Sep-2021 Nikita Popov

Avoid accessing literal operand on nop

This would have create a NOP with a CONST operand ... probably
harmless in practice, but we should avoid it.

Revision tags: php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

Revision tags: php-8.0.8, php-8.1.0alpha2
# 0d9269de 18-Jun-2021 Nikita Popov

Extract helper for fetching class entry in optimizer

This code is repeated a few time. Two occurrences additionally
contained checks for user classes in CG(class_table) with the
same

Extract helper for fetching class entry in optimizer

This code is repeated a few time. Two occurrences additionally
contained checks for user classes in CG(class_table) with the
same file name, but as far as I know these should always be in
the script class_table, so I'm omitting the check here.

show more ...

Revision tags: php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1, php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27
# 2f710f5b 31-Jan-2021 codinghuang

Support custom passes in Optimizer

# ba9c0b38 27-May-2021 Nikita Popov

Export zend_unary_op_produces_error() and use in optimizer

Don't repeat this logic, as it's going to become more complex.

# 446471b9 18-May-2021 Nikita Popov

Remove error suppression from zend_optimizer_eval_binary_op()

All error conditions should be handled by
zend_binary_op_produces_error().

Pointed out by Girgias.

# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

# b82242a8 20-Apr-2021 Nikita Popov

Remove unnecessary php.h includes from Zend/

The Zend/ directory really shouldn't be including php headers.
These particular includes are plain unnecessary.

Revision tags: php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, 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, 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
# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments

# 2d0e2733 18-Mar-2021 Nikita Popov

Support prototypes in call graph

Even if we don't know the exact method being called, include it
in the call graph with the is_prototype flag. In particular, we
can still make use of

Support prototypes in call graph

Even if we don't know the exact method being called, include it
in the call graph with the is_prototype flag. In particular, we
can still make use of return types from prototype methods, as
PHP 8 makes LSP violations a hard error.

Most other places are adjusted to skip calls with !is_prototype.
Maybe some of them would be fine, but ignoring them is conservative.

show more ...

123