namespace System
{
-#if CORECLR || NATIVEAOT
-
[InlineArray(Length)]
internal struct TwoObjects
{
this[2] = arg2;
}
}
-
-#else
-
- internal struct TwoObjects
- {
- internal object? Arg0;
- private object? _arg1;
-
- public TwoObjects(object? arg0, object? arg1)
- {
- Arg0 = arg0;
- _arg1 = arg1;
- }
- }
-
- internal struct ThreeObjects
- {
- internal object? Arg0;
- private object? _arg1;
- private object? _arg2;
-
- public ThreeObjects(object? arg0, object? arg1, object? arg2)
- {
- Arg0 = arg0;
- _arg1 = arg1;
- _arg2 = arg2;
- }
- }
-#endif
}
internal const int MaxStackAllocArgCount = 4;
-#if CORECLR
[InlineArray(MaxStackAllocArgCount)]
-#endif
private protected struct ArgumentData<T>
{
private T _arg0;
-#if !CORECLR
-#pragma warning disable CA1823, CS0169, IDE0051, IDE0044 // accessed via 'CheckArguments' ref arithmetic
- private T _arg1;
- private T _arg2;
- private T _arg3;
-#pragma warning restore CA1823, CS0169, IDE0051, IDE0044
-#endif
+
[UnscopedRef]
public Span<T> AsSpan(int length)
{
}
// Helper struct to avoid intermediate IntPtr[] allocation and RegisterForGCReporting in calls to the native reflection stack.
-#if CORECLR
[InlineArray(MaxStackAllocArgCount)]
-#endif
private protected ref struct StackAllocatedByRefs
{
internal ref byte _arg0;
-#if !CORECLR
-#pragma warning disable CA1823, CS0169, IDE0051 // accessed via 'CheckArguments' ref arithmetic
- private ref byte _arg1;
- private ref byte _arg2;
- private ref byte _arg3;
-#pragma warning restore CA1823, CS0169, IDE0051
-#endif
}
#endif
}