diff options
m--------- | external/corefx | 0 | ||||
-rw-r--r-- | mcs/class/Makefile | 5 | ||||
-rw-r--r-- | mcs/class/System.Runtime.CompilerServices.Unsafe/AssemblyInfo.il | 18 | ||||
-rw-r--r-- | mcs/class/System.Runtime.CompilerServices.Unsafe/Makefile | 18 | ||||
-rw-r--r-- | mcs/class/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.dll.sources | 0 | ||||
-rw-r--r-- | mcs/class/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe_xtest.dll.sources | 1 | ||||
-rw-r--r-- | mcs/class/corlib/Makefile | 6 | ||||
-rw-r--r-- | mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs | 15 | ||||
-rw-r--r-- | mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.il | 13 | ||||
-rw-r--r-- | mcs/class/corlib/corlib.dll.sources | 5 | ||||
-rw-r--r-- | mcs/class/corlib/corlib_xtest.dll.sources | 7 | ||||
-rw-r--r-- | mcs/class/referencesource/mscorlib/system/throwhelper.cs | 3 | ||||
-rw-r--r-- | runtime/Makefile.am | 2 | ||||
-rwxr-xr-x | scripts/ci/run-test-default.sh | 1 |
14 files changed, 84 insertions, 10 deletions
diff --git a/external/corefx b/external/corefx -Subproject 5eba95b97930be62ad28b02eb75936bf31361e1 +Subproject e1f502de7f556407c124e88a4a8bcde962e7ccc diff --git a/mcs/class/Makefile b/mcs/class/Makefile index 57fa33adaa3..13d7aae2873 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -86,7 +86,8 @@ mobile_common_dirs := \ Mono.CSharp \ Microsoft.CSharp \ System.Reflection.Context \ - System.Net.Http.WinHttpHandler + System.Net.Http.WinHttpHandler \ + System.Runtime.CompilerServices.Unsafe testing_aot_full_dirs := \ $(mobile_common_dirs) \ @@ -195,6 +196,7 @@ xammac_4_5_dirs := \ System.Net.Http.WebRequest \ System.Reflection.Context \ System.Net.Http.WinHttpHandler \ + System.Runtime.CompilerServices.Unsafe \ $(pcl_facade_dirs) net_4_x_dirs := \ @@ -336,6 +338,7 @@ net_4_x_parallel_dirs := \ System.Reflection.Context \ Mono.Profiler.Log \ Mono.Runtime.Tests \ + System.Runtime.CompilerServices.Unsafe \ legacy/Mono.Cecil \ $(pcl_facade_dirs) diff --git a/mcs/class/System.Runtime.CompilerServices.Unsafe/AssemblyInfo.il b/mcs/class/System.Runtime.CompilerServices.Unsafe/AssemblyInfo.il new file mode 100644 index 00000000000..af111b736d5 --- /dev/null +++ b/mcs/class/System.Runtime.CompilerServices.Unsafe/AssemblyInfo.il @@ -0,0 +1,18 @@ +.assembly extern mscorlib +{ +} + +.assembly System.Runtime.CompilerServices.Unsafe +{ + .custom instance void [mscorlib]System.Reflection.AssemblyFileVersionAttribute::.ctor(string) = ( 01 00 07 34 2E 30 2E 30 2E 30 00 00 ) // ...4.0.0.0.. + .custom instance void [mscorlib]System.Reflection.AssemblyInformationalVersionAttribute::.ctor(string) = ( 01 00 07 34 2E 30 2E 30 2E 30 00 00 ) // ...4.0.0.0.. + + .hash algorithm 0x00008004 + .ver 4:0:4:0 +} +.module System.Runtime.CompilerServices.Unsafe.dll +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY diff --git a/mcs/class/System.Runtime.CompilerServices.Unsafe/Makefile b/mcs/class/System.Runtime.CompilerServices.Unsafe/Makefile new file mode 100644 index 00000000000..207310ec073 --- /dev/null +++ b/mcs/class/System.Runtime.CompilerServices.Unsafe/Makefile @@ -0,0 +1,18 @@ +thisdir = class/System.Runtime.CompilerServices.Unsafe +SUBDIRS = +include ../../build/rules.make + +LIBRARY = System.Runtime.CompilerServices.Unsafe.dll + +XTEST_LIB_FLAGS = -unsafe + +#NO_BUILD = yes +NO_INSTALL = yes + +EXTRA_DISTFILES = AssemblyInfo.il + +include ../../build/library.make + +$(build_lib): AssemblyInfo.il ../corlib/System.Runtime.CompilerServices/Unsafe.il + $(ILASM) AssemblyInfo.il ../corlib/System.Runtime.CompilerServices/Unsafe.il /dll /out:$(build_lib) + diff --git a/mcs/class/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.dll.sources b/mcs/class/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.dll.sources new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/mcs/class/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.dll.sources diff --git a/mcs/class/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe_xtest.dll.sources b/mcs/class/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe_xtest.dll.sources new file mode 100644 index 00000000000..180257f53e7 --- /dev/null +++ b/mcs/class/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe_xtest.dll.sources @@ -0,0 +1 @@ +../../../external/corefx/src/System.Runtime.CompilerServices.Unsafe/tests/*.cs diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index 9a25f2aa2c9..910f7b672f4 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -94,13 +94,13 @@ LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLE_X509 endif WARNING_ABOUT_DISABLED_WARNING=1635 -LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,3001,3003,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) +LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,3001,3002,3003,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) DEFAULT_REFERENCES = TEST_LIB_REFS = System.Core System -XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks Facades/System.Runtime.InteropServices.RuntimeInformation -XTEST_LIB_FLAGS = -d:netcoreapp +XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks Facades/System.Runtime.InteropServices.RuntimeInformation System.Numerics.Vectors System.Runtime.CompilerServices.Unsafe +XTEST_LIB_FLAGS = -d:netcoreapp -publicsign -keyfile:../mono.snk ifndef AOT_FRIENDLY_PROFILE ifneq ($(PROFILE),testing_aot_hybrid) diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs b/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs index b33937a961c..f80893f8c35 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs @@ -95,9 +95,24 @@ namespace System.Runtime.CompilerServices throw new NotImplementedException (); } + public static T ReadUnaligned<T> (ref byte source) + { + throw new NotImplementedException (); + } + public static int SizeOf<T> () { throw new NotImplementedException (); } + + public static ref T Subtract<T> (ref T source, int elementOffset) + { + throw new NotImplementedException (); + } + + public static void WriteUnaligned<T> (ref byte destination, T value) + { + throw new NotImplementedException (); + } } } diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.il b/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.il index c002459a7ef..957a2be4c45 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.il +++ b/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.il @@ -210,12 +210,17 @@ .method public hidebysig static !!T& AsRef<T>(void* source) cil managed aggressiveinlining { - .locals (int32&) .maxstack 1 ldarg.0 - // Roundtrip via a local to avoid type mismatch on return that the JIT inliner chokes on. - stloc.0 - ldloc.0 + ret + } + + .method public hidebysig static !!T& AsRef<T>(!!T& source) cil managed aggressiveinlining + { + .param [1] + .custom instance void [mscorlib]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) + .maxstack 1 + ldarg.0 ret } diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources index abfe4d1537d..6bb7532991a 100644 --- a/mcs/class/corlib/corlib.dll.sources +++ b/mcs/class/corlib/corlib.dll.sources @@ -1686,10 +1686,15 @@ corefx/SR.cs ../../../external/corefx/src/System.Memory/src/System/ReadOnlySpan.cs ../../../external/corefx/src/System.Memory/src/System/Span.cs ../../../external/corefx/src/System.Memory/src/System/SpanDebugView.cs +../../../external/corefx/src/System.Memory/src/System/SpanExtensions.cs +../../../external/corefx/src/System.Memory/src/System/SpanExtensions.Portable.cs ../../../external/corefx/src/System.Memory/src/System/SpanHelpers.cs ../../../external/corefx/src/System.Memory/src/System/SpanHelpers.Clear.cs +../../../external/corefx/src/System.Memory/src/System/SpanHelpers.byte.cs +../../../external/corefx/src/System.Memory/src/System/SpanHelpers.T.cs ../../../external/corefx/src/System.Memory/src/System/ThrowHelper.cs ../../../external/corefx/src/System.Memory/src/System/Buffers/*.cs +../../../external/corefx/src/System.Memory/src/System/Buffers/Binary/*.cs ../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/OSPlatform.cs ../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/Architecture.cs diff --git a/mcs/class/corlib/corlib_xtest.dll.sources b/mcs/class/corlib/corlib_xtest.dll.sources index f86a4ae5f02..ffe1a73b9d4 100644 --- a/mcs/class/corlib/corlib_xtest.dll.sources +++ b/mcs/class/corlib/corlib_xtest.dll.sources @@ -173,3 +173,10 @@ # System.Text.RegularExpressions ../../../external/corefx/src/System.Text.RegularExpressions/tests/*.cs:CaptureCollectionTests.netcoreapp.cs,GroupCollectionTests.netcoreapp.cs,MatchCollectionTests.netcoreapp.cs,PrecompiledRegexScenarioTest.cs,RegexCompilationInfoTests.cs,RegexGroupNameTests.cs,Regex.Groups.Tests.cs,Regex.Match.Tests.cs,Regex.Serialization.cs,MatchCollectionTests.cs,Regex.Ctor.Tests.cs,GroupCollectionTests2.cs,MatchCollectionTests2.cs,CaptureCollectionTests2.cs + +../../../external/corefx/src/System.Memory/tests/*.cs +../../../external/corefx/src/System.Memory/tests/Binary/*.cs +../../../external/corefx/src/System.Memory/tests/Memory/*.cs +../../../external/corefx/src/System.Memory/tests/ReadOnlyMemory/*.cs +../../../external/corefx/src/System.Memory/tests/ReadOnlySpan/*.cs +../../../external/corefx/src/System.Memory/tests/Span/*.cs diff --git a/mcs/class/referencesource/mscorlib/system/throwhelper.cs b/mcs/class/referencesource/mscorlib/system/throwhelper.cs index 80c4d7f750d..0eea324a960 100644 --- a/mcs/class/referencesource/mscorlib/system/throwhelper.cs +++ b/mcs/class/referencesource/mscorlib/system/throwhelper.cs @@ -473,7 +473,8 @@ namespace System { #if MONO start, pointer, - ownedMemory + ownedMemory, + text, #endif } diff --git a/runtime/Makefile.am b/runtime/Makefile.am index 6b8ad637282..ffd93565617 100644 --- a/runtime/Makefile.am +++ b/runtime/Makefile.am @@ -130,7 +130,7 @@ PLATFORM_PATH_SEPARATOR = : endif # assemblies which are excluded from testing in mcs-compileall below -VERIFY_TESTS_FILTER = +VERIFY_TESTS_FILTER = System.Runtime.CompilerServices.Unsafe.dll if HOST_WIN32 # Mono.WebBrowser.dll fails to verify on Windows diff --git a/scripts/ci/run-test-default.sh b/scripts/ci/run-test-default.sh index e121a80d9ec..24845a18aa5 100755 --- a/scripts/ci/run-test-default.sh +++ b/scripts/ci/run-test-default.sh @@ -85,6 +85,7 @@ ${TESTCMD} --label=System.Xaml --timeout=5m make -w -C mcs/class/System.Xaml run ${TESTCMD} --label=System.Net.Http --timeout=5m make -w -C mcs/class/System.Net.Http run-test ${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run-test ${TESTCMD} --label=System.Threading.Tasks.Dataflow --timeout=5m make -w -C mcs/class/System.Threading.Tasks.Dataflow run-test +if [[ ${label} == linux* ]]; then ${TESTCMD} --label=System.Runtime.CompilerServices.Unsafe-xunit --timeout=5m make -w -C mcs/class/System.Runtime.CompilerServices.Unsafe run-xunit-test; fi ${TESTCMD} --label=Mono.Debugger.Soft --timeout=5m make -w -C mcs/class/Mono.Debugger.Soft run-test ${TESTCMD} --label=Microsoft.CSharp-xunit --timeout=5m make -w -C mcs/class/Microsoft.CSharp run-xunit-test ${TESTCMD} --label=Microsoft.Build --timeout=5m make -w -C mcs/class/Microsoft.Build run-test |