Skip to content

php-in-php: GcCollectCyclesStandaloneLlvm — quarantine visit/mark LLVM from GcCollectCyclesRuntime (#15852 phase 2) #17015

Description

@PurHur

Category

php-in-php · runtime-shrink · php-compiler-strict (standalone AOT cycle scan)

Problem

GcCollectCyclesCollectRuntimeShrinkTest::testEmbedCollectCyclesImplIsThinPhpBridge fails on master: embed JIT routes gc_collect_cycles() through GcCollectCyclesJitHelper::collectCyclesEmbed (PHP visit via visitNativeRegistryObject), but lib/JIT/Builtin/GcCollectCyclesRuntime.php still contains ~500 LOC of standalone LLVM (phpc_gc_visit_object, mark/sweep/inbound) that the shrink test expects quarantined.

php-src reference

PHP implementation target

  • New lib/JIT/Builtin/GcCollectCyclesStandaloneLlvm.php — standalone-only cycle scan LLVM
  • GcCollectCyclesRuntime.php — embed PHP bridge only; net shrink of phpc_gc_visit_object string + LLVM bodies

Repro / verification

./script/docker-exec.sh -- bash -lc 'vendor/bin/phpunit test/unit/GcCollectCyclesCollectRuntimeShrinkTest.php'
make bootstrap-selfhost-vm-driver-execute-probe

Done when

  • GcCollectCyclesCollectRuntimeShrinkTest green (no phpc_gc_visit_object in Runtime)
  • GcCollectCyclesRuntimeStandaloneTest + VM gc_collect_cycles repro unchanged
  • Net LLVM shrink documented in PR

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:compilerCompiler / CFG / JITenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions