diff options
author | Marek Safar <marek.safar@gmail.com> | 2019-12-28 12:41:48 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-12-28 12:41:48 +0300 |
commit | d01de835f1c465eec3baf4dfd78a5a8ade6340d3 (patch) | |
tree | 785303723de067cf7254f0bd1a49f12b3c36b30f | |
parent | ffc05559f94ea91e3c4ad1fb114d29805dea6840 (diff) |
Exclude CharUnicodeInfo in mcs build mode
-rw-r--r-- | src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs | 13 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs | 2 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs b/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs index dd698bca2c..52972816a0 100644 --- a/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs @@ -1,3 +1,5 @@ +#if !__MonoCS__ + // 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. @@ -128,12 +130,7 @@ namespace System.Globalization // Note that & has the lower precedence than addition, so don't forget the parathesis. index = NumericLevel2Index[(index << 4) + ((ch >> 4) & 0x000f)]; index = NumericLevel3Index[(index << 4) + (ch & 0x000f)]; -#if __MonoCS__ - var temp = NumericValues[index * 8]; - ref byte value = ref Unsafe.AsRef(ref temp); -#else ref byte value = ref Unsafe.AsRef(in NumericValues[index * 8]); -#endif if (BitConverter.IsLittleEndian) { @@ -260,12 +257,7 @@ namespace System.Globalization int index = CategoryLevel1Index[ch >> 9]; // Get the level 2 WORD offset from the next 5 bits of ch. This provides the base offset of the level 3 table. // Note that & has the lower precedence than addition, so don't forget the parathesis. -#if __MonoCS__ - var temp = CategoryLevel2Index[(index << 6) + ((ch >> 3) & 0b111110)]; - index = Unsafe.ReadUnaligned<ushort>(ref Unsafe.AsRef(ref temp)); -#else index = Unsafe.ReadUnaligned<ushort>(ref Unsafe.AsRef(in CategoryLevel2Index[(index << 6) + ((ch >> 3) & 0b111110)])); -#endif if (!BitConverter.IsLittleEndian) { index = BinaryPrimitives.ReverseEndianness((ushort)index); @@ -370,3 +362,4 @@ namespace System.Globalization #endif } } +#endif
\ No newline at end of file diff --git a/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs b/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs index 522c33004a..4c73d08695 100644 --- a/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs +++ b/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs @@ -1,3 +1,4 @@ +#if !__MonoCS__ // 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. @@ -1574,3 +1575,4 @@ namespace System.Globalization }; } } +#endif
\ No newline at end of file |