Repository navigation
Closed
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITenhancementNew 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-0:FoundationPhase 0 – foundation & DevExPhase 0 – foundation & DevExphase-2:languagePhase 2 – language featuresPhase 2 – language features
Description
Category
php-in-php · compile-pipeline (VM/JIT/AOT must agree on clone-with semantics)
Problem
clone $obj with { … } readonly property reinitialization still routes through lib/JIT/Builtin/CloneWithReinitRuntime.php (~316 lines LLVM) declaring/trampolineing __phpc_clone_with_* symbols, even though VM SSOT lives in CloneWithSupport / CloneWithJitHelper.php.
Workers adding PHP 8.3+ clone-with features (#4513, #9995 keyword-array syntax) must touch LLVM glue instead of shared PHP helpers.
php-src reference (semantics only)
- php/php-src
Zend/zend_clones.c— clone with property overrides - php/php-src
Zend/zend_objects.c—IS_PROP_REINITABLEduring clone-with
Repro (migration metric)
wc -l lib/JIT/Builtin/CloneWithReinitRuntime.php ext/standard/CloneWithJitHelper.php lib/VM/CloneWithSupport.php
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/compliance/cases/language/clone_with*.phpt 2>/dev/null | tail -5'Today: LLVM module owns reinit bitmap + property walk; PHP helper exists but JIT still emits native calls into CloneWithReinitRuntime.
Scope
| Path | Work |
|---|---|
lib/JIT/Builtin/CloneWithReinitRuntime.php |
delete/shrink — route JIT clone-with reinit through compiled CloneWithJitHelper calls only |
ext/standard/CloneWithJitHelper.php |
SSOT for reinitable property bitmap (shared VM/JIT) |
lib/VM/CloneWithSupport.php |
VM path unchanged; JIT must call same helpers |
lib/JIT/Builtin/CloneWithReinitRuntime.php |
target: thin ABI trampolines or zero LLVM after migration |
PR must note lines removed from CloneWithReinitRuntime.php (or C symbols deleted).
Done when
- JIT/AOT clone-with readonly reinit uses PHP helper path; no duplicate calendar/property LLVM in
CloneWithReinitRuntime.php - Existing clone-with compliance PHPTs green VM + JIT + AOT
-
CloneWithReinitRuntime.phpreduced to thin trampolines (or deleted with calls inlined via helper) -
./script/ci-fast.sh --filter clone_withgreen
Related
- Language: clone with (PHP 8.3) — parse + compile + VM/JIT property overrides (zend_clones.c parity) #4513 clone with · Language: clone $obj with ['prop'] keyword array syntax — parse fails (PHP 8.4, Zend/zend_language_parser.y) #9995 keyword array syntax · php-in-php: AOT CloneWithReinitRuntimeLlvm — route standalone clone-with reinit through CloneWithJitHelper PHP (#1492) #9717 readonly reinit · North star Epic: Self-host critical path — compiler compiles itself (M3→M5) #1492
Metadata
Metadata
Assignees
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITenhancementNew 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-0:FoundationPhase 0 – foundation & DevExPhase 0 – foundation & DevExphase-2:languagePhase 2 – language featuresPhase 2 – language features
Activity
PurHur commentedon Jun 19, 2026
claim: cursor-agent-lane-a — starting this run
PurHur commentedon Jun 19, 2026
Unclaiming: already implemented on master — CloneWithReinitRuntime routes through CloneWithJitHelper PHP; CloneWithReinitRuntimeShrinkTest + clone_with compliance green. Switching to #9972.
PurHur commentedon Jun 23, 2026
Closing as duplicate: CloneWithReinitRuntime already routes through CloneWithJitHelper PHP on master.