Home
last modified time | relevance | path

Searched refs:generator (Results 1 – 25 of 87) sorted by relevance

1234

/PHP-8.0/Zend/
H A Dzend_generators.c428 zend_generator *generator; in zend_generator_create() local
469 generator = generator->node.parent; in zend_generator_check_placeholder_frame()
563 generator = generator->node.parent; in get_new_root()
566 return generator; in get_new_root()
781 zend_observer_fcall_end(generator->execute_data, &generator->value); in zend_generator_resume()
819 …if (UNEXPECTED((generator != orig_generator && !Z_ISUNDEF(generator->retval)) || (generator->execu… in zend_generator_resume()
830 …if (UNEXPECTED(Z_TYPE(generator->value) == IS_UNDEF) && EXPECTED(generator->execute_data) && EXPEC… in zend_generator_ensure_initialized()
850 zend_generator *generator; in ZEND_METHOD() local
863 zend_generator *generator; in ZEND_METHOD() local
920 zend_generator *generator; in ZEND_METHOD() local
[all …]
H A Dzend_generators.h100 ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution);
101 ZEND_API void zend_generator_resume(zend_generator *generator);
103 ZEND_API void zend_generator_restore_call_stack(zend_generator *generator);
106 void zend_generator_yield_from(zend_generator *generator, zend_generator *from);
109 ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator);
110 ZEND_API zend_generator *zend_generator_update_root(zend_generator *generator);
113 if (EXPECTED(generator->node.parent == NULL)) { in zend_generator_get_current()
115 return generator; in zend_generator_get_current()
118 zend_generator *root = generator->node.ptr.root; in zend_generator_get_current()
120 root = zend_generator_update_root(generator); in zend_generator_get_current()
[all …]
/PHP-8.0/Zend/tests/generators/
H A Dbug78434.phpt11 $generator = $function();
12 $generator->valid();
13 yield from $generator;
15 $generator = $function();
16 $generator->valid();
17 yield from $generator;
H A Dgenerator_returns_generator.phpt2 A generator function returns a Generator object
9 // trigger a generator
13 $generator = gen();
14 var_dump($generator instanceof Generator);
H A Dnested_calls_with_die.phpt2 Test nested calls with die() in a generator
8 yield; // force generator
22 yield; // force generator
H A Dgenerator_rewind.phpt2 A generator can only be rewinded before or at the first yield
39 echo "in generator\n";
52 Exception: Cannot rewind a generator that was already run in %s:%d
57 Exception: Cannot traverse an already closed generator in %s:%d
61 in generator
H A Dbug71601.phpt25 $generator = gen2();
27 var_dump($generator->current());
29 unset($generator);
H A Dfunc_get_args.phpt2 func_get_args() can be used inside generator functions
8 yield; // trigger generator
H A Dbug66041.phpt13 $generator = dumpElement();
14 $generator->send($fixedArray);
H A Drepeated_yield_from_with_immediate_release.phpt2 A generator can be yielded from multiple times, testing immediate release of the yield from'ing gen…
H A Dbacktrace.phpt2 Printing the stack trace in a generator
12 yield; // force generator
H A Dyield_from_force_closed.phpt2 Cannot "yield from" from force closed generator
34 Error: Cannot use "yield from" in a force-closed generator in %s:%d
H A Dget_return_errors.phpt74 Cannot get return value of a generator that hasn't returned
76 Cannot get return value of a generator that hasn't returned
79 Cannot get return value of a generator that hasn't returned
/PHP-8.0/Zend/tests/
H A Dbug79927.phpt6 $generator = (function () {
10 $generator->next();
11 $generator->next();
13 $generator->rewind();
17 echo $generator->current(), "\n";
29 Cannot rewind a generator that was already run
H A Dbug62991.phpt2 Bug #62991 (Segfault with generator and closure)
24 $generator = test(array( 1, 2, 3 ) );
25 foreach($generator as $something) {
28 $generator = test2(array( 1, 2, 3 ) );
29 foreach($generator() as $something) {
33 $generator = test2(array( 1, 2, 3 ) );
/PHP-8.0/ext/zend_test/tests/
H A Dobserver_generator_04.phpt12 echo 'Starting generator' . PHP_EOL;
20 $generator = fooResults();
22 while($generator->current() !== NULL) {
23 echo $generator->current() . PHP_EOL;
24 if ($generator->current() === 5) {
25 $generator->send('Boop');
27 $generator->next();
42 Starting generator
H A Dobserver_generator_01.phpt2 Observer: Basic generator observability
18 $generator = getResults();
19 foreach ($generator as $value) {
H A Dobserver_generator_02.phpt19 $generator = getResults();
20 foreach ($generator as $value) {
23 echo $generator->getReturn() . PHP_EOL;
/PHP-8.0/ext/spl/tests/
H A Dbug72684.phpt2 Bug #72684 (AppendIterator segfault with closed generator)
7 $generator = createGenerator();
10 $appendIterator->append($generator);
21 Cannot traverse an already closed generator
/PHP-8.0/ext/reflection/tests/
H A Dbug64007.phpt7 $generator = $reflection->newInstanceWithoutConstructor();
8 var_dump($generator);
13 $generator = $reflection->newInstance();
14 var_dump($generator);
/PHP-8.0/Zend/tests/generators/errors/
H A Dresume_running_generator_error.phpt2 It is not possible to resume an already running generator
22 Exception: Cannot resume an already running generator
24 Fatal error: Uncaught Error: Cannot resume an already running generator in %s:%d
H A Dresume_running_generator_error_002.phpt2 Memory leak when resume an already running generator
17 Cannot resume an already running generator
H A Dresume_running_generator_error_003.phpt2 Use-after-free when resume an already running generator
18 Fatal error: Uncaught Error: Cannot resume an already running generator in %sresume_running_generat…
H A Dyield_in_force_closed_finally_error.phpt2 yield cannot be used in a finally block when the generator is force-closed
29 Fatal error: Uncaught Error: Cannot yield from finally in a force-closed generator in %s:%d
/PHP-8.0/Zend/tests/generators/finally/
H A Dreturn_return.phpt2 try { return } finally { return } in generator
23 yield; // force generator

Completed in 27 milliseconds

1234