Skip to content

Conversation

@Scheremo
Copy link
Contributor

This change introduces first-class class support to the Moore dialect and teaches the Verilog importer to recognize and lower SV classes into that IR. It also adds an opaque class handle type for values of class objects.

  • New IR ops for classes: declarations, properties, and a class-body terminator.
  • New type: !moore.class.object<@Sym> (with ref variant).
  • Importer now creates symbols for classes, wires up extends/implements, and lowers class-typed values to !moore.class.object<…>.
  • Extensive tests for inheritance, interfaces, properties, scoping, and handle declarations.

@Scheremo Scheremo force-pushed the pr-moore-classdecl branch 3 times, most recently from c28ece5 to 8259650 Compare October 24, 2025 08:16
@Scheremo Scheremo changed the title [Moore] Implement ClassHandleType, ClassDeclarationOp [Moore] [1/4] Implement ClassHandleType, ClassDeclarationOp Oct 24, 2025
@Scheremo Scheremo marked this pull request as ready for review October 24, 2025 08:45
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.

Really really cool! Thanks a lot for taking a stab at this pretty wild corner of the SV spec 🥳 💯 🥇

This change introduces first-class **class** support to the Moore dialect and teaches the Verilog importer to **recognize and lower SV classes** into that IR. It also adds an opaque **class handle type** for values of class objects.

- New **IR ops** for classes: declarations, properties, and a class-body terminator.
- New **type**: `!moore.class.object<@sym>` (with `ref` variant).
- Importer now **creates symbols for classes**, wires up `extends`/`implements`, and lowers **class-typed values** to `!moore.class.object<…>`.
- Extensive **tests** for inheritance, interfaces, properties, scoping, and handle declarations.
@Scheremo Scheremo merged commit dabf64e into llvm:main Oct 28, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants