You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mypyc] Add irbuild support for vec types (python#20724)
Add basic irbuild support for `vec[t]`. The runtime representation of
`vec[t]` is a C struct. This is similar to how fixed-length tuples are
represented. Multiple different structs are used, depending on the item
type (`VecI32` for `vec[i32`] and so on).
The C extension `librt.vec` that defines the `vec` type was added in
python#20653 and python#20656. These PRs also explain the implementation in more
detail.
Add RType subclass RVec that is used for vecs. We need a new RType
class, since primitives types can't be generic and they can't be struct
types.
This is based on an old branch, so it mostly uses old-style primitives.
I am planning to modernize some of the primitives in follow-up PRs.
This doesn't include codegen support, and irbuild test cases are only
included for `vec[i64]`. I will create follow-up PRs that add the
remaining irbuild tests, codegen support and run tests. All these tests
are are passing on my local full branch.
Related issue: mypyc/mypyc#840
0 commit comments