Skip to content

php-in-php: delete StringVarExport NestedJit defer — thin via isThinStandaloneAotMain + JitVarExportKernel (#1492) #20077

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, re-#19430 / #20065)

Problem

lib/JIT/Builtin/StringVarExport.php still gates the thin JitVarExportKernel path behind UserScriptAotDeferNestedJit::shouldDefer() (env PHP_COMPILER_AOT_USER_SCRIPT only). That leaves NestedJit on the audit surface and diverges from #20065 / #20050 / Rename shape where thin standalone AOT (user-script and bootstrap-aot-link) shares one Context::isThinStandaloneAotMain() gate.

Both paths already route through VarExportJitHelper PHP — this slice only retires the NestedJit defer gate.

php-src reference

PHP implementation target

  • lib/JIT/Builtin/StringVarExport.php — replace UserScriptAotDeferNestedJit::shouldDefer with $context->isThinStandaloneAotMain(); thin → JitVarExportKernel; embed/non-thin stays helper bridge
  • test/unit/VarExportRuntimeShrinkTest.php — assert no UserScriptAotDeferNestedJit; assert isThinStandaloneAotMain

Repro

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

Done when

Refs #1492, #19430, #20065, #10533

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