History log of /php-src/Zend/zend_inheritance.c (Results 151 – 175 of 435)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 53e527ad 06-Feb-2020 Nikita Popov

Remove ZEND_ACC_IMPLEMENT_INTERFACES flag

This is equivalent to checking ce->num_interfaces. The only subtle
moment is during inheritance, where num_interface may change when
parent

Remove ZEND_ACC_IMPLEMENT_INTERFACES flag

This is equivalent to checking ce->num_interfaces. The only subtle
moment is during inheritance, where num_interface may change when
parent interfaces are inherited. The check in zend_do_link_class
thus uses "interfaces", not "ce->num_interfaces".

show more ...

# f57f0920 06-Feb-2020 Nikita Popov

Remove ZEND_ACC_IMPLEMENTS_TRAITS flag

This is equivalent to checking ce->num_traits.

# d5dd46fb 30-Jan-2020 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Fix copying of functions in variance obligations


# 68596ed7 30-Jan-2020 Nikita Popov

Fix copying of functions in variance obligations

Only copy sizeof(zend_internal_function) for internal functions.

# 3bae1793 28-Jan-2020 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Fixed bug #78989


# 1146bdb9 28-Jan-2020 Nikita Popov

Fixed bug #78989

Always operate on copies of the functions, so we don't reference
temporary trait methods that have gone out of scope.

This could be more efficient, but doing an

Fixed bug #78989

Always operate on copies of the functions, so we don't reference
temporary trait methods that have gone out of scope.

This could be more efficient, but doing an allocated copy only when
strictly necessary turned out to be somewhat tricky.

show more ...

Revision tags: php-7.3.14RC1, php-7.4.2RC1
# e72bf636 06-Jan-2020 Nikita Popov

Allow variadic arguments to replace non-variadic ones

Any number of arguments can be replaced by a variadic one, so
long as the variadic argument is compatible (in the sense of
contr

Allow variadic arguments to replace non-variadic ones

Any number of arguments can be replaced by a variadic one, so
long as the variadic argument is compatible (in the sense of
contravariance) with the subsumed arguments.

In particular this means that function(...$args) becomes a
near-universal signature: It is compatible with any function
signature that does not accept parameters by-reference.

This also fixes bug #70839, which describes a special case.

Closes GH-5059.

show more ...

# a3e29ba3 21-Jan-2020 Nikita Popov

Prefer using declaring class rather than direct parent in error

Point to the class that actually declares the property, which is
not necessarily the same as the direct parent class.

# 99db00b1 19-Jan-2020 Máté Kocsis

Fix #78880 Another round

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

# 655d5c83 18-Dec-2019 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Fixed bug #78776


# 4a61d842 18-Dec-2019 Nikita Popov

Fixed bug #78776

By using the normal inheritance check if the parent is abstract
as well.

Revision tags: php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1
# 33e39f08 09-Dec-2019 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Use unmangled named in property type inheritance error


# 5fcc12f5 09-Dec-2019 Nikita Popov

Use unmangled named in property type inheritance error

# a6832caa 04-Dec-2019 Nikita Popov

Fix incorrect assertion in property type variance check

Only one of the status has to be UNRESOLVED, the other could also
be SUCCESS.

Fixes oss-fuzz #19108 and oss-fuzz #19111.

Revision tags: 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, 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 ...

# e63a44dd 25-Oct-2019 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Fix bug #78226: Don't call __set() on uninitialized typed properties


# f1848a4b 24-Oct-2019 Nikita Popov

Fix bug #78226: Don't call __set() on uninitialized typed properties

Assigning to an uninitialized typed property will no longer trigger
a call to __set(). However, calls to __set() are

Fix bug #78226: Don't call __set() on uninitialized typed properties

Assigning to an uninitialized typed property will no longer trigger
a call to __set(). However, calls to __set() are still triggered if
the property is explicitly unset().

This gives us both the behavior people generally expect, and still
allows ORMs to do lazy initialization by unsetting properties.

For PHP 8, we should fine a way to forbid unsetting of declared
properties entirely, and provide a different way to achieve lazy
initialization.

show more ...

# 296269cf 25-Oct-2019 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Remove recursive check from instanceof_interface


# 184ba0c9 24-Oct-2019 Nikita Popov

Remove recursive check from instanceof_interface

Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.

Only e

Remove recursive check from instanceof_interface

Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.

Only exception are instanceof checks performed during inheritance
itself. However, we already have unlinked_instanceof for this
purpose, it just needs to be taught to handle this case.

Closes GH-4857.

show more ...

# 9a634a9c 17-Oct-2019 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Integrate property types with variance system


# cf85eb24 17-Oct-2019 Nikita Popov

Integrate property types with variance system

Property types are invariant, but may still have to load classes in
order to check for class aliases. This class loading should follow
t

Integrate property types with variance system

Property types are invariant, but may still have to load classes in
order to check for class aliases. This class loading should follow
the same rules as all other variance checks, rather than just
loading unconditionally.

This change integrates property type invariance checks into the
variance system as a new obligation type, and prevent early binding
if the type check cannot be performed.

show more ...

# edace5f5 01-Oct-2019 Nikita Popov

Merge branch 'PHP-7.4'


# f2e88512 01-Oct-2019 Nikita Popov

Remove func copy optimization for private method with static vars

Not NULLing the static_variables pointer for shadow methods during
static var shutdown would be a way to avoid this leak

Remove func copy optimization for private method with static vars

Not NULLing the static_variables pointer for shadow methods during
static var shutdown would be a way to avoid this leak, but unless
there's evidence that inherited private methods with static vars are
actually a common use-case, I don't think we should keep this kind
of fragile edge-case optimization.

Fixes OSS-Fuzz #17875.

show more ...

12345678910>>...18