Skip to content

JIT: Project include lowering for 003-MiniWebApp (phpc serve --jit blocked on #475) #1770

Description

@PurHur

Problem

#475 tracks JIT lowering for static include/require paths. #587 / #1759 add MiniWebAppJitProjectTest for project-level JIT, but the test remains skipped or home-only until:

  1. JIT resolves TYPE_INCLUDE for literal paths (Language: JIT include/require compile-time lowering (#54 follow-up) #475)
  2. OOP + private methods compile under JIT (Language: Class methods and property access in JIT #58, Language: Visibility, constructors, and destructors #145)

VM ✅ and AOT multi-TU ✅ for 003-MiniWebApp; JIT project mode is the only north-star mode still partial in the run matrix.

#207 (phpc serve --jit) cannot serve 003 until project includes JIT.

Goal

MiniWebAppJitProjectTest runs green (not skipped) for at least home + hello PATH_INFO under:

MINIWEBAPP_JIT_PROJECT_GATE=1 ./script/ci-local.sh --filter MiniWebAppJitProject

Optional follow-on: #1759 contact POST + #730 promotion to ci-fast.sh.

Implementation hints

Layer Files Notes
Include op lib/JIT.php TYPE_INCLUDE Delegate to same literal resolver as AOT LiteralIncludeDiscovery (#54)
Multi-file lib/Runtime.php, project entry Compile public/index.php graph like bin/jit.php multi-input
OOP #58, #145 Router::dispatch, private render methods
Test test/unit/MiniWebAppJitProjectTest.php @group llvm; reuse MiniWebAppCgiEnv helpers from AOT tests (#1529)
Serve #207 (later) Consumer once project JIT green

Unblock order

#475 literal include JIT → #58/#145 OOP JIT → #587 test home → #1759 PATH_INFO/POST → #730 ci-fast

Acceptance criteria

Verification (local / Docker only)

MINIWEBAPP_JIT_PROJECT_GATE=1 ./script/ci-local.sh --filter MiniWebAppJitProject
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  env MINIWEBAPP_JIT_PROJECT_GATE=1 ./script/ci-local.sh --filter MiniWebAppJitProject

No GitHub Actions.

Dependencies

Links

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

    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-2:languagePhase 2 – language featuresphase-3:aotPhase 3 – AOT deployment

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions