History log of /PHP-8.1/Zend/zend_closures.c (Results 26 – 50 of 315)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# dfb9e033 02-Jan-2021 Tyson Andre

Use Z_PARAM_OBJ macros when zval isn't needed

In some cases, like spl_object_id, the code is simpler but equally efficient
after optimizations.

In other cases, like get_mangled_

Use Z_PARAM_OBJ macros when zval isn't needed

In some cases, like spl_object_id, the code is simpler but equally efficient
after optimizations.

In other cases, like get_mangled_object_vars(), the compiler can't infer that
the object in the zval won't change.

Closes GH-6567

show more ...

# c351768e 16-Nov-2020 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #74558: Can't rebind closure returned by Closure::fromCallable()


# 78773890 12-Nov-2020 Christoph M. Becker

Fix #74558: Can't rebind closure returned by Closure::fromCallable()

Failure to rebind such closures is not necessarily related to them
being created by `ReflectionFunctionAbstract::getC

Fix #74558: Can't rebind closure returned by Closure::fromCallable()

Failure to rebind such closures is not necessarily related to them
being created by `ReflectionFunctionAbstract::getClosure()`, so we fix
the error message.

Closes GH-6424.

show more ...

# 8e0789a2 21-Sep-2020 Nikita Popov

Use proper parameter type in Closure::bindTo() signature

# b15885b5 19-Sep-2020 Máté Kocsis

Separate Closure::bind() implementations

Closure::bind() and Closure::bindTo() are currently reported as aliases in stubs because they have a single implementation. They are not aliases in f

Separate Closure::bind() implementations

Closure::bind() and Closure::bindTo() are currently reported as aliases in stubs because they have a single implementation. They are not aliases in fact though, they just use zend_parse_method_parameters() cleverly.

Thus, let's separate their implementation so that we don't have to alias Closure::bindTo() anymore. This will also have the advantage that the two ZPP implementations become more clear.

Closes GH-6169

show more ...

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

# befe10fd 14-Aug-2020 Nikita Popov

Fix bug #78770

Refactor the zend_is_callable implementation to check callability
at a particular frame (this is an implementation detail for now,
but could be exposed in the API if u

Fix bug #78770

Refactor the zend_is_callable implementation to check callability
at a particular frame (this is an implementation detail for now,
but could be exposed in the API if useful). Pick the first parent
user frame as the one to check.

show more ...

Revision tags: php-7.3.18RC1, php-7.2.30, php-7.3.17
# d92229d8 06-Apr-2020 Nikita Popov

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument nam

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.

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

Closes GH-5357.

show more ...

# 8664ff7a 24-Jul-2020 Máté Kocsis

Cleanup argument handling in ext/reflection

Closes GH-5850

# d30cd7d7 26-May-2020 Máté Kocsis

Review the usage of apostrophes in error messages

Closes GH-5590

# 7da8c48a 07-Jul-2020 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Fixed bug #79778


# d9b4974cb 07-Jul-2020 Nikita Popov

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
Fixed bug #79778


# b765f96f 07-Jul-2020 Nikita Popov

Fixed bug #79778

In the interest of avoiding side-effects during dumping, I'm
replacing the value with a <constant ast> string instead of
performing an update constant operation.

# 302933da 07-Jul-2020 Nikita Popov

Remove no_separation flag

# 2b5de6f8 01-Jul-2020 Max Semenik

Remove proto comments from C files

Closes GH-5758

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

# 7d6a0ba8 07-Jun-2020 twosee

Fix expression warnings and break warnings

Close GH-5675.

# d1d3a4af 19-May-2020 Máté Kocsis

Generate method entries for Closure

Revision tags: php-7.3.17RC1, php-7.3.18, php-7.3.16, php-7.3.16RC1
# 53efa1b0 02-Mar-2020 Nikita Popov

Store aliased name of trait method

Currently, trait methods are aliased will continue to use the
original function name. In a few places in the codebase, we will
try to look up the a

Store aliased name of trait method

Currently, trait methods are aliased will continue to use the
original function name. In a few places in the codebase, we will
try to look up the actual method name instead. However, this does
not work if an aliased method is used indirectly
(https://bugs.php.net/bug.php?id=69180).

I think it would be better to instead actually change the method
name to the alias. This is in principle easy: We have to allow
function_name to be changed even if op array is otherwise shared
(similar to static_variables). This means we need to addref/release
the function_name separately, but I don't think there is a
performance concern here (especially as everything is usually
interned).

There is a bit of complication in opcache, where we need to make
sure that the function name is released the correct number of times
(interning may overwrite the name in the original op_array, but we
need to release it as many times as the op_array is shared).

Fixes bug #69180.
Fixes bug #74939.
Closes GH-5226.

show more ...

Revision tags: php-7.3.15RC1, php-7.3.15, php-7.3.14
# 68112224 20-Jan-2020 Nikita Popov

Eliminate uses of ZVAL_ZVAL and friends

Instead add RETURN_COPY(_VALUE) macros will the expected behavior.

RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck
around,

Eliminate uses of ZVAL_ZVAL and friends

Instead add RETURN_COPY(_VALUE) macros will the expected behavior.

RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck
around, probably because the alternative was to write directly to
the return_value variable.

show more ...

Revision tags: php-7.3.14RC1
# 1b93cfee 02-Jan-2020 Máté Kocsis

Use RETURN_THROWS() after zend_parse_method_parameters()

# e1b57310 30-Dec-2019 Máté Kocsis

Use RETURN_THROWS() during ZPP in main, sapi, win32, and Zend

# 48d51007 18-Dec-2019 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Fix use-after-free when trying to write to closure property


# b965f158 18-Dec-2019 Nikita Popov

Fix use-after-free when trying to write to closure property

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

12345678910>>...13