Skip to content

Self-host M2: spine native link fails — Expr_ArrowFunction in lib/JIT/BootstrapCompileSmokeM3Emit.php #2679

Closed

Description

@PurHur

Milestone

M2 — compiler_lib_spine_smoke native link on critical path to #1492 / #1498

Problem

BOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smoke fails during Zend compile of the 717-file spine bundle (not LLVM link yet):

parseAndCompile failure: target=/compiler/test/selfhost/compiler_lib_spine_smoke/main.php
PHP Fatal error: Uncaught LogicException: Unknown variable op found: Expr_ArrowFunction
  in vendor/ircmaxell/php-types/lib/PHPTypes/TypeReconstructor.php:303

First offender (source): lib/JIT/BootstrapCompileSmokeM3Emit.php line ~128 — static fn (Context $ctx, …) => … passed to M3EmitTuTrivialEchoAot::emitParseAndCompileWithTrivialFallback.

php script/bootstrap-spine-php-cfg-parse-check.php is green (php-cfg overlay accepts arrow syntax); failure is php-types during Runtime::parse() → TypeReconstructor::resolveVarOp().

This regresses M4 full make bootstrap-loop-probe at the M2 spine prerequisite (exit 1).

Scope

Path Work
lib/JIT/BootstrapCompileSmokeM3Emit.php Remove/replace arrow closure with spine-safe callable (fast unblock) or
patches/php-types-*.patch / vendor/ircmaxell/php-types Teach TypeReconstructor minimal Expr_ArrowFunction (self-host-only)
lib/Lint/UnsupportedRegistry.php Keep Expr_ArrowFunction → #142 until VM lowering exists

Out of scope: full VM/JIT arrow lowering (#142); this issue unblocks honest spine link only.

Repro

./script/docker-exec.sh -- BOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smoke
# exit 2 — Unknown variable op: Expr_ArrowFunction

./script/docker-exec.sh -- ./script/bootstrap-loop-probe.sh
# exit 1 — M2 lib spine smoke failed (same stack)

Done when

Labels

self-host, bootstrap, IMPORTANT

Links

#1492 · #1498 · #142 (full language) · #2664 (full spine gen-1 emit)

Activity

  1. PurHur commented on May 27, 2026

    @PurHur
    OwnerAuthor

    Re-tested on harness 2026-05-27 (docker-exec): M2 prerequisite is now green.

    ./script/docker-exec.sh -- bash -lc 'make bootstrap-loop-probe'

    Key lines:

    • ==> M2 lib spine smoke (native link + run)
    • bootstrap-selfhost-lib-spine-smoke-link: OK /compiler/build/selfhost-lib-spine-smoke

    So the Expr_ArrowFunction TypeReconstructor failure is not reproducing on current master in this environment.

    Closing as fixed/stale. If this regresses again, please reopen with a fresh failing log and the first offending file.

  2. PurHur commented on May 27, 2026

    @PurHur
    OwnerAuthor

    Closed: repro no longer reproduces on harness (see comment).

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions