Skip to content

Unified Macro Definitions#83

Merged
vaivaswatha merged 30 commits intovaivaswatha:masterfrom
rahulmutt:rahulmutt/unified-macro-definitions
Feb 13, 2026
Merged

Unified Macro Definitions#83
vaivaswatha merged 30 commits intovaivaswatha:masterfrom
rahulmutt:rahulmutt/unified-macro-definitions

Conversation

@rahulmutt
Copy link
Contributor

@rahulmutt rahulmutt commented Feb 12, 2026

Implements #58

It is mostly a straightforward change since it's a UX change that will translate to existing macros - actual functionality has not beed added or removed.

So far only the builtin dialect has been updated. After an initial review,pliron-llvm and most of the tests will be updated.

@vaivaswatha
Copy link
Owner

Looks totally fine to me. Thank you @rahulmutt .

@rahulmutt
Copy link
Contributor Author

@vaivaswatha I've updated all the code to use the new macros where possible, except for files inside of pliron-derive. PR is ready for review.

#[cfg_attr(not(target_family = "wasm"), ::pliron::linkme::distributed_slice(#interface_verifiers_slice), linkme(crate = ::pliron::linkme))]
static INTERFACE_VERIFIER: std::sync::LazyLock<(#id, (#all_verifiers_fn_type))> =
std::sync::LazyLock::new(||
(#rust_ty::#get_id_static(),
Copy link
Contributor Author

@rahulmutt rahulmutt Feb 13, 2026

Choose a reason for hiding this comment

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

Highlighting this as this also improves UX by not forcing users to import ::pliron::op::Op, or any of the other entity traits and keeps the macro generated code explicit.

Copy link
Owner

Choose a reason for hiding this comment

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

Thank you. I did encounter this myself, but without a second though just added the import. This makes it much better for new users.

@vaivaswatha vaivaswatha merged commit edbcbb7 into vaivaswatha:master Feb 13, 2026
1 check passed
@vaivaswatha
Copy link
Owner

Thank you @rahulmutt

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