History log of /php-src/Zend/zend_types.h (Results 51 – 75 of 303)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 4b79dba9 09-Feb-2021 Dmitry Stogov

Added Inheritance Cache.

This is a new transparent technology that eliminates overhead of PHP class inheritance.

PHP classes are compiled and cached (by opcahce) separately, howeve

Added Inheritance Cache.

This is a new transparent technology that eliminates overhead of PHP class inheritance.

PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request.

Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking).

The patch shows 8% improvement on Symphony "Hello World" app.

show more ...

Revision tags: php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1
# 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 ...

# ec58a6f1 14-Jan-2021 Nikita Popov

Remove SEPARATE_ZVAL_IF_NOT_REF() macro

This macro hasn't made sense since PHP 7. The correct pattern to
use is ZVAL_DEREF + SEPARATE_ZVAL_NOREF.

# aa517858 14-Jan-2021 Nikita Popov

Remove SEPARATE_ARG_IF_REF macro

The name doesn't correspond to what it does at all, and all the
existing usages appear to be unnecessary.

Usage of this macro can be replaced by

Remove SEPARATE_ARG_IF_REF macro

The name doesn't correspond to what it does at all, and all the
existing usages appear to be unnecessary.

Usage of this macro can be replaced by ZVAL_DEREF + Z_TRY_ADDREF_P.

show more ...

# 880bf622 14-Jan-2021 Nikita Popov

Fixed bug #80617: Type narrowing warning in ZEND_TYPE_INIT_CODE

Revision tags: 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
# da0663a3 15-Sep-2020 Nikita Popov

Add GC_TRY_ADDREF macro

That adds a ref if not immutable. Also audit uses of GC_IMMUTABLE
to either use GC_TRY_ADDREF or GC_TRY_PROTECT_RECURSION.

Revision tags: php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22
# 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 ...

Revision tags: 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
# 15846ff1 17-Jun-2020 Nikita Popov

Add ZVAL_OBJ_COPY macro

For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.

# bb3d4456 15-Jun-2020 Dmitry Stogov

Change GC_COLLECTABLE flag into GC_NOT_COLLECTABLE to simplify GC_MAY_LEAK() check

Revision tags: php-7.4.7, php-7.3.19
# 4b77a158 08-Jun-2020 George Peter Banyard

Use standard boolean type as zend_bool typedef

Closes GH-5624

Revision tags: 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
# aec4c0fd 27-Mar-2020 Máté Kocsis

Add support for the mixed type

RFC: https://wiki.php.net/rfc/mixed_type_v2
Closes GH-5313

Co-authored-by: Dan Ackroyd <danack@basereality.com>

# 446724bc 12-Apr-2020 George Peter Banyard

Fix [-Werror=missing-braces] compiler warning

Partial fix to bug 79431

Revision tags: 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
# 43443857 07-Jan-2020 Nikita Popov

Add static return type

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

The "static" type is represented as MAY_BE_STATIC, rather than
a class type like "self" and "parent", as

Add static return type

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

The "static" type is represented as MAY_BE_STATIC, rather than
a class type like "self" and "parent", as it has special
resolution semantics, and cannot be cached in the runtime cache.

Closes GH-5062.

show more ...

# 437404b0 11-Feb-2020 Dmitry Stogov

Reuse SEPARATE_ARRAY() macro

# bd197728 16-Jan-2020 Nikita Popov

Use zend_type inside type lists

Instead of having a completely independent encoding for type list
entries. This is going to use more memory, but I'm not particularly
concerned about

Use zend_type inside type lists

Instead of having a completely independent encoding for type list
entries. This is going to use more memory, but I'm not particularly
concerned about that, as type unions that contain multiple classes
should be uncommon. On the other hand, this allows us to treat
top-level types and types inside lists mostly the same.

A new ZEND_TYPE_FOREACH macros allows to transparently treat list
and non-list types the same way. I'm not using it everywhere it could be
used for now, just the places that seemed most obvious.

Of course, this will make any future type system changes much simpler,
as it will not be necessary to duplicate all logic two times.

show more ...

# 0b4778c3 16-Jan-2020 Máté Kocsis

Fix #78880: Another bunch of spelling errors

# 1e4920c1 07-Jan-2020 Nikita Popov

Renumber zval types, clarify allowed overlap

Make it clear that types used for type declarations can overlap
with the rest, and can also overlap in MAY_BE space.

This makes thin

Renumber zval types, clarify allowed overlap

Make it clear that types used for type declarations can overlap
with the rest, and can also overlap in MAY_BE space.

This makes things more robust against the addition of new primitive
types.

show more ...

Revision tags: php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13
# ee45dbab 11-Dec-2019 Dmitry Stogov

Merge branch 'PHP-7.4'

* PHP-7.4:
Addirional fix for bug #78918


# 3280209c 11-Dec-2019 Dmitry Stogov

Addirional fix for bug #78918

Revision tags: php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12
# 0cec268d 15-Nov-2019 Nikita Popov

Support single class unions in gen stubs

Revision tags: php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# 999e32b6 25-Sep-2019 Nikita Popov

Implement union types

According to RFC: https://wiki.php.net/rfc/union_types_v2

The type representation now makes use of both the pointer payload
and the type mask at the same t

Implement union types

According to RFC: https://wiki.php.net/rfc/union_types_v2

The type representation now makes use of both the pointer payload
and the type mask at the same time. Additionall, zend_type_list is
introduced as a new kind of pointer payload, which is used to store
multiple class types. Each of the class types is a tagged pointer,
which may be either a class name or class entry. The latter is only
used for typed properties, while arguments/returns will instead use
cache slots. A type list can contain a mix of both names and CEs at
the same time, as not all classes may be resolvable.

One thing this is missing is support for union types in arginfo
and stubs, which I want to handle separately.

I've also dropped the special object code from the JIT implementation
for now -- I plan to add this back in a different form at a later time.
For now I did not want to include non-trivial JIT changes together
with large functional changes.

Another possible piece of follow-up work is to implement "iterable"
as an internal alias for "array|Traversable". I believe this will
eliminate quite a few special-cases that had to be implemented.

Closes GH-4838.

show more ...

Revision tags: php-7.2.23, php-7.3.10
# ac4e0f08 20-Sep-2019 Nikita Popov

Make zend_type a 2-field struct

We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.

Make zend_type a 2-field struct

We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.

To avoid increasing the size of arginfo structures, the
pass_by_reference and is_variadic fields are now stored as part of
the type_mask (8-bit are reserved for custom use).

Different types of pointer payloads are distinguished based on bits
in the type_mask.

show more ...

# 11ce4172 01-Nov-2019 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Fixed bug #78768


# 944c1cf0 01-Nov-2019 Nikita Popov

Fixed bug #78768

Remove the typedef from zend_types.h, use explicit struct prefix
instead.

# 9d48bf51 27-Oct-2019 Tyson Andre

Fix miscellaneous typos in docs and error messages

Closes GH-4863.

12345678910>>...13