Skip to content

php-in-php: drop Context ensureMinimalUserStandaloneBodies always-on StreamLifecycle/StreamRead/StreamBucket — lazy at call sites (peer #34822 / #34439) #34836

Description

@PurHur

Category

php-in-php · runtime-shrink · Pillar Trust (#32122 .1 mint class)

Problem

Context::ensureMinimalUserStandaloneBodies still eagerly NestedJITs StreamLifecycleRuntime / StreamReadRuntime / StreamBucket when !$this->isUserScriptAot() — i.e. the bootstrap-aot path that calls ensureMinimal via ensureBootstrapAotStandaloneBodies.

User-script AOT already skips that block. Call sites already ensureLinked before lookup (JitFclose / JitFgetc / JitStreamBucket / JitIsResource / … — peer Type::initialize drop #34439). Eager NestedJIT during thin init vs Runtime ABI drift mints feof.1 / stream_bucket_*.1 (#31894 / #32122).

Full standalone still links Stream* from ensureFullStandaloneBodies.

PHP implementation target

  • lib/JIT/Context.php — remove the if (!$this->isUserScriptAot()) { StreamLifecycle/StreamRead/StreamBucket::ensureLinked } block from ensureMinimalUserStandaloneBodies
  • Unit shrink test peer ContextMinimalStandaloneLazyCliArgvRuntimeShrinkTest
  • Do not add runtime/*.c

php-src reference

Done when

  • ensureMinimalUserStandaloneBodies has no StreamLifecycle/StreamRead/StreamBucket ensureLinked
  • ./script/aot-smoke.sh stays 8/8
  • Targeted phpunit shrink + hello-world AOT green
  • No restamp / gate weakening

Parent

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 / JITbugSomething isn't workingimplementation-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