Commit Graph

3 Commits

Author SHA1 Message Date
Kuba Mracek
0b50c2155e Don't emit upcast to the same type in SimplifyAllocRefDynamic, add test, add comment 2024-09-24 08:48:51 -07:00
Kuba Mracek
df38313572 The metatype operand on AllocRefDynamicInst is not always at index 1, use getNumTailTypes() 2024-09-23 15:42:38 -07:00
Kuba Mracek
c7a5569c4f [embedded] Add support for ManagedBuffer to Embedded Swift
This makes ManagedBuffer available and usable in Embedded Swift, by:

- Removing an internal consistency check from ManagedBuffer that relies on metatypes.
- Making the .create() API transparent (to hoist the metatype to the callee).
- Adding a AllocRefDynamicInst simplification to convert `alloc_ref_dynamic` to `alloc_ref`, which removes a metatype use.
- Adding tests for the above.
2024-09-23 13:32:50 -07:00