Skip to content

Test cases for validation of the SwiftSelf<T> proposal #102079

Closed
@kotlarmilos

Description

@kotlarmilos

Description

This issue presents test cases for the validation of the SwiftSelf<T> proposal. This proposal is a dependency for the projection tooling to handle frozen structs that exceed the primitive sequence limit of 4 machine words in non-mutating instance methods. In such cases, structs are lowered and passed via swiftself register.

Test cases for validation

Below are examples of structs and how they should be passed to the Swift. When the proposal gets approved, the existing runtime tests should be expanded with frozen structs that exceed the sequence limit.

Example of a struct to be lowered and enregistered:

    [StructLayout(LayoutKind.Sequential, Size = 14)]
    struct F0_S0
    {
        public double F0;
        public uint F1;
        public ushort F2;
    }

Example of a struct to be lowered and passed via the swiftself register:

    [StructLayout(LayoutKind.Sequential, Size = 8)]
    struct F18_S2_S0
    {
        public ulong F0;
    }

    [StructLayout(LayoutKind.Sequential, Size = 40)]
    struct F18_S2
    {
        public ulong F0;
        public long F1;
        public byte F2;
        public F18_S2_S0 F3;
        public long F4;
    }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions