Skip to content

php-in-php: route standalone parse_str through ParseStrRuntime PHP — shrink StringParseStrJit (#9295 follow-up) #13360

Description

@PurHur

Category

php-in-php · follow-up to #9295 / #13358

Problem

Embed JIT routes parse_str() through ParseStrRuntime + ParseStrJitHelper PHP, but standalone AOT still emits __compiler_parse_str via StringParseStrJit::emitCompilerParseStr() (~100 LOC LLVM). Sub-helpers remain LLVM for superglobals until a later pass.

Scope

  • StringParseStr.php — remove standalone branch; always ParseStrRuntime::implement + ensureSubhelpers
  • StringParseStrJit.php — drop main entry LLVM; ensureStandaloneBodies → subhelpers only
  • Context.php — standalone init via StringParseStr::ensureStandaloneBodies

Done when

  • Standalone defines __compiler_parse_str via PHP bridge
  • ParseStrRuntimeShrinkTest updated; ~100+ LLVM lines removed from main entry
  • bootstrap probes green

Refs #9295, #13358, #1492

Activity

  1. added
    enhancementNew feature or request
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jun 28, 2026
  2. PurHur commented on Jun 28, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Runtime → PHP — batch (issues #13360)

  3. PurHur commented on Jun 28, 2026

    @PurHur
    OwnerAuthor

    Merged via #13361.

    Shrink: removed standalone StringParseStrJit::implement + emitCompilerParseStr LLVM (~54 LOC). Standalone init now uses StringParseStr::ensureStandaloneBodies → ParseStrRuntime PHP bridge.

    Verification: ParseStrRuntimeShrinkTest 6/6; bootstrap VM driver probe OK.

    Sub-helpers (__phpc_parse_str_*) remain LLVM for superglobals — future pass.

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