History log of /PHP-8.2/Zend/tests/generators/backtrace_multi_yield_from.phpt (Results 1 – 2 of 2)
Revision Date Author Comments
# de6e401e 18-May-2021 Nikita Popov

Use common formatting for backtraces (#6977)

This makes debug_print_backtrace() use the same formatting as exception
backtraces. The only difference is that the final #{main} is omitted,

Use common formatting for backtraces (#6977)

This makes debug_print_backtrace() use the same formatting as exception
backtraces. The only difference is that the final #{main} is omitted,
because it wouldn't make sense for limited backtraces, and wasn't there
previously either.

show more ...


# dd4a0801 15-Oct-2020 Nikita Popov

Simplify and fix generator tree management

This makes a number of related changes to the generator tree
management, that should hopefully make it easier to understand,
more robust an

Simplify and fix generator tree management

This makes a number of related changes to the generator tree
management, that should hopefully make it easier to understand,
more robust and faster for the common linear-chain case. Fixes
https://bugs.php.net/bug.php?id=80240, which was the original
motivation here.

* Generators now only add a ref to their direct parent.
* Nodes only store their children, not their leafs, which avoids
any need for leaf updating. This means it's no longer possible
to fetch the child for a certain leaf, which is something we
only needed in one place (update_current). If multi-children
nodes are involved, this will require doing a walk in the other
direction (from leaf to root). It does not affect the common
case of single-child nodes.
* The root/leaf pointers are now seen as a pair. One leaf generator
can point to the current root. If a different leaf generator is
used, we'll move the root pointer over to that one. Again, this
is a cache to make the common linear chain case fast, trees may
need to scan up the parent link.

Closes GH-6344.

show more ...