Skip to content

AOT: private method call chain before runtime include (layout_title_branch, #764) #846

@PurHur

Description

@PurHur

Problem

test/fixtures/aot/cases/layout_title_branch/entry.php models 003-MiniWebApp template rendering without copying the full Router class:

class Renderer {
    public function go(): void { $this->render(); }
    private function render(): void {
        $title = 'Home';
        include __DIR__ . '/layout.php';
    }
}

layout.php then conditionally includes home.php / hello.php (#784, #807).

VM runs fine. Native AOT for the full MiniWebApp binary returns empty stdout (#764). There is no focused fixture that isolates private instance method call → void method → runtime include before the layout partial tier.

Goal

layout_title_branch.phpt (see #832) passes @group aot-link execute with stdout containing the layout title line and partial body.

Scope

Implementation hints

Piece Files Notes
Fixture test/fixtures/aot/cases/layout_title_branch/* Already on disk; needs .phpt wrapper
Compare method_include_void*.phpt, method_include_void_array_property.phpt Method + include without private call chain
Compiler lib/Compiler.php TYPE_METHODCALL on $this Visibility + void return
AOT lib/AOT/, lib/JIT/Builtin/Type/Object_.php Same as #58 method dispatch

Reproduce

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

Acceptance criteria

Dependencies

Verification

Local/Docker only — ./script/docker-ci-local.sh --filter layout_title_branch. No GitHub Actions.

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions