Skip to content

php-in-php: drop Context ensureMinimalUserStandaloneBodies always-on ObOutputRuntime — lazy at ValueEchoHelper call sites (peer #34642) #34695

Description

@PurHur

Category

php-in-php · runtime-shrink · thin AOT init (#32122 .1 mint class)

Problem

Context::ensureMinimalUserStandaloneBodies() still eagerly ObOutputRuntime::ensureLinked() during thin standalone init. Hello-world echo lowers via ValueEchoHelper::echoLiteral / echoNativeLong / echoStringVariable, which lookupFunction('__phpc_ob_echo_*') without a call-site ensure — so the always-on was load-bearing.

Peer shrinks (#34578#34642) already moved NestedJIT ABIs to call-site ensureLinked. Leftover Context NestedJIT vs Runtime ABI drift mints *.1 (#31894 / #32122).

Surface Today After
thin hello-world init eagerly NestedJIT ob_* no ObOutput during init
echo / print / var_dump works (always-on) works (ValueEchoHelper / ValueEchoRuntime ensure)

php-src reference

PHP implementation target

  • lib/JIT/ValueEchoHelper.phpObOutputRuntime::ensureLinked before every __phpc_ob_echo_* lookup
  • lib/JIT/Context.php — drop always-on from ensureMinimalUserStandaloneBodies (+ redundant line before ValueEchoRuntime in ensureFullStandaloneBodies)
  • Update ContextMinimalStandaloneLazy* keep-lists (stale peers still assert removed StringTriggerError / StringHtmlspecialchars) + ObOutputRuntimeShrinkTest

Repro / Done when

  • ensureMinimalUserStandaloneBodies has no ObOutputRuntime::ensureLinked
  • ./script/aot-smoke.sh stays 8/8
  • php bin/compile.php -o /tmp/h.bin -r 'echo "hi\n";' && /tmp/h.binhi
  • ./script/phpunit.sh --filter 'ContextMinimalStandaloneLazy|ObOutputRuntimeShrink' green
  • No new runtime/*.c

claim: runtime-php agent

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