Category
php-in-php · runtime-shrink · php-compiler-strict (JIT/AOT collect path)
Problem
lib/JIT/Builtin/GcCollectCyclesRuntime.php is still ~1550 LOC of LLVM after registry helpers moved to GcCollectCyclesRegistryJitHelper.php (#9183). The cycle collect/mark/inbound walk and destructor invocation remain inline LLVM — the largest remaining non-Refcount runtime monolith.
C runtime phpc_gc.c is already deleted (RuntimeShrinkCloseoutTest); this issue finishes shrinking the replacement LLVM layer into compiled PHP.
php-src reference
- php/php-src
Zend/zend_gc.c — gc_collect_cycles, mark/sweep
- Existing SSOT:
ext/standard/GcCollectCyclesJitHelper.php, lib/VM/CycleCollector.php
PHP implementation target
- Extend
ext/standard/GcCollectCyclesJitHelper.php (or sibling helper) for mark/inbound/collect phases currently in GcCollectCyclesRuntime::implement*
- Thin ABI bridges only in
GcCollectCyclesRuntime.php (target <400 LOC, mirror CopyRuntime / StreamReadRuntime)
- Keep
GcCollectCyclesCollectRuntime.php stats bridge unchanged
Repro / verification
./vendor/bin/phpunit test/compliance/cases/runtime/gc_collect_cycles.phpt --no-configuration 2>/dev/null || \
php bin/vm.php test/compliance/cases/runtime/gc_collect_cycles.php
./vendor/bin/phpunit test/unit/GcCollectCyclesCollectRuntimeShrinkTest.php
make bootstrap-selfhost-vm-driver-execute-probe
Done when
Related
Category
php-in-php· runtime-shrink · php-compiler-strict (JIT/AOT collect path)Problem
lib/JIT/Builtin/GcCollectCyclesRuntime.phpis still ~1550 LOC of LLVM after registry helpers moved toGcCollectCyclesRegistryJitHelper.php(#9183). The cycle collect/mark/inbound walk and destructor invocation remain inline LLVM — the largest remaining non-Refcount runtime monolith.C runtime
phpc_gc.cis already deleted (RuntimeShrinkCloseoutTest); this issue finishes shrinking the replacement LLVM layer into compiled PHP.php-src reference
Zend/zend_gc.c—gc_collect_cycles, mark/sweepext/standard/GcCollectCyclesJitHelper.php,lib/VM/CycleCollector.phpPHP implementation target
ext/standard/GcCollectCyclesJitHelper.php(or sibling helper) for mark/inbound/collect phases currently inGcCollectCyclesRuntime::implement*GcCollectCyclesRuntime.php(target <400 LOC, mirrorCopyRuntime/StreamReadRuntime)GcCollectCyclesCollectRuntime.phpstats bridge unchangedRepro / verification
Done when
GcCollectCyclesRuntime.phpnet shrink ≥800 LOC; collect semantics unchangedGcCollectCyclesCollectRuntimeShrinkTestgreenRuntimeShrinkCloseoutTeststill passes (no C runtime reintroduced)gc_collect_cycles()when JIT path in scopeRelated