Skip to content

AOT: remaining unimplemented lowering rows (#31967) - #32012

Closed
PurHur wants to merge 1 commit into
masterfrom
agent/issue-31967-aot-unimplemented-remaining
Closed

AOT: remaining unimplemented lowering rows (#31967)#32012
PurHur wants to merge 1 commit into
masterfrom
agent/issue-31967-aot-unimplemented-remaining

Conversation

@PurHur

@PurHur PurHur commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix strtol assignment sites that blocked every AOT compile after php-in-php: drop always-on LibcExtern strtol after NestedJIT module-local (#31971 shape) #31988 (comment-then-discarded-call pattern).
  • Lower $obj::method() via runtime class id + ClassConstFetchHelper::emitResolveClassId.
  • Resolve interface const Y = self::X at JIT define time (interfaces before compileClass, inherited const walk).
  • Defer enum case class constants until after DECLARE_ENUM; flush pending consts with insert-block restore.
  • Store boxed arrays into static properties via JitValueBox::assignToPointer fallback.

Closes #31967

php-src reference

  • Zend/zend_execute.cZEND_INIT_STATIC_METHOD_CALL (variable static call)
  • Zend/zend_constants.czend_get_class_constant_ex (interface inherited consts)
  • Zend/zend_compile.c — enum case in class constant expr
  • Static property assign — Zend object handlers / static members

Verification

./script/phpunit.sh --filter Issue31967RemainingAotTest
# PHPUnit 9.6.21 — OK (4 tests, 20 assertions)

./script/docker-exec.sh -- bash -lc '
for f in issue_31967_variable_static_call issue_31967_enum_class_const issue_31967_interface_self_const issue_31967_static_array_store; do
  PHP_COMPILER_HELPER_RUNTIME_O=0 php bin/compile.php -o /tmp/x test/repro/${f}.php && out=$(/tmp/x) && echo "$f: [$out]"
done
'
# issue_31967_variable_static_call: [U]
# issue_31967_enum_class_const: [h]
# issue_31967_interface_self_const: [20]
# issue_31967_static_array_store: [1]

Not covered: full ./script/ci-local.sh, differential sweep (no call/operand lowering shape change beyond the four rows), ClassConstEnumCaseJitCompileTest (already errors on master during jitCompileBlock, before this PR's AOT path).

Made with Cursor

…erface const, static array store (#31967)

Fix strtol assignment sites blocked by #31988, variable static calls via runtime class id,
interface self:: const inheritance at JIT define time, enum case class constants after
DECLARE_ENUM, and boxed static array property stores. Guard with Issue31967RemainingAotTest.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur

PurHur commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Duplicate of #32011 — merged to master while this branch was in flight. Verified all four #31967 AOT repros green on origin/master (variable static call, enum class const, interface self:: const, static prop array). Closing without merge.

@PurHur PurHur closed this Aug 18, 2026
@PurHur
PurHur deleted the agent/issue-31967-aot-unimplemented-remaining branch August 26, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant