Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Tracked by #93631
kotlarmilos opened this issue May 10, 2024 · 0 comments
Closed
Tracked by #93631

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

kotlarmilos opened this issue May 10, 2024 · 0 comments

Comments

@kotlarmilos
Copy link
Member

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;
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant