#
2ef1930a |
| 06-Apr-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix number of elements after packed hash filling (#11022) After a hash filling routine the number of elements are set to the fill index. However, if the fill index is larger than the num
Fix number of elements after packed hash filling (#11022) After a hash filling routine the number of elements are set to the fill index. However, if the fill index is larger than the number of elements, the number of elements are no longer correct. This is observable at least via count() and var_dump(). E.g. the attached test case would incorrectly show int(17) instead of int(11). Solve this by only increasing the number of elements by the actual number that got added. Instead of adding a variable that increments per iteration, I wanted to save some cycles in the iteration and simply compute the number of added elements at the end. I discovered this behaviour while fixing GH-11016, where this filling routine is easily exposed to userland via a specialised VM path [1]. Since this seems to be more a general problem with the macros, and may be triggered outside of the VM handlers, I fixed it in the macros instead of modifying the VM to fixup the number of elements. [1] https://github.com/php/php-src/blob/b2c5acbb010f4bbc7ea9b53ba9bc81d672dd0f34/Zend/zend_vm_def.h#L6132-L6141
show more ...
|
#
0e706937 |
| 04-Apr-2023 |
Dmitry Stogov |
Revert "Zend/zend_types.h: move `IS_*` to `zend_type_code.h`" This reverts commit 0270a1e54c0285fa3c89ee2b0120073ef57ab5fa.
|
#
0270a1e5 |
| 21-Feb-2023 |
Max Kellermann |
Zend/zend_types.h: move `IS_*` to `zend_type_code.h` More decoupling of circular header dependencies.
|
#
413844d6 |
| 18-Feb-2023 |
Max Kellermann |
Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597) These types are standard C99. For compatibility with out-of-tree extensions, keep the typedefs in
Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597) These types are standard C99. For compatibility with out-of-tree extensions, keep the typedefs in main/php.h.
show more ...
|
#
2d3427c5 |
| 16-Jan-2023 |
Christoph M. Becker |
Revert "#include cleanup (#10216)" Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>. This reverts commit e628c66f9d4173e585081ddef358505433f9a288.
|
#
e628c66f |
| 04-Jan-2023 |
Max Kellermann |
#include cleanup (#10216) Shift header include In the C file, include the header first so missing #includes are detected by the compiler, and use lighter header dependencies in
#include cleanup (#10216) Shift header include In the C file, include the header first so missing #includes are detected by the compiler, and use lighter header dependencies in the header, to speed up compile times.
show more ...
|
#
db012a8b |
| 04-Oct-2022 |
Jorg Adam Sowa |
Use function HT_IS_PACKED where it's missing (#9658)
|
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 |
|
#
faa83f2f |
| 04-Aug-2022 |
George Peter Banyard |
Convert some macros to zend_always_inline functions (#8288) This doesn't have an effect really, but humans and IDEs can struggle to see through the macro soup when they first interact with P
Convert some macros to zend_always_inline functions (#8288) This doesn't have an effect really, but humans and IDEs can struggle to see through the macro soup when they first interact with PHP's source code. Moreover, this reduces some of the macro expansion hell when they appear in compiler warnings.
show more ...
|
Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, 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, 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, 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, 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, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, 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, 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, php-8.0.8, php-8.1.0alpha2, 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 |
|
#
bdf5a4e4 |
| 13-May-2021 |
George Peter Banyard |
The hashvalue/index of a bucket is a zend_ulong
|
#
75a9a5f3 |
| 11-Jul-2022 |
Tim Düsterhus |
Add `zend_array_to_list()` (#8976) * Add zend_array_to_list() * Use `zend_array_to_list()` in `PHP_FUNCTION(array_values)`
|
#
c2547ab7 |
| 20-Apr-2022 |
George Peter Banyard |
Add some const qualifiers in zend_string/hash (#8304) Co-authored-by: Levi Morrison <morrison.levi@gmail.com>
|
#
a8b9dbc6 |
| 17-Nov-2021 |
Bob Weinand |
Fix ZEND_HASH_REVERSE_FOREACH_PTR definition
|
#
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 ...
|
#
8356da60 |
| 02-Aug-2021 |
Nikita Popov |
Remove dynamic defs from methods as well We need to remove DECLARE_FUNCTION + dynamic_defs for functions defined in methods as well, not just for those declared in the main script.
|
#
67b5d8fc |
| 30-Jul-2021 |
Nikita Popov |
Don't reverse class order during preloading We don't guarantee any particular order, but this reduces test failures under --preload that are sensitive to class order. Add some Z
Don't reverse class order during preloading We don't guarantee any particular order, but this reduces test failures under --preload that are sensitive to class order. Add some ZEND_HASH_FOREACH_*_FROM macros to allow skipping the persistent classes while iterating in forward direction.
show more ...
|
#
ae8647d9 |
| 20-Jul-2021 |
Levi Morrison |
Remove leading underscore for _zend_hash_find_known_hash (#7260) Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...) Convert zend_hash_find_ex(..., 0) to zend_hash_find(.
Remove leading underscore for _zend_hash_find_known_hash (#7260) Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...) Convert zend_hash_find_ex(..., 0) to zend_hash_find(...) Also add serializable changes to UPGRADING.INTERNALS summary
show more ...
|
#
ceb6fa6d |
| 18-Jun-2021 |
Patrick Allaert |
Convert some recently introduced zend_bool to bool As well as `scripts/dev/check_parameters.php` utility. Cfr. 3e01f5afb1b52fe26a956190296de0192eedeec1
|
Revision tags: 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 |
|
#
e86bea8d |
| 06-Apr-2021 |
Dmitry Stogov |
Extend ZEND_HASH_FILL_* API with ZEND_HASH_FILL_GROW and use it to optimize get_declared_classes()
|
#
340013ad |
| 19-Mar-2021 |
Dmitry Stogov |
Add zend_hash_lookup() and zend_hash_index_lookup() functions. Thet search for an element with given key/index and add an empty one (NULL), if no found.
|
Revision tags: 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, 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, 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, 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, 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, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, 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, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1 |
|
#
13c430b1 |
| 04-Nov-2019 |
Dusk |
Add array_is_list(array $array) function This function tests if an array contains only sequential integer keys. While list isn't an official type, this usage is consistent with the commu
Add array_is_list(array $array) function This function tests if an array contains only sequential integer keys. While list isn't an official type, this usage is consistent with the community usage of "list" as an annotation type, cf. https://psalm.dev/docs/annotating_code/type_syntax/array_types/#lists Rebased and modified version of #4886 - Use .stub.php files - Add opcache constant evaluation when argument is a constant - Change from is_list(mixed $value) to array_is_list(array $array) RFC: https://wiki.php.net/rfc/is_list Co-Authored-By: Tyson Andre <tysonandre775@hotmail.com> Co-Authored-By: Dusk <dusk@woofle.net> Closes GH-6070
show more ...
|
#
3e01f5af |
| 15-Jan-2021 |
Nikita Popov |
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
show more ...
|
#
87104292 |
| 10-Sep-2020 |
Remi Collet |
fix zend_hash_get_current_key_type_ex proto
|
#
7be70c6b |
| 10-Sep-2020 |
Remi Collet |
fix zend_hash_get_current_key_ex proto
|
#
40e5238a |
| 04-Sep-2020 |
twosee |
Flesh out ZEND_HASH_REVERSE_FOREACH_* macros Closes GH-6080.
|
#
fa8d9b11 |
| 28-Aug-2020 |
George Peter Banyard |
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functio
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
show more ...
|