Skip to content

Conversation

@Scheremo
Copy link
Contributor

@Scheremo Scheremo commented Nov 4, 2025

  • Introduce moore.class.methoddecl virtual flag.
  • Add moore.vtable.load_method op to fetch a virtual method’s callee.
  • Importer now emits indirect calls for virtual methods; direct calls remain for non-virtual.
  • Verifier ensures method exists, is virtual, and the result FunctionType matches the erased ABI.
  • Tests cover both the virtual decl and dynamic dispatch.

@Scheremo Scheremo force-pushed the pr-classes-virtual-methods branch from 35c60d5 to cae1185 Compare November 4, 2025 13:45
@Scheremo Scheremo marked this pull request as ready for review November 4, 2025 14:07
@Scheremo Scheremo force-pushed the pr-classes-virtual-methods branch 3 times, most recently from 7f7ebd0 to 0abd95f Compare November 4, 2025 16:12
Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a minor nit regarding non-virtual methods.

@Scheremo Scheremo force-pushed the pr-classes-virtual-methods branch 3 times, most recently from f87e1fd to 73c84ee Compare November 6, 2025 10:12
- Introduce `moore.class.methoddecl` **`virtual`** flag.
- Add `moore.vtable.load_method` op to fetch a virtual method’s callee.
- Importer now emits **indirect calls** for virtual methods; direct calls remain for non-virtual.
- Verifier ensures method exists, is `virtual`, and the result **FunctionType** matches the erased ABI.
- Tests cover both the `virtual` decl and dynamic dispatch.
@Scheremo Scheremo force-pushed the pr-classes-virtual-methods branch from 73c84ee to cdb31a7 Compare November 6, 2025 10:15
@Scheremo Scheremo merged commit d8e2151 into llvm:main Nov 6, 2025
7 checks passed
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.

2 participants