Introduce a Builtin.FixedArray type.

`Builtin.FixedArray<let N: Int, T: ~Copyable & ~Escapable>` has the layout of `N` elements of type `T` laid out
sequentially in memory (with the tail padding of every element occupied by the array). This provides a primitive
on which the standard library `Vector` type can be built.
This commit is contained in:
Joe Groff
2024-09-23 08:21:36 -07:00
parent ddd55758d9
commit a184782a38
54 changed files with 2489 additions and 72 deletions

View File

@@ -1313,6 +1313,17 @@ FUNCTION(GetTupleLayout3, swift_getTupleTypeLayout3, SwiftCC, AlwaysAvailable,
EFFECT(NoEffect),
UNKNOWN_MEMEFFECTS)
// MetadataResponse swift_getFixedArrayTypeMetadata(MetadataRequest request,
// intptr_t size,
// Metadata *elt);
FUNCTION(GetFixedArrayTypeMetadata, swift_getFixedArrayTypeMetadata, SwiftCC,
ValueGenericTypeAvailability,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *swift_getExistentialTypeMetadata(
// ProtocolClassConstraint classConstraint,
// const Metadata *superclassConstraint,