forked from ircmaxell/php-compiler
-
Notifications
You must be signed in to change notification settings - Fork 1
Language: foreach by-reference — AOT lowering (phase 2 of #1222) #4364
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
#1222 closed VM + JIT lowering for
foreach ($arr as $k => &$v).docs/capabilities-syntax.mdstill marks AOT = no for foreach by-reference: nativephpc buildbinaries fall back or abort when scripts use reference foreach on hot paths (bootstrap inventory warnings onlib/patterns).php-src reference
Zend/zend_execute.c—ZEND_FE_FETCH_R, reference fetch handlersZend/zend_compile.c—foreachwithIS_VAR_REFvalueRepro
Use existing compliance
test/compliance/cases/language/foreach_by_ref*.phpt(or addforeach_by_ref_aot.phpt):Today: VM/JIT green; AOT column
noin capability matrix.Scope (this repo)
lib/JIT.php— reference foreach loop IR (mirror VM indirect cells)lib/AOT/, runtime helpers for hashtable iterator + indirect write-backlib/JIT/SelfHostBuiltinPolicy.php— remove AOT block if presenttest/fixtures/aot/cases/foreach_by_ref.phptscript/capability-syntax.php— flip AOT toyeswhen greenDone when
foreach_by_ref.phptpasses inAotTest/ci-localllvm taildocs/capabilities-syntax.mdforeach by-reference row: AOT = yesphp script/bootstrap-inventory.php --checkunchanged or improved (no new blockers)Links