Skip to content

php-in-php: drop Context ensureMinimalUserStandaloneBodies always-on stdlib NestedJIT batch — lazy Jit* ABI (peer #34566) #34578

Description

@PurHur

Category

Foundation · php-in-php · runtime-shrink · cold-build / #32122 class

Problem

Context::ensureMinimalUserStandaloneBodies() still eagerly NestedJIT/links a large stdlib batch on every thin AOT user-script init (hello-world / aot-smoke path), even when the script never calls those builtins:

Same always-on NestedJIT vs Runtime ABI drift / cold-build surface class as closed #34566 / #34474 / #32122 .1-mint risk. Call sites already ensureLinked / ensureStandaloneBodies / emit* before lookup.

php-src reference

PHP implementation target

Repro

./script/aot-smoke.sh
./script/docker-exec.sh -- bash -lc 'script/cold-build-check.sh'
./script/phpunit.sh --filter 'ContextMinimalStandaloneLazyStdlib|ExamplesHelloWorldAot'
./script/docker-exec.sh -- bash -lc 'printf "%s\n" "<?php echo file_get_contents(__FILE__) !== \"\" ? \"ok\" : \"fail\", PHP_EOL;" >/tmp/fgc.php && php bin/compile.php -o /tmp/fgc.bin /tmp/fgc.php && /tmp/fgc.bin'

Done when

  • ensureMinimalUserStandaloneBodies does not eagerly link the listed stdlib batch
  • aot-smoke 8/8 + cold-build-check stay green
  • file_get_contents / ini_get / hash / str_contains still work under thin AOT (lazy ensure)
  • No new runtime/*.c

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 / 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