forked from ircmaxell/php-compiler
-
Notifications
You must be signed in to change notification settings - Fork 1
Language: Generators (yield and yield from) #167
Copy link
Copy link
Closed
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITarea:vmVirtual machineVirtual machineenhancementNew feature or requestNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-2:languagePhase 2 – language featuresPhase 2 – language features
Description
Activity
Metadata
Metadata
Assignees
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITarea:vmVirtual machineVirtual machineenhancementNew feature or requestNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-2:languagePhase 2 – language featuresPhase 2 – language features
Category
languageProblem (updated May 2026)
VM generators landed —
yield, keyed yield (#3085), andyield fromiterate viaGeneratorState+foreach. JIT and AOT remainnoperdocs/capabilities-syntax.md;bin/jit.phpfalls back to VM viaBlock::requiresVmLowering.This umbrella issue tracks remaining parity; implement via child issues:
Do not duplicate VM work here.
php-src reference
Zend/zend_compile.c—zend_compile_generator(),yield/yield fromopcodesZend/zend_generators.c—Generatorobject,send/throw, delegateRepro (today)
Expected (Zend):
1,2,3,4Actual (JIT/AOT): no LLVM suspend/resume; AOT may error at compile or runtime stub.
Existing compliance:
test/compliance/cases/language/generator_*.phpt(VM).Scope (this repo) — closure criteria for umbrella
php script/capability-syntax.php— Generators row JIT/AOTyesdocs/generators-jit-aot.mdupdatedDone when (this issue)
All generator compliance PHPTs pass under VM + JIT + AOT without VM fallback; child issues closed.
Dependencies
De-duplication
Links