Skip to content

php-in-php: drop shouldDeferHeavyStreamIoEmitters from IncludePathRuntime — thin via isThinStandaloneAotMain (#1492) #20308

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, peer StreamIo #20229 / ParseStr #20132 / VarExport #20077)

Problem

IncludePathRuntime still gates thin/user-script stubs on StreamIoRuntime::shouldDeferHeavyStreamIoEmitters() (inventory-emit + NestedJit defer bag). Peer builtins already use Context::isThinStandaloneAotMain() for the same thin-standalone constraint (#16075).

Mode Today Target
Embed / non-thin IncludePathJitHelper NestedJIT bridges unchanged
User-script / bootstrap thin AOT shouldDeferHeavyStreamIoEmitters → thin stubs isThinStandaloneAotMain() → same thin stubs
Inventory emit / M3 driver deferred via StreamIo defer bag thin only when isThinStandaloneAotMain (honest NestedJIT otherwise)

php-src reference

PHP implementation target

  • lib/JIT/Builtin/IncludePathRuntime.php — gate thin stubs on $context->isThinStandaloneAotMain(); drop shouldDeferHeavyStreamIoEmitters call
  • test/unit/IncludePathRuntimeShrinkTest.php — assert isThinStandaloneAotMain, no shouldDeferHeavyStreamIoEmitters

Repro

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

Done when

  • shouldDeferHeavyStreamIoEmitters removed from IncludePathRuntime
  • Thin path gated on isThinStandaloneAotMain only (thin stubs retained)
  • Shrink test green
  • make bootstrap-selfhost-vm-driver-execute-probe green
  • PR body cites defer-gate lines removed

Refs #1492, #13678, #9245, #20229, #20132

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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