From 31f58501c38dd88a254b38ef03dad8394182ff09 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Mon, 15 Jul 2024 00:10:37 +0200 Subject: [PATCH] Revert to only those with diffs --- src/libraries/System.Private.CoreLib/src/System/Array.cs | 4 ++-- .../src/System/Diagnostics/Tracing/EventProvider.cs | 2 +- .../System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs | 2 +- .../System/Reflection/PortableExecutable/PEBinaryReader.cs | 2 +- .../Text/RegularExpressions/Symbolic/SymbolicRegexMatcher.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Array.cs b/src/libraries/System.Private.CoreLib/src/System/Array.cs index 84bd5ed20eed1..819f4257087ba 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Array.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Array.cs @@ -2258,7 +2258,7 @@ public static bool TrueForAll(T[] array, Predicate match) 0X7FFFFFC7; // Private value type used by the Sort methods. - private readonly struct SorterObjectArray + private readonly ref struct SorterObjectArray { private readonly object[] keys; private readonly object?[]? items; @@ -2475,7 +2475,7 @@ private void InsertionSort(int lo, int hi) // Private value used by the Sort methods for instances of Array. // This is slower than the one for Object[], since we can't use the JIT helpers // to access the elements. We must use GetValue & SetValue. - private readonly struct SorterGenericArray + private readonly ref struct SorterGenericArray { private readonly Array keys; private readonly Array? items; diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs index 0819e7096c862..3b49dec91f86d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs @@ -654,7 +654,7 @@ internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr even } /// Workaround for inability to stackalloc object[EtwAPIMaxRefObjCount == 8]. - private struct EightObjects + private ref struct EightObjects { internal object? _arg0; #pragma warning disable CA1823, CS0169, IDE0051, IDE0044 diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs index 158db9c20fa31..8d6c08b96a632 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs @@ -13,7 +13,7 @@ namespace System.Diagnostics.Tracing /// /// To get the value of a property quickly, use a delegate produced by . /// - internal readonly unsafe struct PropertyValue + internal readonly unsafe ref struct PropertyValue { /// /// Union of well-known value types, to avoid boxing those types. diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEBinaryReader.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEBinaryReader.cs index 9cf7b5779540d..ea54b7d3af4e0 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEBinaryReader.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEBinaryReader.cs @@ -17,7 +17,7 @@ namespace System.Reflection.PortableExecutable /// /// Only methods that are needed to read PE headers are implemented. /// - internal readonly struct PEBinaryReader + internal readonly ref struct PEBinaryReader { private readonly long _startOffset; private readonly long _maxOffset; diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexMatcher.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexMatcher.cs index e67a72018dfd5..b9e457c95b1d5 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexMatcher.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexMatcher.cs @@ -1241,7 +1241,7 @@ public void InitializeFrom(SymbolicRegexMatcher matcher, MatchingStateRepresents a current state in a DFA or NFA graph walk while processing a regular expression. /// This is a discriminated union between a DFA state and an NFA state. One and only one will be non-null. - private struct CurrentState + private ref struct CurrentState { /// Initializes the state as a DFA state. public CurrentState(MatchingState dfaState)