History log of /PHP-8.0/Zend/zend_generators.c (Results 201 – 225 of 273)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b4f00be6 30-Nov-2013 Nikita Popov

Cleanup generator closing code a bit

All code dealing with unfinished execution cleanup is now in a separate
function (previously most of it was run even when execution was properly

Cleanup generator closing code a bit

All code dealing with unfinished execution cleanup is now in a separate
function (previously most of it was run even when execution was properly
finished.

Furthermore some code dealing with unclean shutdowns has been removed,
which is no longer necessary, because we no longer try to clean up in
this case.

show more ...


# 9589cae8 30-Nov-2013 Nikita Popov

Fixed bug #66041: list() fails to unpack yielded ArrayAccess object

Yield return values now use IS_VAR rather than IS_TMP_VAR. This
fixes the issue with list() and should also be faster

Fixed bug #66041: list() fails to unpack yielded ArrayAccess object

Yield return values now use IS_VAR rather than IS_TMP_VAR. This
fixes the issue with list() and should also be faster as it avoids
doing a zval copy.

show more ...


Revision tags: php-5.5.7RC1, php-5.4.23RC1, php-5.4.22, php-5.5.6, php-5.4.22RC1, php-5.5.6RC1, php-5.4.21, php-5.5.5, php-5.4.21RC1, php-5.5.5RC1
# 6b68f44e 29-Sep-2013 Nikita Popov

Fix bug #64979: Wrong behavior of static variables in closure generators


Revision tags: php-5.5.4, php-5.4.20
# bdfa03d7 14-Sep-2013 Nikita Popov

Save a TSRMLS_FETCH() for zval_ptr_dtor in executor

This gives me about 9% improvement on Zend/bench.php for a zts build.


Revision tags: php-5.5.4RC1, php-5.4.20RC1
# 47ee4709 26-Aug-2013 Nikita Popov

Make use of direct returns in some places


Revision tags: php-5.5.3, php-5.4.19, php-5.5.2, php-5.4.18, php-5.5.2RC1, php-5.4.18RC2, php-5.5.1, php-5.4.18RC1, php-5.3.27
# 6c4af15d 07-Jul-2013 Veres Lajos

typos (orig)


# b8a2b254 07-Jul-2013 Veres Lajos

typos (orig)


Revision tags: php-5.4.17
# 0f36224b 29-Jun-2013 Nikita Popov

Don't try to clean up generator stack on unclean shutdown

This fixes bugs #65035 and #65161. In one of the bugs the issue is
that function_state.arguments is NULL, but the arg count is p

Don't try to clean up generator stack on unclean shutdown

This fixes bugs #65035 and #65161. In one of the bugs the issue is
that function_state.arguments is NULL, but the arg count is pushed
to the stack and the code tries to free it. In the other bug the
stack of the generator is freed twice, once in generator_close and
later during shutdown.

It's rather hard (if at all possible) to do a proper stack cleanup
on an unclean shutdown, so I'm just disabling it in this case.

show more ...


Revision tags: php-5.5.0, php-5.3.27RC1, php-5.4.17RC1, php-5.5.0RC3, php-5.3.26, php-5.4.16, php-5.5.0RC2, php-5.3.26RC1, php-5.4.16RC1, php-5.5.0RC1, php-5.3.25, php-5.4.15, php-5.3.25RC1, php-5.5.0beta4, php-5.4.15RC1, php-5.4.14, php-5.3.24, php-5.5.0beta3, php-5.3.24RC1, php-5.4.14RC1, php-5.5.0beta2
# 8345abca 25-Mar-2013 Nikita Popov

Remove support for cloning generators


Revision tags: php-5.5.0beta1, php-5.3.23, php-5.4.13, php-5.5.0alpha6, php-5.3.23RC1, php-5.4.13RC1, php-5.3.22, php-5.5.0alpha5, php-5.4.12
# fcc6611d 16-Feb-2013 Nikita Popov

Add support for non-scalar Iterator keys in foreach

RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys


Revision tags: php-5.3.22RC2, php-5.4.12RC2
# 114245c1 01-Feb-2013 Nikita Popov

Fix bug #63830: Segfault on undefined function call in nested generator

This also reverses the destruction order of the pushed arguments to
align with how it is done everywhere else.

Fix bug #63830: Segfault on undefined function call in nested generator

This also reverses the destruction order of the pushed arguments to
align with how it is done everywhere else.

I'm not exactly sure whether this is the right way to fix it, but it
seems to work fine.

show more ...


# 3ee20e45 01-Feb-2013 Nikita Popov

Fix segfault when cloning generator with properties

Rule of thumb: Always implement the object clone handler rather
than the object storage clone handler. Actually I think we should

Fix segfault when cloning generator with properties

Rule of thumb: Always implement the object clone handler rather
than the object storage clone handler. Actually I think we should
drop the latter. It's nearly never usable.

show more ...


Revision tags: php-5.3.22RC1
# 8b972efe 30-Jan-2013 Nikita Popov

Fix potential segfault when finally in a generator is run during shutdown

If a generator is destroyed in a finally block it will resume the generator to run that finally
block before fre

Fix potential segfault when finally in a generator is run during shutdown

If a generator is destroyed in a finally block it will resume the generator to run that finally
block before freeing the generator. This was done in the object storage free handler.

Running user code in the free handler isn't safe though because the free handlers may be run
during request shutdown, already after several key components have been shut down.

This is avoided by doing the finally handling in the dtor handler. These handlers are run at the
start of the shutdown sequence.

show more ...


Revision tags: php-5.4.12RC1, php-5.5.0alpha4, php-5.3.21, php-5.4.11, php-5.5.0alpha3, php-5.3.21RC1, php-5.4.11RC1
# a666285b 01-Jan-2013 Xinchen Hui

Happy New Year


Revision tags: php-5.3.20, php-5.4.10
# be7b0bc3 17-Dec-2012 Nikita Popov

Implement Generator::throw() method

Generator::throw($exception) throws an exception into the generator. The
exception is thrown at the current point of suspension within the generator.

Implement Generator::throw() method

Generator::throw($exception) throws an exception into the generator. The
exception is thrown at the current point of suspension within the generator.
It basically behaves as if the current yield statement were replaced with
a throw statement and the generator subsequently resumed.

show more ...


# 14f13303 21-Dec-2012 Nikita Popov

Fix crash when last yielded value is a closure

If zend_generator_close is called from within zend_generator_resume (e.g.
due to a return statement) then all the EGs will still be using t

Fix crash when last yielded value is a closure

If zend_generator_close is called from within zend_generator_resume (e.g.
due to a return statement) then all the EGs will still be using the values
from the generator. That's why the stack frame has to be the last thing
that is dtored, otherwise some other dtor that is using
EG(current_execute_data) might access the already freed memory segment.
This was the case with the closure dtor.

The fix is to move the dtors for key and value to the start of the handler.
This way the stack frame is the last thing that is freed.

show more ...


# 3e78c6ad 20-Dec-2012 Nikita Popov

Do not add a ref to EX(object) on generator clone

If a ref has to be added it will be already added while walking the call
slots.


# d53f1bf8 18-Dec-2012 Nikita Popov

Fix leak when generator ignores sent value

When the return value of yield wasn't used it was leaked.

This is fixed by using a TMP_VAR return value instead of VAR. TMP_VARs are
a

Fix leak when generator ignores sent value

When the return value of yield wasn't used it was leaked.

This is fixed by using a TMP_VAR return value instead of VAR. TMP_VARs are
automatically freed when they aren't used.

show more ...


Revision tags: php-5.5.0alpha2
# a73a6be7 14-Dec-2012 Xinchen Hui

Fix warning of no return in non-void function


# 9c96fe52 12-Dec-2012 Dmitry Stogov

Restored proper generators behaviour in conjunction with "finally". (Nikita)


# a9a5f7ac 11-Dec-2012 Dmitry Stogov

- generators API exported for extensions
- improved RETURN sequence to avoid redundant check if op_array is a generator


Revision tags: php-5.3.20RC1, php-5.4.10RC1
# 7651d645 04-Dec-2012 Dmitry Stogov

Optimized access to temporary and compiled VM variables


# 5db372fb 30-Nov-2012 Felipe Pena

- Fixed ZTS build


# 70f83f35 30-Nov-2012 Dmitry Stogov

. The VM stacks for passing function arguments and syntaticaly nested calls were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocate

. The VM stacks for passing function arguments and syntaticaly nested calls were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocated at once. As result all the stack push operatins don't require checks for stack overflow any more.
. Generators implementation was improved using the new VM stack. Now it's a bit more clear and faster.

show more ...


# 60871e51 24-Nov-2012 Nikita Popov

Fix bug #63596: finally in generators segfaults

EX(fast_ret) wasn't initialized in this case so the code ended up
dereferencing an invalid pointer after the jump.


1234567891011