#
04a4864b |
| 24-Mar-2022 |
Max Kellermann |
ext/opcache: merge redundant code and "bool" refactoring (#8237) * ext/opcache/ZendAccelerator: make check_persistent_script_access() static * ext/opcache/ZendAccelerator: convert "
ext/opcache: merge redundant code and "bool" refactoring (#8237) * ext/opcache/ZendAccelerator: make check_persistent_script_access() static * ext/opcache/ZendAccelerator: convert "int" to "bool" * ext/opcache/zend_file_cache: convert "int" to "bool" * ext/opcache: use true/false for zend_persistent_script.corrupted * ext/opcache/ZendAccelerator: move duplicate code to zend_accel_discard_script() * ext/opcache/ZendAccelerator: convert accel_deactivate_now() to function Simplify the #iddef ZEND_WIN32. * ext/opcache/zend_file_cache: simplify iovec initializer * ext/opcache/zend_file_cache: add local zend_string* variables Eliminates lots of redundant casts and avoids reloading the variable from RAM into registers. * ext/opcache/zend_file_cache: use ZSTR_VAL() * ext/opcache/zend_file_cache: move code to zend_file_cache_script_write() This eliminates duplicate error handling code.
show more ...
|
Revision tags: php-8.1.4RC1, php-8.0.17RC1, 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 ...
|
#
a066b809 |
| 27-Dec-2021 |
Dmitry Stogov |
Skip abstract methods |
Revision tags: php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1 |
|
#
024d5f4b |
| 01-Dec-2021 |
Tyson Andre |
Cache method overrides of ArrayAccess in zend_class_entry Previously, code such as subclasses of SplFixedArray would check for method overrides when instantiating the objects. T
Cache method overrides of ArrayAccess in zend_class_entry Previously, code such as subclasses of SplFixedArray would check for method overrides when instantiating the objects. This optimization was mentioned as a followup to GH-6552
show more ...
|
Revision tags: php-7.4.27RC1, php-8.1.0 |
|
#
d56ec0a6 |
| 17-Nov-2021 |
Dmitry Stogov |
Merge branch 'PHP-8.1' * PHP-8.1: Fixed bug #81607 (CE_CACHE allocation with concurrent access)
|
#
76548e50 |
| 17-Nov-2021 |
Dmitry Stogov |
Fixed bug #81607 (CE_CACHE allocation with concurrent access) |
Revision tags: php-8.0.13, php-7.4.26, php-7.3.33, 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 |
|
#
6b2b4bb1 |
| 19-Oct-2021 |
Nikita Popov |
Remove unused scope argument |
Revision tags: php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1 |
|
#
0a831423 |
| 05-Oct-2021 |
Nikita Popov |
Merge branch 'PHP-8.1' * PHP-8.1: Restore CE_CACHE clear on persist
|
#
e8e4852e |
| 05-Oct-2021 |
Nikita Popov |
Restore CE_CACHE clear on persist We still need to do this in case early binding succeeds and caches the class. We could guard that by !in_compilation as well, but in this case the p
Restore CE_CACHE clear on persist We still need to do this in case early binding succeeds and caches the class. We could guard that by !in_compilation as well, but in this case the previous cache clearing should be reliable, so restore it.
show more ...
|
#
d4368b88 |
| 04-Oct-2021 |
Nikita Popov |
Merge branch 'PHP-8.1' * PHP-8.1: Don't populate CE_CACHE during compilation
|
#
ac70bb36 |
| 01-Oct-2021 |
Nikita Popov |
Don't populate CE_CACHE during compilation It's possible for CE_CACHE slots to be populated during compilation (e.g. due to an early binding attempt). When opcache then persists the
Don't populate CE_CACHE during compilation It's possible for CE_CACHE slots to be populated during compilation (e.g. due to an early binding attempt). When opcache then persists the class, it clears the CE_CACHE slot for the class name as declared, but not for different spellings (that only differ in case). As such, a pointer to the old, non-persistent class entry may be retained. Fix this by not populating CE_CACHE if in_compilation is set. Closes GH-7542.
show more ...
|
Revision tags: php-8.1.0RC3 |
|
#
c19977d0 |
| 27-Sep-2021 |
Nikita Popov |
Fix delayed early binding with optimization It's possible for delayed early binding opcodes to get optimized away if they are "unreachable". However, we still need to attempt early b
Fix delayed early binding with optimization It's possible for delayed early binding opcodes to get optimized away if they are "unreachable". However, we still need to attempt early binding for them. (In some cases we also corrupt the early binding list outright during optimization, which is how I got here.) Fix this by storing information about delayed early binding independently of DECLARE_CLASS_DELAYED opcodes, so early binding is performed even after the opcode has been dropped.
show more ...
|
Revision tags: php-8.0.11, php-7.4.24, php-7.3.31, 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 |
|
#
116fa654 |
| 23-Aug-2021 |
Dmitry Stogov |
Fixed ZEND_MAP_PTR_KIND_PTR (it is not used) |
#
476c333a |
| 23-Aug-2021 |
Dmitry Stogov |
Reorder updates to avoid race conditions |
Revision tags: php-8.1.0beta3 |
|
#
02b5660c |
| 12-Aug-2021 |
Nikita Popov |
Clear ce cache when persisting for file cache only We should clear the ce cache before storing the interned string, while we still have a reference to the original ce cache slot. |
#
315f4094 |
| 11-Aug-2021 |
Nikita Popov |
Always use CE_CACHE, remove TYPE_HAS_CE (#7336) Currently, CE_CACHE on strings is only used with opcache interned strings. This patch extends usage to non-opcache interned strings as wel
Always use CE_CACHE, remove TYPE_HAS_CE (#7336) Currently, CE_CACHE on strings is only used with opcache interned strings. This patch extends usage to non-opcache interned strings as well. This means that most type strings can now make use of CE_CACHE even if opcache is not loaded, which allows us to remove TYPE_HAS_CE kind, and fix some discrepancies depending on whether a type stores a resolved or non-resolved name. There are two cases where CE_CACHE will not be used: * When opcache is not used and a permanent interned string (that is not an internal class name) is used as a type name during the request. In this case we can't allocate a map_ptr index for the permanent string, as it would be not be in the permanent map_ptr index space. * When opcache is used but the script is not cached (e.g. eval'd code or opcache full). If opcache is used, we can't allocate additional map_ptr indexes at runtime, because they may conflict with indexes allocated by opcache. In these two cases we would end up not using CE caching for property types (argument/return types still have the separate cache slot).
show more ...
|
Revision tags: php-8.0.10RC1, php-7.4.23RC1 |
|
#
5e997ec3 |
| 10-Aug-2021 |
Nikita Popov |
Remove special self/parent handling in get_class_name_map_ptr() (#7330) zend_accel_get_class_name_map_ptr() for "self" and "parent" will currently try to determine which class these refe
Remove special self/parent handling in get_class_name_map_ptr() (#7330) zend_accel_get_class_name_map_ptr() for "self" and "parent" will currently try to determine which class these refer to, and then initialize the CE_CACHE on those strings. However, this shouldn't be necessary: We already initialize CE_CACHE on all class declaration names, so it should be covered through that already.
show more ...
|
Revision tags: php-8.1.0beta2, php-8.0.9, php-7.4.22 |
|
#
1bd6fafa |
| 27-Jul-2021 |
Nikita Popov |
Fix preloading of trait property attributes |
#
3eb97a45 |
| 22-Jul-2021 |
Nikita Popov |
Always use separate static_members_table When running without opcache, static_members_table is shared with default_static_members_table. This is visible in reflection output, because
Always use separate static_members_table When running without opcache, static_members_table is shared with default_static_members_table. This is visible in reflection output, because ReflectionProperty::getDefaultValue() will return the current value, rather than the default value. Address this by never sharing the table, which matches the behavior we already see under opcache. Fixes bug #80821. Closes GH-7299.
show more ...
|
Revision tags: 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, php-7.4.21RC1, php-8.0.8RC1 |
|
#
bd98d84e |
| 10-Jun-2021 |
Dmitry Stogov |
Reorder conditions and always mark methods in SHM as ZEND_ACC_IMMUTABLE |
Revision tags: php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1 |
|
#
2e93bb7a |
| 12-May-2021 |
Dmitry Stogov |
Fixed possible use after free |
#
9f238917 |
| 11-May-2021 |
Dmitry Stogov |
Fixed tracing JIT + preloading failures: ext/opcache/tests/preload_003.phpt ext/opcache/tests/preload_trait_multiple_fixup.phpt ext/opcache/tests/preload_trait_static.phpt |
#
cb0854bc |
| 11-May-2021 |
Dmitry Stogov |
JIT class methods only when class entry is completely persistent. This fixes a number of test failures on low optimization levels. (e.g. use after free in Zend/tests/bug54268.phpt and te
JIT class methods only when class entry is completely persistent. This fixes a number of test failures on low optimization levels. (e.g. use after free in Zend/tests/bug54268.phpt and tests/classes/protected_001.phpt with opcache.jit=1204)
show more ...
|