Skip to content

php-in-php: drop UserScriptAotDeferNestedJit from StringParseStr — thin via isThinStandaloneAotMain + ParseStrRuntime user-script bridge (#1492) #20132

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, re-#20028 / #13360)

Problem

lib/JIT/Builtin/StringParseStr.php still gates user-script AOT through UserScriptAotDeferNestedJit::shouldDefer(). Peer builtins (StringRename #20028, StringBin2hex #20011, MathFpow #20034) already route thin standalone via Context::isThinStandaloneAotMain() so NestedJIT defer is not a per-builtin gate.

php-src reference

PHP implementation target

  • lib/JIT/Builtin/StringParseStr.php — replace UserScriptAotDeferNestedJit::shouldDefer with $context->isThinStandaloneAotMain() → ParseStrRuntime::ensureUserScriptLinked
  • test/unit/ParseStrRuntimeShrinkTest.php — assert no UserScriptAotDeferNestedJit; require isThinStandaloneAotMain

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/ParseStrRuntimeShrinkTest.php
'

Done when

  • UserScriptAotDeferNestedJit removed from StringParseStr.php
  • Thin/user-script path uses isThinStandaloneAotMain + ParseStrRuntime::ensureUserScriptLinked
  • ParseStrRuntimeShrinkTest green
  • make bootstrap-selfhost-vm-driver-execute-probe green
  • PR body cites NestedJit defer gate removed

Refs #1492, #13360, #20028, #18855

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