Home
last modified time | relevance | path

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

123

/PHP-7.2/Zend/
H A Dzend_generators.c157 if (generator->gc_buffer) { in zend_generator_close()
257 if (generator->iterator) { in zend_generator_free_storage()
401 zend_generator *generator; in zend_generator_create() local
415 generator->node.ptr.root = generator; in zend_generator_create()
437 …zend_generator *root = (generator->node.children < 1 ? generator : generator->node.ptr.leaf)->node… in zend_generator_check_placeholder_frame()
443 generator = generator->node.parent; in zend_generator_check_placeholder_frame()
607 zend_generator *parent = generator->node.parent, *cur = generator; in zend_generator_add_child()
645 if (root != generator) { in zend_generator_update_current()
887 …if (UNEXPECTED((generator != orig_generator && !Z_ISUNDEF(generator->retval)) || (generator->execu… in zend_generator_resume()
897 …if (UNEXPECTED(Z_TYPE(generator->value) == IS_UNDEF) && EXPECTED(generator->execute_data) && EXPEC… in zend_generator_ensure_initialized()
[all …]
H A Dzend_generators.h105 ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution);
106 ZEND_API void zend_generator_resume(zend_generator *generator);
108 ZEND_API void zend_generator_restore_call_stack(zend_generator *generator);
111 void zend_generator_yield_from(zend_generator *generator, zend_generator *from);
114 ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator, zend_generator *l…
115 static zend_always_inline zend_generator *zend_generator_get_current(zend_generator *generator) in zend_generator_get_current() argument
120 if (EXPECTED(generator->node.parent == NULL)) { in zend_generator_get_current()
122 return generator; in zend_generator_get_current()
125 leaf = generator->node.children ? generator->node.ptr.leaf : generator; in zend_generator_get_current()
133 return zend_generator_update_current(generator, leaf); in zend_generator_get_current()
/PHP-7.2/Zend/tests/
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 ) );
H A Dbug69221_2.phpt2 Bug #69221: Segmentation fault when using a generator in combination with an Iterator (2)
/PHP-7.2/Zend/tests/generators/
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 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 Dnested_calls_with_die.phpt2 Test nested calls with die() in a generator
8 yield; // force generator
22 yield; // force 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 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
H A Dbug74954.phpt2 Bug #74954 (crash after update of generator yielding from finished generator)
H A Dreturn_from_by_ref_generator.phpt2 Return from by-ref generator
H A Dbug67497.phpt2 Bug #67467: eval with parse error causes segmentation fault in generator
H A Dyield_from_by_reference.phpt12 Fatal error: Cannot use "yield from" inside a by-reference generator in %s on line %d
H A Dbug75396.phpt2 Bug #75396: Exit inside generator finally results in fatal error
H A Dsend_returns_current.phpt2 $generator->send() returns the yielded value
/PHP-7.2/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-7.2/ext/reflection/tests/
H A Dbug64007.phpt7 $generator = $reflection->newInstanceWithoutConstructor();
8 var_dump($generator);
13 $generator = $reflection->newInstance();
14 var_dump($generator);
/PHP-7.2/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 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-7.2/Zend/tests/generators/finally/
H A Dreturn_return.phpt2 try { return } finally { return } in generator
23 yield; // force generator
/PHP-7.2/sapi/phpdbg/
H A Dphpdbg_frame.c108 if (PHPDBG_FRAME(generator)) { in phpdbg_restore_frame()
109 if (PHPDBG_FRAME(generator)->execute_data->call) { in phpdbg_restore_frame()
110 …PHPDBG_FRAME(generator)->frozen_call_stack = zend_generator_freeze_call_stack(PHPDBG_FRAME(generat… in phpdbg_restore_frame()
112 PHPDBG_FRAME(generator) = NULL; in phpdbg_restore_frame()
333 PHPDBG_FRAME(generator) = gen; in phpdbg_open_generator_frame()

Completed in 33 milliseconds

123