Skip to content

JIT: Complete first-class callable lowering (#1363)#1472

Merged
PurHur merged 1 commit into
masterfrom
feat/lang-1363-fcc-jit
May 24, 2026
Merged

JIT: Complete first-class callable lowering (#1363)#1472
PurHur merged 1 commit into
masterfrom
feat/lang-1363-fcc-jit

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 24, 2026

Summary

  • Propagate compileTimeString through TYPE_ASSIGN chains in JIT so strlen(...) and Class::m(...) first-class callables resolve to direct builtin/static calls.
  • Extend compiler tryFoldVariableFunctionName to follow the same assign chains for literal callee folding.
  • Add JitFirstClassCallableTest and first_class_callable_jit.phpt; update capability-syntax notes for JIT: Complete first-class callable lowering (#1230 follow-up) #1363.

Test plan

  • phpunit test/unit/JitFirstClassCallableTest.php (compiler fold; JIT tests when LLVM available)
  • phpunit test/unit/FirstClassCallableTest.php
  • phpunit test/unit/BootstrapSelfhostHelloWorldTest.php (FCC self-host stub guards)
  • php script/capability-syntax.php --check
  • CI LLVM/JIT compliance on first_class_callable_jit.phpt

Closes #1363

Made with Cursor

Propagate compile-time callable names through TYPE_ASSIGN chains so
strlen(...) and Class::m(...) fold to direct JIT calls, and extend
compiler variable-function folding for the same paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

JIT: Complete first-class callable lowering (#1230 follow-up)

1 participant