diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-02-24 17:13:26 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-02-27 20:20:45 +0300 |
commit | 91cd0472dea32769fe7ee3d1e4ad0832955f8b8f (patch) | |
tree | e7bd5139ca6f5e636f9fbf0bd4acc989d6acdcd0 | |
parent | f89d6b0c76101fbff995ed8893f4724e079f60f3 (diff) |
[System.Numerics] Use corefx implementation
-rw-r--r-- | mcs/class/System.Numerics.Vectors/System.Numerics.Vectors.dll.sources | 10 | ||||
-rw-r--r-- | mcs/class/System.Numerics.Vectors/corefx/SR.cs (renamed from mcs/class/System.Numerics.Vectors/SR.cs) | 3 | ||||
-rw-r--r-- | mcs/class/System.Numerics/Makefile | 6 | ||||
-rw-r--r-- | mcs/class/System.Numerics/System.Numerics.dll.sources | 51 | ||||
-rw-r--r-- | mcs/class/System.Numerics/corefx/SR.cs (renamed from mcs/class/System.Numerics/ReferenceSources/SR.cs) | 8 | ||||
-rw-r--r-- | mcs/class/System.Numerics/corefx/Vector.cs | 12 | ||||
-rw-r--r-- | mcs/class/corlib/Assembly/AssemblyInfo.cs | 2 |
7 files changed, 59 insertions, 33 deletions
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics.Vectors.dll.sources b/mcs/class/System.Numerics.Vectors/System.Numerics.Vectors.dll.sources index a5f261e85ca..74524d655fd 100644 --- a/mcs/class/System.Numerics.Vectors/System.Numerics.Vectors.dll.sources +++ b/mcs/class/System.Numerics.Vectors/System.Numerics.Vectors.dll.sources @@ -2,11 +2,11 @@ ../../build/common/SR.cs Assembly/AssemblyInfo.cs Assembly/TypeForwarders.cs -SR.cs +corefx/SR.cs ../../../external/corefx/src/Common/src/System/Numerics/Hashing/HashHelpers.cs ../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/ConstantHelper.cs -../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics//JitIntrinsicAttribute.cs -../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics//Register.cs -../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics//Vector_Operations.cs -../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics//Vector.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/JitIntrinsicAttribute.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Register.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Vector_Operations.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Vector.cs diff --git a/mcs/class/System.Numerics.Vectors/SR.cs b/mcs/class/System.Numerics.Vectors/corefx/SR.cs index 6c04e222d68..def5b0907ed 100644 --- a/mcs/class/System.Numerics.Vectors/SR.cs +++ b/mcs/class/System.Numerics.Vectors/corefx/SR.cs @@ -6,9 +6,6 @@ partial class SR { public const string Arg_ArgumentOutOfRangeException = "Index was out of bounds:"; public const string Arg_ElementsInSourceIsGreaterThanDestination = "Number of elements in source vector is greater than the destination array"; - public const string Arg_MultiDimArrayNotSupported = "Only one-dimensional arrays are supported"; public const string Arg_NullArgumentNullRef = "The method was called with a null array argument."; - public const string Arg_RegisterLengthOfRangeException = "length must be less than"; public const string Arg_TypeNotSupported = "Specified type is not supported"; - public const string Reflection_MethodNotSupported = "Vector<T>.Count cannot be called via reflection when intrinsics are enabled."; } diff --git a/mcs/class/System.Numerics/Makefile b/mcs/class/System.Numerics/Makefile index bc470e1b6e7..19d1e56a543 100644 --- a/mcs/class/System.Numerics/Makefile +++ b/mcs/class/System.Numerics/Makefile @@ -4,10 +4,12 @@ include ../../build/rules.make LIBRARY = System.Numerics.dll LIB_REFS = System -LIB_MCS_FLAGS = /unsafe -nowarn:414 -nowarn:436 +LIB_MCS_FLAGS = /unsafe TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -TXT_RESOURCE_STRINGS = ../referencesource/System.Numerics/System.Numerics.txt +RESX_RESOURCE_STRING = \ + ../../../external/corefx/src/System.Runtime.Numerics/src/Resources/Strings.resx \ + ../../../external/corefx/src/System.Numerics.Vectors/src/Resources/Strings.resx EXTRA_DISTFILES = diff --git a/mcs/class/System.Numerics/System.Numerics.dll.sources b/mcs/class/System.Numerics/System.Numerics.dll.sources index 9d03ee13917..1e56c801e93 100644 --- a/mcs/class/System.Numerics/System.Numerics.dll.sources +++ b/mcs/class/System.Numerics/System.Numerics.dll.sources @@ -1,21 +1,34 @@ +../../build/common/Consts.cs ../../build/common/SR.cs Assembly/AssemblyInfo.cs -ReferenceSources/SR.cs -../referencesource/System.Numerics/System/Numerics/BigInteger.cs -../referencesource/System.Numerics/System/Numerics/BigIntegerBuilder.cs -../referencesource/System.Numerics/System/Numerics/BigNumber.cs -../referencesource/System.Numerics/System/Numerics/Complex.cs -../referencesource/System.Numerics/System/Numerics/NumericsHelpers.cs -../referencesource/System.Numerics/System/Numerics/HashCodeHelper.cs -../referencesource/System.Numerics/System/Numerics/JITIntrinsicAttribute.cs -../referencesource/System.Numerics/System/Numerics/Matrix3x2.cs -../referencesource/System.Numerics/System/Numerics/Matrix4x4.cs -../referencesource/System.Numerics/System/Numerics/Plane.cs -../referencesource/System.Numerics/System/Numerics/Quaternion.cs -../referencesource/System.Numerics/System/Numerics/Vector2.cs -../referencesource/System.Numerics/System/Numerics/Vector2_Intrinsics.cs -../referencesource/System.Numerics/System/Numerics/Vector3.cs -../referencesource/System.Numerics/System/Numerics/Vector3_Intrinsics.cs -../referencesource/System.Numerics/System/Numerics/Vector4.cs -../referencesource/System.Numerics/System/Numerics/Vector4_Intrinsics.cs -../referencesource/System.Numerics/System/Numerics/Vector_Operations.cs +corefx/SR.cs +corefx/Vector.cs + +../../../external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs +../../../external/corefx/src/Common/src/System/Numerics/Hashing/HashHelpers.cs + +../../../external/corefx/src/System.Runtime.Numerics/src/System/Globalization/FormatProvider.BigInteger.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Globalization/FormatProvider.NumberBuffer.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.AddSub.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.BitsBuffer.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.DivRem.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.FastReducer.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.GcdInv.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.PowMod.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.SquMul.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/BigNumber.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/Complex.cs +../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/NumericsHelpers.cs + +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/JitIntrinsicAttribute.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Matrix3x2.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Vector2.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Vector2_Intrinsics.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Vector3.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Vector3_Intrinsics.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Vector4.cs +../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Vector4_Intrinsics.cs diff --git a/mcs/class/System.Numerics/ReferenceSources/SR.cs b/mcs/class/System.Numerics/corefx/SR.cs index 3b4d7bd23e7..e4590b7131d 100644 --- a/mcs/class/System.Numerics/ReferenceSources/SR.cs +++ b/mcs/class/System.Numerics/corefx/SR.cs @@ -1,13 +1,13 @@ // -// This file was generated by txt2sr tool +// This file was generated by resx2sr tool // partial class SR { + public const string Argument_BadFormatSpecifier = "Format specifier was invalid."; public const string Argument_InvalidNumberStyles = "An undefined NumberStyles value is being used."; public const string Argument_InvalidHexStyle = "With the AllowHexSpecifier bit set in the enum bit field, the only other valid bits that can be combined into the enum value must be a subset of those in HexNumber."; public const string Argument_MustBeBigInt = "The parameter must be a BigInteger."; - public const string Format_InvalidFormatSpecifier = "Format specifier was invalid."; public const string Format_TooLarge = "The value is too large to be represented by this format specifier."; public const string ArgumentOutOfRange_MustBeNonNeg = "The number must be greater than or equal to zero."; public const string Overflow_BigIntInfinity = "BigInteger cannot represent infinity."; @@ -18,4 +18,8 @@ partial class SR public const string Overflow_UInt32 = "Value was either too large or too small for a UInt32."; public const string Overflow_UInt64 = "Value was either too large or too small for a UInt64."; public const string Overflow_Decimal = "Value was either too large or too small for a Decimal."; + public const string Arg_ArgumentOutOfRangeException = "Index was out of bounds:"; + public const string Arg_ElementsInSourceIsGreaterThanDestination = "Number of elements in source vector is greater than the destination array"; + public const string Arg_NullArgumentNullRef = "The method was called with a null array argument."; + public const string Arg_TypeNotSupported = "Specified type is not supported"; } diff --git a/mcs/class/System.Numerics/corefx/Vector.cs b/mcs/class/System.Numerics/corefx/Vector.cs new file mode 100644 index 00000000000..de085baeb13 --- /dev/null +++ b/mcs/class/System.Numerics/corefx/Vector.cs @@ -0,0 +1,12 @@ +namespace System.Numerics +{ + static class Vector + { + [JitIntrinsic] + public static bool IsHardwareAccelerated { + get { + return false; + } + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/Assembly/AssemblyInfo.cs b/mcs/class/corlib/Assembly/AssemblyInfo.cs index 59ef32f147f..6e1e9ef1264 100644 --- a/mcs/class/corlib/Assembly/AssemblyInfo.cs +++ b/mcs/class/corlib/Assembly/AssemblyInfo.cs @@ -76,8 +76,6 @@ using System.Runtime.InteropServices; [assembly: InternalsVisibleTo ("System, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)] [assembly: InternalsVisibleTo ("System.Core, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)] -[assembly: InternalsVisibleTo ("System.Numerics, PublicKey=00000000000000000400000000000000")] - [assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime, PublicKey=00000000000000000400000000000000")] [assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime.UI.Xaml, PublicKey=00000000000000000400000000000000")] |