History log of /php-src/Zend/zend_types.h (Results 26 – 50 of 303)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 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 ...


# 3bce1160 20-Feb-2023 Max Kellermann

Zend/zend_types.h: move `zend_result` to separate header (#10609)

Many sources need just `zend_result`, and with this new header, they
only need to include `zend_result.h` instead of `ze

Zend/zend_types.h: move `zend_result` to separate header (#10609)

Many sources need just `zend_result`, and with this new header, they
only need to include `zend_result.h` instead of `zend_types.h`; the
latter is large and has fat dependencies, which slows down the build.

show more ...


# 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 ...


# 2f4973fd 16-Jan-2023 Christoph M. Becker

Revert GH-10279

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit 45a128c9de93bf60956102d85d15f1fe8913bb70.
This reverts commit 1eb71c

Revert GH-10279

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit 45a128c9de93bf60956102d85d15f1fe8913bb70.
This reverts commit 1eb71c3f155a42ad6867cd5e2f6d921a99506a37.
This reverts commit 492523a779dced91eb09215183287e0856b693bf.
This reverts commit c7a4633891392d16d40b08135598807b3f0443b0.
This reverts commit 308adb915c1b659ab377f752fb27b408a455d7ed.
This reverts commit cd27d5e07f01172ac8a701996d260a731489d856.
This reverts commit c5933409b47bea760977cf9c9ea04cbb63aaafe5.
This reverts commit 46371f4eb339f7e7615a8732d61f2369f8d9129e.
This reverts commit 623e2e9fc6a23b8eb7f22010eaf99bf6f638917d.
This reverts commit e7434c124772c05fe836832e02196d50bec10c23.
This reverts commit d28d323ca20976ed776171330b90588cc3857dd6.
This reverts commit 1a067b84ee423a6fb06a5debd92b4cafefeac4e4.
This reverts commit a55c0c5fc3f624a685f42281df26cf87f445be43.
This reverts commit b5aeb3a4d40dbf38da65975d12b9d2c593b83bdd.
This reverts commit f061a035e44d3f6bbc71774f2101525d74fbf16f.
This reverts commit b088575119b3244a4d08f6a300251111a221c66b.
This reverts commit b1d48774a79592e7fb1ba85d3a2bd6717f25acec.
This reverts commit 94f9a20ce6451b54e8346cc474de6b4f9b8897a4.
This reverts commit 4831e48708e19346ace0fa5f3f085ee8afd43267.
This reverts commit cd985de190534c8e3567a4c5547eb98c45337fa0.
This reverts commit 9521d21681b22a471f21b3c56e32b883acac3301.
This reverts commit d6136151e9f7fc40e753ac0ebe1790e0d0371b6b.

show more ...


# 0f7625c4 13-Jan-2023 Arnaud Le Blanc

Reduce HT_MAX_SIZE to account for the max load factor of 0.5 (#10242)

zend_hash allocates a hash table twice as big as nTableSize
(HT_HASH_SIZE(HT_SIZE_TO_MASK(nTableSize)) == nTableSize

Reduce HT_MAX_SIZE to account for the max load factor of 0.5 (#10242)

zend_hash allocates a hash table twice as big as nTableSize
(HT_HASH_SIZE(HT_SIZE_TO_MASK(nTableSize)) == nTableSize*2), so HT_MAX_SIZE
must be half the max table size or less.

Fixes GH-10240

show more ...


# 45a128c9 04-Jan-2023 Max Kellermann

Zend/zend_types: include cleanup


Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22
# a6970838 01-Aug-2022 Arnaud Le Blanc

Extended map_ptr before copying class table (#9188)

Fixes GH-9164

# 4457dba1 22-Jul-2022 George Peter Banyard

Add support for stubs to declare intersection type class properties (#8751)

Revision tags: 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
# b40ae808 07-Jun-2022 George Peter Banyard

Convert iterable into an internal alias for Traversable|array (#7309)

This does a compile time transformation of ``iterable`` into ``Traversable|array`` which simplifies some of the LSP vari

Convert iterable into an internal alias for Traversable|array (#7309)

This does a compile time transformation of ``iterable`` into ``Traversable|array`` which simplifies some of the LSP variance handling.

The arginfo generation script from stubs is updated to produce a union type when it encounters the type ``iterable``
Extension functions which do not regenerate the arginfo, or write them manually are still supported by mimicking the compile time transformation while registering the function.

Type Reflection is preserved for single ``iterable`` (and ``?iterable``) to produce a ReflectionNamedType with name ``iterable``, however usage of ``iterable`` in union types will be converted to ``array|Traversable``

show more ...

Revision tags: 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
# 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
# d362caed 15-Nov-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix generation of property with class union type
Replace SKIPIF with EXTENSIONS


# 68ca3879 15-Nov-2021 Nikita Popov

Fix generation of property with class union type

The generated type was missing the UNION bit. Add a ZEND_TYPE_INIT_UNION
macro to hide the implementation details.

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, php-8.0.12, php-8.1.0RC4
# bd3e5363 08-Oct-2021 Nikita Popov

Fixed bug #81514

Objects reuse the GC_PERSISTENT flag as IS_OBJ_WEAKLY_REFERENCED,
which we did not account for in ZVAL_COPY_OR_DUP. To make things
worse the incorrect zval_copy_ctor

Fixed bug #81514

Objects reuse the GC_PERSISTENT flag as IS_OBJ_WEAKLY_REFERENCED,
which we did not account for in ZVAL_COPY_OR_DUP. To make things
worse the incorrect zval_copy_ctor_func() invocation silently did
nothing. To avoid that, add an assertion that it should only be
called with arrays and strings (unlike the normal zval_copy_ctor()
which can be safely called on any zval).

show more ...

Revision tags: 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
# 14f599ea 31-Aug-2021 Nikita Popov

Use zend_long for resource ID

Currently, resource IDs are limited to 32-bits. As resource IDs
are not reused, this means that resource ID overflow for
long-running processes is very

Use zend_long for resource ID

Currently, resource IDs are limited to 32-bits. As resource IDs
are not reused, this means that resource ID overflow for
long-running processes is very possible.

This patch switches resource IDs to use zend_long instead, which
means that on 64-bit systems, 64-bit resource IDs will be used.
This makes resource ID overflow practically impossible.

The tradeoff is an 8 byte increase in zend_resource size.

Closes GH-7436.

show more ...

Revision tags: php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3
# 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, php-8.1.0beta2, php-8.0.9
# fb52b3c9 28-Jul-2021 George Peter Banyard

[skip-ci] Fix comments and UPGRADING.INTERNALS for zend_type changes

Revision tags: php-7.4.22, php-8.1.0beta1
# 7572d9bd 20-Jul-2021 Nikita Popov

Fix RC_DEBUG check for IS_NULL type

IS_NULL is set during GC, conservatively assume that it might have
been an object.

Revision tags: php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3
# 069a9fa5 05-Jul-2021 George Peter Banyard

Pure Intersection types (#6799)

Implement pure intersection types RFC

RFC: https://wiki.php.net/rfc/pure-intersection-types

Co-authored-by: Nikita Popov <nikic@php.net>

Pure Intersection types (#6799)

Implement pure intersection types RFC

RFC: https://wiki.php.net/rfc/pure-intersection-types

Co-authored-by: Nikita Popov <nikic@php.net>
Co-authored-by: Ilija Tovilo <ilutov@php.net>

show more ...

Revision tags: 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
# e11468a7 07-Jun-2021 Nikita Popov

Remove ZVAL_NEW_ARR() macro

This macro is a footgun because it creates an uninitialized array
(only an allocation). This macro is no longer used in php-src,
and we have better altern

Remove ZVAL_NEW_ARR() macro

This macro is a footgun because it creates an uninitialized array
(only an allocation). This macro is no longer used in php-src,
and we have better alternatives like array_init() or
ZVAL_ARR(arr, zend_new_array(size_hint)).

show more ...

Revision tags: php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1, php-8.0.6, php-7.4.19
# fd1d5ec2 28-Apr-2021 Nikita Popov

Add ZEND_CLASS_CONST_FLAGS() macro

And drop Z_ACCESS_FLAGS(). We no longer store *only* access flags
in these.

Revision tags: php-7.4.18, php-7.3.28, php-8.0.5
# 6cd0b48c 19-Apr-2021 Matt Brown

Implement never return type

The never type can be used to indicate that a function never
returns, for example because it always unwinds.

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

Implement never return type

The never type can be used to indicate that a function never
returns, for example because it always unwinds.

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

Closes GH-6761.

show more ...

Revision tags: php-8.0.5RC1, php-7.4.18RC1
# d8e4fbae 08-Apr-2021 Dmitry Stogov

Fast Class Cache

This is generalization of idea, that was previously usesd for caching
resolution of class_entries in zend_type. Now very similar mechanizm is
used for general zend_s

Fast Class Cache

This is generalization of idea, that was previously usesd for caching
resolution of class_entries in zend_type. Now very similar mechanizm is
used for general zend_string into zend_class_entry resolution.

Interned zend_string with IS_STR_CLASS_NAME_MAP_PTR GC_FLAG uses its
refcount to adress corresponding zend_class_entry cache slot.
The refcount keeps an offset to this slot from CG(map_ptr_base).
Flag may be checked by ZSTR_HAS_CE_CACHE(str), cache slot may be read by
ZSTR_GET_CE_CACHE(str) and set by ZSTR_SET_CE_CACHE(str, ce).

show more ...

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
# 353f7ffb 16-Feb-2021 Nikita Popov

Delref only after successful allocation

Otherwise we may have inconsistent refcounts after OOM.

I expect this problem is much more prevalent, but this at least
fixes some string

Delref only after successful allocation

Otherwise we may have inconsistent refcounts after OOM.

I expect this problem is much more prevalent, but this at least
fixes some string/array separation cases.

Fixes oss-fuzz #30999.

show more ...

12345678910>>...13