Skip to content

AOT: unimplemented lowering — numeric-string arithmetic, NAN spaceship, enum-as-const, variable static call, self:: interface const #31967

Description

@PurHur

What

Six ordinary PHP constructs abort compilation with a clear message. Unlike the other AOT groups these fail honestly — no wrong output, no crash — so they are lower priority. They are filed together so the work queue is complete rather than because they share a cause.

probe Zend 8.2.32 AOT
"5" + 5 int(10) Reached end of switch, can't handle binary operation yet: TYPE_PLUS
NAN <=> 1.0 int(1) same, TYPE_SPACESHIP
enum case as a class-constant value h Unsupported compile-time constant for JIT (vm type 9)
$obj::method() / variable class in a static call U Static call class must be a literal
interface constant via self:: in a const expression 20 Undefined constant C::X
array literal stored to a static property 1 JIT static property boxed store does not support value type __string__

"5" + 5 is worth calling out: numeric-string arithmetic is extremely common in real PHP, so despite being an honest failure it blocks a lot of ordinary code.

Static call class must be a literal is the same error surface that blocks spine split-TU work (#24429), so a fix there may be shared.

Provenance

Probe-reported by a differential hunt; not yet independently reproduced. Deterministic compiler errors.

Prerequisite

Not measurable before #31894 (merged). script/aot-smoke.sh must read 8/8 before working this.

Done when

  • each row compiles and matches Zend, or is closed with a documented reason for remaining unsupported
  • compliance cases cover the ones that get implemented

Context: docs/roadmap/AOT-CORRECTNESS-PLAN.md (group 5).

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions