Fix non-ASCII characters across corefx (dotnet/corefxdotnet/coreclr#40318)
authorStephen Toub <stoub@microsoft.com>
Thu, 15 Aug 2019 12:17:46 +0000 (08:17 -0400)
committerStephen Toub <stoub@microsoft.com>
Thu, 15 Aug 2019 18:39:02 +0000 (14:39 -0400)
* Fix several non-visible characters in test files

* Replace Unicode surrogate pairs with escaped hex values

* Fix non-ASCII characters in most C# files

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/2af25277cfc7162fe5f64fcfce901502e3859218

src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs
src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreSlim.cs

index 45ee6bc673fb399c0773181a897e6fe030338ca6..d8c1cc27f631cc9a00ead674017f6d0a70c6f359 100644 (file)
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
@@ -1332,7 +1332,7 @@ namespace System
         //
         //  The second problem is solved by making all addresses relative to the
         //  start of the first sequence and performing all operations in
-        //  unsigned integer arithmetic modulo 2³².
+        //  unsigned integer arithmetic modulo 2^32.
         //
         //  Example
         //  -------
@@ -1348,7 +1348,7 @@ namespace System
         //  address space as follows:
         //
         //      [----------------------------------------------)                            normal address space
-        //      0                                             2³²
+        //      0                                             2^32
         //                            [------------------)                                  first sequence
         //                            xRef            xRef + xLength
         //              [--------------------------)     .                                  second sequence
@@ -1359,7 +1359,7 @@ namespace System
         //                            .            .     .
         //                            .            .     .
         //                            [----------------------------------------------)      relative address space
-        //                            0            .     .                          2³²
+        //                            0            .     .                          2^32
         //                            [------------------)             :                    first sequence
         //                            x1           .     x2            :
         //                            -------------)                   [-------------       second sequence
@@ -1381,7 +1381,7 @@ namespace System
         //
         //  yRef relative to xRef is (yRef - xRef). If (yRef - xRef) is
         //  negative, casting it to an unsigned 32-bit integer turns it into
-        //  (yRef - xRef + 2³²). So, in the example above, y1 moves to the right
+        //  (yRef - xRef + 2^32). So, in the example above, y1 moves to the right
         //  of x2.
         //
         //  y2 is simply y1 + yLength. Note that this can overflow, as in the
@@ -1390,29 +1390,29 @@ namespace System
         //  The two sequences do *not* overlap if y is entirely in the space
         //  right of x in the relative address space. (It can't be left of it!)
         //
-        //          (y1 >= x2) && (y2 <= 2³²)
+        //          (y1 >= x2) && (y2 <= 2^32)
         //
         //  Inversely, they do overlap if
         //
-        //          (y1 < x2) || (y2 > 2³²)
+        //          (y1 < x2) || (y2 > 2^32)
         //
         //  After substituting x2 and y2 with their respective definition:
         //
-        //      == (y1 < xLength) || (y1 + yLength > 2³²)
+        //      == (y1 < xLength) || (y1 + yLength > 2^32)
         //
         //  Since yLength can't be greater than the size of the address space,
         //  the overflow can be avoided as follows:
         //
-        //      == (y1 < xLength) || (y1 > 2³² - yLength)
+        //      == (y1 < xLength) || (y1 > 2^32 - yLength)
         //
-        //  However, 2³² cannot be stored in an unsigned 32-bit integer, so one
+        //  However, 2^32 cannot be stored in an unsigned 32-bit integer, so one
         //  more change is needed to keep doing everything with unsigned 32-bit
         //  integers:
         //
         //      == (y1 < xLength) || (y1 > -yLength)
         //
         //  Due to modulo arithmetic, this gives exactly same result *except* if
-        //  yLength is zero, since 2³² - 0 is 0 and not 2³². So the case
+        //  yLength is zero, since 2^32 - 0 is 0 and not 2^32. So the case
         //  y.IsEmpty must be handled separately first.
         //
 
index 6d65aa1f029f59b3524548d199350e6264d98b96..e9ddfbd747de59db9556cfffe8ee4578c4baa258 100644 (file)
@@ -327,7 +327,7 @@ namespace System.Threading
             {
                 // Perf: first spin wait for the count to be positive.
                 // This additional amount of spinwaiting in addition
-                // to Monitor.Enter()s spinwaiting has shown measurable perf gains in test scenarios.
+                // to Monitor.Enter()'s spinwaiting has shown measurable perf gains in test scenarios.
                 if (m_currentCount == 0)
                 {
                     // Monitor.Enter followed by Monitor.Wait is much more expensive than waiting on an event as it involves another