Skip to content

[mypyc] Support generic primitives and add some generic primitives for vec#21656

Merged
JukkaL merged 11 commits into
masterfrom
vec-get-item-lower
Jun 29, 2026
Merged

[mypyc] Support generic primitives and add some generic primitives for vec#21656
JukkaL merged 11 commits into
masterfrom
vec-get-item-lower

Conversation

@JukkaL

@JukkaL JukkaL commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Generic primitives have RTypeVar types in parameter and/or return types, and these get expanded away when the primitive is added to IR.

Generic primitives let us use lowering for various vec operations, many of which are generic. Using higher-level operations in the IR helps with various optimizations. It's also easier to verify that the generated IR is correct when the IR is less verbose.

Add generic primitives for unsafe vec get item op as an initial use case. We can later use these for other vec operations as well.

Used some coding agent assist (mostly for tests).

@p-sawicki p-sawicki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

great addition!

@JukkaL JukkaL merged commit 629f456 into master Jun 29, 2026
18 checks passed
@JukkaL JukkaL deleted the vec-get-item-lower branch June 29, 2026 16:21
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