Skip to content

php-in-php: delete GcCollectCyclesStandaloneLlvm — standalone AOT GC via PHP helpers (#18630)#18640

Merged
PurHur merged 2 commits into
masterfrom
agent/runtime-php-gc-standalone-shrink
Jul 13, 2026
Merged

php-in-php: delete GcCollectCyclesStandaloneLlvm — standalone AOT GC via PHP helpers (#18630)#18640
PurHur merged 2 commits into
masterfrom
agent/runtime-php-gc-standalone-shrink

Conversation

@PurHur

@PurHur PurHur commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Delete last *StandaloneLlvm GC file (GcCollectCyclesStandaloneLlvm.php, ~516 lines) and ~500 lines of dead LLVM registry/collect code in GcCollectCyclesRuntime.php.
  • Route standalone AOT phpc_gc_register / phpc_gc_collect_cycles_impl through GcCollectCyclesRegistryJitHelper + GcCollectCyclesStandaloneJitHelper (shared native scan in GcCollectCyclesNativeScanJitHelper).
  • Embed path unchanged semantically: GcCollectCyclesJitHelper::collectCyclesEmbed now delegates native scan to the shared helper.

Closes #18630.

C/LLVM shrink

  • Deleted: lib/JIT/Builtin/GcCollectCyclesStandaloneLlvm.php (516 lines)
  • Removed: standalone LLVM registry globals (phpc_gc_objects[], marked/inbound arrays) and LLVM monolith branches in GcCollectCyclesRuntime.php

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php vendor/bin/phpunit --filter "GcCollectCyclesStandaloneLlvmShrinkTest|GcCollectCyclesRuntimeStandaloneTest|GcCollectCyclesCollectRuntimeShrinkTest|GcCollectCyclesRegistryRuntimeShrinkTest"'
# OK (12 tests, 78 assertions)

make bootstrap-selfhost-vm-driver-execute-probe
# bootstrap-selfhost-vm-driver-execute-probe: OK

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php script/check-selfhost-spine-coverage-sync.php'
# check-selfhost-spine-coverage-sync: OK (spine covers all 4775 inventory files)

Note: ./script/check-aot-build-smoke.sh tier-1 hello-world build is already red on master (LLVM verify __value__writeHashtable mismatch) — not introduced by this PR.

Made with Cursor

PurHur and others added 2 commits July 13, 2026 16:07
…via PHP helpers (#18630)

Route standalone AOT gc_register/collect through GcCollectCyclesRegistryJitHelper
and GcCollectCyclesJitHelper::collectCyclesStandalone; remove ~516-line LLVM
monolith and ~500 lines of dead registry LLVM in GcCollectCyclesRuntime.

Closes #18630.

Co-authored-by: Cursor <cursoragent@cursor.com>
…18630)

Split standalone AOT collect from embed GcCollectCyclesJitHelper so nested
JIT during phpc build avoids Superglobals/CycleCollector. Shared scan lives in
GcCollectCyclesNativeScanJitHelper; stats/collect bridge in StandaloneJitHelper.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 32012e3 into master Jul 13, 2026
@PurHur PurHur deleted the agent/runtime-php-gc-standalone-shrink branch July 13, 2026 16:18
PurHur added a commit that referenced this pull request Jul 13, 2026
#18640 nested-JIT of GcCollectCyclesNativeScanJitHelper broke all standalone
AOT compiles (LLVM module verify: writeHashtable type mismatch). Restore
GcCollectCyclesStandaloneLlvm for standalone collect/registry; keep PHP registry
on embed. Hash context incremental AOT + HelloWorld compile green again.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

php-in-php: delete GcCollectCyclesStandaloneLlvm — route standalone AOT GC registry/collect through PHP helpers (#1492)

1 participant