Merge pull request #3132 from alexanderkyte/libmono_safe_undefined
authorAlexander Kyte <alexmkyte@gmail.com>
Mon, 18 Jul 2016 20:04:17 +0000 (16:04 -0400)
committerGitHub <noreply@github.com>
Mon, 18 Jul 2016 20:04:17 +0000 (16:04 -0400)
[runtime] Make mini still build when -no-undefined given

823 files changed:
.gitmodules
Makefile.am
acceptance-tests/coreclr.mk
configure.ac
eglib/configure.ac
eglib/src/Makefile.am
eglib/src/gerror.c
eglib/src/glib.h
eglib/src/gmarkup.c
eglib/src/gmem.c
eglib/src/gmisc-win32.c
eglib/src/goutput.c
eglib/src/gpath.c
eglib/src/gstr.c
eglib/src/vasprintf.c [deleted file]
eglib/src/vasprintf.h [deleted file]
eglib/test/test.c
external/buildtools [new submodule]
external/ikvm
external/nuget-buildtasks [new submodule]
m4/nls.m4
man/mono.1
mcs/build/README.makefiles
mcs/build/executable.make
mcs/build/library.make
mcs/build/profiles/basic.make
mcs/build/profiles/build.make
mcs/build/profiles/mobile.make
mcs/build/profiles/mobile_static.make
mcs/build/profiles/monodroid.make
mcs/build/profiles/monotouch_runtime.make
mcs/build/profiles/net_4_x.make
mcs/build/profiles/xammac.make
mcs/build/profiles/xbuild_12.make
mcs/build/rules.make
mcs/class/Facades/Makefile
mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/Microsoft.Win32.Registry.AccessControl.dll.sources
mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/RegistryAclExtensions.cs [new file with mode: 0644]
mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/TypeForwarders.cs
mcs/class/Facades/Microsoft.Win32.Registry/TypeForwarders.cs
mcs/class/Facades/System.ComponentModel.Primitives/TypeForwarders.cs
mcs/class/Facades/System.ComponentModel.TypeConverter/TypeForwarders.cs
mcs/class/Facades/System.Console/TypeForwarders.cs
mcs/class/Facades/System.Data.Common/DbColumn.cs [new file with mode: 0644]
mcs/class/Facades/System.Data.Common/DbDataReaderExtensions.Facade.cs [new file with mode: 0644]
mcs/class/Facades/System.Data.Common/IDbColumnSchemaGenerator.cs [new file with mode: 0644]
mcs/class/Facades/System.Data.Common/Makefile
mcs/class/Facades/System.Data.Common/System.Data.Common.dll.sources
mcs/class/Facades/System.Data.Common/TypeForwarders.cs
mcs/class/Facades/System.Data.SqlClient/TypeForwarders.cs
mcs/class/Facades/System.Diagnostics.Process/TypeForwarders.cs
mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.dll.sources
mcs/class/Facades/System.Diagnostics.StackTrace/TypeForwarders.cs
mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs [new file with mode: 0644]
mcs/class/Facades/System.Diagnostics.Tracing/System.Diagnostics.Tracing.dll.sources
mcs/class/Facades/System.Diagnostics.Tracing/TypeForwarders.cs
mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/embedded_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/monotouch_watch_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/xammac_net_4_5_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Globalization.Extensions/GlobalizationExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Globalization.Extensions/SR.cs [new file with mode: 0644]
mcs/class/Facades/System.Globalization.Extensions/StringNormalizationExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Globalization.Extensions/System.Globalization.Extensions.dll.sources
mcs/class/Facades/System.Globalization.Extensions/TypeForwarders.cs
mcs/class/Facades/System.IO.Compression/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.IO.Compression/Makefile [new file with mode: 0644]
mcs/class/Facades/System.IO.Compression/Missing.cs [new file with mode: 0644]
mcs/class/Facades/System.IO.Compression/System.IO.Compression.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.IO.Compression/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.IO.FileSystem.AccessControl/FileSystemAclExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.IO.FileSystem.AccessControl/System.IO.FileSystem.AccessControl.dll.sources
mcs/class/Facades/System.IO.FileSystem.AccessControl/TypeForwarders.cs
mcs/class/Facades/System.IO.FileSystem.Watcher/TypeForwarders.cs
mcs/class/Facades/System.IO.Packaging/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.IO.Packaging/Makefile [new file with mode: 0644]
mcs/class/Facades/System.IO.Packaging/System.IO.Packaging.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.IO.Packaging/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.IO/TypeForwarders.cs
mcs/class/Facades/System.Linq.Expressions/TypeForwarders.cs
mcs/class/Facades/System.Net.Ping/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Ping/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Net.Ping/System.Net.Ping.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Net.Ping/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Security/TypeForwarders.cs
mcs/class/Facades/System.Net.Sockets/SocketReceiveFromResult.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Sockets/SocketReceiveMessageFromResult.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Sockets/System.Net.Sockets.dll.sources
mcs/class/Facades/System.Private.CoreLib.Threading/AssemblyInfo.cs [deleted file]
mcs/class/Facades/System.Private.CoreLib.Threading/Facades_System.Private.CoreLib.Threading-net_4_x.csproj [deleted file]
mcs/class/Facades/System.Private.CoreLib.Threading/Makefile [deleted file]
mcs/class/Facades/System.Private.CoreLib.Threading/System.Private.CoreLib.Threading-net_4_x.csproj [deleted file]
mcs/class/Facades/System.Private.CoreLib.Threading/System.Private.CoreLib.Threading.dll.sources [deleted file]
mcs/class/Facades/System.Private.CoreLib.Threading/TypeForwarders.cs [deleted file]
mcs/class/Facades/System.Reflection.Primitives/TypeForwarders.cs
mcs/class/Facades/System.Reflection.TypeExtensions/Requires.cs [new file with mode: 0644]
mcs/class/Facades/System.Reflection.TypeExtensions/SR.cs [new file with mode: 0644]
mcs/class/Facades/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.dll.sources
mcs/class/Facades/System.Reflection.TypeExtensions/TypeExtensions.CoreCLR.cs [new file with mode: 0644]
mcs/class/Facades/System.Reflection.TypeExtensions/TypeForwarders.cs
mcs/class/Facades/System.Reflection/TypeForwarders.cs
mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
mcs/class/Facades/System.Runtime.Serialization.Formatters/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Formatters/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Formatters/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Primitives/ISerializationSurrogateProvider.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.dll.sources
mcs/class/Facades/System.Runtime.Serialization.Primitives/TypeForwarders.cs
mcs/class/Facades/System.Runtime.Serialization.Xml/DataContractSerializerExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Xml/Makefile
mcs/class/Facades/System.Runtime.Serialization.Xml/NotImplemented.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.dll.sources
mcs/class/Facades/System.Runtime.Serialization.Xml/TypeForwarders.cs
mcs/class/Facades/System.Runtime/TypeForwarders.cs
mcs/class/Facades/System.Security.Cryptography.Algorithms/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Cng/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Cng/System.Security.Cryptography.Cng.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Csp/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Csp/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Csp/System.Security.Cryptography.Csp.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Csp/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Encoding/TypeForwarders.cs
mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Pkcs/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Pkcs/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Pkcs/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Primitives/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Primitives/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Primitives/System.Security.Cryptography.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Primitives/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.X509Certificates/Makefile
mcs/class/Facades/System.Security.Cryptography.X509Certificates/TypeForwarders.cs
mcs/class/Facades/System.Security.Principal.Windows/TypeForwarders.cs
mcs/class/Facades/System.Security.SecureString/SecureStringMarshal.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.SecureString/System.Security.SecureString.dll.sources
mcs/class/Facades/System.Security.SecureString/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Duplex/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.NetTcp/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Primitives/Makefile
mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources
mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs
mcs/class/Facades/System.ServiceProcess.ServiceController/Makefile
mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceControllerStatus_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceController_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceStartMode_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceType_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/System.ServiceProcess.ServiceController.dll.sources
mcs/class/Facades/System.ServiceProcess.ServiceController/TimeoutException_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/TypeForwarders.cs
mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Text.Encoding.CodePages/CodePagesEncodingProvider.cs [new file with mode: 0644]
mcs/class/Facades/System.Text.Encoding.CodePages/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Text.RegularExpressions/TypeForwarders.cs
mcs/class/Facades/System.Threading.AccessControl/System.Threading.AccessControl.dll.sources
mcs/class/Facades/System.Threading.AccessControl/ThreadingAclExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.AccessControl/TypeForwarders.cs
mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandle.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandleOverlapped.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolPreAllocatedOverlapped.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/DeferredDisposableLifetime.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/HResults.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/Makefile
mcs/class/Facades/System.Threading.Overlapped/SR.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/System.Threading.Overlapped.dll.sources
mcs/class/Facades/System.Threading.Overlapped/TypeForwarders.cs
mcs/class/Facades/System.Xml.ReaderWriter/TypeForwarders.cs
mcs/class/Facades/System.Xml.XPath.XDocument/Makefile
mcs/class/Facades/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.dll.sources
mcs/class/Facades/System.Xml.XPath.XDocument/TypeForwarders.cs
mcs/class/Facades/System.Xml.XPath.XDocument/XDocumentExtensions.cs [new file with mode: 0644]
mcs/class/Facades/subdirs.make
mcs/class/Makefile
mcs/class/Microsoft.NuGet.Build.Tasks/Makefile [new file with mode: 0644]
mcs/class/Microsoft.NuGet.Build.Tasks/xbuild_14_Microsoft.NuGet.Build.Tasks.dll.sources [new file with mode: 0644]
mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs
mcs/class/Mono.CSharp/mobile_static_Mono.CSharp_test.dll.exclude.sources [new file with mode: 0644]
mcs/class/Mono.CSharp/mobile_static_Mono.CSharp_test.dll.sources [new file with mode: 0644]
mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD2Test.cs
mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD4Test.cs
mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD5Test.cs
mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/SHA1Test.cs
mcs/class/Mono.Security/Test/Mono.Math/BigIntegerSetTest.cs
mcs/class/Mono.Security/Test/Mono.Math/PrimeTestingTest.cs
mcs/class/Mono.Security/Test/Mono.Math/SearchGeneratorTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Authenticode/PrivateKeyTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/CryptoConvertTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/DiffieHellmanManagedTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/PKCS8Test.cs
mcs/class/Mono.Security/Test/Mono.Security.Protocol.Ntlm/ChallengeResponseTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Protocol.Ntlm/MessageBaseTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Protocol.Ntlm/Type1MessageTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Protocol.Ntlm/Type2MessageTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Protocol.Ntlm/Type3MessageTest.cs
mcs/class/Mono.Security/Test/Mono.Security/StrongNameTest.cs
mcs/class/Mono.Tasklets/Makefile
mcs/class/Mono.Tasklets/Mono.Tasklets_test.dll.sources [new file with mode: 0644]
mcs/class/Mono.Tasklets/Test/Mono.Tasklets/ContinuationsTest.cs [new file with mode: 0644]
mcs/class/Novell.Directory.Ldap/Makefile
mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_x.csproj
mcs/class/System.ComponentModel.Composition.4.5/Makefile
mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition-net_4_x.csproj
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs [new file with mode: 0644]
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs [new file with mode: 0644]
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.cs [new file with mode: 0644]
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.cs [new file with mode: 0644]
mcs/class/System.Core/System.IO.Pipes/AnonymousPipeClientStream.cs
mcs/class/System.Core/System.IO.Pipes/AnonymousPipeServerStream.cs
mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs
mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs
mcs/class/System.Core/System.IO.Pipes/PipeStream.cs
mcs/class/System.Core/System.Security.Cryptography.X509Certificates/ECDsaCertificateExtensions.cs [new file with mode: 0644]
mcs/class/System.Core/System.Security.Cryptography.X509Certificates/RSACertificateExtensions.cs [new file with mode: 0644]
mcs/class/System.Core/System.Security.Cryptography/AesCng.cs [new file with mode: 0644]
mcs/class/System.Core/System.Security.Cryptography/TripleDESCng.cs [new file with mode: 0644]
mcs/class/System.Core/Test/System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs
mcs/class/System.Core/common_System.Core.dll.sources
mcs/class/System.Core/mobile_static_System.Core.dll.sources
mcs/class/System.Core/net_4_x_System.Core.dll.sources
mcs/class/System.Data.Services.Client/Makefile
mcs/class/System.Data.Services.Client/System.Data.Services.Client-net_4_x.csproj
mcs/class/System.Data/Microsoft.SqlServer.Server/SqlDataRecord.cs
mcs/class/System.Data/Test/System.Data/ConstraintCollectionTest2.cs
mcs/class/System.Data/Test/System.Data/DataRowTest.cs
mcs/class/System.Data/Test/System.Data/DataRowViewTest.cs
mcs/class/System.Data/Test/System.Data/DataTableCollectionTest.cs
mcs/class/System.Data/Test/System.Data/DataTableTest.cs
mcs/class/System.Data/Test/System.Data/DataViewManagerTest.cs
mcs/class/System.Data/Test/System.Data/DataViewTest.cs
mcs/class/System.Data/Test/System.Data/DataViewTest2.cs
mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest.cs
mcs/class/System.Data/Test/System.Xml/XmlDataDocumentTest2.cs
mcs/class/System.Data/app_test_mobile_static.config [new file with mode: 0644]
mcs/class/System.Drawing/Makefile
mcs/class/System.Drawing/System.Drawing/Point.cs
mcs/class/System.Drawing/System.Drawing/Rectangle.cs
mcs/class/System.Drawing/System.Drawing/Size.cs
mcs/class/System.Drawing/System.Drawing/SizeF.cs
mcs/class/System.IO.Compression/SharpCompress/Archive/AbstractWritableArchive.cs
mcs/class/System.IO.Compression/SharpCompress/Archive/Zip/ZipArchiveEntry.cs
mcs/class/System.IO.Compression/SharpCompress/Common/Zip/ZipEntry.cs
mcs/class/System.IO.Compression/SharpCompress/IO/ReadOnlySubStream.cs
mcs/class/System.IO.Compression/SharpCompress/Writer/Zip/ZipCentralDirectoryEntry.cs
mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs
mcs/class/System.IO.Compression/ZipArchive.cs
mcs/class/System.IO.Compression/ZipArchiveEntry.cs
mcs/class/System.IO.Compression/test.nupkg [new file with mode: 0644]
mcs/class/System.Json.Microsoft/Makefile
mcs/class/System.Json.Microsoft/System.Json.Microsoft-net_4_x.csproj
mcs/class/System.Net.Http.Formatting/Makefile
mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_x.csproj
mcs/class/System.Net.Http.WinHttpHandler/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/Makefile [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.dll.sources [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/CookieUsePolicy.cs [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WinHttpHandler.cs [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WindowsProxyUsePolicy.cs [new file with mode: 0644]
mcs/class/System.Net.Http/CFNetworkHandler.cs
mcs/class/System.Numerics.Vectors/Assembly/TypeForwarders.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/Makefile
mcs/class/System.Numerics.Vectors/SR.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics.Vectors.dll.sources
mcs/class/System.Numerics.Vectors/System.Numerics/ConstantHelper.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/HashCodeHelper.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/JitIntrinsicAttribute.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/Register.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/Vector.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/Vector_Operations.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.exclude.sources [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.sources [new file with mode: 0644]
mcs/class/System.Numerics/Makefile
mcs/class/System.Numerics/ReferenceSources/Environment.cs [deleted file]
mcs/class/System.Numerics/System.Numerics.dll.sources
mcs/class/System.Reflection.Context/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Reflection.Context/Makefile [new file with mode: 0644]
mcs/class/System.Reflection.Context/System.Reflection.Context.dll.sources [new file with mode: 0644]
mcs/class/System.Reflection.Context/System.Reflection.Context/CustomReflectionContext.cs [new file with mode: 0644]
mcs/class/System.Reflection.DispatchProxy/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Reflection.DispatchProxy/Makefile [new file with mode: 0644]
mcs/class/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources [new file with mode: 0644]
mcs/class/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs [new file with mode: 0644]
mcs/class/System.Runtime.InteropServices.RuntimeInformation/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Runtime.InteropServices.RuntimeInformation/Makefile [new file with mode: 0644]
mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices.RuntimeInformation.dll.sources [new file with mode: 0644]
mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/Architecture.cs [new file with mode: 0644]
mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/OSPlatform.cs [new file with mode: 0644]
mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/RuntimeInformation.cs [new file with mode: 0644]
mcs/class/System.Runtime.Serialization.Formatters.Soap/Test/InternalSoapValuesTest.cs
mcs/class/System.Runtime.Serialization.Formatters.Soap/Test/SerializationTest.cs
mcs/class/System.Runtime.Serialization.Formatters.Soap/Test/SoapFormatterTest.cs
mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/DataContractResolverTest.cs
mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs
mcs/class/System.Security/System.Security.Cryptography/ProtectedData.cs
mcs/class/System.Security/common_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/mobile_static_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monodroid_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_runtime_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_tv_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_tv_runtime_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_watch_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_watch_runtime_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/xammac_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ConnectionOrientedTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/WindowsStreamSecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SecureConversationSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/UserNameSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.dll.sources
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsSecurity.cs
mcs/class/System.ServiceModel/System.ServiceModel/CallbackBehaviorAttribute.cs
mcs/class/System.ServiceModel/System.ServiceModel/DnsEndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/DuplexChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientRuntimeChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel/HttpBindingBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityOverTcp.cs
mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityVersion.cs
mcs/class/System.ServiceModel/System.ServiceModel/NetHttpsBinding.cs [new file with mode: 0644]
mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/UpnEndpointIdentity.cs
mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources
mcs/class/System.ServiceModel/mobile_static_System.ServiceModel_test.dll.exclude.sources [new file with mode: 0644]
mcs/class/System.ServiceModel/mobile_static_System.ServiceModel_test.dll.sources [new file with mode: 0644]
mcs/class/System.Web.Http.SelfHost/Makefile
mcs/class/System.Web.Http.SelfHost/System.Web.Http.SelfHost-net_4_x.csproj
mcs/class/System.Web.Http.WebHost/Makefile
mcs/class/System.Web.Http.WebHost/System.Web.Http.WebHost-net_4_x.csproj
mcs/class/System.Web.Http/Makefile
mcs/class/System.Web.Http/System.Web.Http-net_4_x.csproj
mcs/class/System.Web.Mvc3/Makefile
mcs/class/System.Web.Razor/Makefile
mcs/class/System.Web.Razor/System.Web.Razor-net_4_x.csproj
mcs/class/System.Web.Services/Makefile
mcs/class/System.Web.Services/System.Web.Services.Protocols/Methods.cs
mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/SoapHttpClientProtocolTest.cs
mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.exclude.sources
mcs/class/System.Web.WebPages.Deployment/Makefile
mcs/class/System.Web.WebPages.Deployment/System.Web.WebPages.Deployment-net_4_x.csproj
mcs/class/System.Web.WebPages.Razor/Makefile
mcs/class/System.Web.WebPages.Razor/System.Web.WebPages.Razor-net_4_x.csproj
mcs/class/System.Web.WebPages/Makefile
mcs/class/System.Web.WebPages/System.Web.WebPages-net_4_x.csproj
mcs/class/System.Web/Makefile
mcs/class/System.Web/System.Web-net_4_x.csproj
mcs/class/System.Web/System.Web-plainweb-net_4_x.csproj
mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs
mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs
mcs/class/System.Xml.XPath.XmlDocument/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Xml.XPath.XmlDocument/Makefile [new file with mode: 0644]
mcs/class/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.dll.sources [new file with mode: 0644]
mcs/class/System.Xml.XPath.XmlDocument/System.Xml/XmlDocumentXPathExtensions.cs [new file with mode: 0644]
mcs/class/System/Makefile
mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
mcs/class/System/Microsoft.Win32.SafeHandles/SafeX509ChainHandle.cs [new file with mode: 0644]
mcs/class/System/Mono.Net.Security/MonoSslStreamImpl.cs
mcs/class/System/System.IO.Compression/DeflateStream.cs
mcs/class/System/System.IO/FileSystemWatcher_mobile.cs [new file with mode: 0644]
mcs/class/System/System.Net.NetworkInformation/IPInterfaceProperties.cs
mcs/class/System/System.Net.NetworkInformation/NetworkChange.cs
mcs/class/System/System.Net.Sockets/Socket.cs
mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs
mcs/class/System/System.Net/ServicePoint.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBindingKind.cs
mcs/class/System/System.dll.sources
mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs
mcs/class/System/Test/System.ComponentModel.Design.Serialization/InstanceDescriptorTest.cs
mcs/class/System/Test/System.Diagnostics/FileVersionInfoTest.cs
mcs/class/System/Test/System.Net.NetworkInformation/PingTest.cs
mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
mcs/class/System/Test/System.Net/HttpListener2Test.cs
mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs
mcs/class/System/Test/System.Net/ServicePointTest.cs
mcs/class/System/Test/System.Net/WebRequestTest.cs
mcs/class/System/Test/System.Timers/TimerTest.cs
mcs/class/System/Test/System/UriTest.cs
mcs/class/System/mobile_System.dll.sources
mcs/class/System/mobile_static_System_test.dll.exclude.sources
mcs/class/corlib/Microsoft.Win32/Registry.cs
mcs/class/corlib/Microsoft.Win32/RegistryHive.cs
mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs
mcs/class/corlib/Microsoft.Win32/RegistryValueOptions.cs
mcs/class/corlib/Mono/RuntimeHandles.cs [new file with mode: 0644]
mcs/class/corlib/Mono/RuntimeStructs.cs [new file with mode: 0644]
mcs/class/corlib/Mono/SafeGPtrArrayHandle.cs [new file with mode: 0644]
mcs/class/corlib/ReferenceSources/MethodBase.cs
mcs/class/corlib/ReferenceSources/RuntimeType.cs
mcs/class/corlib/System.Diagnostics.Tracing/EventDataAttribute.cs [new file with mode: 0644]
mcs/class/corlib/System.Diagnostics.Tracing/EventFieldAttribute.cs [new file with mode: 0644]
mcs/class/corlib/System.Diagnostics.Tracing/EventFieldFormat.cs [new file with mode: 0644]
mcs/class/corlib/System.Diagnostics.Tracing/EventFieldTags.cs [new file with mode: 0644]
mcs/class/corlib/System.Diagnostics.Tracing/EventIgnoreAttribute.cs [new file with mode: 0644]
mcs/class/corlib/System.Diagnostics.Tracing/EventManifestOptions.cs [new file with mode: 0644]
mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs
mcs/class/corlib/System.Diagnostics.Tracing/EventSourceException.cs [new file with mode: 0644]
mcs/class/corlib/System.Diagnostics/StackFrame.cs
mcs/class/corlib/System.Diagnostics/StackTrace.cs
mcs/class/corlib/System.Globalization/CultureInfo.cs
mcs/class/corlib/System.IO/Path.cs
mcs/class/corlib/System.Reflection.Emit/FlowControl.cs
mcs/class/corlib/System.Reflection.Emit/OpCode.cs
mcs/class/corlib/System.Reflection.Emit/OpCodeNames.cs
mcs/class/corlib/System.Reflection.Emit/OpCodeType.cs
mcs/class/corlib/System.Reflection.Emit/OpCodes.cs
mcs/class/corlib/System.Reflection.Emit/OperandType.cs
mcs/class/corlib/System.Reflection.Emit/PackingSize.cs
mcs/class/corlib/System.Reflection.Emit/StackBehaviour.cs
mcs/class/corlib/System.Reflection.Metadata/AssemblyExtensions.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection/Assembly.cs
mcs/class/corlib/System.Reflection/AssemblyName.cs
mcs/class/corlib/System.Reflection/EventInfo.cs
mcs/class/corlib/System.Reflection/MonoAssembly.cs
mcs/class/corlib/System.Reflection/PropertyInfo.cs
mcs/class/corlib/System.Runtime.InteropServices/ComAwareEventInfo.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices/ComEventsHelper.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices/CustomQueryInterfaceMode.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.Loader/AssemblyLoadContext.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.Remoting.Contexts/SynchronizationAttribute.cs
mcs/class/corlib/System.Runtime.Remoting.Messaging/MonoMethodMessage.cs
mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
mcs/class/corlib/System.Security/CodeAccessPermission.cs
mcs/class/corlib/System.Security/PermissionSet.cs
mcs/class/corlib/System.Security/SafeAccessTokenHandle.cs [deleted file]
mcs/class/corlib/System.Threading/Thread.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/RuntimeTypeHandle.cs
mcs/class/corlib/System/TimeZoneInfo.cs
mcs/class/corlib/Test/Mono.Math/ArithmeticBigTest.cs
mcs/class/corlib/Test/Mono.Math/PrimeTestingTest.cs
mcs/class/corlib/Test/System.Collections/SortedListTest.cs
mcs/class/corlib/Test/System.IO/PathTest.cs
mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs
mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
mcs/class/corlib/Test/System.Runtime.ExceptionServices/ExceptionDispatchInfoTest.cs
mcs/class/corlib/Test/System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
mcs/class/corlib/Test/System.Runtime.Remoting/SynchronizationAttributeTest.cs
mcs/class/corlib/Test/System.Security/CodeAccessPermissionTest.cs
mcs/class/corlib/Test/System.Threading/ExecutionContextCas.cs
mcs/class/corlib/Test/System/ConvertTest.cs
mcs/class/corlib/Test/System/DelegateTest.cs
mcs/class/corlib/Test/System/EnvironmentTest.cs
mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
mcs/class/corlib/Test/System/TimeZoneTest.cs
mcs/class/corlib/Test/System/TypeTest.cs
mcs/class/corlib/corlib.dll.sources
mcs/class/doc/NUnitGuidelines
mcs/class/referencesource/System.Core/System/Security/Cryptography/BCryptNative.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKey.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/NCryptNative.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/RsaCng.cs
mcs/class/referencesource/System.Data.Linq/misc/SecurityUtils.cs
mcs/class/referencesource/System.Data.SqlXml/System/Xml/Xsl/XsltOld/Compiler.cs
mcs/class/referencesource/System.Data/System/Data/Common/AdapterUtil.cs
mcs/class/referencesource/System.Data/System/Data/XMLSchema.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ClassDataContract.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/Globals.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerContext.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs
mcs/class/referencesource/System.ServiceModel.Internals/System/Runtime/PartialTrustHelpers.cs
mcs/class/referencesource/System.Xml/System/Xml/XmlSecureResolver.cs
mcs/class/referencesource/System.Xml/System/Xml/XmlSecureResolverAsync.cs
mcs/class/referencesource/System.Xml/System/Xml/Xslt/XslTransform.cs
mcs/class/referencesource/System/compmod/system/componentmodel/DebugReflectPropertyDescriptor.cs
mcs/class/referencesource/System/compmod/system/componentmodel/DebugTypeDescriptor.cs
mcs/class/referencesource/System/compmod/system/componentmodel/IntSecurity.cs
mcs/class/referencesource/System/compmod/system/componentmodel/ReflectPropertyDescriptor.cs
mcs/class/referencesource/System/compmod/system/componentmodel/ReflectTypeDescriptionProvider.cs
mcs/class/referencesource/System/compmod/system/componentmodel/TypeDescriptor.cs
mcs/class/referencesource/System/compmod/system/componentmodel/Win32Exception.cs
mcs/class/referencesource/System/compmod/system/componentmodel/design/DesigntimeLicenseContext.cs
mcs/class/referencesource/System/compmod/system/diagnostics/Trace.cs
mcs/class/referencesource/System/compmod/system/diagnostics/TraceEventCache.cs
mcs/class/referencesource/System/compmod/system/diagnostics/TraceInternal.cs
mcs/class/referencesource/System/misc/SecurityUtils.cs
mcs/class/referencesource/System/net/System/Net/AuthenticationManager.cs
mcs/class/referencesource/System/net/System/Net/CredentialCache.cs
mcs/class/referencesource/System/net/System/Net/Internal.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs
mcs/class/referencesource/System/net/System/Net/ServicePoint.cs
mcs/class/referencesource/System/net/System/Net/WebHeaderCollection.cs
mcs/class/referencesource/System/net/System/Net/WebRequest.cs
mcs/class/referencesource/System/net/System/Net/_SecureChannel.cs
mcs/class/referencesource/System/net/System/Net/_SpnDictionary.cs
mcs/class/referencesource/System/net/System/Net/webclient.cs
mcs/class/referencesource/System/net/System/Net/webproxy.cs
mcs/class/referencesource/System/net/System/URI.cs
mcs/class/referencesource/System/net/System/UriScheme.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/RegexCompiler.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/RegexGroup.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/RegexMatch.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/compiledregexrunnerfactory.cs
mcs/class/referencesource/System/sys/system/collections/concurrent/ConcurrentBag.cs
mcs/class/referencesource/mscorlib/system/exception.cs
mcs/class/referencesource/mscorlib/system/io/__error.cs
mcs/class/referencesource/mscorlib/system/io/fileinfo.cs
mcs/class/referencesource/mscorlib/system/io/filesysteminfo.cs
mcs/class/referencesource/mscorlib/system/io/unmanagedmemorystream.cs
mcs/class/referencesource/mscorlib/system/resources/filebasedresourcegroveler.cs
mcs/class/referencesource/mscorlib/system/resources/resourcewriter.cs
mcs/class/referencesource/mscorlib/system/rttype.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/runtimeenvironment.cs
mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryobjectreader.cs
mcs/class/referencesource/mscorlib/system/security/safesecurityhandles.cs
mcs/ilasm/codegen/TypeDef.cs
mcs/jay/jay.vcxproj
mcs/mcs/assembly.cs
mcs/mcs/convert.cs
mcs/mcs/ecore.cs
mcs/mcs/ikvm.cs
mcs/mcs/import.cs
mcs/mcs/mcs.csproj
mcs/mcs/reflection.cs
mcs/tests/test-935.cs
mcs/tests/test-936-lib.il [new file with mode: 0644]
mcs/tests/test-936.cs [new file with mode: 0644]
mcs/tests/test-937.cs [new file with mode: 0644]
mcs/tests/test-interpolation-10.cs [new file with mode: 0644]
mcs/tests/ver-il-net_4_x.xml
mcs/tools/linker/Descriptors/mscorlib.xml
mcs/tools/mkbundle/mkbundle.cs
mcs/tools/mono-api-html/ApiDiff.cs
mcs/tools/mono-api-html/ClassComparer.cs
mcs/tools/mono-api-html/FieldComparer.cs
mcs/tools/mono-api-html/MemberComparer.cs
mcs/tools/mono-symbolicate/LocationProvider.cs
mcs/tools/mono-symbolicate/Makefile
mcs/tools/mono-symbolicate/SeqPointInfo.cs
mcs/tools/mono-symbolicate/StackFrameData.cs [new file with mode: 0644]
mcs/tools/mono-symbolicate/StackTraceMetadata.cs [new file with mode: 0644]
mcs/tools/mono-symbolicate/SymbolManager.cs [new file with mode: 0644]
mcs/tools/mono-symbolicate/mono-symbolicate.exe.sources
mcs/tools/mono-symbolicate/symbolicate.cs
mcs/tools/security/mozroots.cs
mcs/tools/xbuild/Makefile
mcs/tools/xbuild/data/12.0/Microsoft.Common.targets
mcs/tools/xbuild/data/14.0/Microsoft.Common.props [new file with mode: 0644]
mcs/tools/xbuild/data/14.0/Microsoft.Common.targets
mcs/tools/xbuild/data/4.0/Microsoft.Common.targets
mcs/tools/xbuild/targets/Microsoft.Portable.CSharp_4.0.targets [deleted file]
mcs/tools/xbuild/targets/Microsoft.Portable.CSharp_4.5.targets [deleted file]
mcs/tools/xbuild/targets/Microsoft.Portable.Common.targets [deleted file]
mcs/tools/xbuild/targets/Microsoft.Portable.Core.props [deleted file]
mcs/tools/xbuild/targets/Microsoft.Portable.Core.targets [deleted file]
mcs/tools/xbuild/targets/Microsoft.Portable.VisualBasic_4.0.targets [deleted file]
mcs/tools/xbuild/targets/Microsoft.Portable.VisualBasic_4.5.targets [deleted file]
mono/cil/cil-opcodes.xml
mono/cil/opcode.def
mono/dis/main.c
mono/io-layer/Makefile.am
mono/io-layer/error.c
mono/io-layer/event-private.h
mono/io-layer/events.c
mono/io-layer/handles-private.h [deleted file]
mono/io-layer/handles.c [deleted file]
mono/io-layer/handles.h [deleted file]
mono/io-layer/io-private.h
mono/io-layer/io-trace.h
mono/io-layer/io.c
mono/io-layer/io.h
mono/io-layer/locking.c
mono/io-layer/mutex-private.h
mono/io-layer/mutexes.c
mono/io-layer/posix.c
mono/io-layer/process-private.h
mono/io-layer/processes.c
mono/io-layer/processes.h
mono/io-layer/semaphore-private.h
mono/io-layer/semaphores.c
mono/io-layer/shared.c
mono/io-layer/shared.h
mono/io-layer/socket-private.h
mono/io-layer/sockets.c
mono/io-layer/thread-private.h
mono/io-layer/threads.h
mono/io-layer/wait.c
mono/io-layer/wapi-private.h
mono/io-layer/wapi.c [new file with mode: 0644]
mono/io-layer/wapi.h
mono/io-layer/wthreads.c
mono/metadata/.gitignore
mono/metadata/Makefile.am
mono/metadata/appdomain.c
mono/metadata/attach.c
mono/metadata/cil-coff.h
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/coree.c
mono/metadata/domain-internals.h
mono/metadata/domain.c
mono/metadata/file-io.c
mono/metadata/gc.c
mono/metadata/handle.c
mono/metadata/handle.h
mono/metadata/icall-def.h
mono/metadata/icall.c
mono/metadata/image.c
mono/metadata/loader.c
mono/metadata/marshal.c
mono/metadata/mempool.c
mono/metadata/metadata-internals.h
mono/metadata/metadata-verify.c
mono/metadata/metadata.c
mono/metadata/metadata.h
mono/metadata/monitor.c
mono/metadata/mono-config.c
mono/metadata/object-internals.h
mono/metadata/object.c
mono/metadata/opcodes.h
mono/metadata/pedump.c [deleted file]
mono/metadata/process.c
mono/metadata/reflection.c
mono/metadata/remoting.c
mono/metadata/sgen-bridge-internals.h
mono/metadata/sgen-bridge.c
mono/metadata/sgen-bridge.h
mono/metadata/sgen-dynarray.h [new file with mode: 0644]
mono/metadata/sgen-mono.c
mono/metadata/sgen-new-bridge.c
mono/metadata/sgen-tarjan-bridge.c
mono/metadata/socket-io.c
mono/metadata/threadpool-ms-io.c
mono/metadata/threadpool-ms.c
mono/metadata/threads.c
mono/metadata/verify.c
mono/metadata/wrapper-types.h
mono/mini/abcremoval.c
mono/mini/abcremoval.h
mono/mini/alias-analysis.c
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/branch-opts.c
mono/mini/cpu-amd64.md
mono/mini/debugger-agent.c
mono/mini/driver.c
mono/mini/exceptions-amd64.c
mono/mini/exceptions-x86.c
mono/mini/generics.cs
mono/mini/jit-icalls.c
mono/mini/linear-scan.c
mono/mini/llvm-jit.cpp
mono/mini/main.c
mono/mini/method-to-ir.c
mono/mini/mini-amd64-gsharedvt.c
mono/mini/mini-amd64.c
mono/mini/mini-amd64.h
mono/mini/mini-codegen.c
mono/mini/mini-exceptions.c
mono/mini/mini-generic-sharing.c
mono/mini/mini-llvm-cpp.cpp
mono/mini/mini-llvm-cpp.h
mono/mini/mini-llvm.c
mono/mini/mini-ops.h
mono/mini/mini-runtime.c
mono/mini/mini-trampolines.c
mono/mini/mini-x86.c
mono/mini/mini-x86.h
mono/mini/mini.c
mono/mini/mini.h
mono/mini/tasklets.c
mono/mini/test_op_il_seq_point.sh
mono/mini/unwind.c
mono/profiler/Makefile.am
mono/sgen/sgen-alloc.c
mono/sgen/sgen-gc.c
mono/sgen/sgen-gc.h
mono/sgen/sgen-internal.c
mono/sgen/sgen-marksweep.c
mono/tests/Makefile.am
mono/tests/bug-30085.cs
mono/tests/exception18.cs
mono/tests/libtest.c
mono/tests/priority.cs [new file with mode: 0644]
mono/tests/process-leak.cs
mono/tests/sgen-bridge-pathologies.cs
mono/tests/sleep.cs
mono/tests/test-runner.cs
mono/tests/tests-config.in
mono/utils/Makefile.am
mono/utils/lock-free-alloc.c
mono/utils/mono-hwcap-arm.c
mono/utils/mono-log-common.c [new file with mode: 0644]
mono/utils/mono-log-posix.c [new file with mode: 0644]
mono/utils/mono-log-windows.c [new file with mode: 0644]
mono/utils/mono-logger-internals.h
mono/utils/mono-logger.c
mono/utils/mono-logger.h
mono/utils/mono-publib.c
mono/utils/mono-publib.h
mono/utils/mono-threads-coop.c
mono/utils/mono-threads-posix.c
mono/utils/mono-threads-windows.c
mono/utils/mono-threads.c
mono/utils/mono-threads.h
mono/utils/mono-time.c
mono/utils/w32handle.c [new file with mode: 0644]
mono/utils/w32handle.h [new file with mode: 0644]
msvc/.gitignore
msvc/build-all.vcxproj [new file with mode: 0644]
msvc/build-all.vcxproj.filters [new file with mode: 0644]
msvc/build-init.vcxproj [new file with mode: 0644]
msvc/build-init.vcxproj.filters [new file with mode: 0644]
msvc/build-install.vcxproj [new file with mode: 0644]
msvc/build-install.vcxproj.filters [new file with mode: 0644]
msvc/build-package.vcxproj [new file with mode: 0644]
msvc/build-package.vcxproj.filters [new file with mode: 0644]
msvc/compare-config-content.ps1 [new file with mode: 0644]
msvc/compare-config-files.ps1 [new file with mode: 0644]
msvc/create-windef.pl
msvc/eglib.vcxproj
msvc/eglib.vcxproj.filters [new file with mode: 0644]
msvc/genmdesc.vcxproj
msvc/genmdesc.vcxproj.filters [new file with mode: 0644]
msvc/install.bat [new file with mode: 0644]
msvc/libgc.vcxproj
msvc/libgc.vcxproj.filters [new file with mode: 0644]
msvc/libgcmonosgen.vcxproj [new file with mode: 0644]
msvc/libgcmonosgen.vcxproj.filters [new file with mode: 0644]
msvc/libmono-static.vcxproj [new file with mode: 0644]
msvc/libmono-static.vcxproj.filters [new file with mode: 0644]
msvc/libmono.bat [new file with mode: 0644]
msvc/libmono.vcxproj
msvc/libmono.vcxproj.filters [new file with mode: 0644]
msvc/libmonoruntime.vcxproj
msvc/libmonoruntime.vcxproj.filters [new file with mode: 0644]
msvc/libmonoutils.vcxproj
msvc/libmonoutils.vcxproj.filters [new file with mode: 0644]
msvc/libtest.vcxproj
msvc/libtest.vcxproj.filters [new file with mode: 0644]
msvc/mono-mini-regression-aot-test.vcxproj [new file with mode: 0644]
msvc/mono-mini-regression-aot-test.vcxproj.filters [new file with mode: 0644]
msvc/mono-mini-regression-test-aot.props [new file with mode: 0644]
msvc/mono-mini-regression-test.props [new file with mode: 0644]
msvc/mono-mini-regression-test.vcxproj [new file with mode: 0644]
msvc/mono-mini-regression-test.vcxproj.filters [new file with mode: 0644]
msvc/mono-regression-test-Win32.props [new file with mode: 0644]
msvc/mono-regression-test-x64.props [new file with mode: 0644]
msvc/mono-regression-test.props [new file with mode: 0644]
msvc/mono.def
msvc/mono.props
msvc/mono.sln
msvc/mono.vcxproj
msvc/mono.vcxproj.filters [new file with mode: 0644]
msvc/monodis.vcxproj
msvc/monodis.vcxproj.filters [new file with mode: 0644]
msvc/monograph.vcxproj
msvc/monograph.vcxproj.filters [new file with mode: 0644]
msvc/monoposixhelper.vcxproj
msvc/monoposixhelper.vcxproj.filters [new file with mode: 0644]
msvc/monosgen.def
msvc/package.bat [new file with mode: 0644]
msvc/pedump.vcxproj
msvc/pedump.vcxproj.filters [new file with mode: 0644]
msvc/profiler-vtune.vcxproj
msvc/profiler-vtune.vcxproj.filters [new file with mode: 0644]
msvc/scripts/System.ComponentModel.Composition.pre [deleted file]
msvc/scripts/System.Data.Services.Client.pre [deleted file]
msvc/scripts/System.Json.Microsoft.pre [deleted file]
msvc/scripts/System.Net.Http.Formatting.pre [deleted file]
msvc/scripts/System.Web.Http.pre [deleted file]
msvc/scripts/System.Web.Razor.pre [deleted file]
msvc/scripts/System.Web.WebPages.Deployment.pre [deleted file]
msvc/scripts/TODO.md
msvc/scripts/genproj.cs
msvc/scripts/order.xml
msvc/test-invoke.vcxproj
msvc/test-invoke.vcxproj.filters [new file with mode: 0644]
msvc/test-metadata.vcxproj
msvc/test-metadata.vcxproj.filters [new file with mode: 0644]
msvc/test_eglib.vcxproj
msvc/test_eglib.vcxproj.filters [new file with mode: 0644]
msvc/teste.vcxproj
msvc/teste.vcxproj.filters [new file with mode: 0644]
msvc/winsetup.bat
net_4_x.sln
samples/embed/teste.c
scripts/ci/run-jenkins.sh
scripts/ci/run-test-default.sh [new file with mode: 0755]
scripts/ci/run-test-mobile_static.sh [new file with mode: 0755]
scripts/submodules/versions.mk
tools/Makefile.am
tools/monograph/Makefile.am
tools/pedump/.gitignore [new file with mode: 0644]
tools/pedump/Makefile.am [new file with mode: 0644]
tools/pedump/pedump.c [new file with mode: 0644]
tools/sgen/Makefile.am
tools/sgen/gcpausevis.py

index 2025d14474d4528e26bed929d272fa63ededdffa..7c8d2d14e8b109d99672c2673da1cc4e9359c48d 100644 (file)
@@ -29,3 +29,9 @@
 [submodule "external/nunit-lite"]
        path = external/nunit-lite
        url = git://github.com/mono/NUnitLite.git
+[submodule "external/nuget-buildtasks"]
+       path = external/nuget-buildtasks
+       url = git://github.com/mono/NuGet.BuildTasks
+[submodule "external/buildtools"]
+       path = external/buildtools
+       url = git://github.com/mono/buildtools.git
index c0672460ea05b19b410a140f5790651cafd6b6cf..9c6dc7e971457668dc80b31fa3d5d152d9b3f363 100644 (file)
@@ -4,17 +4,16 @@ AM_CFLAGS = $(WERROR_CFLAGS)
 
 MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
 
+# Some tools might not build when cross-compiling
 if CROSS_COMPILING
-SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests llvm
-# Keep in sync with SUBDIRS
-## 'tools' is not normally built
-DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
+tools_dir =
 else
-SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests llvm
+tools_dir = tools
+endif
+
+SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
 # Keep in sync with SUBDIRS
-## 'tools' is not normally built
 DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
-endif
 
 all: update_submodules
 
@@ -68,6 +67,10 @@ get-monolite-latest:
        cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
        cd $(mcslib) && mv -f monolite-* monolite
 
+.PHONY: check-ci
+check-ci:
+       MONO_LLVMONLY=$(MONO_LLVMONLY) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
+
 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
 validate: do-build-mono-mcs
        $(MAKE) mcs-do-tests
@@ -153,6 +156,7 @@ package-inputs:
                 read libou;  echo "      <library_output>$$libou</library_output>"; \
                 read fx_ver; echo "      <fx_version>$$fx_ver</fx_version>"; \
                 read profile; echo "      <profile>$$profile</profile>"; \
+                read resxt;  echo "      <resources>$$resxt</resources>"; \
                 read resp;   echo "      <response>$$resp</response>"; \
                 echo "    </project>") >> msvc/scripts/order.xml; \
        done
index 8f75b05470fe46685d232f3a35933dbc1080fc59..1f4be3d1e8fbc9cefb15d72648b5068298d01356 100644 (file)
@@ -262,9 +262,7 @@ CORECLR_TEST_CS_SRC=                \
        $(CORECLR_PATH)/tests/src/JIT/Directed/intrinsic/pow/pow2.cs    \
        $(CORECLR_PATH)/tests/src/JIT/Directed/intrinsic/pow/pow3.cs    \
        $(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime1.cs    \
-       $(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime2.cs    \
        $(CORECLR_PATH)/tests/src/JIT/Directed/localloc/localloc3.cs    \
-       $(CORECLR_PATH)/tests/src/JIT/Directed/newarr/newarr.cs \
        $(CORECLR_PATH)/tests/src/JIT/Directed/shift/int16.cs   \
        $(CORECLR_PATH)/tests/src/JIT/Directed/shift/int32.cs   \
        $(CORECLR_PATH)/tests/src/JIT/Directed/shift/int64.cs   \
@@ -1279,7 +1277,6 @@ CORECLR_TEST_CS_SRC=              \
        $(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs     \
        $(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeybeta2/366085/366085.cs     \
        $(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.cs      \
-       $(CORECLR_PATH)/tests/src/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs    \
        $(CORECLR_PATH)/tests/src/baseservices/exceptions/simple/finally.cs     \
        $(CORECLR_PATH)/tests/src/baseservices/exceptions/unittests/returnfromcatch.cs  \
        $(CORECLR_PATH)/tests/src/baseservices/regression/v1/threads/functional/threadpool/cs_threadpoolnullchecks/cs_threadpoolnullchecks.cs   \
@@ -4003,6 +4000,15 @@ CORECLR_DISABLED_TEST_CS_SRC +=  \
 # this test makes no sense, the expected pattern is the English one for all cultures
 CORECLR_DISABLED_TEST_CS_SRC += $(CORECLR_PATH)/tests/src/Regressions/coreclr/0584/test584.cs
 
+# Requires precise stack scanning
+CORECLR_DISABLED_TEST_CS_SRC +=        \
+       $(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime2.cs
+
+# Depends on small array behavior of .net. Mono supports objects > 2Gb on 64bits and the following tests verify for that
+CORECLR_DISABLED_TEST_CS_SRC +=        \
+       $(CORECLR_PATH)/tests/src/JIT/Directed/newarr/newarr.cs \
+          $(CORECLR_PATH)/tests/src/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs
+
 CORECLR_TEST_IL_SRC =                  \
        $(CORECLR_PATH)/tests/src/JIT/BBT/Scenario4/Not-Int32.il        \
        $(CORECLR_PATH)/tests/src/JIT/Directed/Convert/implicitConv.il  \
@@ -4073,7 +4079,6 @@ CORECLR_TEST_IL_SRC =                     \
        $(CORECLR_PATH)/tests/src/JIT/Directed/array-il/simple3.il      \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/badendfinally.il       \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/badtailcall.il \
-       $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/byrefsubbyref1.il      \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/calli2.il      \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/ceeillegal.il  \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/ldelemnullarr2.il      \
@@ -4087,14 +4092,12 @@ CORECLR_TEST_IL_SRC =                   \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/volatilldind.il        \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/volatilstind.il        \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/arrgetlen.il   \
-       $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/lcliimpl.il    \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ldsshrstsfld.il        \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ldvirtftncalli.il      \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ovfldiv2.il    \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ovflrem2.il    \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/stfldstatic1.il        \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/stfldstatic2.il        \
-       $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/subbyref.il    \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly1.il  \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly2.il  \
        $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly3.il  \
@@ -5118,6 +5121,21 @@ CORECLR_DISABLED_TEST_IL_SRC +=                  \
        $(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28901/b28901.il      \
        $(CORECLR_PATH)/tests/src/JIT/Regression/clr-x64-JIT/v2.1/b173569/b173569.il
 
+
+# Bad test that tries an implicit cast from int32 to byref
+CORECLR_DISABLED_TEST_IL_SRC +=        \
+       $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/byrefsubbyref1.il
+
+# Bad test that tries to implicit cast from bytef to int32
+CORECLR_DISABLED_TEST_IL_SRC +=        \
+       $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/subbyref.il
+
+# Bad test that tries to assign a byref to a class to a byref of an interface that class implements
+# This is unsafe because the byref is mutable and would allow you to store the wrong type on that cell.
+CORECLR_DISABLED_TEST_IL_SRC +=        \
+       $(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/lcliimpl.il
+
+       
 # find all CoreCLR *.il test files that aren't mentioned in this file
 CORECLR_DEFINED_IL_SRC = $(CORECLR_TEST_IL_SRC) $(CORECLR_DISABLED_TEST_IL_SRC)
 CORECLR_UPSTREAM_IL_SRC=$(shell find "$(CORECLR_PATH)/tests" -iname "*.il")
index 4999b8f2b48121fe7b9b357f7c5f702edd9c3177..0930a431abaebcf0602fcbe87ccb18c85f26865b 100644 (file)
@@ -727,6 +727,178 @@ AC_ARG_ENABLE(system-aot, [  --enable-system-aot  Enable the Ahead-Of-Time compi
 
 DISABLED_FEATURES=none
 
+#
+# Set the build profiles and options before things which use them
+#
+
+AC_ARG_WITH(profile4_x,      [  --with-profile4=yes,no          If you want to install the 4.x FX (defaults to yes)],                 [], [with_profile4_x=default])
+AC_ARG_WITH(monodroid,       [  --with-monodroid=yes,no         If you want to build the MonoDroid assemblies (defaults to no)],      [], [with_monodroid=default])
+AC_ARG_WITH(monotouch,       [  --with-monotouch=yes,no         If you want to build the Xamarin.iOS assemblies (defaults to no)],    [], [with_monotouch=default])
+AC_ARG_WITH(monotouch_watch, [  --with-monotouch_watch=yes,no   If you want to build the Xamarin.WatchOS assemblies (defaults to no)],[], [with_monotouch_watch=default])
+AC_ARG_WITH(monotouch_tv,    [  --with-monotouch_tv=yes,no      If you want to build the Xamarin.TVOS assemblies (defaults to no)],   [], [with_monotouch_tv=default])
+AC_ARG_WITH(bitcode,         [  --with-bitcode=yes,no           If bitcode is enabled (defaults to no)],                              [], [with_bitcode=default])
+AC_ARG_WITH(xammac,          [  --with-xammac=yes,no            If you want to build the Xamarin.Mac assemblies (defaults to no)],    [], [with_xammac=default])
+AC_ARG_WITH(mobile_static,   [  --with-mobile_static=yes,no     If you want to build the mobile_static assemblies (defaults to no)],  [], [with_mobile_static=default])
+
+AC_ARG_WITH(runtime_preset, [  --with-runtime_preset=net_4_x,all,mobile_static,bitcode_mobile_static   Which default profile to build (defaults to net_4_x)],  [], [with_runtime_preset=net_4_x])
+
+dnl
+dnl Profile defaults
+dnl
+TEST_PROFILE=default
+enable_llvm_default=no
+
+if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
+   DISABLE_MCS_DOCS_default=yes
+   with_profile4_x_default=no
+   with_monodroid_default=no
+   with_monotouch_default=no
+   with_monotouch_watch_default=no
+   with_monotouch_tv_default=no
+   with_xammac_default=no
+   with_mobile_static_default=no
+   with_bitcode_default=no
+   with_cooperative_gc_default=no
+elif test x$with_runtime_preset = xnet_4_x; then
+   with_cooperative_gc_default=no
+   with_profile4_x_default=yes
+   with_monodroid_default=no
+   with_monotouch_default=no
+   with_monotouch_watch_default=no
+   with_monotouch_tv_default=no
+   with_xammac_default=no
+   with_mobile_static_default=no
+   with_bitcode_default=no
+elif test x$with_runtime_preset = xall; then
+   with_cooperative_gc_default=no
+   with_profile4_x_default=yes
+   with_monodroid_default=yes
+   with_monotouch_default=yes
+   with_monotouch_watch_default=yes
+   with_monotouch_tv_default=yes
+   with_xammac_default=yes
+   with_mobile_static_default=yes
+   with_bitcode_default=no
+elif test x$with_runtime_preset = xmobile_static; then
+   DISABLE_MCS_DOCS_default=yes
+   with_cooperative_gc_default=no
+   with_profile4_x_default=no
+   with_monodroid_default=no
+   with_monotouch_default=no
+   with_monotouch_watch_default=no
+   with_monotouch_tv_default=no
+   with_xammac_default=no
+   with_mobile_static_default=yes
+   with_bitcode_default=no
+   with_cooperative_gc_default=no
+   TEST_PROFILE=mobile_static 
+elif test x$with_runtime_preset = xbitcode_mobile_static; then
+   DISABLE_MCS_DOCS_default=yes
+   with_profile4_x_default=no
+   with_monodroid_default=no
+   with_monotouch_default=no
+   with_monotouch_watch_default=no
+   with_monotouch_tv_default=no
+   with_xammac_default=no
+   with_mobile_static_default=yes
+   with_bitcode_default=yes
+   with_cooperative_gc_default=yes
+   TEST_PROFILE=mobile_static 
+   enable_llvm_default=yes
+   MONO_LLVMONLY=yes
+else
+   with_profile4_x_default=yes
+   with_monodroid_default=no
+   with_monotouch_default=no
+   with_monotouch_watch_default=no
+   with_monotouch_tv_default=no
+   with_bitcode_default=no
+   with_xammac_default=no
+   with_mobile_static_default=no
+   with_cooperative_gc_default=no
+fi
+
+AC_SUBST(TEST_PROFILE)
+
+if test "x$with_profile4_x" = "xdefault"; then
+   with_profile4_x=$with_profile4_x_default
+fi
+if test "x$with_monodroid" = "xdefault"; then
+   with_monodroid=$with_monodroid_default
+fi
+if test "x$with_monotouch" = "xdefault"; then
+   with_monotouch=$with_monotouch_default
+fi
+if test "x$with_monotouch_watch" = "xdefault"; then
+   with_monotouch_watch=$with_monotouch_watch_default
+fi
+if test "x$with_monotouch_tv" = "xdefault"; then
+   with_monotouch_tv=$with_monotouch_tv_default
+fi
+if test "x$with_bitcode" = "xdefault"; then
+   with_bitcode=$with_bitcode_default
+fi
+if test "x$with_xammac" = "xdefault"; then
+   with_xammac=$with_xammac_default
+fi
+if test "x$with_mobile_static" = "xdefault"; then
+   with_mobile_static=$with_mobile_static_default
+fi
+
+AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"])
+AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
+AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
+AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"])
+AM_CONDITIONAL(INSTALL_MONOTOUCH_TV, [test "x$with_monotouch_tv" != "xno"])
+AM_CONDITIONAL(BITCODE, test "x$with_bitcode" = "xyes")
+AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
+AM_CONDITIONAL(INSTALL_MOBILE_STATIC, [test "x$with_mobile_static" != "xno"])
+
+AC_SUBST(MONO_LLVMONLY)
+
+AC_SUBST(BITCODE)
+
+default_profile=net_4_x
+if test -z "$INSTALL_MONODROID_TRUE"; then :
+   default_profile=monodroid
+fi
+if test -z "$INSTALL_MONOTOUCH_TRUE"; then :
+   default_profile=monotouch
+fi
+if test -z "$INSTALL_XAMMAC_TRUE"; then :
+   default_profile=xammac
+fi
+if test -z "$INSTALL_MOBILE_STATIC_TRUE"; then :
+   default_profile=mobile_static
+fi
+if test -z "$INSTALL_4_x_TRUE"; then :
+   default_profile=net_4_x
+fi
+DEFAULT_PROFILE=$default_profile
+AC_SUBST(DEFAULT_PROFILE)
+
+#
+# End build profile configuration
+#
+
+if test x$USE_NLS = xprofile_default; then
+
+if test x$host_darwin = xyes; then
+# We make the default value for USE_NLS
+# "no" on OSX because it isn't available on most
+# default OSX installs. The most common configurations will
+# all disable it, so this saves us typing.
+  USE_NLS=no
+  AC_SUBST([USE_NLS])
+  AC_MSG_RESULT([$USE_NLS])
+else
+  USE_NLS=yes
+  AC_SUBST([USE_NLS])
+  AC_MSG_RESULT([$USE_NLS])
+fi
+
+fi
+
 AC_ARG_ENABLE(minimal, [  --enable-minimal=LIST      drop support for LIST subsystems.
      LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, 
      reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters, remoting,
@@ -2577,13 +2749,17 @@ dnl **************
 dnl ***  LLVM  ***
 dnl **************
 
-AC_ARG_ENABLE(llvm,[  --enable-llvm    Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
+AC_ARG_ENABLE(llvm,[  --enable-llvm    Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=default)
 AC_ARG_ENABLE(loadedllvm,[  --enable-loadedllvm        Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no)
 AC_ARG_ENABLE(llvm-version-check,[  --enable-llvm-version-check Check that the LLVM matches the version expected by mono], enable_llvm_version_check=$enableval, enable_llvm_version_check=no)
 AC_ARG_ENABLE(llvm-runtime,[  --enable-llvm-runtime    Enable runtime support for llvmonly code], enable_llvm_runtime=$enableval, enable_llvm_runtime=no)
 
 AC_ARG_WITH(llvm, [  --with-llvm=<llvm prefix>    Enable the LLVM back-end], enable_llvm=yes,)
 
+if test "x$enable_llvm" = "xdefault"; then
+   enable_llvm=$enable_llvm_default
+fi
+
 if test "x$enable_llvm" = "xyes"; then
    if test "x$with_llvm" != "x"; then
          LLVM_CONFIG=$with_llvm/bin/llvm-config
@@ -3267,14 +3443,17 @@ AC_ARG_WITH(sgen-default-concurrent, [  --with-sgen-default-concurrent=yes,no
 if test x$buildsgen = xyes; then
    AC_DEFINE(HAVE_MOVING_COLLECTOR, 1, [Moving collector])
    SGEN_DEFINES="-DHAVE_SGEN_GC"
-   if test "x$gc_msg" = "x"; then
-      gc_msg="sgen"
-   else
-      gc_msg="sgen and $gc_msg"
-   fi
 
+       conc_gc_msg=""
    if test x$with_sgen_default_concurrent != xno; then
        AC_DEFINE(HAVE_CONC_GC_AS_DEFAULT, 1, [Defaults to concurrent GC])
+          conc_gc_msg=" (concurrent by default)"
+   fi
+
+   if test "x$gc_msg" = "x"; then
+      gc_msg="sgen$conc_gc_msg"
+   else
+      gc_msg="sgen$conc_gc_msg and $gc_msg"
    fi
 fi
 AC_SUBST(SGEN_DEFINES)
@@ -3561,15 +3740,6 @@ case "x$libgc" in
                ;;
 esac
 
-AC_ARG_WITH(profile4_x,      [  --with-profile4=yes,no          If you want to install the 4.6 FX (defaults to yes)],                 [], [with_profile4_x=yes])
-AC_ARG_WITH(monodroid,       [  --with-monodroid=yes,no         If you want to build the MonoDroid assemblies (defaults to no)],      [], [with_monodroid=no])
-AC_ARG_WITH(monotouch,       [  --with-monotouch=yes,no         If you want to build the Xamarin.iOS assemblies (defaults to no)],    [], [with_monotouch=no])
-AC_ARG_WITH(monotouch_watch, [  --with-monotouch_watch=yes,no   If you want to build the Xamarin.WatchOS assemblies (defaults to no)],[], [with_monotouch_watch=no])
-AC_ARG_WITH(monotouch_tv,    [  --with-monotouch_tv=yes,no      If you want to build the Xamarin.TVOS assemblies (defaults to no)],   [], [with_monotouch_tv=no])
-AC_ARG_WITH(bitcode,         [  --with-bitcode=yes,no           If bitcode is enabled (defaults to no)],                              [], [with_bitcode=no])
-AC_ARG_WITH(xammac,          [  --with-xammac=yes,no            If you want to build the Xamarin.Mac assemblies (defaults to no)],    [], [with_xammac=no])
-AC_ARG_WITH(mobile_static,   [  --with-mobile_static=yes,no     If you want to build the mobile_static assemblies (defaults to no)],  [], [with_mobile_static=no])
-
 MALLOC_MEMPOOLS=no
 AC_ARG_WITH(malloc_mempools,[  --with-malloc-mempools=yes,no  Use malloc for each single mempool allocation (only for runtime debugging, defaults to no)],[
        if test x$with_malloc_mempools = xyes; then
@@ -3579,15 +3749,18 @@ AC_ARG_WITH(malloc_mempools,[  --with-malloc-mempools=yes,no  Use malloc for eac
 ])
 
 
-DISABLE_MCS_DOCS=no
+DISABLE_MCS_DOCS=default
 AC_ARG_WITH(mcs_docs,[  --with-mcs-docs=yes,no         If you want to build the documentation under mcs (defaults to yes)],[
        if test x$with_mcs_docs != xyes; then
                DISABLE_MCS_DOCS=yes
        fi
 ])
-if test x$with_profile4_x != xyes; then
+if test -n "$INSTALL_4_x_TRUE"; then :
        DISABLE_MCS_DOCS=yes
 fi
+if test "x$DISABLE_MCS_DOCS" = "xdefault"; then
+   DISABLE_MCS_DOCS=$DISABLE_MCS_DOCS_default
+fi
 
 AC_ARG_WITH(lazy_gc_thread_creation, [  --with-lazy-gc-thread-creation=yes|no      Enable lazy runtime thread creation, embedding host must do it explicitly (defaults to no)],[
        if test x$with_lazy_gc_thread_creation != xno ; then
@@ -3595,11 +3768,15 @@ AC_ARG_WITH(lazy_gc_thread_creation, [  --with-lazy-gc-thread-creation=yes|no
        fi
 ], [with_lazy_gc_thread_creation=no])
 
-AC_ARG_WITH(cooperative_gc, [  --with-cooperative-gc=yes|no      Enable cooperative stop-the-world garbage collection (sgen only) (defaults to no)],[
-       if test x$with_cooperative_gc != xno ; then
-               AC_DEFINE(USE_COOP_GC,1,[Enable cooperative stop-the-world garbage collection.])
-       fi
-], [with_cooperative_gc=no])
+AC_ARG_WITH(cooperative_gc, [  --with-cooperative-gc=yes|no      Enable cooperative stop-the-world garbage collection (sgen only) (defaults to no)], [], [with_cooperative_gc=default])
+
+if test x$with_cooperative_gc = xdefault; then
+       with_cooperative_gc=$with_cooperative_gc_default
+fi
+
+if test x$with_cooperative_gc != xno; then
+       AC_DEFINE(USE_COOP_GC,1,[Enable cooperative stop-the-world garbage collection.])
+fi
 
 AM_CONDITIONAL([ENABLE_COOP], [test x$with_cooperative_gc != xno])
 
@@ -3657,20 +3834,6 @@ else
 fi
 AC_SUBST(LIBMONO_LA)
 
-dnl
-dnl Consistency settings
-dnl
-if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
-   DISABLE_MCS_DOCS=yes
-   with_profile4_x=no
-   with_monodroid=no
-   with_monotouch=no
-   with_monotouch_watch=no
-   with_monotouch_tv=no
-   with_xammac=no
-   with_mobile_static=no
-fi
-
 if test x$DISABLE_MCS_DOCS = xyes; then
    docs_dir=""
 else
@@ -3683,15 +3846,6 @@ AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_bui
 
 libmono_ldflags="$libmono_ldflags $LIBS"
 
-AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = xyes])
-AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
-AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
-AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"])
-AM_CONDITIONAL(INSTALL_MONOTOUCH_TV, [test "x$with_monotouch_tv" != "xno"])
-AM_CONDITIONAL(BITCODE, test "x$with_bitcode" = "xyes")
-AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
-AM_CONDITIONAL(INSTALL_MOBILE_STATIC, [test "x$with_mobile_static" != "xno"])
-
 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
@@ -3746,22 +3900,6 @@ else
 fi
 AC_SUBST(mono_cfg_dir)
 
-default_profile=net_4_x
-if test -z "$INSTALL_MONODROID_TRUE"; then :
-   default_profile=monodroid
-fi
-if test -z "$INSTALL_MONOTOUCH_TRUE"; then :
-   default_profile=monotouch
-fi
-if test -z "$INSTALL_XAMMAC_TRUE"; then :
-   default_profile=xammac
-fi
-if test -z "$INSTALL_4_x_TRUE"; then :
-   default_profile=net_4_x
-fi
-DEFAULT_PROFILE=$default_profile
-AC_SUBST(DEFAULT_PROFILE)
-
 AC_CONFIG_FILES([po/mcs/Makefile.in])
 
 AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
@@ -3995,6 +4133,7 @@ tools/Makefile
 tools/locale-builder/Makefile
 tools/sgen/Makefile
 tools/monograph/Makefile
+tools/pedump/Makefile
 runtime/Makefile
 msvc/Makefile
 po/Makefile
@@ -4087,6 +4226,10 @@ fi
       echo "BCL_OPTIMIZE = 1" >> $srcdir/$mcsdir/build/config.make
     fi
 
+    if test "x$MONO_LLVMONLY" = "xyes" ; then
+      echo "MONO_LLVMONLY = 1" >> $srcdir/$mcsdir/build/config.make
+    fi
+
   fi
 
 )
@@ -4108,7 +4251,7 @@ echo "
        LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
 
    Libraries:
-       .NET 4.6:        $with_profile4_x
+       .NET 4.x:        $with_profile4_x
        Xamarin.Android: $with_monodroid
        Xamarin.iOS:     $with_monotouch
        Xamarin.WatchOS: $with_monotouch_watch
index 7622701ef455e81d8ce977db10503d84da267ba9..dbca788afd663e33dc4df87132a14061c4c8d4b2 100644 (file)
@@ -138,6 +138,15 @@ AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
 AC_CHECK_FUNCS(getrlimit)
 AC_CHECK_FUNCS(fork execv execve)
 
+AC_ARG_WITH([overridable-allocators], [  --with-overridable-allocators allow g_*alloc/g_free to call custom allocators set via g_mem_set_vtable])
+
+if test x$with_overridable_allocators == xyes; then
+       AC_DEFINE(ENABLE_OVERRIDABLE_ALLOCATORS,1,[Overridable allocator support enabled])
+  AC_MSG_NOTICE([Overridable allocator support enabled])
+else
+  AC_MSG_NOTICE([Overridable allocator support disabled])
+fi
+
 #
 # Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
 # the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be
@@ -151,7 +160,7 @@ elif test x$target_ios = xno; then
 AC_CHECK_FUNCS(strndup getpwuid_r)
 fi
 
-AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno )
+AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators == xyes)
 AM_ICONV()
 AC_SEARCH_LIBS(sqrtf, m)
 
index 31771dfd9a19dab5f0af901207d869f5160264b2..1527ba26d30452bb70aa7403d6cbc1281ad5ec78 100644 (file)
@@ -11,14 +11,6 @@ unix_files = \
        gdate-unix.c  gdir-unix.c  gfile-unix.c  gmisc-unix.c   \
        gmodule-unix.c gtimer-unix.c
 
-# some unices and windows do not have an implementation of vasprintf
-# used by eglib, use provided implementation instead
-if NEED_VASPRINTF
-vasprintf_files = vasprintf.c
-else
-vaprinttf_files = foo.c
-endif
-
 if HOST_WIN32
 os_files = $(win_files)
 else
@@ -32,7 +24,6 @@ libeglib_la_SOURCES = \
        garray.c        \
        gbytearray.c    \
        gerror.c        \
-       vasprintf.h     \
        ghashtable.c    \
        giconv.c        \
        gmem.c          \
@@ -55,8 +46,7 @@ libeglib_la_SOURCES = \
        gutf8.c         \
        gunicode.c      \
        unicode-data.h  \
-       $(os_files)     \
-       $(vasprintf_files)
+       $(os_files)
 
 libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
 
index 2ec089c9956c1053c96bd0b8ea441d2881d54800..43fef97cc434c1a67daa1df2c8e5a8b98f97b439 100644 (file)
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
+#include <config.h>
 #include <glib.h>
-
-#include "vasprintf.h"
-
 GError *
 g_error_new (gpointer domain, gint code, const char *format, ...)
 {
@@ -42,7 +40,7 @@ g_error_new (gpointer domain, gint code, const char *format, ...)
        err->code = code;
 
        va_start (args, format);
-       if (vasprintf (&err->message, format, args) == -1)
+       if (g_vasprintf (&err->message, format, args) == -1)
                err->message = g_strdup_printf ("internal: invalid format string %s", format); 
        va_end (args);
 
@@ -57,7 +55,7 @@ g_error_vnew (gpointer domain, gint code, const char *format, va_list ap)
        err->domain = domain;
        err->code = code;
 
-       if (vasprintf (&err->message, format, ap) == -1)
+       if (g_vasprintf (&err->message, format, ap) == -1)
                err->message = g_strdup_printf ("internal: invalid format string %s", format); 
 
        return err;
@@ -77,7 +75,7 @@ g_error_free (GError *error)
 {
        g_return_if_fail (error != NULL);
        
-       free (error->message);
+       g_free (error->message);
        g_free (error);
 }
 
index 72770b2f44fab3fae7b0a5312b83d802df98524e..23781c168526edd95498a3260697cbd76af23ff6 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef __GLIB_H
 #define __GLIB_H
-
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
@@ -9,6 +8,7 @@
 #include <ctype.h>
 #include <limits.h>
 
+
 #ifdef _MSC_VER
 #pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
 #endif
@@ -126,6 +126,7 @@ void g_free (void *ptr);
 gpointer g_realloc (gpointer obj, gsize size);
 gpointer g_malloc (gsize x);
 gpointer g_malloc0 (gsize x);
+gpointer g_calloc (gsize n, gsize x);
 gpointer g_try_malloc (gsize x);
 gpointer g_try_realloc (gpointer obj, gsize size);
 
@@ -138,7 +139,7 @@ gpointer g_try_realloc (gpointer obj, gsize size);
 #define g_alloca(size)         alloca (size)
 
 gpointer g_memdup (gconstpointer mem, guint byte_size);
-static inline gchar   *g_strdup (const gchar *str) { if (str) {return strdup (str);} return NULL; }
+static inline gchar   *g_strdup (const gchar *str) { if (str) { return (gchar*) g_memdup (str, (guint)strlen (str) + 1); } return NULL; }
 gchar **g_strdupv (gchar **str_array);
 
 typedef struct {
@@ -146,11 +147,9 @@ typedef struct {
        gpointer (*realloc)     (gpointer mem, gsize n_bytes);
        void     (*free)        (gpointer mem);
        gpointer (*calloc)      (gsize    n_blocks, gsize n_block_bytes);
-       gpointer (*try_malloc)  (gsize    n_bytes);
-       gpointer (*try_realloc) (gpointer mem, gsize n_bytes);
 } GMemVTable;
 
-#define g_mem_set_vtable(x)
+void g_mem_set_vtable (GMemVTable* vtable);
 
 struct _GMemChunk {
        guint alloc_size;
@@ -223,11 +222,11 @@ gint         g_printf          (gchar const *format, ...);
 gint         g_fprintf         (FILE *file, gchar const *format, ...);
 gint         g_sprintf         (gchar *string, gchar const *format, ...);
 gint         g_snprintf        (gchar *string, gulong n, gchar const *format, ...);
+gint         g_vasprintf       (gchar **ret, const gchar *fmt, va_list ap);
 #define g_vprintf vprintf
 #define g_vfprintf vfprintf
 #define g_vsprintf vsprintf
 #define g_vsnprintf vsnprintf
-#define g_vasprintf vasprintf
 
 gsize   g_strlcpy            (gchar *dest, const gchar *src, gsize dest_size);
 gchar  *g_stpcpy             (gchar *dest, const char *src);
@@ -772,6 +771,8 @@ const gchar *g_get_user_name   (void);
 gchar *g_get_prgname           (void);
 void  g_set_prgname            (const gchar *prgname);
 
+gboolean g_ensure_directory_exists (const gchar *filename);
+
 /*
  * Shell
  */
index 6a0b246a957bb00a0f814f03948eea3d107e969a..4e6c6641fef542ac4fb758a51d27281baf556340 100644 (file)
@@ -367,7 +367,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
                                if (context->parser.end_element != NULL &&  context->state == START_ELEMENT){
                                        context->parser.end_element (context, ename, context->user_data, error);
                                        if (error != NULL && *error != NULL){
-                                               free (ename);
+                                               g_free (ename);
                                                goto fail;
                                        }
                                }
index 565239d1cb81a476030b895e2326d5614441b6b5..eff478dcbfad01f9ee41cc709a90342a6b3d2550 100644 (file)
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
+#include <config.h>
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
 
+#if defined (ENABLE_OVERRIDABLE_ALLOCATORS)
+
+static GMemVTable sGMemVTable = { malloc, realloc, free, calloc };
+
+void
+g_mem_set_vtable (GMemVTable* vtable)
+{
+       sGMemVTable.calloc = vtable->calloc ? vtable->calloc : calloc;
+       sGMemVTable.realloc = vtable->realloc ? vtable->realloc : realloc;
+       sGMemVTable.malloc = vtable->malloc ? vtable->malloc : malloc;
+       sGMemVTable.free = vtable->free ? vtable->free : free;
+}
+
+#define G_FREE_INTERNAL sGMemVTable.free
+#define G_REALLOC_INTERNAL sGMemVTable.realloc
+#define G_CALLOC_INTERNAL sGMemVTable.calloc
+#define G_MALLOC_INTERNAL sGMemVTable.malloc
+#else
+
+void
+g_mem_set_vtable (GMemVTable* vtable)
+{
+}
+
+#define G_FREE_INTERNAL free
+#define G_REALLOC_INTERNAL realloc
+#define G_CALLOC_INTERNAL calloc
+#define G_MALLOC_INTERNAL malloc
+#endif
 void
 g_free (void *ptr)
 {
        if (ptr != NULL)
-               free (ptr);
+               G_FREE_INTERNAL (ptr);
 }
 
 gpointer
@@ -58,7 +88,7 @@ gpointer g_realloc (gpointer obj, gsize size)
                g_free (obj);
                return 0;
        }
-       ptr = realloc (obj, size);
+       ptr = G_REALLOC_INTERNAL (obj, size);
        if (ptr)
                return ptr;
        g_error ("Could not allocate %i bytes", size);
@@ -70,27 +100,31 @@ g_malloc (gsize x)
        gpointer ptr;
        if (!x)
                return 0;
-       ptr = malloc (x);
+       ptr = G_MALLOC_INTERNAL (x);
        if (ptr) 
                return ptr;
        g_error ("Could not allocate %i bytes", x);
 }
 
+gpointer g_calloc (gsize n, gsize x)
+{
+       gpointer ptr;
+       if (!x || !n)
+               return 0;
+               ptr = G_CALLOC_INTERNAL (n, x);
+       if (ptr)
+               return ptr;
+       g_error ("Could not allocate %i (%i * %i) bytes", x*n, n, x);
+}
 gpointer g_malloc0 (gsize x) 
 { 
-       gpointer ptr; 
-       if (!x) 
-               return 0; 
-       ptr = calloc(1,x); 
-       if (ptr) 
-               return ptr; 
-       g_error ("Could not allocate %i bytes", x);
+       return g_calloc (1,x);
 }
 
 gpointer g_try_malloc (gsize x) 
 {
        if (x)
-               return malloc (x);
+               return G_MALLOC_INTERNAL (x);
        return 0;
 }
 
@@ -98,8 +132,8 @@ gpointer g_try_malloc (gsize x)
 gpointer g_try_realloc (gpointer obj, gsize size)
 { 
        if (!size) {
-               g_free (obj);
+               G_FREE_INTERNAL (obj);
                return 0;
        } 
-       return realloc (obj, size);
+       return G_REALLOC_INTERNAL (obj, size);
 }
index f89f37c22049a780451ff55dcb4d3369ce8d1d10..625fd15a84fa1b81026b732836f9610d10c588ad 100644 (file)
@@ -92,7 +92,7 @@ g_win32_getlocale(void)
        gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
        buf[ccBuf - 1] = '-';
        ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
-       return strdup(buf);
+       return g_strdup (buf);
 }
 
 gboolean
@@ -128,6 +128,9 @@ g_get_home_dir (void)
                }
        }
 
+       g_free (drive);
+       g_free (path);
+
        return home_dir;
 }
 
index 779ca96fd217b697b37de49e4fe927d7adc9f478..ef80cff034748e559dea3055bc3bfb175dc3eb76 100644 (file)
@@ -31,8 +31,6 @@
 #include <stdlib.h>
 #include <glib.h>
 
-#include "vasprintf.h"
-
 /* The current fatal levels, error is always fatal */
 static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR;
 static GLogFunc default_log_func;
@@ -49,7 +47,7 @@ g_print (const gchar *format, ...)
        va_list args;
 
        va_start (args, format);
-       if (vasprintf (&msg, format, args) < 0)
+       if (g_vasprintf (&msg, format, args) < 0)
                return;
        va_end (args);
 
@@ -57,7 +55,7 @@ g_print (const gchar *format, ...)
                stdout_handler = default_stdout_handler;
 
        stdout_handler (msg);
-       free (msg);
+       g_free (msg);
 }
 
 void
@@ -67,7 +65,7 @@ g_printerr (const gchar *format, ...)
        va_list args;
 
        va_start (args, format);
-       if (vasprintf (&msg, format, args) < 0)
+       if (g_vasprintf (&msg, format, args) < 0)
                return;
        va_end (args);
 
@@ -75,7 +73,7 @@ g_printerr (const gchar *format, ...)
                stderr_handler = default_stderr_handler;
 
        stderr_handler (msg);
-       free (msg);
+       g_free (msg);
 }
 
 GLogLevelFlags
@@ -107,11 +105,11 @@ g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format,
        if (!default_log_func)
                default_log_func = g_log_default_handler;
        
-       if (vasprintf (&msg, format, args) < 0)
+       if (g_vasprintf (&msg, format, args) < 0)
                return;
 
        default_log_func (log_domain, log_level, msg, default_log_func_user_data);
-       free (msg);
+       g_free (msg);
 }
 
 void
index 5302f427925453496b43d0b4babb88daacbd9bf1..59f5923125bffef92db3ff085e4d4ac12773cbd6 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <glib.h>
 #include <errno.h>
+#include <sys/stat.h>
 
 #ifdef G_OS_WIN32
 #include <direct.h> 
@@ -294,3 +295,95 @@ g_get_prgname (void)
 {
        return name;
 }
+
+gboolean
+g_ensure_directory_exists (const gchar *filename)
+{
+#ifdef G_OS_WIN32
+       gchar *dir_utf8 = g_path_get_dirname (filename);
+       gunichar2 *p;
+       gunichar2 *dir_utf16 = NULL;
+       int retval;
+       
+       if (!dir_utf8 || !dir_utf8 [0])
+               return FALSE;
+
+       dir_utf16 = g_utf8_to_utf16 (dir_utf8, strlen (dir_utf8), NULL, NULL, NULL);
+       g_free (dir_utf8);
+
+       if (!dir_utf16)
+               return FALSE;
+
+       p = dir_utf16;
+
+       /* make life easy and only use one directory seperator */
+       while (*p != '\0')
+       {
+               if (*p == '/')
+                       *p = '\\';
+               p++;
+       }
+
+       p = dir_utf16;
+
+       /* get past C:\ )*/
+       while (*p++ != '\\')    
+       {
+       }
+
+       while (1) {
+               gboolean bRet = FALSE;
+               p = wcschr (p, '\\');
+               if (p)
+                       *p = '\0';
+               retval = _wmkdir (dir_utf16);
+               if (retval != 0 && errno != EEXIST) {
+                       g_free (dir_utf16);
+                       return FALSE;
+               }
+               if (!p)
+                       break;
+               *p++ = '\\';
+       }
+       
+       g_free (dir_utf16);
+       return TRUE;
+#else
+       char *p;
+       gchar *dir = g_path_get_dirname (filename);
+       int retval;
+       struct stat sbuf;
+       
+       if (!dir || !dir [0]) {
+               g_free (dir);
+               return FALSE;
+       }
+       
+       if (stat (dir, &sbuf) == 0 && S_ISDIR (sbuf.st_mode)) {
+               g_free (dir);
+               return TRUE;
+       }
+       
+       p = dir;
+       while (*p == '/')
+               p++;
+
+       while (1) {
+               p = strchr (p, '/');
+               if (p)
+                       *p = '\0';
+               retval = mkdir (dir, 0777);
+               if (retval != 0 && errno != EEXIST) {
+                       g_free (dir);
+                       return FALSE;
+               }
+               if (!p)
+                       break;
+               *p++ = '/';
+       }
+       
+       g_free (dir);
+       return TRUE;
+#endif
+}
+
index 3e976c5a2edfe3019a294daad9f45d355f7da250..8b64da572f69967e7c17f459cafcf2beb2b8e55c 100644 (file)
 #include <ctype.h>
 #include <glib.h>
 
-#include "vasprintf.h"
+/* 
+ * g_strndup and g_vasprintf need to allocate memory with g_malloc if 
+ * ENABLE_OVERRIDABLE_ALLOCATORS is defined so that it can be safely freed with g_free 
+ * rather than free.
+ */
 
 /* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */
 gchar *
 g_strndup (const gchar *str, gsize n)
 {
-#ifdef HAVE_STRNDUP
+#if defined (HAVE_STRNDUP) && !defined (ENABLE_OVERRIDABLE_ALLOCATORS)
        return strndup (str, n);
 #else
        if (str) {
@@ -52,6 +56,37 @@ g_strndup (const gchar *str, gsize n)
 #endif
 }
 
+gint g_vasprintf (gchar **ret, const gchar *fmt, va_list ap)
+{
+#if defined (HAVE_VASPRINTF) && !defined (ENABLE_OVERRIDABLE_ALLOCATORS)
+  return vasprintf (ret, fmt, ap);
+#else
+       char *buf;
+       int len;
+       size_t buflen;
+       va_list ap2;
+       
+#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
+       ap2 = ap;
+       len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
+#else
+       va_copy(ap2, ap);
+       len = vsnprintf(NULL, 0, fmt, ap2);
+#endif
+
+       if (len >= 0 && (buf = g_malloc ((buflen = (size_t) (len + 1)))) != NULL) {
+               len = vsnprintf(buf, buflen, fmt, ap);
+               *ret = buf;
+       } else {
+               *ret = NULL;
+               len = -1;
+       }
+
+       va_end(ap2);
+       return len;
+#endif
+}
+
 void
 g_strfreev (gchar **str_array)
 {
@@ -133,7 +168,7 @@ g_strdup_vprintf (const gchar *format, va_list args)
        int n;
        char *ret;
        
-       n = vasprintf (&ret, format, args);
+       n = g_vasprintf (&ret, format, args);
        if (n == -1)
                return NULL;
 
@@ -148,7 +183,7 @@ g_strdup_printf (const gchar *format, ...)
        int n;
 
        va_start (args, format);
-       n = vasprintf (&ret, format, args);
+       n = g_vasprintf (&ret, format, args);
        va_end (args);
        if (n == -1)
                return NULL;
diff --git a/eglib/src/vasprintf.c b/eglib/src/vasprintf.c
deleted file mode 100644 (file)
index 3c21ca4..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int vasprintf(char **ret, const char *fmt, va_list ap)
-{
-       char *buf;
-       int len;
-       size_t buflen;
-       va_list ap2;
-       
-#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
-       ap2 = ap;
-       len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
-#else
-       va_copy(ap2, ap);
-       len = vsnprintf(NULL, 0, fmt, ap2);
-#endif
-       
-       if (len >= 0 && (buf = malloc ((buflen = (size_t) (len + 1)))) != NULL) {
-               len = vsnprintf(buf, buflen, fmt, ap);
-               *ret = buf;
-       } else {
-               *ret = NULL;
-               len = -1;
-       }
-       
-       va_end(ap2);
-       return len;
-}
-
diff --git a/eglib/src/vasprintf.h b/eglib/src/vasprintf.h
deleted file mode 100644 (file)
index 3d29454..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __VASPRINTF_H
-#define __VASPRINTF_H
-
-#include <stdarg.h>
-#include <config.h>
-
-#ifndef HAVE_VASPRINTF
-int vasprintf(char **ret, const char *fmt, va_list ap);
-#endif
-
-#endif /* __VASPRINTF_H */
index 6dd7bf47469a891c8ca708bf157b99f04936fd02..7c870e9c7665a3a074cf4763ca3ed33271b90716 100644 (file)
 #include "test.h"
 
 extern gint global_passed, global_tests;
-
-#ifndef HAVE_VASPRINTF
-  /* systen does not provide a vasprintf function, use the one
-     provided within eglib itself */
-extern int vasprintf(char **ret, const char *format, va_list ap);
-#endif
-
 static gchar *last_result = NULL;
 
 gboolean 
@@ -183,7 +176,7 @@ FAILED(const gchar *format, ...)
        return NULL;
 #else
        va_start(args, format);
-       n = vasprintf(&ret, format, args);
+       n = g_vasprintf(&ret, format, args);
        va_end(args);
 
        if(n == -1) {
diff --git a/external/buildtools b/external/buildtools
new file mode 160000 (submodule)
index 0000000..a446ae4
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit a446ae466ce729b6732133f9b359590ae12030e6
index 163b37483c08b5310c4e3d4c2e22a1ed59b1e6e0..9f44f259bf5059df6c8019948ea75313bd09a9fb 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 163b37483c08b5310c4e3d4c2e22a1ed59b1e6e0
+Subproject commit 9f44f259bf5059df6c8019948ea75313bd09a9fb
diff --git a/external/nuget-buildtasks b/external/nuget-buildtasks
new file mode 160000 (submodule)
index 0000000..04bdab5
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 04bdab55d8de9edcf628694cfd2001561e8f8e60
index 003704c4b93b51bf11bd430c4344be47b63cb856..93e89ee4632b0b9bc9e0e00266787603cb8d191e 100644 (file)
--- a/m4/nls.m4
+++ b/m4/nls.m4
@@ -26,7 +26,7 @@ AC_DEFUN([AM_NLS],
   dnl Default is enabled NLS
   AC_ARG_ENABLE([nls],
     [  --disable-nls           do not use Native Language Support],
-    USE_NLS=$enableval, USE_NLS=yes)
+    USE_NLS=$enableval, USE_NLS=profile_default)
   AC_MSG_RESULT([$USE_NLS])
   AC_SUBST([USE_NLS])
 ])
index e2eff1620e7697a20a9d28a36db3a4e0eaf6479d..81f5ae9838987a1805e1d9bcb175bc758af330e0 100644 (file)
@@ -142,10 +142,10 @@ instead of going through the operating system symbol lookup operation.
 .I llvm-path=<PREFIX>
 Same for the llvm tools 'opt' and 'llc'.
 .TP
-.I gen-seq-points-file=FILE.msym
+.I msym-dir=<PATH>
 Instructs the AOT compiler to generate offline sequence points .msym files.
-The path is optional, if none is passed then a .msym file will be generated
-next to the input assembly.
+The generated .msym files will be stored into a subfolder of <PATH> named as the
+compilation AOTID.
 .TP
 .I mtriple=<TRIPLE>
 Use the GNU style target triple <TRIPLE> to determine some code generation options, i.e.
@@ -1652,11 +1652,11 @@ Automatically generates sequence points where the
 IL stack is empty.  These are places where the debugger can set a
 breakpoint.
 .TP
-\fBgen-compact-seq-points\fR
-This option generates sequence points data that maps native offsets to
-IL offsets. Sequence point data is used to display IL offset in
-stacktraces. Stacktraces with IL offsets can be symbolicated using
-mono-symbolicate tool.
+\fBno-compact-seq-points\fR
+Unless the option is used, the runtime generates sequence points data that
+maps native offsets to IL offsets. Sequence point data is used to
+display IL offset in stacktraces. Stacktraces with IL offsets can be
+symbolicated using mono-symbolicate tool.
 .TP
 \fBhandle-sigint\fR
 Captures the interrupt signal (Control-C) and displays a stack trace
@@ -1732,6 +1732,16 @@ messages for a certain component. You can use multiple masks by comma
 separating them. For example to see config file messages and assembly loader
 messages set you mask to "asm,cfg".
 .TP
+\fBMONO_LOG_DEST\fR
+Controls where trace log messages are written. If not set then the messages go to stdout. 
+If set, the string either specifies a path to a file that will have messages appended to
+it, or the string "syslog" in which case the messages will be written to the system log.
+Under Windows, this is simulated by writing to a file called "mono.log". 
+\fBMONO_LOG_HEADER\fR
+Controls whether trace log messages not directed to syslog have the id, timestamp, and
+pid as the prefix to the log message. To enable a header this environment variable need
+just be non-null. 
+.TP
 \fBMONO_TRACE\fR
 Used for runtime tracing of method calls. The format of the comma separated
 trace options is:
index 1e1ace7d7b136e1ffce23cc783a72f27476f499d..f5b95a5a32e011e5a092d80d945a1136cbf634ff 100644 (file)
@@ -15,8 +15,6 @@ build system needs to let us do, specifically:
 
 
 
-
-
 ** Makefile structure
 
 A general makefile looks like this:
@@ -438,7 +436,15 @@ To give it flags, set $(LOCAL_CFLAGS). As with compiling C#, the
 variable $(CFLAGS) will automatically be included on the command line.
 
 
+* Compiling resources with resgen
+
+If you have a resource that should be compiled with resgen and
+included in your assembly, you can use the RESOURCES_DEFS variable.
+This variable can contain lists of pairs that are separated by comma
+to represent the resource ID as embedded in the assembly followed by
+the file name, like this:
 
+RESOURCE_DEFS = Messages,TextResources.resx Errors,ErrorList.txt
 
 
 * Documentation-related needs? Use $(MDOC)
index d4b57e0c7725798f60c67c31ee1cefb4795a3716..afcad223f8e969f9261f2d7c631a2b624beefbc7 100644 (file)
@@ -173,6 +173,7 @@ csproj-local:
        echo $(build_lib); \
        echo $(FRAMEWORK_VERSION); \
        echo $(PROFILE); \
+       echo $(RESOURCE_DEFS); \
        echo $(response)) > $(topdir)/../msvc/scripts/inputs/$$config_file
 
 
index f9b197cda5815edc9a995933616c50e640feba87..e0c16f48e90558609352e080ed67c54f4e64b43e 100644 (file)
@@ -145,6 +145,7 @@ csproj-library:
        echo $(build_lib); \
        echo $(FRAMEWORK_VERSION); \
        echo $(PROFILE); \
+       echo $(RESOURCE_DEFS); \
        echo $(response)) > $(topdir)/../msvc/scripts/inputs/$$config_file
 
 csproj-test:
@@ -216,7 +217,28 @@ clean-local:
 test-local run-test-local run-test-ondotnet-local:
        @:
 
-DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES)
+#
+# RESOURCES_DEFS is a list of ID,FILE pairs separated by spaces
+# for each of those, generate a rule that produces ID.resource from
+# FILE using the resgen tool, adds the generated file to CLENA_FILES and
+# passes the resource to the compiler
+#
+ccomma = ,
+define RESOURCE_template
+$(1).resources: $(2)
+       $(RESGEN) "$$<" "$$@"
+
+GEN_RESOURCE_DEPS += $(1).resources
+GEN_RESOURCE_FLAGS += -resource:$(1).resources
+CLEAN_FILES += $(1).resources
+DIST_LISTED_RESOURCES += $(2)
+endef
+
+ifdef RESOURCE_DEFS
+$(foreach pair,$(RESOURCE_DEFS), $(eval $(call RESOURCE_template,$(word 1, $(subst $(ccomma), ,$(pair))), $(word 2, $(subst $(ccomma), ,$(pair))))))
+endif
+
+DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES) $(DIST_LISTED_RESOURCES)
 
 ASSEMBLY      = $(LIBRARY)
 ASSEMBLY_EXT  = .dll
@@ -236,6 +258,7 @@ csproj-test:
        echo $(test_lib); \
        echo $(FRAMEWORK_VERSION); \
        echo $(PROFILE); \
+       echo ""; \
        echo $(test_response)) > $(topdir)/../msvc/scripts/inputs/$$config_file
 
 endif
@@ -275,8 +298,8 @@ endif
 
 $(the_lib): $(the_libdir)/.stamp
 
-$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp)
-       $(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
+$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp) $(GEN_RESOURCE_DEPS)
+       $(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(GEN_RESOURCE_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
 ifdef RESOURCE_STRINGS_FILES
        $(Q) $(STRING_REPLACER) $(RESOURCE_STRINGS_FILES) $@
 endif
index 563253738a2bfb1d1368cba6eb1a9823154dd39a..b48617d66fabed49adcbffeccc0e89549afd6a8e 100644 (file)
@@ -18,7 +18,7 @@ endif
 
 MCS = $(with_mono_path) $(INTERNAL_GMCS)
 
-PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -d:DISABLE_CAS_USE -lib:$(topdir)/class/lib/$(PROFILE)
+PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -lib:$(topdir)/class/lib/$(PROFILE)
 NO_SIGN_ASSEMBLY = yes
 NO_TEST = yes
 NO_INSTALL = yes
index 3b4c7e0706e4fb4862fc5eaf17fffb0d805e6c65..1acf54c1e2e5027f0bc25758b5704ccb74983044 100644 (file)
@@ -13,7 +13,7 @@ profile-check:
        @:
 
 DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
-PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
+PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
 
 NO_SIGN_ASSEMBLY = yes
 NO_TEST = yes
index 70908afa4e194fa55f910c259b89c231f11eebfd..e531f44a4b55b581ff562313c61af33b8d721a8e 100644 (file)
@@ -23,7 +23,7 @@ PROFILE_MCS_FLAGS = \
        -d:NET_4_0 \
        -d:NET_4_5 \
        -d:MONO \
-       -d:DISABLE_CAS_USE \
+       -d:NETSTANDARD \
        -nowarn:1699 \
        -nostdlib \
        $(DEFAULT_REFERENCES) \
index f13e65d83ccb7bdfadde12ab9a255ee7001898aa..5663124343ac69dca38e1601b358c6ae24f01eec 100644 (file)
@@ -21,7 +21,7 @@ PROFILE_MCS_FLAGS = \
        -d:NET_4_0 \
        -d:NET_4_5 \
        -d:MONO \
-       -d:DISABLE_CAS_USE \
+       -d:NETSTANDARD \
        -d:MOBILE,MOBILE_STATIC,MOBILE_LEGACY \
        -d:FULL_AOT_RUNTIME \
        -d:DISABLE_REMOTING \
@@ -41,7 +41,7 @@ MOBILE_PROFILE = yes
 NO_VTS_TEST = yes
 
 # Note need for trailing comma. If you add, keep it
-PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,
+PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,PKITS,
 
 ifndef MONO_DISABLE_GSHAREDVT
 GSHAREDVT_FLAG = -O=gsharedvt
index 9ea27d6c9c7f866de0d850093cad9056a9301ab9..65919907c270b35fefe7bcbc6ba24b2212895b57 100644 (file)
@@ -21,11 +21,11 @@ PROFILE_MCS_FLAGS = \
        -d:NET_4_0 \
        -d:NET_4_5 \
        -d:MONO \
-       -d:DISABLE_CAS_USE \
        -d:MOBILE,MOBILE_LEGACY \
        -d:MOBILE_DYNAMIC \
        -d:MONODROID \
        -d:ANDROID \
+       -d:NETSTANDARD \
        -nowarn:1699 \
        -nostdlib \
        $(DEFAULT_REFERENCES) \
index f127fd7d19043fc3f7a79656697477b03a109cfa..e4370cf4f985b188dc80ed333347e114bf4e24c1 100644 (file)
@@ -23,11 +23,11 @@ PROFILE_MCS_FLAGS = \
        -d:NET_4_5 \
        -d:MOBILE,MOBILE_LEGACY \
        -d:MONO \
-       -d:DISABLE_CAS_USE \
        -d:MONOTOUCH \
        -d:DISABLE_REMOTING \
        -d:DISABLE_COM \
        -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
+       -d:NETSTANDARD \
        -nowarn:1699 \
        -nostdlib \
        $(DEFAULT_REFERENCES) \
index a93b03b7f6b4fffa902356cac8ca5e2728aa2400..00d5bc12ee4106f9720266bffa7101b3edf44f76 100644 (file)
@@ -11,7 +11,7 @@ profile-check:
        @:
 
 DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
-PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE  -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
+PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO  -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
 
 FRAMEWORK_VERSION = 4.5
 XBUILD_VERSION = 4.0
index d3cbdb5d972e886f246edaf9ffef7269086697e5..14ffacaa7ab7817cbc2ecf1b6ee7c128129b34ea 100644 (file)
@@ -19,7 +19,6 @@ PROFILE_MCS_FLAGS = \
        -d:NET_4_0 \
        -d:NET_4_5 \
        -d:MONO \
-       -d:DISABLE_CAS_USE  \
        -d:MOBILE \
        -d:MOBILE_DYNAMIC \
        -d:XAMMAC \
index a0b681071ddb49c38d4c62d9ed349c669e4391d8..f8a39cb48f00059e54c08e1a71e27d638ad423dd 100644 (file)
@@ -6,6 +6,4 @@ PARENT_PROFILE = ../net_4_x/
 DEFAULT_REFERENCES = -r:$(topdir)/class/lib/net_4_x/mscorlib.dll
 PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12
 
-RESGEN_EXE = $(topdir)/class/lib/net_4_x/resgen.exe
-
 XBUILD_VERSION = 12.0
index 5e90cf8ddac60c76169f749959fabe51e0fe4484..8c05d7e273c5b12a89eef04327fc726b5395efa2 100644 (file)
@@ -45,9 +45,9 @@ INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PR
 INTERNAL_ILASM = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/ilasm.exe
 INTERNAL_CSC = $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
 
-RESGEN_EXE = $(topdir)/class/lib/$(PROFILE)/resgen.exe
+RESGEN_EXE = $(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)resgen.exe
 INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(RESGEN_EXE)
-RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN)
+RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN)
 STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/cil-stringreplacer.exe
 
 depsdir = $(topdir)/build/deps
@@ -202,17 +202,33 @@ STD_TARGETS = test run-test run-test-ondotnet clean install uninstall doc-update
 $(STD_TARGETS): %: do-%
 
 ifdef PLATFORM_AOT_SUFFIX
-Q_AOT=$(if $(V),,@echo "AOT     [$(PROFILE)] AOT All Assemblies";)
-LIST_ALL_PROFILE_ASSEMBLIES = find . | grep -E '(dll|exe)$$' | grep -v -E 'bare|plaincore|secxml|Facades'
-COMPILE_ALL_PROFILE_ASSEMBLIES = $(LIST_ALL_PROFILE_ASSEMBLIES) | MONO_PATH="./" xargs -I '{}' $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS) '{}'
+AOT_PROFILE_ASSEMBLIES = $(shell cd $(topdir)/class/lib/$(PROFILE)/ && find . | grep -E '(dll|exe)$$' | grep -v -E 'bare|plaincore|secxml|Facades' | sed 's:\./::g' | tr '\n' ' ')
 
 do-all-aot:
        $(MAKE) do-all TOP_LEVEL_DO=do-all
        $(MAKE) aot-all-profile
 
-aot-all-profile:
-       $(Q_AOT) cd $(topdir)/class/lib/$(PROFILE)/ && $(COMPILE_ALL_PROFILE_ASSEMBLIES) &> $(PROFILE)-aot.log
-endif
+# When we recursively call $(MAKE) aot-all-profile
+# we will have created this directory, and so will
+# be able to evaluate the .dylibs to make
+ifneq ("$(wildcard $(topdir)/class/lib/$(PROFILE))","")
+
+AOT_PROFILE_ASSEMBLIES_CMD = cd $(topdir)/class/lib/$(PROFILE)/ && find . | grep -E '(dll|exe)$$' | grep -v -E 'bare|plaincore|secxml|Facades|ilasm' | sed 's:\./::g' | tr '\n' ' '
+AOT_PROFILE_ASSEMBLIES_CMD_SAFE = $(AOT_PROFILE_ASSEMBLIES_CMD) || true
+AOT_PROFILE_ASSEMBLIES = $(shell $(AOT_PROFILE_ASSEMBLIES_CMD_SAFE))
+
+# This can run in parallel
+.PHONY: aot-all-profile
+aot-all-profile: $(patsubst %,$(topdir)/class/lib/$(PROFILE)/%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_ASSEMBLIES))
+
+$(topdir)/class/lib/$(PROFILE)/%$(PLATFORM_AOT_SUFFIX): $(topdir)/class/lib/$(PROFILE)/%
+       @ mkdir -p $(topdir)/class/lib/$(PROFILE)/$*_bitcode_tmp
+       @echo "AOT     [$(PROFILE)] AOT $* " && cd $(topdir)/class/lib/$(PROFILE)/ && MONO_PATH="." $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS),temp-path=$*_bitcode $* >> $(PROFILE)-aot.log
+       @ rm -rf $(topdir)/class/lib/$(PROFILE)/$*_bitcode_tmp
+
+endif #ifneq ("$(wildcard $(topdir)/class/lib/$(PROFILE))","")
+
+endif # PLATFORM_AOT_SUFFIX
 
 do-run-test:
        ok=:; $(MAKE) run-test-recursive || ok=false; $(MAKE) run-test-local || ok=false; $$ok
index d984f22ecd51922003ddc2fb5dd3a7bf711c4f0d..4ef52f56dcad794058bfaae88a87d2849945173c 100644 (file)
@@ -28,7 +28,7 @@ include $(MCS_BUILD_DIR)/rules.make
 
 dist-local: dist-default
 
-DIST_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
+DIST_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS) $(net_4_x_SUBDIRS) $(mobile_only_SUBDIRS)
 DISTFILES=subdirs.make
 
 doc-update-local:
@@ -39,7 +39,7 @@ doc-update-recursive:
 
 System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Runtime.Serialization System.XML \
 System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.IO.Compression.FileSystem \
-System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http:
+System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http System.ServiceProcess:
 
 all-local-aot:
 
diff --git a/mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/RegistryAclExtensions.cs b/mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/RegistryAclExtensions.cs
new file mode 100644 (file)
index 0000000..deb3458
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// RegistryAclExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Security;
+using System.Security.AccessControl;
+
+namespace Microsoft.Win32
+{
+       public static class RegistryAclExtensions
+       {
+               [MonoTODO]
+               public static RegistrySecurity GetAccessControl (this RegistryKey key)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static RegistrySecurity GetAccessControl (this RegistryKey key, AccessControlSections includeSections)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void SetAccessControl (this RegistryKey key, RegistrySecurity registrySecurity)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
index cb252be1af3c7655dbf23e9ad81c0660baf77ff2..bdef1972306e60feafe11e0927e3b39b94fa7cf9 100644 (file)
@@ -23,4 +23,3 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistryAccessRule))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistryAuditRule))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistrySecurity))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryAclExtensions))]
index ecf772dd7eccdac8fc14834b9cc94a4dae156928..fae8514159ef6ae454d4414207ded833a41eef4d 100644 (file)
 // THE SOFTWARE.
 // 
 
-#if !MOBILE
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.Registry))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryHive))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryKey))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryValueKind))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryValueOptions))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryView))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeRegistryHandle))]
index 81a899b5e01ca018b4525724464a24bba13a5ff4..710df4ecd209261fe9ced57019332aab1825ce95 100644 (file)
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BrowsableAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CategoryAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ComponentCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DescriptionAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignOnlyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerCategoryAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerSerializationVisibility))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerSerializationVisibilityAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DisplayNameAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventHandlerList))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IComponent))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IContainer))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ISite))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ImmutableObjectAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.InitializationEventAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.LocalizableAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MergablePropertyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.NotifyParentPropertyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ParenthesizePropertyNameAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ReadOnlyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshProperties))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshPropertiesAttribute))]
 
 
index 4a50ae332d04472bd74bd15b816d8973474c69bf..12d2434bfcf66a4fc3c5bef3bbc4fe617092af72 100644 (file)
 // 
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ArrayConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.AttributeCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.AttributeProviderAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BaseNumberConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BooleanConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ByteConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CancelEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CharConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeAction))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CustomTypeDescriptor))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DateTimeConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DateTimeOffsetConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DecimalConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DefaultEventAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DefaultPropertyAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DoubleConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EnumConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventDescriptor))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventDescriptorCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ExtenderProvidedPropertyAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.GuidConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.HandledEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.HandledEventHandler))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ICustomTypeDescriptor))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IExtenderProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IListSource))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypeDescriptorContext))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypedList))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int16Converter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int32Converter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int64Converter))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypeDescriptorContext))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.InvalidAsynchronousStateException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MemberDescriptor))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MultilineStringConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.NullableConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyDescriptor))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyDescriptorCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ProvidePropertyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.SByteConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.SingleConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.StringConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TimeSpanConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeConverterAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptionProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptionProviderAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptor))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeListConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt16Converter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt32Converter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt64Converter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriTypeConverter))]
 
 
index 5987d7bb1f3e6fb4329f9aa6bfddf96df440f3c5..c1695f51f4b0d40654781a4f3b5afeeb556755ac 100644 (file)
@@ -24,6 +24,7 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleCancelEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleCancelEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleColor))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleKey))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleKeyInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleModifiers))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleSpecialKey))]
-
-
diff --git a/mcs/class/Facades/System.Data.Common/DbColumn.cs b/mcs/class/Facades/System.Data.Common/DbColumn.cs
new file mode 100644 (file)
index 0000000..f7bc5c7
--- /dev/null
@@ -0,0 +1,64 @@
+//
+// DbColumn.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Collections.Generic;
+
+namespace System.Data.Common
+{
+    public abstract class DbColumn
+    {
+        public bool? AllowDBNull { get; protected set; }
+        public string BaseCatalogName { get; protected set; }
+        public string BaseColumnName { get; protected set; }
+        public string BaseSchemaName { get; protected set; }
+        public string BaseServerName { get; protected set; }
+        public string BaseTableName { get; protected set; }
+        public string ColumnName { get; protected set; }
+        public int? ColumnOrdinal { get; protected set; }
+        public int? ColumnSize { get; protected set; }
+        public bool? IsAliased { get; protected set; }
+        public bool? IsAutoIncrement { get; protected set; }
+        public bool? IsExpression { get; protected set; }
+        public bool? IsHidden { get; protected set; }
+        public bool? IsIdentity { get; protected set; }
+        public bool? IsKey { get; protected set; }
+        public bool? IsLong { get; protected set; }
+        public bool? IsReadOnly { get; protected set; }
+        public bool? IsUnique { get; protected set; }
+        public int? NumericPrecision { get; protected set; }
+        public int? NumericScale { get; protected set; }
+        public string UdtAssemblyQualifiedName { get; protected set; }
+        public Type DataType { get; protected set; }
+        public string DataTypeName { get; protected set; }
+        public virtual object this[string property] {
+               get {
+                       throw new NotImplementedException ();
+               }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Data.Common/DbDataReaderExtensions.Facade.cs b/mcs/class/Facades/System.Data.Common/DbDataReaderExtensions.Facade.cs
new file mode 100644 (file)
index 0000000..ba1913f
--- /dev/null
@@ -0,0 +1,85 @@
+// 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.
+
+using System.Collections.Generic;
+
+namespace System.Data.Common
+{
+
+    internal class DataRowDbColumn : DbColumn
+    {
+        private DataColumnCollection schemaColumns;
+        private DataRow schemaRow;
+
+        public DataRowDbColumn(DataRow readerSchemaRow, DataColumnCollection readerSchemaColumns)
+        {
+            this.schemaRow = readerSchemaRow;
+            this.schemaColumns = readerSchemaColumns;
+            populateFields();
+        }
+
+        private void populateFields()
+        {
+            AllowDBNull = GetDbColumnValue<bool?>(SchemaTableColumn.AllowDBNull);
+            BaseCatalogName = GetDbColumnValue<string>(SchemaTableOptionalColumn.BaseCatalogName);
+            BaseColumnName = GetDbColumnValue<string>(SchemaTableColumn.BaseColumnName);
+            BaseSchemaName = GetDbColumnValue<string>(SchemaTableColumn.BaseSchemaName);
+            BaseServerName = GetDbColumnValue<string>(SchemaTableOptionalColumn.BaseServerName);
+            BaseTableName = GetDbColumnValue<string>(SchemaTableColumn.BaseTableName);
+            ColumnName = GetDbColumnValue<string>(SchemaTableColumn.ColumnName);
+            ColumnOrdinal = GetDbColumnValue<int?>(SchemaTableColumn.ColumnOrdinal);
+            ColumnSize = GetDbColumnValue<int?>(SchemaTableColumn.ColumnSize);
+            IsAliased = GetDbColumnValue<bool?>(SchemaTableColumn.IsAliased);
+            IsAutoIncrement = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsAutoIncrement);
+            IsExpression = GetDbColumnValue<bool>(SchemaTableColumn.IsExpression);
+            IsHidden = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsHidden);
+            IsIdentity = GetDbColumnValue<bool?>("IsIdentity");
+            IsKey = GetDbColumnValue<bool?>(SchemaTableColumn.IsKey);
+            IsLong = GetDbColumnValue<bool?>(SchemaTableColumn.IsLong);
+            IsReadOnly = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsReadOnly);
+            IsUnique = GetDbColumnValue<bool?>(SchemaTableColumn.IsUnique);
+            NumericPrecision = GetDbColumnValue<int?>(SchemaTableColumn.NumericPrecision);
+            NumericScale = GetDbColumnValue<int?>(SchemaTableColumn.NumericScale);
+            UdtAssemblyQualifiedName = GetDbColumnValue<string>("UdtAssemblyQualifiedName");
+            DataType = GetDbColumnValue<Type>(SchemaTableColumn.DataType);
+            DataTypeName = GetDbColumnValue<string>("DataTypeName");
+        }
+
+        private T GetDbColumnValue<T>(string columnName)
+        {
+            if (!schemaColumns.Contains(columnName))
+            {
+                return default(T);
+            }
+            object schemaObject = schemaRow[columnName];
+            if (schemaObject is T)
+            {
+                return (T)schemaObject;
+            }
+            return default(T);
+        }
+    }
+
+    public static class DbDataReaderExtensions
+    {
+        public static System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> GetColumnSchema(this DbDataReader reader)
+        {
+            IList<DbColumn> columnSchema = new List<DbColumn>();
+            DataTable schemaTable = reader.GetSchemaTable();
+            DataColumnCollection schemaTableColumns = schemaTable.Columns;
+            foreach (DataRow row in schemaTable.Rows)
+            {
+                DbColumn dbColumn = new DataRowDbColumn(row, schemaTableColumns);
+                columnSchema.Add(dbColumn);
+            }
+            System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> readOnlyColumnSchema = new System.Collections.ObjectModel.ReadOnlyCollection<DbColumn>(columnSchema);
+            return readOnlyColumnSchema;
+        }
+
+        public static bool CanGetColumnSchema(this DbDataReader reader)
+        {
+            return true;
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Data.Common/IDbColumnSchemaGenerator.cs b/mcs/class/Facades/System.Data.Common/IDbColumnSchemaGenerator.cs
new file mode 100644 (file)
index 0000000..ed6c519
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// IDbColumnSchemaGenerator.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Data.Common
+{
+       public interface IDbColumnSchemaGenerator
+       {
+               System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> GetColumnSchema();
+       }
+}
\ No newline at end of file
index 30bf3dd018146c2ca81002fde79578ff7f6457c1..ff6d03567897533cc1b43a22bd216a4bcecea509 100644 (file)
@@ -11,7 +11,7 @@ LIBRARY = System.Data.Common.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.Data
+LIB_REFS = System System.Data System.Xml
 LIB_MCS_FLAGS = $(SIGN_FLAGS)
 
 PLATFORM_DEBUG_FLAGS =
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..6b723549733e3bf504ea75990958fa103ae257ff 100644 (file)
@@ -1,3 +1,5 @@
 TypeForwarders.cs
 AssemblyInfo.cs
-
+IDbColumnSchemaGenerator.cs
+DbColumn.cs
+DbDataReaderExtensions.Facade.cs
index 52b199a2e67ea1fb11200196d40d83ce233e8991..9470c9c78b2ca156ac4782396c30c7b48217b5ca 100644 (file)
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DBNull))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandBehavior))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbCommand))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnectionStringBuilder))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataReader))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataRecord))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbEnumerator))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbParameter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbParameterCollection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbProviderFactory))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbTransaction))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ConnectionState))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTable))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DbType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameterCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataReader))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataRecord))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbCommand))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbConnection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbDataParameter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbTransaction))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IsolationLevel))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ParameterDirection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StateChangeEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StateChangeEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.UpdateRowSource))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DBNull))]
 
 
index d930326b45e1143c3ebff6902896c038eeab8e51..3237d9eb98fbddfa777678623072a5db0808da07 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.SqlServer.Server.SqlMetaData))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.ApplicationIntent))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SortOrder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopy))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyColumnMapping))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyColumnMappingCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlClientFactory))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlCommand))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlConnection))]
@@ -36,6 +40,8 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlInfoMessageEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlParameter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlParameterCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlRowsCopiedEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlRowsCopiedEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlTransaction))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlDbType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.INullable))]
index 7601feb313ee998d285dd999d92e68cf4824a625..e91a664406dd54a619020d96cd69e0b18525c3d0 100644 (file)
@@ -20,7 +20,7 @@
 // THE SOFTWARE.
 // 
 
-// TODO: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeProcessHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeProcessHandle))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.DataReceivedEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.DataReceivedEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Process))]
diff --git a/mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs b/mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs
new file mode 100644 (file)
index 0000000..1fb375f
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// StackFrameExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Diagnostics
+{
+       public static class StackFrameExtensions
+       {
+               [MonoTODO]
+               public static bool HasNativeImage (this StackFrame stackFrame)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static bool HasMethod (this StackFrame stackFrame)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static bool HasILOffset (this StackFrame stackFrame)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static bool HasSource (this StackFrame stackFrame)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..9d113cec2030b8af0bc1ae8f0fd91b7781671d1a 100644 (file)
@@ -1,3 +1,5 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+StackFrameExtensions.cs
index b07464db3e2a0f7329dcbbf322ea2fd481cea100..3643429a219efa4bb5011e6c17bbd9b5b76d4a58 100644 (file)
@@ -22,5 +22,4 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackFrame))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackTrace))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackFrameExtensions))]
 
diff --git a/mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs b/mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs
new file mode 100644 (file)
index 0000000..7fedc40
--- /dev/null
@@ -0,0 +1,41 @@
+//
+// EventCounter.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Diagnostics.Tracing
+{
+       public class EventCounter
+       {
+               public EventCounter (string name, EventSource eventSource)
+               {
+               }
+
+               public void WriteMetric (float value)
+               {
+               }
+       }
+}
\ No newline at end of file
index 832c003b52e813dd0f25651f00370f164a258cfa..5c8ab29d77aeb95e7a9fcceeec94fccc04ccecdb 100644 (file)
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventActivityOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventChannel))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCommand))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCommandEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventDataAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldFormat))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldTags))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventIgnoreAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventKeywords))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventLevel))]
-//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventListener))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventListener))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventManifestOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventOpcode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSource))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceSettings))]
-//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTags))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTask))]
-//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.NonEventAttribute))]
diff --git a/mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..fd9a20b
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Drawing.Primitives.dll")]
+[assembly: AssemblyDescription ("System.Drawing.Primitives.dll")]
+[assembly: AssemblyDefaultAlias ("System.Drawing.Primitives.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
diff --git a/mcs/class/Facades/System.Drawing.Primitives/Makefile b/mcs/class/Facades/System.Drawing.Primitives/Makefile
new file mode 100644 (file)
index 0000000..a42f4bc
--- /dev/null
@@ -0,0 +1,27 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Drawing.Primitives
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Drawing.Primitives.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
+
+ifneq (2.1, $(FRAMEWORK_VERSION))
+ifndef XAMMAC_4_5
+LIB_REFS += System.Drawing
+endif
+endif
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
diff --git a/mcs/class/Facades/System.Drawing.Primitives/System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..719628d
--- /dev/null
@@ -0,0 +1,2 @@
+TypeForwarders.cs
+AssemblyInfo.cs
diff --git a/mcs/class/Facades/System.Drawing.Primitives/TypeForwarders.cs b/mcs/class/Facades/System.Drawing.Primitives/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..af29167
--- /dev/null
@@ -0,0 +1,28 @@
+//
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Point))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.PointF))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Rectangle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.RectangleF))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Size))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SizeF))]
diff --git a/mcs/class/Facades/System.Drawing.Primitives/embedded_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/embedded_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..dd5e421
--- /dev/null
@@ -0,0 +1,8 @@
+AssemblyInfo.cs
+
+../../System.Drawing/System.Drawing/Point.cs
+../../System.Drawing/System.Drawing/PointF.cs
+../../System.Drawing/System.Drawing/Rectangle.cs
+../../System.Drawing/System.Drawing/RectangleF.cs
+../../System.Drawing/System.Drawing/Size.cs
+../../System.Drawing/System.Drawing/SizeF.cs
diff --git a/mcs/class/Facades/System.Drawing.Primitives/monotouch_watch_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/monotouch_watch_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..49902e8
--- /dev/null
@@ -0,0 +1 @@
+#include embedded_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Drawing.Primitives/xammac_net_4_5_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/xammac_net_4_5_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..49902e8
--- /dev/null
@@ -0,0 +1 @@
+#include embedded_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Globalization.Extensions/GlobalizationExtensions.cs b/mcs/class/Facades/System.Globalization.Extensions/GlobalizationExtensions.cs
new file mode 100644 (file)
index 0000000..43c1494
--- /dev/null
@@ -0,0 +1,98 @@
+// 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.
+
+using System;
+using System.Diagnostics;
+using System.Diagnostics.Contracts;
+
+namespace System.Globalization
+{
+    public static class GlobalizationExtensions
+    {
+        public static StringComparer GetStringComparer(this CompareInfo compareInfo, CompareOptions options)
+        {
+            if (compareInfo == null)
+            {
+                throw new ArgumentNullException(nameof(compareInfo));
+            }
+
+            if (options == CompareOptions.Ordinal)
+            {
+                return StringComparer.Ordinal;
+            }
+
+            if (options == CompareOptions.OrdinalIgnoreCase)
+            {
+                return StringComparer.OrdinalIgnoreCase;
+            }
+
+            if ((options & CultureAwareComparer.ValidCompareMaskOffFlags) != 0)
+            {
+                throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
+            }
+
+            return new CultureAwareComparer(compareInfo, options);
+        }
+    }
+
+    internal sealed class CultureAwareComparer : StringComparer
+    {
+        internal const CompareOptions ValidCompareMaskOffFlags =
+            ~(CompareOptions.IgnoreCase | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreNonSpace |
+              CompareOptions.IgnoreWidth | CompareOptions.IgnoreKanaType | CompareOptions.StringSort);
+
+        private readonly CompareInfo _compareInfo;
+        private readonly CompareOptions _options;
+
+        internal CultureAwareComparer(CompareInfo compareInfo, CompareOptions options)
+        {
+            Debug.Assert((options & ValidCompareMaskOffFlags) == 0);
+            _compareInfo = compareInfo;
+            _options = options;
+        }
+
+        public override int Compare(string x, string y)
+        {
+            if (Object.ReferenceEquals(x, y)) return 0;
+            if (x == null) return -1;
+            if (y == null) return 1;
+            return _compareInfo.Compare(x, y, _options);
+        }
+
+        public override bool Equals(string x, string y)
+        {
+            if (Object.ReferenceEquals(x, y)) return true;
+            if (x == null || y == null) return false;
+
+            return (_compareInfo.Compare(x, y, _options) == 0);
+        }
+
+        public override int GetHashCode(string obj)
+        {
+            if (obj == null)
+            {
+                throw new ArgumentNullException(nameof(obj));
+            }
+            Contract.EndContractBlock();
+
+            // StringSort used in compare operation and not with the hashing
+            return _compareInfo.GetHashCode(obj, _options & (~CompareOptions.StringSort));
+        }
+
+        // Equals method for the comparer itself. 
+        public override bool Equals(object obj)
+        {
+            CultureAwareComparer comparer = obj as CultureAwareComparer;
+            return
+                comparer != null &&
+                _options == comparer._options &&
+                _compareInfo.Equals(comparer._compareInfo);
+        }
+
+        public override int GetHashCode()
+        {
+            return _compareInfo.GetHashCode() ^ ((int)_options & 0x7FFFFFFF);
+        }
+    }
+}
diff --git a/mcs/class/Facades/System.Globalization.Extensions/SR.cs b/mcs/class/Facades/System.Globalization.Extensions/SR.cs
new file mode 100644 (file)
index 0000000..52a75a8
--- /dev/null
@@ -0,0 +1,4 @@
+partial class SR
+{
+       public const string Argument_InvalidFlag = "Value of flags is invalid.";
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Globalization.Extensions/StringNormalizationExtensions.cs b/mcs/class/Facades/System.Globalization.Extensions/StringNormalizationExtensions.cs
new file mode 100644 (file)
index 0000000..7953b29
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// StringNormalizationExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System.Text;
+
+namespace System
+{
+       public static class StringNormalizationExtensions
+       {
+               [MonoTODO]
+               public static bool IsNormalized(this string value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static bool IsNormalized(this string value, NormalizationForm normalizationForm)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static String Normalize(this string value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static String Normalize(this string value, NormalizationForm normalizationForm)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..8cec8fa1ac31da87e4be0dda612242a37528b28a 100644 (file)
@@ -1,3 +1,7 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+SR.cs
+GlobalizationExtensions.cs
+StringNormalizationExtensions.cs
index 2f88c337195517b9598dea2519535fbef11ac4a6..ae5a0bbb413cd0b0b19b3ad0b0dc94b14ca9a8c0 100644 (file)
@@ -22,5 +22,3 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.IdnMapping))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.NormalizationForm))]
-// Missing: [assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.GlobalizationExtensions))]
-// Missing: [assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringNormalizationExtensions))]
diff --git a/mcs/class/Facades/System.IO.Compression/AssemblyInfo.cs b/mcs/class/Facades/System.IO.Compression/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..08e157f
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.IO.Compression.dll")]
+[assembly: AssemblyDescription ("System.IO.Compression.dll")]
+[assembly: AssemblyDefaultAlias ("System.IO.Compression.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.IO.Compression/Makefile b/mcs/class/Facades/System.IO.Compression/Makefile
new file mode 100644 (file)
index 0000000..4fbfc56
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.IO.Compression
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.IO.Compression.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.IO.Compression/Missing.cs b/mcs/class/Facades/System.IO.Compression/Missing.cs
new file mode 100644 (file)
index 0000000..cd06b1c
--- /dev/null
@@ -0,0 +1,40 @@
+// This is stub only. The implementation should come from https://github.com/dotnet/corefx/tree/master/src/System.IO.Compression/src/System/IO/Compression
+
+namespace System.IO.Compression
+{
+       public class ZipArchive : System.IDisposable
+       {
+               public ZipArchive(System.IO.Stream stream) { }
+               public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode) { }
+               public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen) { }
+               public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen, System.Text.Encoding entryNameEncoding) { }
+               public System.Collections.ObjectModel.ReadOnlyCollection<System.IO.Compression.ZipArchiveEntry> Entries { get { return default(System.Collections.ObjectModel.ReadOnlyCollection<System.IO.Compression.ZipArchiveEntry>); } }
+               public System.IO.Compression.ZipArchiveMode Mode { get { return default(System.IO.Compression.ZipArchiveMode); } }
+               public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName) { return default(System.IO.Compression.ZipArchiveEntry); }
+               public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName, System.IO.Compression.CompressionLevel compressionLevel) { return default(System.IO.Compression.ZipArchiveEntry); }
+               public void Dispose() { }
+               protected virtual void Dispose(bool disposing) { }
+               public System.IO.Compression.ZipArchiveEntry GetEntry(string entryName) { return default(System.IO.Compression.ZipArchiveEntry); }
+       }
+
+       public partial class ZipArchiveEntry
+       {
+               internal ZipArchiveEntry() { }
+               public System.IO.Compression.ZipArchive Archive { get { return default(System.IO.Compression.ZipArchive); } }
+               public long CompressedLength { get { return default(long); } }
+               public string FullName { get { return default(string); } }
+               public System.DateTimeOffset LastWriteTime { get { return default(System.DateTimeOffset); } set { } }
+               public long Length { get { return default(long); } }
+               public string Name { get { return default(string); } }
+               public void Delete() { }
+               public System.IO.Stream Open() { return default(System.IO.Stream); }
+               public override string ToString() { return default(string); }
+       }
+
+       public enum ZipArchiveMode
+       {
+               Create = 1,
+               Read = 0,
+               Update = 2,
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.IO.Compression/System.IO.Compression.dll.sources b/mcs/class/Facades/System.IO.Compression/System.IO.Compression.dll.sources
new file mode 100644 (file)
index 0000000..402d066
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+Missing.cs
diff --git a/mcs/class/Facades/System.IO.Compression/TypeForwarders.cs b/mcs/class/Facades/System.IO.Compression/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..5eaf037
--- /dev/null
@@ -0,0 +1,28 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Compression.CompressionLevel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Compression.CompressionMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Compression.DeflateStream))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Compression.GZipStream))]
+
+
diff --git a/mcs/class/Facades/System.IO.FileSystem.AccessControl/FileSystemAclExtensions.cs b/mcs/class/Facades/System.IO.FileSystem.AccessControl/FileSystemAclExtensions.cs
new file mode 100644 (file)
index 0000000..1dd8d97
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// FileSystemAclExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.IO
+{
+       public static partial class FileSystemAclExtensions
+       {
+               [MonoTODO]
+               public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileStream fileStream)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void SetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void SetAccessControl(this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
index 12daecd0383c701a5f1d3170b2ddde387f990d64..18351db171e67ece3658a19c82b0bb3bcbbc6a92 100644 (file)
@@ -27,5 +27,3 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemAuditRule))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemRights))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemSecurity))]
-
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.FileSystemAclExtensions))]
index 6237d34bfc4d7c1abd7213d00a60c0c8e50bf37e..b25bcf38598ffc09c45cf98b294e915469ba9f50 100644 (file)
@@ -29,5 +29,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.RenamedEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.RenamedEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.WatcherChangeTypes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.WaitForChangedResult))]
 
 
diff --git a/mcs/class/Facades/System.IO.Packaging/AssemblyInfo.cs b/mcs/class/Facades/System.IO.Packaging/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..7b0813f
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.IO.Packaging.dll")]
+[assembly: AssemblyDescription ("System.IO.Packaging.dll")]
+[assembly: AssemblyDefaultAlias ("System.IO.Packaging.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
diff --git a/mcs/class/Facades/System.IO.Packaging/Makefile b/mcs/class/Facades/System.IO.Packaging/Makefile
new file mode 100644 (file)
index 0000000..cbf6d68
--- /dev/null
@@ -0,0 +1,21 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.IO.Packaging
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.IO.Packaging.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System WindowsBase
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
diff --git a/mcs/class/Facades/System.IO.Packaging/System.IO.Packaging.dll.sources b/mcs/class/Facades/System.IO.Packaging/System.IO.Packaging.dll.sources
new file mode 100644 (file)
index 0000000..719628d
--- /dev/null
@@ -0,0 +1,2 @@
+TypeForwarders.cs
+AssemblyInfo.cs
diff --git a/mcs/class/Facades/System.IO.Packaging/TypeForwarders.cs b/mcs/class/Facades/System.IO.Packaging/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..a3c4504
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.FileFormatException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.CompressionOption))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.EncryptionOption))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackUriHelper))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.Package))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackagePart))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackagePartCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageProperties))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageRelationship))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageRelationshipCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageRelationshipSelector))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageRelationshipSelectorType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.TargetMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.ZipPackage))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.ZipPackagePart))]
index ea526e77de476e7db02c11eedf2a25c82cc9d0fe..2c84d4bac3c845ebb4b038e4ae62b31a6341551a 100644 (file)
@@ -35,4 +35,5 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.StringWriter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.TextReader))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.TextWriter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.BufferedStream))]
 
index 52af3f619ecce003dda88b62803983097f0e368f..6b82ffb42f3a2d7282375c675f546baca6bb129e 100644 (file)
@@ -64,6 +64,5 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryable))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryable<>))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryProvider))]
-
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IArgumentProvider))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IDynamicExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IArgumentProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IDynamicExpression))]
diff --git a/mcs/class/Facades/System.Net.Ping/AssemblyInfo.cs b/mcs/class/Facades/System.Net.Ping/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..507e590
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Net.Ping.dll")]
+[assembly: AssemblyDescription ("System.Net.Ping.dll")]
+[assembly: AssemblyDefaultAlias ("System.Net.Ping.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
diff --git a/mcs/class/Facades/System.Net.Ping/Makefile b/mcs/class/Facades/System.Net.Ping/Makefile
new file mode 100644 (file)
index 0000000..750ace6
--- /dev/null
@@ -0,0 +1,21 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Net.Ping
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Net.Ping.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
diff --git a/mcs/class/Facades/System.Net.Ping/System.Net.Ping.dll.sources b/mcs/class/Facades/System.Net.Ping/System.Net.Ping.dll.sources
new file mode 100644 (file)
index 0000000..719628d
--- /dev/null
@@ -0,0 +1,2 @@
+TypeForwarders.cs
+AssemblyInfo.cs
diff --git a/mcs/class/Facades/System.Net.Ping/TypeForwarders.cs b/mcs/class/Facades/System.Net.Ping/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..2f79a42
--- /dev/null
@@ -0,0 +1,27 @@
+//
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.IPStatus))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.Ping))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingReply))]
index 884e50a3fd27513cb944012361964ed52ffd9fac..3167d764e13327feab061a0855dc8a27632cca80 100644 (file)
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.AuthenticatedStream))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.EncryptionPolicy))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.LocalCertificateSelectionCallback))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.NegotiateStream))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.ProtectionLevel))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.RemoteCertificateValidationCallback))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.SslStream))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.AuthenticationException))]
@@ -29,5 +32,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.PolicyEnforcement))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.ProtectionScenario))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.ServiceNameCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.InvalidCredentialException))]
 
 
diff --git a/mcs/class/Facades/System.Net.Sockets/SocketReceiveFromResult.cs b/mcs/class/Facades/System.Net.Sockets/SocketReceiveFromResult.cs
new file mode 100644 (file)
index 0000000..2add0e6
--- /dev/null
@@ -0,0 +1,36 @@
+//
+// SocketReceiveFromResult.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Net.Sockets
+{
+       public struct SocketReceiveFromResult
+       {
+               public int ReceivedBytes;
+               public EndPoint RemoteEndPoint;
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Net.Sockets/SocketReceiveMessageFromResult.cs b/mcs/class/Facades/System.Net.Sockets/SocketReceiveMessageFromResult.cs
new file mode 100644 (file)
index 0000000..ab5ed10
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// SocketReceiveMessageFromResult.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Net.Sockets
+{
+       public struct SocketReceiveMessageFromResult
+       {
+               public int ReceivedBytes;
+               public SocketFlags SocketFlags;
+               public EndPoint RemoteEndPoint;
+               public IPPacketInformation PacketInformation;
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs b/mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs
new file mode 100644 (file)
index 0000000..a3e24ed
--- /dev/null
@@ -0,0 +1,250 @@
+// 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.
+
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace System.Net.Sockets
+{
+    public static class SocketTaskExtensions
+    {
+        public static Task<Socket> AcceptAsync(this Socket socket)
+        {
+            return Task<Socket>.Factory.FromAsync(
+                (callback, state) => ((Socket)state).BeginAccept(callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
+                state: socket);
+        }
+
+        public static Task<Socket> AcceptAsync(this Socket socket, Socket acceptSocket)
+        {
+            const int ReceiveSize = 0;
+            return Task<Socket>.Factory.FromAsync(
+                (socketForAccept, receiveSize, callback, state) => ((Socket)state).BeginAccept(socketForAccept, receiveSize, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
+                acceptSocket,
+                ReceiveSize,
+                state: socket);
+        }
+
+        public static Task ConnectAsync(this Socket socket, EndPoint remoteEndPoint)
+        {
+            return Task.Factory.FromAsync(
+                (targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+                remoteEndPoint,
+                state: socket);
+        }
+
+        public static Task ConnectAsync(this Socket socket, IPAddress address, int port)
+        {
+            return Task.Factory.FromAsync(
+                (targetAddress, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddress, targetPort, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+                address,
+                port,
+                state: socket);
+        }
+
+        public static Task ConnectAsync(this Socket socket, IPAddress[] addresses, int port)
+        {
+            return Task.Factory.FromAsync(
+                (targetAddresses, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddresses, targetPort, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+                addresses,
+                port,
+                state: socket);
+        }
+
+        public static Task ConnectAsync(this Socket socket, string host, int port)
+        {
+            return Task.Factory.FromAsync(
+                (targetHost, targetPort, callback, state) => ((Socket)state).BeginConnect(targetHost, targetPort, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+                host,
+                port,
+                state: socket);
+        }
+
+        public static Task<int> ReceiveAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffer, flags, callback, state) => ((Socket)state).BeginReceive(
+                                                              targetBuffer.Array,
+                                                              targetBuffer.Offset,
+                                                              targetBuffer.Count,
+                                                              flags,
+                                                              callback,
+                                                              state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
+                buffer,
+                socketFlags,
+                state: socket);
+        }
+
+        public static Task<int> ReceiveAsync(
+            this Socket socket,
+            IList<ArraySegment<byte>> buffers,
+            SocketFlags socketFlags)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffers, flags, callback, state) => ((Socket)state).BeginReceive(targetBuffers, flags, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
+                buffers,
+                socketFlags,
+                state: socket);
+        }
+
+        public static Task<SocketReceiveFromResult> ReceiveFromAsync(
+            this Socket socket,
+            ArraySegment<byte> buffer,
+            SocketFlags socketFlags,
+            EndPoint remoteEndPoint)
+        {
+            object[] packedArguments = new object[] { socket, remoteEndPoint };
+
+            return Task<SocketReceiveFromResult>.Factory.FromAsync(
+                (targetBuffer, flags, callback, state) =>
+                {
+                    var arguments = (object[])state;
+                    var s = (Socket)arguments[0];
+                    var e = (EndPoint)arguments[1];
+
+                    IAsyncResult result = s.BeginReceiveFrom(
+                        targetBuffer.Array,
+                        targetBuffer.Offset,
+                        targetBuffer.Count,
+                        flags,
+                        ref e,
+                        callback,
+                        state);
+
+                    arguments[1] = e;
+                    return result;
+                },
+                asyncResult =>
+                {
+                    var arguments = (object[])asyncResult.AsyncState;
+                    var s = (Socket)arguments[0];
+                    var e = (EndPoint)arguments[1];
+
+                    int bytesReceived = s.EndReceiveFrom(asyncResult, ref e);
+
+                    return new SocketReceiveFromResult()
+                    {
+                        ReceivedBytes = bytesReceived,
+                        RemoteEndPoint = e
+                    };
+                },
+                buffer,
+                socketFlags,
+                state: packedArguments);
+        }
+
+        public static Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(
+            this Socket socket,
+            ArraySegment<byte> buffer,
+            SocketFlags socketFlags,
+            EndPoint remoteEndPoint)
+        {
+            object[] packedArguments = new object[] { socket, socketFlags, remoteEndPoint };
+
+            return Task<SocketReceiveMessageFromResult>.Factory.FromAsync(
+                (targetBuffer, callback, state) =>
+                {
+                    var arguments = (object[])state;
+                    var s = (Socket)arguments[0];
+                    var f = (SocketFlags)arguments[1];
+                    var e = (EndPoint)arguments[2];
+
+                    IAsyncResult result = s.BeginReceiveMessageFrom(
+                        targetBuffer.Array,
+                        targetBuffer.Offset,
+                        targetBuffer.Count,
+                        f,
+                        ref e,
+                        callback,
+                        state);
+
+                    arguments[2] = e;
+                    return result;
+                },
+                asyncResult =>
+                {
+                    var arguments = (object[])asyncResult.AsyncState;
+                    var s = (Socket)arguments[0];
+                    var f = (SocketFlags)arguments[1];
+                    var e = (EndPoint)arguments[2];
+                    IPPacketInformation ipPacket;
+
+                    int bytesReceived = s.EndReceiveMessageFrom(
+                        asyncResult,
+                        ref f,
+                        ref e,
+                        out ipPacket);
+
+                    return new SocketReceiveMessageFromResult()
+                    {
+                        PacketInformation = ipPacket,
+                        ReceivedBytes = bytesReceived,
+                        RemoteEndPoint = e,
+                        SocketFlags = f
+                    };
+                },
+                buffer,
+                state: packedArguments);
+        }
+
+        public static Task<int> SendAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffer, flags, callback, state) => ((Socket)state).BeginSend(
+                                                              targetBuffer.Array,
+                                                              targetBuffer.Offset,
+                                                              targetBuffer.Count,
+                                                              flags,
+                                                              callback,
+                                                              state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
+                buffer,
+                socketFlags,
+                state: socket);
+        }
+
+        public static Task<int> SendAsync(
+            this Socket socket,
+            IList<ArraySegment<byte>> buffers,
+            SocketFlags socketFlags)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffers, flags, callback, state) => ((Socket)state).BeginSend(targetBuffers, flags, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
+                buffers,
+                socketFlags,
+                state: socket);
+        }
+
+        public static Task<int> SendToAsync(
+            this Socket socket,
+            ArraySegment<byte> buffer,
+            SocketFlags socketFlags,
+            EndPoint remoteEndPoint)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
+                                                                        targetBuffer.Array,
+                                                                        targetBuffer.Offset,
+                                                                        targetBuffer.Count,
+                                                                        flags,
+                                                                        endPoint,
+                                                                        callback,
+                                                                        state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
+                buffer,
+                socketFlags,
+                remoteEndPoint,
+                state: socket);
+        }
+    }
+}
\ No newline at end of file
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..a4cab35a66bc194d0b4d44ce6aba3335088ac771 100644 (file)
@@ -1,3 +1,5 @@
 TypeForwarders.cs
 AssemblyInfo.cs
-
+SocketReceiveFromResult.cs
+SocketReceiveMessageFromResult.cs
+SocketTaskExtensions.cs
diff --git a/mcs/class/Facades/System.Private.CoreLib.Threading/AssemblyInfo.cs b/mcs/class/Facades/System.Private.CoreLib.Threading/AssemblyInfo.cs
deleted file mode 100644 (file)
index de58780..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// 
-// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-// 
-
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyTitle ("System.Private.CoreLib.Threading.dll")]
-[assembly: AssemblyDescription ("System.Private.CoreLib.Threading.dll")]
-[assembly: AssemblyDefaultAlias ("System.Private.CoreLib.Threading.dll")]
-[assembly: AssemblyCompany ("Xamarin, Inc.")]
-[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
-[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
-[assembly: AssemblyInformationalVersion ("4.0.0.0")]
-[assembly: AssemblyFileVersion ("4.0.0.0")]
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../../msfinal.pub")]
-
-[assembly: ReferenceAssembly]
-
-
diff --git a/mcs/class/Facades/System.Private.CoreLib.Threading/Facades_System.Private.CoreLib.Threading-net_4_x.csproj b/mcs/class/Facades/System.Private.CoreLib.Threading/Facades_System.Private.CoreLib.Threading-net_4_x.csproj
deleted file mode 100644 (file)
index df6c913..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <PropertyGroup>\r
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
-    <ProductVersion>9.0.30729</ProductVersion>\r
-    <SchemaVersion>2.0</SchemaVersion>\r
-    <ProjectGuid>{642A1B9E-1A2F-4C55-B184-E22F8C2E95B5}</ProjectGuid>\r
-    <OutputType>Library</OutputType>\r
-    <NoWarn>1699,1616,1699</NoWarn>\r
-    <OutputPath>./../../../class/lib/net_4_x/Facades</OutputPath>\r
-    <IntermediateOutputPath>obj-Facades</IntermediateOutputPath>\r
-    <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
-    <NoStdLib>True</NoStdLib>\r
-    \r
-    <NoConfig>True</NoConfig>\r
-    \r
-    <AppDesignerFolder>Properties</AppDesignerFolder>\r
-    <RootNamespace>\r
-    </RootNamespace>\r
-    <AssemblyName>System.Private.CoreLib.Threading</AssemblyName>\r
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
-    <FileAlignment>512</FileAlignment>\r
-  </PropertyGroup>\r
-    <PropertyGroup>\r
-    <SignAssembly>true</SignAssembly>\r
-    <DelaySign>true</DelaySign>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
-    <DebugSymbols>true</DebugSymbols>\r
-    <DebugType>full</DebugType>\r
-    <NoWarn>1699,1616,1699</NoWarn>\r
-    <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
-    <DebugType>pdbonly</DebugType>\r
-    <NoWarn>1699,1616,1699</NoWarn>\r
-    <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
-  Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
-  is a problem to compile the Mono mscorlib.dll -->\r
-  <PropertyGroup>\r
-    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
-  </PropertyGroup>\r
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
-  <ItemGroup>\r
-    <Compile Include="AssemblyInfo.cs" />\r
-    <Compile Include="TypeForwarders.cs" />\r  </ItemGroup>\r
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
-       Other similar extension points exist, see Microsoft.Common.targets.\r
-  <Target Name="BeforeBuild">\r
-  </Target>\r
-  <Target Name="AfterBuild">\r
-  </Target>\r
-  -->\r
-  <PropertyGroup>\r
-    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PreBuildEvent>\r
-    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PreBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PostBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PostBuildEvent>\r
-  </PropertyGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="../../corlib/corlib-net_4_x.csproj">\r
-      <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
-      <Name>corlib-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../../System/System-net_4_x.csproj">\r
-      <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
-      <Name>System-net_4_x</Name>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <Folder Include="Properties\" />\r
-  </ItemGroup>\r
-</Project>\r
-
diff --git a/mcs/class/Facades/System.Private.CoreLib.Threading/Makefile b/mcs/class/Facades/System.Private.CoreLib.Threading/Makefile
deleted file mode 100644 (file)
index 347b171..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-MCS_BUILD_DIR = ../../../build
-
-thisdir = class/Facades/System.Private.CoreLib.Threading
-SUBDIRS = 
-include $(MCS_BUILD_DIR)/rules.make
-
-LIBRARY_SUBDIR = Facades
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
-
-LIBRARY = System.Private.CoreLib.Threading.dll
-
-KEY_FILE = ../../msfinal.pub
-SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) 
-
-PLATFORM_DEBUG_FLAGS =
-
-NO_TEST = yes
-
-include $(MCS_BUILD_DIR)/library.make
-
-
diff --git a/mcs/class/Facades/System.Private.CoreLib.Threading/System.Private.CoreLib.Threading-net_4_x.csproj b/mcs/class/Facades/System.Private.CoreLib.Threading/System.Private.CoreLib.Threading-net_4_x.csproj
deleted file mode 100644 (file)
index 17de547..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <PropertyGroup>\r
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
-    <ProductVersion>9.0.30729</ProductVersion>\r
-    <SchemaVersion>2.0</SchemaVersion>\r
-    <ProjectGuid>{A577B5A0-5038-4D8E-8C80-18ED9FEC8686}</ProjectGuid>\r
-    <OutputType>Library</OutputType>\r
-    <NoWarn>1699,1616,1699</NoWarn>\r
-    <OutputPath>./../../../class/lib/net_4_x/Facades</OutputPath>\r
-    <NoStdLib>True</NoStdLib>\r
-    <NoConfig>True</NoConfig>\r
-    \r
-    <AppDesignerFolder>Properties</AppDesignerFolder>\r
-    <RootNamespace>\r
-    </RootNamespace>\r
-    <AssemblyName>System.Private.CoreLib.Threading</AssemblyName>\r
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
-    <FileAlignment>512</FileAlignment>\r
-  </PropertyGroup>\r
-    <PropertyGroup>\r
-    <SignAssembly>true</SignAssembly>\r
-    <DelaySign>true</DelaySign>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
-    <DebugSymbols>true</DebugSymbols>\r
-    <DebugType>full</DebugType>\r
-    <NoWarn>1699,1616,1699</NoWarn>\r
-    <Optimize>false</Optimize>\r
-    <DefineConstants>DEBUG;TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
-    <DebugType>pdbonly</DebugType>\r
-    <NoWarn>1699,1616,1699</NoWarn>\r
-    <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
-  Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
-  is a problem to compile the Mono mscorlib.dll -->\r
-  <PropertyGroup>\r
-    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
-  </PropertyGroup>\r
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
-  <ItemGroup>\r
-    <Compile Include="AssemblyInfo.cs" />\r
-    <Compile Include="TypeForwarders.cs" />\r  </ItemGroup>\r
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
-       Other similar extension points exist, see Microsoft.Common.targets.\r
-  <Target Name="BeforeBuild">\r
-  </Target>\r
-  <Target Name="AfterBuild">\r
-  </Target>\r
-  -->\r
-  <PropertyGroup>\r
-    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
-    </PreBuildEvent>\r
-    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
-    </PostBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PostBuildEvent>\r
-  </PropertyGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="../../corlib/corlib-net_4_x.csproj">\r
-      <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
-      <Name>corlib-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../../corlib/corlib-net_4_x.csproj">\r
-      <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
-      <Name>corlib-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../../System/System-net_4_x.csproj">\r
-      <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
-      <Name>System-net_4_x</Name>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <Folder Include="Properties\" />\r
-  </ItemGroup>\r
-</Project>\r
-
diff --git a/mcs/class/Facades/System.Private.CoreLib.Threading/System.Private.CoreLib.Threading.dll.sources b/mcs/class/Facades/System.Private.CoreLib.Threading/System.Private.CoreLib.Threading.dll.sources
deleted file mode 100644 (file)
index 8e33d4d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-TypeForwarders.cs
-AssemblyInfo.cs
-
diff --git a/mcs/class/Facades/System.Private.CoreLib.Threading/TypeForwarders.cs b/mcs/class/Facades/System.Private.CoreLib.Threading/TypeForwarders.cs
deleted file mode 100644 (file)
index 7b9aa7a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// 
-// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-// 
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.AbandonedMutexException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.AutoResetEvent))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.EventResetMode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.EventWaitHandle))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Interlocked))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.LazyInitializer))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ManualResetEvent))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Monitor))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Mutex))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Semaphore))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SemaphoreFullException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SpinWait))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SynchronizationLockException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Volatile))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.WaitHandleCannotBeOpenedException))]
-
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Condition))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Lock))]
index cfa70ce24a5c460f9ae8f1c8efef1cff5afe3b63..a3dd7e7c887cf9bec3b64650356e8a5a17e7603f 100644 (file)
@@ -20,7 +20,6 @@
 // THE SOFTWARE.
 // 
 
-#if !FULL_AOT_RUNTIME
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.FlowControl))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCodes))]
@@ -28,7 +27,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OperandType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.PackingSize))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.StackBehaviour))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CallingConventions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventAttributes))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.FieldAttributes))]
diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/Requires.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/Requires.cs
new file mode 100644 (file)
index 0000000..339981b
--- /dev/null
@@ -0,0 +1,17 @@
+// 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.
+
+namespace System.Reflection
+{
+    internal static class Requires
+    {
+        internal static void NotNull(object obj, string name)
+        {
+            if (obj == null)
+            {
+                throw new ArgumentNullException(name);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/SR.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/SR.cs
new file mode 100644 (file)
index 0000000..0a1ae28
--- /dev/null
@@ -0,0 +1,4 @@
+partial class SR
+{
+       public const string NoMetadataTokenAvailable = "There is no metadata token available for the given member.";
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/TypeExtensions.CoreCLR.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/TypeExtensions.CoreCLR.cs
new file mode 100644 (file)
index 0000000..661cd67
--- /dev/null
@@ -0,0 +1,400 @@
+// 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.
+
+// NOTE: These are extension methods in the contract, but plain static methods
+// in this implementation. This is done to avoid confusion around what would 
+// look like infinite recursion in the implementation. Callers compiled against
+// the contract will still be able to invoke them as extension methods and get
+// source compatibility with classic reflection code.
+//
+// However, this does not apply if there is no 1:1 correspondence with an instance
+// in mscorlib. New extension methods should be marked with 'this'.
+
+namespace System.Reflection
+{
+    public static class TypeExtensions
+    {
+        public static ConstructorInfo GetConstructor(Type type, Type[] types)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetConstructor(types);
+        }
+
+        public static ConstructorInfo[] GetConstructors(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetConstructors();
+        }
+
+        public static ConstructorInfo[] GetConstructors(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetConstructors(bindingAttr);
+        }
+
+        public static MemberInfo[] GetDefaultMembers(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetDefaultMembers();
+        }
+
+        public static EventInfo GetEvent(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetEvent(name);
+        }
+
+        public static EventInfo GetEvent(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetEvent(name, bindingAttr);
+        }
+
+        public static EventInfo[] GetEvents(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetEvents();
+        }
+
+        public static EventInfo[] GetEvents(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetEvents(bindingAttr);
+        }
+
+        public static FieldInfo GetField(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetField(name);
+        }
+
+        public static FieldInfo GetField(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetField(name, bindingAttr);
+        }
+
+        public static FieldInfo[] GetFields(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetFields();
+        }
+
+        public static FieldInfo[] GetFields(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetFields(bindingAttr);
+        }
+
+        public static Type[] GetGenericArguments(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetGenericArguments();
+        }
+
+        public static Type[] GetInterfaces(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetInterfaces();
+        }
+
+        public static MemberInfo[] GetMember(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMember(name);
+        }
+
+        public static MemberInfo[] GetMember(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMember(name, bindingAttr);
+        }
+
+        public static MemberInfo[] GetMembers(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMembers();
+        }
+
+        public static MemberInfo[] GetMembers(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMembers(bindingAttr);
+        }
+
+        public static MethodInfo GetMethod(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethod(name);
+        }
+
+        public static MethodInfo GetMethod(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethod(name, bindingAttr);
+        }
+
+        public static MethodInfo GetMethod(Type type, string name, Type[] types)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethod(name, types);
+        }
+
+        public static MethodInfo[] GetMethods(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethods();
+        }
+
+        public static MethodInfo[] GetMethods(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethods(bindingAttr);
+        }
+
+        public static Type GetNestedType(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetNestedType(name, bindingAttr);
+        }
+
+        public static Type[] GetNestedTypes(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetNestedTypes(bindingAttr);
+        }
+
+        public static PropertyInfo[] GetProperties(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperties();
+        }
+
+        public static PropertyInfo[] GetProperties(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperties(bindingAttr);
+        }
+
+        public static PropertyInfo GetProperty(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperty(name);
+        }
+
+        public static PropertyInfo GetProperty(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperty(name, bindingAttr);
+        }
+
+        public static PropertyInfo GetProperty(Type type, string name, Type returnType)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperty(name, returnType);
+        }
+
+        public static PropertyInfo GetProperty(Type type, string name, Type returnType, Type[] types)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperty(name, returnType, types);
+        }
+
+        public static bool IsAssignableFrom(Type type, Type c)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.IsAssignableFrom(c);
+        }
+
+        public static bool IsInstanceOfType(Type type, object o)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.IsInstanceOfType(o);
+        }
+    }
+
+    public static class AssemblyExtensions
+    {
+        public static Type[] GetExportedTypes(Assembly assembly)
+        {
+            Requires.NotNull(assembly, nameof(assembly));
+            return assembly.GetExportedTypes();
+        }
+
+        public static Module[] GetModules(Assembly assembly)
+        {
+            Requires.NotNull(assembly, nameof(assembly));
+            return assembly.GetModules();
+        }
+
+        public static Type[] GetTypes(Assembly assembly)
+        {
+            Requires.NotNull(assembly, nameof(assembly));
+            return assembly.GetTypes();
+        }
+    }
+
+    public static class EventInfoExtensions
+    {
+        public static MethodInfo GetAddMethod(EventInfo eventInfo)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetAddMethod();
+        }
+
+        public static MethodInfo GetAddMethod(EventInfo eventInfo, bool nonPublic)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetAddMethod(nonPublic);
+        }
+
+        public static MethodInfo GetRaiseMethod(EventInfo eventInfo)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetRaiseMethod();
+        }
+
+        public static MethodInfo GetRaiseMethod(EventInfo eventInfo, bool nonPublic)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetRaiseMethod(nonPublic);
+        }
+
+        public static MethodInfo GetRemoveMethod(EventInfo eventInfo)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetRemoveMethod();
+        }
+
+        public static MethodInfo GetRemoveMethod(EventInfo eventInfo, bool nonPublic)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetRemoveMethod(nonPublic);
+        }
+    }
+
+    public static class MemberInfoExtensions
+    {
+
+        /// <summary>
+        /// Determines if there is a metadata token available for the given member.
+        /// <see cref="GetMetadataToken(MemberInfo)"/> throws <see cref="InvalidOperationException"/> otherwise.
+        /// </summary>
+        /// <remarks>This maybe</remarks>
+        public static bool HasMetadataToken(this MemberInfo member)
+        {
+            Requires.NotNull(member, nameof(member));
+
+            try
+            {
+                return GetMetadataTokenOrZeroOrThrow(member) != 0;
+            }
+            catch (InvalidOperationException)
+            {
+                // Thrown for unbaked ref-emit members/types. 
+                // Other cases such as typeof(byte[]).MetadataToken will be handled by comparison to zero above.
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// Gets a metadata token for the given member if available. The returned token is never nil.
+        /// </summary>
+        /// <exception cref="InvalidOperationException">
+        /// There is no metadata token available. <see cref="HasMetadataToken(MemberInfo)"/> returns false in this case.
+        /// </exception>
+        public static int GetMetadataToken(this MemberInfo member)
+        {
+            Requires.NotNull(member, nameof(member));
+
+            int token = GetMetadataTokenOrZeroOrThrow(member); 
+
+            if (token == 0)
+            {
+                throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
+            }
+
+            return token;
+        }
+
+        private static int GetMetadataTokenOrZeroOrThrow(MemberInfo member)
+        {
+            int token = member.MetadataToken;
+
+            // Tokens have MSB = table index, 3 LSBs = row index
+            // row index of 0 is a nil token 
+            const int rowMask = 0x00FFFFFF;
+            if ((token & rowMask) == 0)
+            {
+                // Nil token is returned for edge cases like typeof(byte[]).MetadataToken.
+                return 0;
+            }
+
+            return token;
+         }
+    }
+
+    public static class MethodInfoExtensions
+    {
+        public static MethodInfo GetBaseDefinition(MethodInfo method)
+        {
+            Requires.NotNull(method, nameof(method));
+            return method.GetBaseDefinition();
+        }
+    }
+
+    public static class ModuleExtensions
+    {
+        public static bool HasModuleVersionId(this Module module)
+        {
+            Requires.NotNull(module, nameof(module));
+            return true; // not expected to fail on platforms with Module.ModuleVersionId built-in.
+        }
+
+        public static Guid GetModuleVersionId(this Module module)
+        {
+            Requires.NotNull(module, nameof(module));
+            return module.ModuleVersionId;
+        }
+    }
+
+    public static class PropertyInfoExtensions
+    {
+        public static MethodInfo[] GetAccessors(PropertyInfo property)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetAccessors();
+        }
+
+        public static MethodInfo[] GetAccessors(PropertyInfo property, bool nonPublic)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetAccessors(nonPublic);
+        }
+
+        public static MethodInfo GetGetMethod(PropertyInfo property)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetGetMethod();
+        }
+
+        public static MethodInfo GetGetMethod(PropertyInfo property, bool nonPublic)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetGetMethod(nonPublic);
+        }
+
+        public static MethodInfo GetSetMethod(PropertyInfo property)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetSetMethod();
+        }
+
+        public static MethodInfo GetSetMethod(PropertyInfo property, bool nonPublic)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetSetMethod(nonPublic);
+        }
+    }
+}
index a6b0138ff61631688ad0fe624a0a658f1de2dc56..757cd13035567a34670186a13eee3f67dddff7f4 100644 (file)
@@ -22,8 +22,3 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.BindingFlags))]
 
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyExtensions))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventInfoExtensions))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodInfoExtensions))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.PropertyInfoExtensions))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeExtensions))]
index 511c1fe2ed3af0233af458fa162b98c6263d916d..d1d2b4ecb1245ec23878cc0ecb6204e2ecebe71f 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TargetInvocationException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TargetParameterCountException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.BindingFlags))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ICustomAttributeProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.InvalidFilterCriteriaException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MemberFilter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MemberTypes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ParameterModifier))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TargetException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeFilter))]
 
index a088678a7fb96c382503db951a7ce8a31e7bc692..94249720f6a1a2130d71d6bacff177e3bd5d47d0 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATSTG))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CriticalHandle))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CurrencyWrapper))]
-//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceMode))]
-//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceResult))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceResult))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DefaultCharSetAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DefaultParameterValueAttribute))]
-//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispatchWrapper))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispIdAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DllImportAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DllImportSearchPath))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.UnmanagedType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VarEnum))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VariantWrapper))]
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComAwareEventInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComEventsHelper))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ADVF))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.BIND_OPTS))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.BINDPTR))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.CALLCONV))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.CONNECTDATA))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.DATADIR))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.DESCKIND))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.DISPPARAMS))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.DVASPECT))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ELEMDESC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.EXCEPINFO))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FILETIME))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FORMATETC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FUNCFLAGS))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FUNCKIND))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IAdviseSink))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IBindCtx))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IConnectionPoint))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IConnectionPointContainer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IDLDESC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IDLFLAG))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumConnectionPoints))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumConnections))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumFORMATETC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumMoniker))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumString))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumVARIANT))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IMoniker))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.INVOKEKIND))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IPersistFile))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IRunningObjectTable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeComp))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeInfo2))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeLib))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeLib2))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.LIBFLAGS))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.PARAMDESC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.PARAMFLAG))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATDATA))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STGMEDIUM))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.SYSKIND))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYMED))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPEATTR))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPEDESC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPEFLAGS))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPEKIND))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPELIBATTR))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.VARDESC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.VARFLAGS))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.VARKIND))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ICustomQueryInterface))]
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Formatters/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Serialization.Formatters/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..9b92117
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Runtime.Serialization.Formatters.dll")]
+[assembly: AssemblyDescription ("System.Runtime.Serialization.Formatters.dll")]
+[assembly: AssemblyDefaultAlias ("System.Runtime.Serialization.Formatters.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Formatters/Makefile b/mcs/class/Facades/System.Runtime.Serialization.Formatters/Makefile
new file mode 100644 (file)
index 0000000..a8c237d
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Runtime.Serialization.Formatters
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Runtime.Serialization.Formatters.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.dll.sources b/mcs/class/Facades/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Formatters/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.Serialization.Formatters/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..31daa7c
--- /dev/null
@@ -0,0 +1,32 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.NonSerializedAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.IDeserializationCallback))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.IFormatterConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.ISerializable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationEntry))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationInfoEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.SerializableAttribute))]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Primitives/ISerializationSurrogateProvider.cs b/mcs/class/Facades/System.Runtime.Serialization.Primitives/ISerializationSurrogateProvider.cs
new file mode 100644 (file)
index 0000000..b14b6df
--- /dev/null
@@ -0,0 +1,32 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+namespace System.Runtime.Serialization
+{
+       public interface ISerializationSurrogateProvider
+       {
+               object GetDeserializedObject (object obj, Type targetType);
+               object GetObjectToSerialize (object obj, Type targetType);
+               Type GetSurrogateType (Type type);
+       }
+}
+
index ce3180fe1f18b8bbb783db9d3df0d08ed6686efb..57b2d4db09ccb3689b3f37c1bf4f47cfcb634ab4 100644 (file)
@@ -33,4 +33,4 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.OnSerializingAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.StreamingContext))]
-
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.InvalidDataContractException))]
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/DataContractSerializerExtensions.cs b/mcs/class/Facades/System.Runtime.Serialization.Xml/DataContractSerializerExtensions.cs
new file mode 100644 (file)
index 0000000..3ccdff7
--- /dev/null
@@ -0,0 +1,84 @@
+// 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.
+
+#if !NO_CODEDOM
+using System.CodeDom;
+#endif
+using System.Collections.ObjectModel;
+using System.Reflection;
+
+namespace System.Runtime.Serialization
+{
+    public static class DataContractSerializerExtensions
+    {
+        public static ISerializationSurrogateProvider GetSerializationSurrogateProvider(this DataContractSerializer serializer) 
+        {
+            SurrogateProviderAdapter adapter = serializer.DataContractSurrogate as SurrogateProviderAdapter;
+            return (adapter == null) ? null : adapter.Provider;
+        }
+
+        public static void SetSerializationSurrogateProvider(this DataContractSerializer serializer, ISerializationSurrogateProvider provider)
+        {
+            // allocate every time, expectation is that this won't happen enough to warrant maintaining a CondtionalWeakTable.
+            IDataContractSurrogate adapter = new SurrogateProviderAdapter(provider);
+
+            // DCS doesn't expose a setter, access the field directly as a workaround
+            typeof(DataContractSerializer)
+              .GetField("dataContractSurrogate", BindingFlags.Instance | BindingFlags.NonPublic)
+              .SetValue(serializer, adapter);
+        }
+
+        private class SurrogateProviderAdapter : IDataContractSurrogate
+        {
+            private ISerializationSurrogateProvider _provider;
+            public SurrogateProviderAdapter(ISerializationSurrogateProvider provider)
+            {
+                _provider = provider;
+            }
+
+            public ISerializationSurrogateProvider Provider { get { return _provider; } }
+            public object GetCustomDataToExport(Type clrType, Type dataContractType)
+            {
+                throw NotImplemented.ByDesign;
+            }
+
+            public object GetCustomDataToExport(MemberInfo memberInfo, Type dataContractType)
+            {
+                throw NotImplemented.ByDesign;
+            }
+
+            public Type GetDataContractType(Type type)
+            {
+                return _provider.GetSurrogateType(type);
+            }
+
+            public object GetDeserializedObject(object obj, Type targetType)
+            {
+                return _provider.GetDeserializedObject(obj, targetType);
+            }
+
+            public void GetKnownCustomDataTypes(Collection<Type> customDataTypes)
+            {
+                throw NotImplemented.ByDesign;
+            }
+
+            public object GetObjectToSerialize(object obj, Type targetType)
+            {
+                return _provider.GetObjectToSerialize(obj, targetType);
+            }
+
+            public Type GetReferencedTypeOnImport(string typeName, string typeNamespace, object customData)
+            {
+                throw NotImplemented.ByDesign;
+            }
+
+#if !NO_CODEDOM
+            public CodeTypeDeclaration ProcessImportedType(CodeTypeDeclaration typeDeclaration, CodeCompileUnit compileUnit)
+            {
+                throw NotImplemented.ByDesign;
+            }
+#endif
+        }
+    }
+}
\ No newline at end of file
index 774289eb4de9e987c0368ce80e90d818c7b7ef7e..dc0a84d022933675423cf9435280d42f3c277367 100644 (file)
@@ -11,9 +11,13 @@ LIBRARY = System.Runtime.Serialization.Xml.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System.Runtime.Serialization System.Xml
+LIB_REFS = System System.Runtime.Serialization System.Xml Facades/System.Runtime.Serialization.Primitives
 LIB_MCS_FLAGS = $(SIGN_FLAGS) 
 
+ifeq (2.1, $(FRAMEWORK_VERSION))
+LIB_MCS_FLAGS += /d:NO_CODEDOM
+endif
+
 PLATFORM_DEBUG_FLAGS =
 
 NO_TEST = yes
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/NotImplemented.cs b/mcs/class/Facades/System.Runtime.Serialization.Xml/NotImplemented.cs
new file mode 100644 (file)
index 0000000..26e5342
--- /dev/null
@@ -0,0 +1,32 @@
+// 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.
+
+namespace System
+{
+    //
+    // This class enables one to throw a NotImplementedException using the following idiom:
+    //
+    //     throw NotImplemented.ByDesign;
+    //
+    // Used by methods whose intended implementation is to throw a NotImplementedException (typically
+    // virtual methods in public abstract classes that intended to be subclassed by third parties.)
+    //
+    // This makes it distinguishable both from human eyes and CCI from NYI's that truly represent undone work.
+    //
+    internal static class NotImplemented
+    {
+        internal static Exception ByDesign
+        {
+            get
+            {
+                return new NotImplementedException();
+            }
+        }
+
+        internal static Exception ByDesignWithMessage(String message)
+        {
+            return new NotImplementedException(message);
+        }
+    }
+}
\ No newline at end of file
index bfd4e7e471152d2a9dd1c7fbc18e223e53328c91..38eea612a4779c0ab2f3158a68820eff29a8e8ae 100644 (file)
@@ -36,3 +36,4 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryWriter))]
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.OnXmlDictionaryReaderClose))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryReaderQuotaTypes))]
index 7184eee8b4b3c1e703575c9713013c51d1fe9f09..03f6d00db310d388e7074299c1562c6d5727f99c 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IsConst))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TypeCode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriFormatException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConditionalWeakTable<,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.GCHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.GCHandleType))]
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..76645c3
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.Algorithms.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.Algorithms.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Algorithms.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs
new file mode 100644 (file)
index 0000000..3e1733e
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// ECCurve.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+       public struct ECCurve
+       {
+               public byte[] A;
+               public byte[] B;
+               public byte[] Cofactor;
+               public ECCurveType CurveType;
+               public ECPoint G;
+               public HashAlgorithmName? Hash;
+               public byte[] Order;
+               public byte[] Polynomial;
+               public byte[] Prime;
+               public byte[] Seed;
+               public bool IsCharacteristic2 { get { throw new NotImplementedException (); } }
+               public bool IsExplicit { get { throw new NotImplementedException (); } }
+               public bool IsNamed { get { throw new NotImplementedException (); } }
+               public bool IsPrime { get { throw new NotImplementedException (); } }
+               public Oid Oid { get { throw new NotImplementedException (); } }
+               public static ECCurve CreateFromFriendlyName (string oidFriendlyName) { throw new NotImplementedException (); }
+               public static ECCurve CreateFromOid (Oid curveOid) { throw new NotImplementedException (); }
+               public static ECCurve CreateFromValue (string oidValue) { throw new NotImplementedException (); }
+               public void Validate () { throw new NotImplementedException (); }
+
+               public enum ECCurveType
+               {
+                       Implicit = 0,
+                       PrimeShortWeierstrass = 1,
+                       PrimeTwistedEdwards = 2,
+                       PrimeMontgomery = 3,
+                       Characteristic2 = 4,
+                       Named = 5,
+               }
+               
+               public static class NamedCurves
+               {
+                       public static ECCurve brainpoolP160r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP160t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP192r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP192t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP224r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP224t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP256r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP256t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP320r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP320t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP384r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP384t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP512r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP512t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve nistP256 { get { throw new NotImplementedException (); } }
+                       public static ECCurve nistP384 { get { throw new NotImplementedException (); } }
+                       public static ECCurve nistP521 { get { throw new NotImplementedException (); } }
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs
new file mode 100644 (file)
index 0000000..6f1e421
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// ECPArameters.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+    public partial struct ECParameters
+    {
+        public ECCurve Curve;
+        public byte[] D;
+        public ECPoint Q;
+        public void Validate () { throw new NotImplementedException (); }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs
new file mode 100644 (file)
index 0000000..5693959
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// ECPoint.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+       public struct ECPoint
+       {
+               public byte[] X;
+               public byte[] Y;
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs
new file mode 100644 (file)
index 0000000..7b39b0d
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// IncrementalHash.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+    public sealed class IncrementalHash : IDisposable
+    {
+        private IncrementalHash () { }
+        public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
+        public void AppendData (byte[] data) { }
+        public void AppendData (byte[] data, int offset, int count) { }
+        public static IncrementalHash CreateHash (HashAlgorithmName hashAlgorithm) { throw new NotImplementedException (); }
+        public static IncrementalHash CreateHMAC (HashAlgorithmName hashAlgorithm, byte[] key) { throw new NotImplementedException (); }
+        public void Dispose () { }
+        public byte[] GetHashAndReset () { throw new NotImplementedException (); }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile b/mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile
new file mode 100644 (file)
index 0000000..389a11c
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.Algorithms
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.Algorithms.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources
new file mode 100644 (file)
index 0000000..dcb3ff9
--- /dev/null
@@ -0,0 +1,6 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+ECCurve.cs
+ECPoint.cs
+ECParameters.cs
+IncrementalHash.cs
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..5a59369
--- /dev/null
@@ -0,0 +1,46 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Aes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DeriveBytes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDsa))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACMD5))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA1))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA256))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA384))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA512))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.MD5))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RandomNumberGenerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Rfc2898DeriveBytes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSA))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAEncryptionPadding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAEncryptionPaddingMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSASignaturePadding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSASignaturePaddingMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA1))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA256))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA384))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA512))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDES))]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..b902325
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.Cng.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.Cng.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Cng.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/Makefile b/mcs/class/Facades/System.Security.Cryptography.Cng/Makefile
new file mode 100644 (file)
index 0000000..4912aa3
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.Cng
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.Cng.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/System.Security.Cryptography.Cng.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Cng/System.Security.Cryptography.Cng.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..309d6fb
--- /dev/null
@@ -0,0 +1,46 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeNCryptHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AesCng))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngAlgorithm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngAlgorithmGroup))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngExportPolicies))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKey))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyBlobFormat))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyCreationOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyCreationParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyHandleOpenOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyOpenOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyUsages))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngProperty))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngPropertyCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngPropertyOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngUIPolicy))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngUIProtectionLevels))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDsaCng))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSACng))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDESCng))]
diff --git a/mcs/class/Facades/System.Security.Cryptography.Csp/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Csp/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..0d63053
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.Csp.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.Csp.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Csp.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Csp/Makefile b/mcs/class/Facades/System.Security.Cryptography.Csp/Makefile
new file mode 100644 (file)
index 0000000..91d0932
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.Csp
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.Csp.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Csp/System.Security.Cryptography.Csp.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Csp/System.Security.Cryptography.Csp.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Csp/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Csp/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..a854f1f
--- /dev/null
@@ -0,0 +1,30 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CspKeyContainerInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CspParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CspProviderFlags))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ICspAsymmetricAlgorithm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.KeyNumber))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSACryptoServiceProvider))]
+
+
index 49d90149966d12bfe89027ff647952642b8490ec..07db287ab8876d9556386139dbb5a00b2dacf602 100644 (file)
@@ -25,5 +25,5 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.OidCollection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.OidEnumerator))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.OidGroup))]
-
-
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AsnEncodedDataCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AsnEncodedDataEnumerator))]
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..3560bf2
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.OpenSsl.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.OpenSsl.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.OpenSsl.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs
new file mode 100644 (file)
index 0000000..1a2771a
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// ECDsaOpenSsl.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class ECDsaOpenSsl : ECDsa
+       {
+               public override byte[] SignHash (byte[] hash)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override bool VerifyHash (byte[] hash, byte[] signature)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               // TODO: Implement full contract API
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile
new file mode 100644 (file)
index 0000000..aa30bc9
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.OpenSsl
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.OpenSsl.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs
new file mode 100644 (file)
index 0000000..4bdcd80
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// RSAOpenSsl.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class RSAOpenSsl : RSA
+       {
+               public override RSAParameters ExportParameters (bool includePrivateParameters)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void ImportParameters (RSAParameters parameters)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override byte[] SignHash (byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override bool VerifyHash (byte[] hash, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               // TODO: Implement full contract API
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs
new file mode 100644 (file)
index 0000000..85fd745
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// SafeEvpPKeyHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class SafeEvpPKeyHandle : System.Runtime.InteropServices.SafeHandle
+       {
+               public SafeEvpPKeyHandle (IntPtr handle, bool ownsHandle) 
+                       : base (handle, ownsHandle)
+               {
+               }
+
+               public override bool IsInvalid { get { throw new NotImplementedException (); } }
+
+               public SafeEvpPKeyHandle DuplicateHandle ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               protected override bool ReleaseHandle ()
+               {
+                       return true;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources
new file mode 100644 (file)
index 0000000..9e2bb4b
--- /dev/null
@@ -0,0 +1,4 @@
+AssemblyInfo.cs
+ECDsaOpenSsl.cs
+RSAOpenSsl.cs
+SafeEvpPKeyHandle.cs
diff --git a/mcs/class/Facades/System.Security.Cryptography.Pkcs/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Pkcs/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..06089b3
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.Pkcs.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.Pkcs.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Pkcs.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Pkcs/Makefile b/mcs/class/Facades/System.Security.Cryptography.Pkcs/Makefile
new file mode 100644 (file)
index 0000000..b98a242
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.Pkcs
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.Pkcs.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System System.Security
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Pkcs/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Pkcs/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..db96723
--- /dev/null
@@ -0,0 +1,51 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptographicAttributeObject))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptographicAttributeObjectCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptographicAttributeObjectEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.AlgorithmIdentifier))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipient))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.ContentInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.EnvelopedCms))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyAgreeRecipientInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyTransRecipientInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9AttributeObject))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9ContentType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentDescription))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentName))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9MessageDigest))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9SigningTime))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.PublicKeyInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifier))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKey))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKeyType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Xml.X509IssuerSerial))]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Primitives/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..9b7aef5
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.Primitives.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.Primitives.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Primitives.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Primitives/Makefile b/mcs/class/Facades/System.Security.Cryptography.Primitives/Makefile
new file mode 100644 (file)
index 0000000..b4c114a
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.Primitives
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.Primitives.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Primitives/System.Security.Cryptography.Primitives.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Primitives/System.Security.Cryptography.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Primitives/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Primitives/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..ea7934e
--- /dev/null
@@ -0,0 +1,37 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AsymmetricAlgorithm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CipherMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptographicException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptoStream))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptoStreamMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HashAlgorithm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HashAlgorithmName))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMAC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ICryptoTransform))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.KeyedHashAlgorithm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.KeySizes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.PaddingMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SymmetricAlgorithm))]
+
+
index 5ad2d813f95f024e4a80de3a6e15c9458230b531..8b01e585ecba504d93a2d1a4bd423c4c50dacaaf 100644 (file)
@@ -11,7 +11,7 @@ LIBRARY = System.Security.Cryptography.X509Certificates.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
+LIB_REFS = System System.Core
 LIB_MCS_FLAGS = $(SIGN_FLAGS) 
 
 PLATFORM_DEBUG_FLAGS =
index 4984b098b6ee8368fa0c8387a97ab2ef254e0514..a653d295fa9fe155769c976867352eb86ea1b73e 100644 (file)
@@ -20,7 +20,7 @@
 // THE SOFTWARE.
 // 
 
-//TODO:[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeX509ChainHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeX509ChainHandle))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.X509Certificates.OpenFlags))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.X509Certificates.PublicKey))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.X509Certificates.StoreLocation))]
@@ -56,5 +56,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierHashAlgorithm))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.X509Certificates.X509VerificationFlags))]
-
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.X509Certificates.ECDsaCertificateExtensions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.X509Certificates.RSACertificateExtensions))]
 
index 8ce4172c8424c2774d4dcbc268df6062f4d85c46..ec9f05c624574ac277c87dea710a04280e2112c8 100644 (file)
@@ -20,7 +20,7 @@
 // THE SOFTWARE.
 // 
 
-//TODO:[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Principal.IdentityNotMappedException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Principal.IdentityReference))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Principal.IdentityReferenceCollection))]
diff --git a/mcs/class/Facades/System.Security.SecureString/SecureStringMarshal.cs b/mcs/class/Facades/System.Security.SecureString/SecureStringMarshal.cs
new file mode 100644 (file)
index 0000000..59c85a4
--- /dev/null
@@ -0,0 +1,47 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+namespace System.Security
+{
+       public static class SecureStringMarshal
+       {
+               public static IntPtr SecureStringToCoTaskMemAnsi (SecureString s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IntPtr SecureStringToCoTaskMemUnicode (SecureString s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IntPtr SecureStringToGlobalAllocAnsi (SecureString s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IntPtr SecureStringToGlobalAllocUnicode (SecureString s)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
index d8898cbe774bd16160e143039935f1044f732eff..4267f40e03b04ae637899d56dabe6b9413f7075f 100644 (file)
@@ -21,5 +21,3 @@
 // 
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.SecureString))]
-
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.SecureStringMarshal))]
index 89df05537785702076e7b0b9a3cf1831880c4e92..09d884b1527d2768307eaf03833fdba7358813c1 100644 (file)
@@ -20,9 +20,7 @@
 // THE SOFTWARE.
 // 
 
-#if !MOBILE && !XAMMAC_4_5
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CallbackBehaviorAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DuplexChannelFactory<>))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DuplexClientBase<>))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.InstanceContext))]
index 57276e7078c989085ee8c8c27997dd707d8a0cdd..4aa28e9e49f0bc660137f259cfe73a0b8d799c84 100644 (file)
@@ -24,6 +24,9 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpMessageCredentialType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpSecurity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpSecurityMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpsBinding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpsSecurity))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpsSecurityMode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpRequestMessageProperty))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpResponseMessageProperty))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpsTransportBindingElement))]
@@ -35,5 +38,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpClientCredentialType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpTransportSecurity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpBinding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpsBinding))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpMessageEncoding))]
 
index a80d1c6fd126c5c9ffc8e0b8923fd9805bb0910e..f03bc06d93c1d117a36572cdb9a3b1f8c7b00d76 100644 (file)
@@ -20,7 +20,6 @@
 // THE SOFTWARE.
 // 
 
-#if !MOBILE && !XAMMAC_4_5
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ConnectionOrientedTransportBindingElement))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SslStreamSecurityBindingElement))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TcpConnectionPoolSettings))]
@@ -30,5 +29,4 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetTcpBinding))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetTcpSecurity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.TcpTransportSecurity))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.TcpClientCredentialType))]
index 5f65e0599a30b14d256482f517c0ec7e66a5e4db..b89ba3525c8652877cf796a1b56edf2c72a59ed2 100644 (file)
@@ -11,7 +11,12 @@ LIBRARY = System.ServiceModel.Primitives.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System.ServiceModel System.Xml
+LIB_REFS = System System.ServiceModel System.Xml Facades/System.Security.Cryptography.X509Certificates
+
+ifneq (2.1, $(FRAMEWORK_VERSION))
+LIB_REFS += System.IdentityModel
+endif
+
 LIB_MCS_FLAGS = $(SIGN_FLAGS) 
 
 PLATFORM_DEBUG_FLAGS =
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..f43e364288ecdfe39cf6ad30ee2590de8b775429 100644 (file)
@@ -1,3 +1,9 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+X509ServiceCertificateAuthentication_mobile.cs
+X509CertificateValidator_mobile.cs
+X509CertificateValidationMode_mobile.cs
+X509CertificateRecipientClientCredential_mobile.cs
+X509CertificateInitiatorClientCredential_mobile.cs
index 38f834268c4ea888b5202436dcba723b72667add..b584fc0b8ee576cb82de3adc696344b0ee063b26 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageContractMemberAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageCredentialType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeader<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeaderAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeaderException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageParameterAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContext))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UnknownMessageReceivedEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
 
+#if !MOBILE && !XAMMAC_4_5
+
+// TODO: These are implemented as stubs in the facade directly on mobile (contrary to Desktop where they're forwarded to System.ServiceModel.dll/System.IdentityModel.dll).
+// I'm not 100% sure this is the right approach, but Marek thinks it's fine so I'm sticking with it for now.
+// The problem on mobile is that types like X509CertificateValidator live in System.IdentityModel.dll which is not built for mobile.
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IdentityModel.Selectors.X509CertificateValidator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateValidationMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509ServiceCertificateAuthentication))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateInitiatorClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateRecipientClientCredential))]
+
+#endif
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs
new file mode 100644 (file)
index 0000000..daf321c
--- /dev/null
@@ -0,0 +1,72 @@
+//
+// X509CertificateInitiatorClientCredential_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.ServiceModel.Security
+{
+       public sealed class X509CertificateInitiatorClientCredential
+       {
+               [MonoTODO]
+               public X509Certificate2 Certificate
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               internal X509CertificateInitiatorClientCredential()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void SetCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void SetCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs
new file mode 100644 (file)
index 0000000..3545b72
--- /dev/null
@@ -0,0 +1,117 @@
+//
+// X509CertificateRecipientClientCredential_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System;
+using System.Collections.Generic;
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.ServiceModel.Security
+{
+       public sealed class X509CertificateRecipientClientCredential
+       {
+               [MonoTODO]
+               public X509ServiceCertificateAuthentication Authentication
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public X509Certificate2 DefaultCertificate
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public Dictionary<Uri, X509Certificate2> ScopedCertificates
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public X509ServiceCertificateAuthentication SslCertificateAuthentication
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               internal X509CertificateRecipientClientCredential ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void SetDefaultCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void SetDefaultCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void SetScopedCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue, Uri targetService)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void SetScopedCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName, Uri targetService)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs
new file mode 100644 (file)
index 0000000..34b1d24
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// X509CertificateValidationMode_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+namespace System.ServiceModel.Security
+{
+       public enum X509CertificateValidationMode
+       {
+               None,
+               PeerTrust,
+               ChainTrust,
+               PeerOrChainTrust,
+               Custom
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs
new file mode 100644 (file)
index 0000000..734e990
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// X509CertificateValidator_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.IdentityModel.Selectors
+{
+       public abstract class X509CertificateValidator
+       {
+               public abstract void Validate (X509Certificate2 certificate);
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs
new file mode 100644 (file)
index 0000000..725cbd9
--- /dev/null
@@ -0,0 +1,95 @@
+//
+// X509ServiceCertificateAuthentication_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System;
+using System.IdentityModel.Selectors;
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.ServiceModel.Security
+{
+       public sealed class X509ServiceCertificateAuthentication
+       {
+               [MonoTODO]
+               public X509CertificateValidationMode CertificateValidationMode
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public X509CertificateValidator CustomCertificateValidator
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public X509RevocationMode RevocationMode
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public StoreLocation TrustedStoreLocation
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index 61d5b5a04468de6b95b1eac09e189e718aee5d87..a11a6f59a06ab3d71757b8bea625794700b88c2f 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SecurityBindingElement))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SecurityHeaderLayout))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TransportSecurityBindingElement))]
-#if !MOBILE
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DnsEndpointIdentity))]
-#if !XAMMAC_4_5
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageSecurityVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SpnEndpointIdentity))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UpnEndpointIdentity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.BasicSecurityProfileVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecureConversationVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityPolicyVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.TrustVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SecureConversationSecurityTokenParameters))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SecurityTokenParameters))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SupportingTokenParameters))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.UserNameSecurityTokenParameters))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.TrustVersion))]
-#endif
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SpnEndpointIdentity))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UpnEndpointIdentity))]
-#endif
index 2724a34a105c35861c75080253a8dbf96d954e99..5fa4c609b0ba9bf81b857a8c688e79cfb7f3ae6f 100644 (file)
@@ -11,7 +11,14 @@ LIBRARY = System.ServiceProcess.ServiceController.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.ServiceProcess
+LIB_REFS = System
+
+ifneq (2.1, $(FRAMEWORK_VERSION))
+ifndef XAMMAC_4_5
+LIB_REFS += System.ServiceProcess
+endif
+endif
+
 LIB_MCS_FLAGS = $(SIGN_FLAGS)
 
 PLATFORM_DEBUG_FLAGS =
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceControllerStatus_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceControllerStatus_mobile.cs
new file mode 100644 (file)
index 0000000..f233c8b
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// ServiceControllerStatus_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System;
+
+namespace System.ServiceProcess
+{
+       public enum ServiceControllerStatus
+       {
+               ContinuePending = 5,
+               Paused = 7,
+               PausePending = 6,
+               Running = 4,
+               StartPending = 2,
+               Stopped = 1,
+               StopPending = 3
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceController_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceController_mobile.cs
new file mode 100644 (file)
index 0000000..f84a27d
--- /dev/null
@@ -0,0 +1,246 @@
+//
+// ServiceController_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace System.ServiceProcess
+{
+       public class ServiceController : IDisposable
+       {
+               [MonoTODO]
+               public bool CanPauseAndContinue
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public bool CanShutdown
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public bool CanStop
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceController[] DependentServices
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public string DisplayName
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public string MachineName
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public SafeHandle ServiceHandle
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public string ServiceName
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceController[] ServicesDependedOn
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceType ServiceType
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceStartMode StartType
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceControllerStatus Status
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceController (string name)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public ServiceController (string name, string machineName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Continue ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Dispose ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected virtual void Dispose (bool disposing)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ServiceController[] GetDevices ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ServiceController[] GetDevices (string machineName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ServiceController[] GetServices ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ServiceController[] GetServices (string machineName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Pause ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Refresh ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Start ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Start (string[] args)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Stop ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void WaitForStatus (ServiceControllerStatus desiredStatus)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void WaitForStatus (ServiceControllerStatus desiredStatus, TimeSpan timeout)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceStartMode_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceStartMode_mobile.cs
new file mode 100644 (file)
index 0000000..3c875c3
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ServiceStartMode_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System;
+
+namespace System.ServiceProcess
+{
+       public enum ServiceStartMode
+       {
+               Automatic = 2,
+               Boot = 0,
+               Disabled = 4,
+               Manual = 3,
+               System = 1
+       }
+}
+
+#endif
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceType_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceType_mobile.cs
new file mode 100644 (file)
index 0000000..ba4f144
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// ServiceType_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System;
+
+namespace System.ServiceProcess
+{
+       [Flags]
+       public enum ServiceType
+       {
+               Adapter = 4,
+               FileSystemDriver = 2,
+               InteractiveProcess = 256,
+               KernelDriver = 1,
+               RecognizerDriver = 8,
+               Win32OwnProcess = 16,
+               Win32ShareProcess = 32
+       }
+}
+
+#endif
\ No newline at end of file
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..56e080d93c71d2f98ec884932141f6130b6e1a11 100644 (file)
@@ -1,3 +1,9 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+ServiceController_mobile.cs
+ServiceControllerStatus_mobile.cs
+ServiceStartMode_mobile.cs
+ServiceType_mobile.cs
+TimeoutException_mobile.cs
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/TimeoutException_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/TimeoutException_mobile.cs
new file mode 100644 (file)
index 0000000..c6448d8
--- /dev/null
@@ -0,0 +1,59 @@
+//
+// TimeoutException_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MOBILE || XAMMAC_4_5
+
+using System;
+
+namespace System.ServiceProcess
+{
+       public class TimeoutException : Exception
+       {
+               [MonoTODO]
+               public TimeoutException ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public TimeoutException (string message)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public TimeoutException (string message, Exception innerException)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index 6a21dfc46f16d0792d9767b3c339f812719ff881..b14584243c26246101e1057892c5015b3beedf59 100644 (file)
 // THE SOFTWARE.
 // 
 
+#if !MOBILE && !XAMMAC_4_5
+
+// TODO: These are implemented as stubs in the facade directly on mobile 
+
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.ServiceController))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.ServiceControllerStatus))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.ServiceStartMode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.ServiceType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.TimeoutException))]
 
-
+#endif
diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs b/mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..568942d
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Text.Encoding.CodePages.dll")]
+[assembly: AssemblyDescription ("System.Text.Encoding.CodePages.dll")]
+[assembly: AssemblyDefaultAlias ("System.Text.Encoding.CodePages.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/CodePagesEncodingProvider.cs b/mcs/class/Facades/System.Text.Encoding.CodePages/CodePagesEncodingProvider.cs
new file mode 100644 (file)
index 0000000..d97ad54
--- /dev/null
@@ -0,0 +1,37 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+namespace System.Text
+{
+       public sealed partial class CodePagesEncodingProvider
+       {
+               private CodePagesEncodingProvider ()
+               {
+               }
+               
+               public static System.Text.EncodingProvider Instance { 
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/Makefile b/mcs/class/Facades/System.Text.Encoding.CodePages/Makefile
new file mode 100644 (file)
index 0000000..7430a65
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Text.Encoding.CodePages
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Text.Encoding.CodePages.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.dll.sources b/mcs/class/Facades/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.dll.sources
new file mode 100644 (file)
index 0000000..db2c267
--- /dev/null
@@ -0,0 +1,2 @@
+AssemblyInfo.cs
+CodePagesEncodingProvider.cs
index be4c7cc58bcba3d1a50e548ba714a4e61834e821..f9b4d759a44030f2263947be81d3d59b0b951110 100644 (file)
@@ -30,4 +30,5 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.Regex))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.RegexMatchTimeoutException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.RegexOptions))]
-
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.RegexRunner))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.RegexRunnerFactory))]
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..0d28c343986eccda5535c44d498db69ce8ebe08e 100644 (file)
@@ -1,3 +1,5 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+ThreadingAclExtensions.cs
diff --git a/mcs/class/Facades/System.Threading.AccessControl/ThreadingAclExtensions.cs b/mcs/class/Facades/System.Threading.AccessControl/ThreadingAclExtensions.cs
new file mode 100644 (file)
index 0000000..af61a50
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// ThreadingAclExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Security.AccessControl;
+using System.Diagnostics.Contracts;
+
+namespace System.Threading
+{
+    public static class ThreadingAclExtensions
+    {
+        [MonoTODO]
+        public static EventWaitHandleSecurity GetAccessControl (EventWaitHandle handle)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static void SetAccessControl (EventWaitHandle handle, EventWaitHandleSecurity eventSecurity)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static MutexSecurity GetAccessControl (Mutex mutex)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static void SetAccessControl (Mutex mutex, MutexSecurity mutexSecurity)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static SemaphoreSecurity GetAccessControl (Semaphore semaphore)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static void SetAccessControl (Semaphore semaphore, SemaphoreSecurity semaphoreSecurity)
+        {
+            throw new NotImplementedException ();
+        }
+    }
+}
\ No newline at end of file
index 8871794f349eda4ffb387ac87098498bfc9ca7a6..02fbd79cc8f8358c1719bd402b0d4c30ac5fe365 100644 (file)
@@ -33,4 +33,3 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.SemaphoreRights))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.SemaphoreSecurity))]
 
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ThreadingAclExtensions))]
diff --git a/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandle.cs b/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandle.cs
new file mode 100644 (file)
index 0000000..40253fb
--- /dev/null
@@ -0,0 +1,315 @@
+// 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.
+
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace System.Threading
+{
+    //
+    // Implementation of ThreadPoolBoundHandle that sits on top of the CLR's ThreadPool and Overlapped infrastructure
+    //
+
+    /// <summary>
+    ///     Represents an I/O handle that is bound to the system thread pool and enables low-level
+    ///     components to receive notifications for asynchronous I/O operations.
+    /// </summary>
+    public sealed partial class ThreadPoolBoundHandle : IDisposable
+    {
+        private readonly SafeHandle _handle;
+        private bool _isDisposed;
+
+        private ThreadPoolBoundHandle(SafeHandle handle)
+        {
+            _handle = handle;
+        }
+
+        /// <summary>
+        ///     Gets the bound operating system handle.
+        /// </summary>
+        /// <value>
+        ///     A <see cref="SafeHandle"/> object that holds the bound operating system handle.
+        /// </value>
+        public SafeHandle Handle
+        {
+            get { return _handle; }
+        }
+
+        /// <summary>
+        ///     Returns a <see cref="ThreadPoolBoundHandle"/> for the specific handle, 
+        ///     which is bound to the system thread pool.
+        /// </summary>
+        /// <param name="handle">
+        ///     A <see cref="SafeHandle"/> object that holds the operating system handle. The 
+        ///     handle must have been opened for overlapped I/O on the unmanaged side.
+        /// </param>
+        /// <returns>
+        ///     <see cref="ThreadPoolBoundHandle"/> for <paramref name="handle"/>, which 
+        ///     is bound to the system thread pool.
+        /// </returns>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="handle"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ArgumentException">
+        ///     <paramref name="handle"/> has been disposed.
+        ///     <para>
+        ///         -or-
+        ///     </para>
+        ///     <paramref name="handle"/> does not refer to a valid I/O handle.
+        ///     <para>
+        ///         -or-
+        ///     </para>
+        ///     <paramref name="handle"/> refers to a handle that has not been opened 
+        ///     for overlapped I/O.
+        ///     <para>
+        ///         -or-
+        ///     </para>
+        ///     <paramref name="handle"/> refers to a handle that has already been bound.
+        /// </exception>
+        /// <remarks>
+        ///     This method should be called once per handle.
+        ///     <para>
+        ///         -or-
+        ///     </para>
+        ///     <see cref="ThreadPoolBoundHandle"/> does not take ownership of <paramref name="handle"/>, 
+        ///     it remains the responsibility of the caller to call <see cref="SafeHandle.Dispose"/>.
+        /// </remarks>
+        public static ThreadPoolBoundHandle BindHandle(SafeHandle handle)
+        {
+            if (handle == null)
+                throw new ArgumentNullException(nameof(handle));
+
+            if (handle.IsClosed || handle.IsInvalid)
+                throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
+
+            try
+            {
+                // ThreadPool.BindHandle will always return true, otherwise, it throws. See the underlying FCall
+                // implementation in ThreadPoolNative::CorBindIoCompletionCallback to see the implementation.
+                bool succeeded = ThreadPool.BindHandle(handle);
+                Debug.Assert(succeeded);
+            }
+            catch (Exception ex)
+            {   // BindHandle throws ApplicationException on full CLR and Exception on CoreCLR.
+                // We do not let either of these leak and convert them to ArgumentException to 
+                // indicate that the specified handles are invalid.
+
+                if (ex.HResult == System.HResults.E_HANDLE)         // Bad handle
+                    throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
+
+                if (ex.HResult == System.HResults.E_INVALIDARG)     // Handle already bound or sync handle
+                    throw new ArgumentException(SR.Argument_AlreadyBoundOrSyncHandle, nameof(handle));
+
+                throw;
+            }
+
+            return new ThreadPoolBoundHandle(handle);
+        }
+
+        /// <summary>
+        ///     Returns an unmanaged pointer to a <see cref="NativeOverlapped"/> structure, specifying 
+        ///     a delegate that is invoked when the asynchronous I/O operation is complete, a user-provided 
+        ///     object providing context, and managed objects that serve as buffers.
+        /// </summary>
+        /// <param name="callback">
+        ///     An <see cref="IOCompletionCallback"/> delegate that represents the callback method 
+        ///     invoked when the asynchronous I/O operation completes.
+        /// </param>
+        /// <param name="state">
+        ///     A user-provided object that distinguishes this <see cref="NativeOverlapped"/> from other 
+        ///     <see cref="NativeOverlapped"/> instances. Can be <see langword="null"/>.
+        /// </param>
+        /// <param name="pinData">
+        ///     An object or array of objects representing the input or output buffer for the operation. Each 
+        ///     object represents a buffer, for example an array of bytes.  Can be <see langword="null"/>.
+        /// </param>
+        /// <returns>
+        ///     An unmanaged pointer to a <see cref="NativeOverlapped"/> structure.
+        /// </returns>
+        /// <remarks>
+        ///     <para>
+        ///         The unmanaged pointer returned by this method can be passed to the operating system in 
+        ///         overlapped I/O operations. The <see cref="NativeOverlapped"/> structure is fixed in 
+        ///         physical memory until <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> is called.
+        ///     </para>
+        ///     <para>
+        ///         The buffer or buffers specified in <paramref name="pinData"/> must be the same as those passed 
+        ///         to the unmanaged operating system function that performs the asynchronous I/O.
+        ///     </para>
+        ///     <note>
+        ///         The buffers specified in <paramref name="pinData"/> are pinned for the duration of 
+        ///         the I/O operation.
+        ///     </note>
+        /// </remarks>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="callback"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ObjectDisposedException">
+        ///     This method was called after the <see cref="ThreadPoolBoundHandle"/> was disposed.
+        /// </exception>
+        public unsafe NativeOverlapped* AllocateNativeOverlapped(IOCompletionCallback callback, object state, object pinData)
+        {
+            if (callback == null)
+                throw new ArgumentNullException(nameof(callback));
+
+            EnsureNotDisposed();
+
+            ThreadPoolBoundHandleOverlapped overlapped = new ThreadPoolBoundHandleOverlapped(callback, state, pinData, preAllocated: null);
+            overlapped._boundHandle = this;
+            return overlapped._nativeOverlapped;
+        }
+
+        /// <summary>
+        ///     Returns an unmanaged pointer to a <see cref="NativeOverlapped"/> structure, using the callback,
+        ///     state, and buffers associated with the specified <see cref="PreAllocatedOverlapped"/> object.
+        /// </summary>
+        /// <param name="preAllocated">
+        ///     A <see cref="PreAllocatedOverlapped"/> object from which to create the NativeOverlapped pointer.
+        /// </param>
+        /// <returns>
+        ///     An unmanaged pointer to a <see cref="NativeOverlapped"/> structure.
+        /// </returns>
+        /// <remarks>
+        ///     <para>
+        ///         The unmanaged pointer returned by this method can be passed to the operating system in 
+        ///         overlapped I/O operations. The <see cref="NativeOverlapped"/> structure is fixed in 
+        ///         physical memory until <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> is called.
+        ///     </para>
+        /// </remarks>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="preAllocated"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ArgumentException">
+        ///     <paramref name="preAllocated"/> is currently in use for another I/O operation.  
+        /// </exception>
+        /// <exception cref="ObjectDisposedException">
+        ///     This method was called after the <see cref="ThreadPoolBoundHandle"/> was disposed, or 
+        ///     this method was called after <paramref name="preAllocated"/> was disposed.
+        /// </exception>
+        /// <seealso cref="PreAllocatedOverlapped"/>
+        public unsafe NativeOverlapped* AllocateNativeOverlapped(PreAllocatedOverlapped preAllocated)
+        {
+            if (preAllocated == null)
+                throw new ArgumentNullException(nameof(preAllocated));
+
+            EnsureNotDisposed();
+
+            preAllocated.AddRef();
+            try
+            {
+                ThreadPoolBoundHandleOverlapped overlapped = preAllocated._overlapped;
+
+                if (overlapped._boundHandle != null)
+                    throw new ArgumentException(SR.Argument_PreAllocatedAlreadyAllocated, nameof(preAllocated));
+
+                overlapped._boundHandle = this;
+
+                return overlapped._nativeOverlapped;
+            }
+            catch
+            {
+                preAllocated.Release();
+                throw;
+            }
+        }
+
+        /// <summary>
+        ///     Frees the unmanaged memory associated with a <see cref="NativeOverlapped"/> structure 
+        ///     allocated by the <see cref="AllocateNativeOverlapped"/> method.
+        /// </summary>
+        /// <param name="overlapped">
+        ///     An unmanaged pointer to the <see cref="NativeOverlapped"/> structure to be freed.
+        /// </param>
+        /// <remarks>
+        ///     <note type="caution">
+        ///         You must call the <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> method exactly once 
+        ///         on every <see cref="NativeOverlapped"/> unmanaged pointer allocated using the 
+        ///         <see cref="AllocateNativeOverlapped"/> method. 
+        ///         If you do not call the <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> method, you will 
+        ///         leak memory. If you call the <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> method more 
+        ///         than once on the same <see cref="NativeOverlapped"/> unmanaged pointer, memory will be corrupted.
+        ///     </note>
+        /// </remarks>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="overlapped"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ObjectDisposedException">
+        ///     This method was called after the <see cref="ThreadPoolBoundHandle"/> was disposed.
+        /// </exception>
+        public unsafe void FreeNativeOverlapped(NativeOverlapped* overlapped)
+        {
+            if (overlapped == null)
+                throw new ArgumentNullException(nameof(overlapped));
+
+            // Note: we explicitly allow FreeNativeOverlapped calls after the ThreadPoolBoundHandle has been Disposed.
+
+            ThreadPoolBoundHandleOverlapped wrapper = GetOverlappedWrapper(overlapped, this);
+
+            if (wrapper._boundHandle != this)
+                throw new ArgumentException(SR.Argument_NativeOverlappedWrongBoundHandle, nameof(overlapped));
+
+            if (wrapper._preAllocated != null)
+                wrapper._preAllocated.Release();
+            else
+                Overlapped.Free(overlapped);
+        }
+
+        /// <summary>
+        ///     Returns the user-provided object specified when the <see cref="NativeOverlapped"/> instance was
+        ///     allocated using the <see cref="AllocateNativeOverlapped(IOCompletionCallback, object, byte[])"/>.
+        /// </summary>
+        /// <param name="overlapped">
+        ///     An unmanaged pointer to the <see cref="NativeOverlapped"/> structure from which to return the 
+        ///     asscociated user-provided object.
+        /// </param>
+        /// <returns>
+        ///     A user-provided object that distinguishes this <see cref="NativeOverlapped"/> 
+        ///     from other <see cref="NativeOverlapped"/> instances, otherwise, <see langword="null"/> if one was 
+        ///     not specified when the instance was allocated using <see cref="AllocateNativeOverlapped"/>.
+        /// </returns>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="overlapped"/> is <see langword="null"/>.
+        /// </exception>
+        public unsafe static object GetNativeOverlappedState(NativeOverlapped* overlapped)
+        {
+            if (overlapped == null)
+                throw new ArgumentNullException(nameof(overlapped));
+
+            ThreadPoolBoundHandleOverlapped wrapper = GetOverlappedWrapper(overlapped, null);
+            Debug.Assert(wrapper._boundHandle != null);
+            return wrapper._userState;
+        }
+
+        private static unsafe ThreadPoolBoundHandleOverlapped GetOverlappedWrapper(NativeOverlapped* overlapped, ThreadPoolBoundHandle expectedBoundHandle)
+        {
+            ThreadPoolBoundHandleOverlapped wrapper;
+            try
+            {
+                wrapper = (ThreadPoolBoundHandleOverlapped)Overlapped.Unpack(overlapped);
+            }
+            catch (NullReferenceException ex)
+            {
+                throw new ArgumentException(SR.Argument_NativeOverlappedAlreadyFree, nameof(overlapped), ex);
+            }
+
+            return wrapper;
+        }
+
+        public void Dispose()
+        {
+            // .NET Native's version of ThreadPoolBoundHandle that wraps the Win32 ThreadPool holds onto
+            // native resources so it needs to be disposable. To match the contract, we are also disposable.
+            // We also implement a disposable state to mimic behavior between this implementation and 
+            // .NET Native's version (code written against us, will also work against .NET Native's version).
+            _isDisposed = true;
+        }
+
+
+        private void EnsureNotDisposed()
+        {
+            if (_isDisposed)
+                throw new ObjectDisposedException(GetType().ToString());
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandleOverlapped.cs b/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandleOverlapped.cs
new file mode 100644 (file)
index 0000000..2245254
--- /dev/null
@@ -0,0 +1,50 @@
+// 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.
+
+namespace System.Threading
+{
+    /// <summary>
+    /// Overlapped subclass adding data needed by ThreadPoolBoundHandle.
+    /// </summary>
+    internal sealed class ThreadPoolBoundHandleOverlapped : Overlapped
+    {
+        private readonly IOCompletionCallback _userCallback;
+        internal readonly object _userState;
+        internal PreAllocatedOverlapped _preAllocated;
+        internal unsafe NativeOverlapped* _nativeOverlapped;
+        internal ThreadPoolBoundHandle _boundHandle;
+        internal bool _completed;
+
+        public unsafe ThreadPoolBoundHandleOverlapped(IOCompletionCallback callback, object state, object pinData, PreAllocatedOverlapped preAllocated)
+        {
+            _userCallback = callback;
+            _userState = state;
+            _preAllocated = preAllocated;
+
+            _nativeOverlapped = Pack(CompletionCallback, pinData);
+            _nativeOverlapped->OffsetLow = 0;        // CLR reuses NativeOverlapped instances and does not reset these
+            _nativeOverlapped->OffsetHigh = 0;
+        }
+
+        private unsafe static void CompletionCallback(uint errorCode, uint numBytes, NativeOverlapped* nativeOverlapped)
+        {
+            ThreadPoolBoundHandleOverlapped overlapped = (ThreadPoolBoundHandleOverlapped)Overlapped.Unpack(nativeOverlapped);
+
+            //
+            // The Win32 thread pool implementation of ThreadPoolBoundHandle does not permit reuse of NativeOverlapped
+            // pointers without freeing them and allocating new a new one.  We need to ensure that code using the CLR
+            // ThreadPool implementation follows those rules.
+            //
+            if (overlapped._completed)
+                throw new InvalidOperationException(SR.InvalidOperation_NativeOverlappedReused);
+
+            overlapped._completed = true;
+
+            if (overlapped._boundHandle == null)
+                throw new InvalidOperationException(SR.Argument_NativeOverlappedAlreadyFree);
+
+            overlapped._userCallback(errorCode, numBytes, nativeOverlapped);
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolPreAllocatedOverlapped.cs b/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolPreAllocatedOverlapped.cs
new file mode 100644 (file)
index 0000000..dfc7d47
--- /dev/null
@@ -0,0 +1,104 @@
+// 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.
+
+namespace System.Threading
+{
+    /// <summary>
+    /// Represents pre-allocated state for native overlapped I/O operations.
+    /// </summary>
+    /// <seealso cref="ThreadPoolBoundHandle.AllocateNativeOverlapped(PreAllocatedOverlapped)"/>
+    public sealed class PreAllocatedOverlapped : IDisposable, IDeferredDisposable
+    {
+        internal readonly ThreadPoolBoundHandleOverlapped _overlapped;
+        private DeferredDisposableLifetime<PreAllocatedOverlapped> _lifetime;
+
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="PreAllocatedOverlapped"/> class, specifying 
+        ///     a delegate that is invoked when each asynchronous I/O operation is complete, a user-provided 
+        ///     object providing context, and managed objects that serve as buffers.
+        /// </summary>
+        /// <param name="callback">
+        ///     An <see cref="IOCompletionCallback"/> delegate that represents the callback method 
+        ///     invoked when each asynchronous I/O operation completes.
+        /// </param>
+        /// <param name="state">
+        ///     A user-provided object that distinguishes <see cref="NativeOverlapped"/> instance produced from this
+        ///     object from other <see cref="NativeOverlapped"/> instances. Can be <see langword="null"/>.
+        /// </param>
+        /// <param name="pinData">
+        ///     An object or array of objects representing the input or output buffer for the operations. Each 
+        ///     object represents a buffer, for example an array of bytes.  Can be <see langword="null"/>.
+        /// </param>
+        /// <remarks>
+        ///     The new <see cref="PreAllocatedOverlapped"/> instance can be passed to 
+        ///     <see cref="ThreadPoolBoundHandle.AllocateNativeOverlapped(PreAllocatedOverlapped)"/>, to produce
+        ///     a <see cref="NativeOverlapped"/> instance that can be passed to the operating system in overlapped
+        ///     I/O operations.  A single <see cref="PreAllocatedOverlapped"/> instance can only be used for 
+        ///     a single native I/O operation at a time.  However, the state stored in the <see cref="PreAllocatedOverlapped"/>
+        ///     instance can be reused for subsequent native operations.
+        ///     <note>
+        ///         The buffers specified in <paramref name="pinData"/> are pinned until <see cref="Dispose"/> is called.
+        ///     </note>
+        /// </remarks>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="callback"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ObjectDisposedException">
+        ///     This method was called after the <see cref="ThreadPoolBoundHandle"/> was disposed.
+        /// </exception>
+        public unsafe PreAllocatedOverlapped(IOCompletionCallback callback, object state, object pinData)
+        {
+            if (callback == null)
+                throw new ArgumentNullException(nameof(callback));
+
+            _overlapped = new ThreadPoolBoundHandleOverlapped(callback, state, pinData, this);
+        }
+
+        internal bool AddRef()
+        {
+            return _lifetime.AddRef(this);
+        }
+
+        internal void Release()
+        {
+            _lifetime.Release(this);
+        }
+
+        /// <summary>
+        /// Frees the resources associated with this <see cref="PreAllocatedOverlapped"/> instance. 
+        /// </summary>
+        public unsafe void Dispose()
+        {
+            _lifetime.Dispose(this);
+            GC.SuppressFinalize(this);
+        }
+
+        ~PreAllocatedOverlapped()
+        {
+            //
+            // During shutdown, don't automatically clean up, because this instance may still be
+            // reachable/usable by other code.
+            //
+            if (!Environment.HasShutdownStarted)
+                Dispose();
+        }
+
+        unsafe void IDeferredDisposable.OnFinalRelease(bool disposed)
+        {
+            if (_overlapped != null)
+            {
+                if (disposed)
+                {
+                    Overlapped.Free(_overlapped._nativeOverlapped);
+                }
+                else
+                {
+                    _overlapped._boundHandle = null;
+                    _overlapped._completed = false;
+                    *_overlapped._nativeOverlapped = default(NativeOverlapped);
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Threading.Overlapped/DeferredDisposableLifetime.cs b/mcs/class/Facades/System.Threading.Overlapped/DeferredDisposableLifetime.cs
new file mode 100644 (file)
index 0000000..2450906
--- /dev/null
@@ -0,0 +1,116 @@
+// 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.
+
+using System.Diagnostics;
+
+namespace System.Threading
+{
+    /// <summary>
+    /// Provides callbacks to objects whose lifetime is managed by <see cref="DeferredDisposableLifetime{T}"/>.
+    /// </summary>
+    internal interface IDeferredDisposable
+    {
+        /// <summary>
+        /// Called when the object's refcount reaches zero.
+        /// </summary>
+        /// <param name="disposed">
+        /// Indicates whether the object has been disposed.
+        /// </param>
+        /// <remarks>
+        /// If the refount reaches zero before the object is disposed, this method will be called with
+        /// <paramref name="disposed"/> set to false.  If the object is then disposed, this method will be
+        /// called again, with <paramref name="disposed"/> set to true.  If the refcount reaches zero
+        /// after the object has already been disposed, this will be called a single time, with 
+        /// <paramref name="disposed"/> set to true.
+        /// </remarks>
+        void OnFinalRelease(bool disposed);
+    }
+
+    /// <summary>
+    /// Manages the lifetime of an object which implements IDisposable, but which must defer the actual
+    /// cleanup of state until all existing uses of the object are complete.
+    /// </summary>
+    /// <typeparam name="T">The type of object whose lifetime will be managed.</typeparam>
+    /// <remarks>
+    /// This type maintains a reference count, and tracks whether the object has been disposed.  When
+    /// Callbacks are made to <see cref="IDeferredDisposable.OnFinalRelease(bool)"/> when the refcount
+    /// reaches zero.  Objects that need to defer cleanup until they have been disposed *and* they have
+    /// no more references can do so in <see cref="IDeferredDisposable.OnFinalRelease(bool)"/> when
+    /// 'disposed' is true.
+    /// </remarks>
+    internal struct DeferredDisposableLifetime<T> where T : class, IDeferredDisposable
+    {
+        //
+        // _count is positive until Dispose is called, after which it's (-1 - refcount).
+        //
+        private int _count;
+
+        public bool AddRef(T obj)
+        {
+            while (true)
+            {
+                int oldCount = Volatile.Read(ref _count);
+
+                // Have we been disposed?
+                if (oldCount < 0)
+                    throw new ObjectDisposedException(typeof(T).ToString());
+
+                int newCount = checked(oldCount + 1);
+
+                if (Interlocked.CompareExchange(ref _count, newCount, oldCount) == oldCount)
+                    return true;
+            }
+        }
+
+        public void Release(T obj)
+        {
+            while (true)
+            {
+                int oldCount = Volatile.Read(ref _count);
+                if (oldCount > 0)
+                {
+                    // We haven't been disposed.  Decrement _count.
+                    int newCount = oldCount - 1;
+                    if (Interlocked.CompareExchange(ref _count, newCount, oldCount) == oldCount)
+                    {
+                        if (newCount == 0)
+                            obj.OnFinalRelease(disposed: false);
+                        return;
+                    }
+                }
+                else
+                {
+                    Debug.Assert(oldCount != 0 && oldCount != -1);
+
+                    // We've been disposed.  Increment _count.
+                    int newCount = oldCount + 1;
+                    if (Interlocked.CompareExchange(ref _count, newCount, oldCount) == oldCount)
+                    {
+                        if (newCount == -1)
+                            obj.OnFinalRelease(disposed: true);
+                        return;
+                    }
+                }
+            }
+        }
+
+        public void Dispose(T obj)
+        {
+            while (true)
+            {
+                int oldCount = Volatile.Read(ref _count);
+                if (oldCount < 0)
+                    return; // already disposed
+
+                int newCount = -1 - oldCount;
+                if (Interlocked.CompareExchange(ref _count, newCount, oldCount) == oldCount)
+                {
+                    if (newCount == -1)
+                        obj.OnFinalRelease(disposed: true);
+                    return;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Threading.Overlapped/HResults.cs b/mcs/class/Facades/System.Threading.Overlapped/HResults.cs
new file mode 100644 (file)
index 0000000..ef9a772
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// HResults.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System
+{
+       internal static class HResults
+       {
+               internal const int E_HANDLE = unchecked((int)0x80070006);
+               internal const int E_INVALIDARG = unchecked((int)0x80070057);
+       }
+}
\ No newline at end of file
index 460fb4aff26d042fd0beb0c5b8bb7cd8ced7eb27..061c46b236be0470d5f3818dc7a59b00709e404c 100644 (file)
@@ -12,7 +12,7 @@ LIBRARY = System.Threading.Overlapped.dll
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
 LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) 
+LIB_MCS_FLAGS = $(SIGN_FLAGS) -unsafe
 
 PLATFORM_DEBUG_FLAGS =
 
diff --git a/mcs/class/Facades/System.Threading.Overlapped/SR.cs b/mcs/class/Facades/System.Threading.Overlapped/SR.cs
new file mode 100644 (file)
index 0000000..a65446d
--- /dev/null
@@ -0,0 +1,11 @@
+// strings taken from corefx
+
+class SR
+{
+       public const string Argument_AlreadyBoundOrSyncHandle = "'handle' has already been bound to the thread pool, or was not opened for asynchronous I/O.";
+       public const string Argument_InvalidHandle = "'handle' has been disposed or is an invalid handle.";
+       public const string Argument_NativeOverlappedAlreadyFree = "'overlapped' has already been freed.";
+       public const string Argument_NativeOverlappedWrongBoundHandle = "'overlapped' was not allocated by this ThreadPoolBoundHandle instance.";
+       public const string Argument_PreAllocatedAlreadyAllocated = "'preAllocated' is already in use.";
+       public const string InvalidOperation_NativeOverlappedReused = "NativeOverlapped cannot be reused for multiple operations.";
+}
\ No newline at end of file
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..eb1041a8bbb8cb2a919944f2b2a41a379d579704 100644 (file)
@@ -1,3 +1,9 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+ClrThreadPoolBoundHandle.cs
+ClrThreadPoolBoundHandleOverlapped.cs
+ClrThreadPoolPreAllocatedOverlapped.cs
+DeferredDisposableLifetime.cs
+SR.cs
+HResults.cs
index 127e5a1f080eb04b66754124352a3903b53ece39..dd272df5d996c56f703f0c19bfc8ee24d818b964 100644 (file)
@@ -22,6 +22,3 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.IOCompletionCallback))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.NativeOverlapped))]
-
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.PreAllocatedOverlapped))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ThreadPoolBoundHandle))]
index 1b3e7a3a46b6e5b29adbd0c1754c3b9bb289b10a..a4915b94613f6cb8481ceae1097a4fe7dcfc7910 100644 (file)
@@ -47,4 +47,5 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.IXmlSerializable))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDateTimeSerializationMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSchemaProviderAttribute))]
 
index 45ffe3482e084120afd9a7685bf6684b584bee83..16a26f2c55db1e21bbb3c17affae841887e4c8d8 100644 (file)
@@ -11,7 +11,7 @@ LIBRARY = System.Xml.XPath.XDocument.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.Xml.Linq
+LIB_REFS = System System.Xml System.Xml.Linq
 LIB_MCS_FLAGS = $(SIGN_FLAGS)
 
 PLATFORM_DEBUG_FLAGS =
index a9ce64258f895e97a52d9aedd6489aeab736a08b..0fec9f720b46d9d83d0367053fa01bb674a929ae 100644 (file)
@@ -22,4 +22,3 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XPath.Extensions))]
 
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XPath.XDocumentExtensions))]
diff --git a/mcs/class/Facades/System.Xml.XPath.XDocument/XDocumentExtensions.cs b/mcs/class/Facades/System.Xml.XPath.XDocument/XDocumentExtensions.cs
new file mode 100644 (file)
index 0000000..d254f73
--- /dev/null
@@ -0,0 +1,29 @@
+
+// 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.
+
+using System.Xml.Linq;
+
+namespace System.Xml.XPath
+{
+    public static class XDocumentExtensions
+    {
+        private class XDocumentNavigable : IXPathNavigable
+        {
+            private XNode _node;
+            public XDocumentNavigable(XNode n)
+            {
+                _node = n;
+            }
+            public XPathNavigator CreateNavigator()
+            {
+                return _node.CreateNavigator();
+            }
+        }
+        public static IXPathNavigable ToXPathNavigable(this XNode node)
+        {
+            return new XDocumentNavigable(node);
+        }
+    }
+}
\ No newline at end of file
index 0e18045fc84e385f476acf179a8d9486c22857a7..8a525e19ab2627e5416715a932fc6e5c98998334 100644 (file)
@@ -3,13 +3,13 @@
 # Caution while renaming SUBDIRS variables as those are used outside mono repository.
 # ie: macccore/builds/Makefile
 
-monotouch_PARALLEL_SUBDIRS = System.Collections.Concurrent System.Collections System.ComponentModel.Annotations System.ComponentModel.EventBasedAsync System.ComponentModel \
+common_SUBDIRS = System.Collections.Concurrent System.Collections System.ComponentModel.Annotations System.ComponentModel.EventBasedAsync System.ComponentModel \
 System.Diagnostics.Contracts System.Diagnostics.Debug System.Diagnostics.Tracing System.Diagnostics.Tools System.Dynamic.Runtime System.Globalization System.IO System.Linq.Expressions \
 System.Linq.Parallel System.Linq.Queryable System.Linq System.Net.NetworkInformation System.Net.Primitives System.Net.Requests System.ObjectModel \
 System.Reflection.Extensions System.Reflection.Primitives System.Reflection System.Resources.ResourceManager System.Runtime.Extensions \
 System.Runtime.InteropServices System.Runtime.InteropServices.WindowsRuntime System.Runtime.Numerics System.Runtime.Serialization.Json \
-System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml System.Runtime System.Security.Principal System.ServiceModel.Http \
-System.ServiceModel.Primitives System.ServiceModel.Security System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel \
+System.Runtime System.Security.Principal System.ServiceModel.Http \
+System.ServiceModel.Security System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel \
 System.Threading.Tasks System.Threading.Timer System.Threading System.Xml.ReaderWriter System.Xml.XDocument System.Xml.XmlSerializer \
 System.Runtime.Handles System.ServiceModel.Duplex System.ServiceModel.NetTcp \
 Microsoft.Win32.Primitives Microsoft.Win32.Registry System.AppContext System.Collections.NonGeneric System.Collections.Specialized System.ComponentModel.Primitives \
@@ -22,24 +22,46 @@ System.Net.Utilities System.Net.WebHeaderCollection System.Net.WebSockets System
 System.Security.AccessControl System.Security.Claims System.Security.Cryptography.DeriveBytes System.Security.Cryptography.Encoding System.Security.Cryptography.Encryption \
 System.Security.Cryptography.Encryption.Aes System.Security.Cryptography.Encryption.ECDiffieHellman System.Security.Cryptography.Encryption.ECDsa System.Security.Cryptography.Hashing \
 System.Security.Cryptography.Hashing.Algorithms System.Security.Cryptography.RSA System.Security.Cryptography.RandomNumberGenerator \
-System.Security.Cryptography.X509Certificates System.Security.Principal.Windows System.Threading.Thread System.Threading.ThreadPool \
+System.Security.Principal.Windows System.Threading.Thread System.Threading.ThreadPool \
 System.Xml.XPath System.Xml.XmlDocument System.Xml.Xsl.Primitives Microsoft.Win32.Registry.AccessControl System.Diagnostics.StackTrace System.Globalization.Extensions \
-System.IO.FileSystem.AccessControl System.Private.CoreLib.InteropServices System.Private.CoreLib.Threading System.Reflection.TypeExtensions \
-System.Security.SecureString System.Threading.AccessControl System.Threading.Overlapped System.Xml.XPath.XDocument
+System.IO.FileSystem.AccessControl System.Private.CoreLib.InteropServices System.Reflection.TypeExtensions \
+System.Security.SecureString System.Threading.AccessControl System.Threading.Overlapped System.Xml.XPath.XDocument System.IO.Compression \
+System.Security.Cryptography.Algorithms System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
+System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes
+
+# common_SUBDIRS dependencies
+common_DEPS_SUBDIRS = System.Security.Cryptography.X509Certificates System.ServiceModel.Primitives System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml
+
+drawing_DEPS_SUBDIRS = System.Drawing.Primitives
 
 reflection_PARALLEL_SUBDIRS = System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
 
+monotouch_SUBDIRS = $(common_DEPS_SUBDIRS)
+monotouch_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
+
+mobile_static_SUBDIRS = $(monotouch_SUBDIRS)
 mobile_static_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
-net_4_x_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS) System.Diagnostics.PerformanceCounter \
-System.IO.FileSystem.Watcher System.IO.Pipes System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.Net.Http.WebRequestHandler
+net_4_x_SUBDIRS = $(common_DEPS_SUBDIRS) $(drawing_DEPS_SUBDIRS)
+net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(reflection_PARALLEL_SUBDIRS) System.Diagnostics.PerformanceCounter \
+System.Net.Http.WebRequestHandler
 
+monodroid_SUBDIRS = $(monotouch_SUBDIRS)
 monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
 
-xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
-xammac_net_4_5_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
+xammac_SUBDIRS = $(monotouch_SUBDIRS)
+xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
+xammac_net_4_5_SUBDIRS = $(net_4_x_SUBDIRS)
+xammac_net_4_5_PARALLEL_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
+
+monotouch_watch_SUBDIRS = $(monotouch_SUBDIRS) $(drawing_DEPS_SUBDIRS)
 monotouch_watch_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
+
+monotouch_tv_SUBDIRS = $(monotouch_SUBDIRS)
 monotouch_tv_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
+mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
+System.Security.Cryptography.Cng System.Security.Cryptography.OpenSsl
+
 PROFILE_PARALLEL_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
index 167bc4ca5cc5bc8a883aa8d145b3c9249aba47b0..4f4528e4ee3749a9692683963aadbd72f6f20a53 100644 (file)
@@ -23,6 +23,7 @@ mobile_common_dirs := \
        Mono.Security \
        System  \
        System.Core     \
+       System.Security \
        System.XML      \
        I18N            \
        System.ServiceModel.Internals   \
@@ -36,6 +37,7 @@ mobile_common_dirs := \
        Mono.Data.Tds   \
        System.Transactions     \
        System.Numerics \
+       System.Numerics.Vectors         \
        System.Data     \
        Mono.Cairo      \
        Mono.Data.Sqlite        \
@@ -46,14 +48,18 @@ mobile_common_dirs := \
        System.ComponentModel.Composition.4.5 \
        System.Net \
        System.Net.Http \
-       System.Net.Http.WebRequest      \
        System.Windows \
        System.Xml.Serialization \
        Mono.CSharp     \
        Microsoft.CSharp \
        Mono.Security.Providers.DotNet  \
        Mono.Security.Providers.NewSystemSource \
-       Mono.Security.Providers.NewTls
+       Mono.Security.Providers.NewTls  \
+       System.Runtime.InteropServices.RuntimeInformation       \
+       System.Reflection.DispatchProxy \
+       System.Xml.XPath.XmlDocument \
+       System.Reflection.Context       \
+       System.Net.Http.WinHttpHandler
 
 mobile_static_dirs := \
        $(mobile_common_dirs)   \
@@ -94,6 +100,7 @@ xammac_4_5_dirs := \
        System  \
        Mono.Posix                      \
        System.Core     \
+       System.Security                 \
        System.XML      \
        I18N            \
        System.ServiceModel.Internals   \
@@ -129,10 +136,14 @@ xammac_4_5_dirs := \
        Mono.CompilerServices.SymbolWriter      \
        System.Data.Linq                \
        System.Net.Http \
+       System.Net.Http.WebRequest \
        Mono.Security.Providers.DotNet \
        Mono.Security.Providers.OldTls \
        Mono.Security.Providers.NewSystemSource \
        Mono.Security.Providers.NewTls \
+       System.Runtime.InteropServices.RuntimeInformation \
+       System.Reflection.Context       \
+       System.Net.Http.WinHttpHandler  \
        $(pcl_facade_dirs)
 
 net_4_x_dirs := \
@@ -219,7 +230,8 @@ net_4_x_dirs := \
        System.Web.Http.SelfHost \
        System.Web.Http.WebHost \
        Mono.Security.Providers.NewSystemSource \
-       Mono.Security.Providers.NewTls
+       Mono.Security.Providers.NewTls \
+       System.Runtime.InteropServices.RuntimeInformation
 
 # These are the subdirs which depends on libs in net_4_x_dirs
 # or have proper dependencies between each other
@@ -275,6 +287,7 @@ net_4_x_parallel_dirs := \
        System.Workflow.Activities \
        System.Workflow.ComponentModel \
        System.Workflow.Runtime \
+       System.Reflection.Context \
        $(pcl_facade_dirs)
 
 xbuild_2_0_dirs := \
@@ -303,7 +316,7 @@ binary_reference_assemblies_SUBDIRS := reference-assemblies
 net_4_x_SUBDIRS := $(net_4_x_dirs) $(xbuild_4_0_dirs)
 net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs) aot-compiler
 xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
-xbuild_14_SUBDIRS := $(xbuild_4_0_dirs)
+xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
 
 include ../build/rules.make
 
diff --git a/mcs/class/Microsoft.NuGet.Build.Tasks/Makefile b/mcs/class/Microsoft.NuGet.Build.Tasks/Makefile
new file mode 100644 (file)
index 0000000..e3561d4
--- /dev/null
@@ -0,0 +1,35 @@
+thisdir = class/Microsoft.NuGet.Build.Tasks
+SUBDIRS =
+include ../../build/rules.make
+
+XBUILD_DIR=$(topdir)/tools/xbuild
+include $(XBUILD_DIR)/xbuild.make
+
+NUGET_BUILDTASKS_REPO_DIR=$(topdir)/../external/nuget-buildtasks
+NUGET_BUILDTASKS_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/NuGet
+
+LIBRARY = Microsoft.NuGet.Build.Tasks.dll
+LIBRARY_INSTALL_DIR = $(NUGET_BUILDTASKS_TARGETS_DIR)
+
+KEY_FILE = $(NUGET_BUILDTASKS_REPO_DIR)/build/PublicKey.snk
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE)
+
+RESOURCE_DEFS = Microsoft.NuGet.Build.Tasks.Strings,$(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/Strings.resx
+
+LIB_REFS = $(PARENT_PROFILE)System \
+       $(PARENT_PROFILE)System.Core \
+       $(PARENT_PROFILE)System.Data \
+       $(PARENT_PROFILE)System.Xml \
+       $(PARENT_PROFILE)System.Xml.Linq \
+       $(PARENT_PROFILE)System.Runtime.Serialization \
+       $(XBUILD_UTILITIES) \
+       $(XBUILD_FRAMEWORK)
+
+LIB_MCS_FLAGS = \
+       -nowarn:3021            \
+       $(SIGN_FLAGS)
+
+EXTRA_DISTFILES = \
+       $(NUGET_BUILDTASKS_REPO_DIR)/build/PublicKey.snk
+
+include ../../build/library.make
diff --git a/mcs/class/Microsoft.NuGet.Build.Tasks/xbuild_14_Microsoft.NuGet.Build.Tasks.dll.sources b/mcs/class/Microsoft.NuGet.Build.Tasks/xbuild_14_Microsoft.NuGet.Build.Tasks.dll.sources
new file mode 100644 (file)
index 0000000..3fa9acd
--- /dev/null
@@ -0,0 +1,164 @@
+../../../external/nuget-buildtasks/src/Microsoft.NuGet.Build.Tasks/Delegates.cs
+../../../external/nuget-buildtasks/src/Microsoft.NuGet.Build.Tasks/ExceptionFromResource.cs
+../../../external/nuget-buildtasks/src/Microsoft.NuGet.Build.Tasks/InternalsVisibleTo.cs
+../../../external/nuget-buildtasks/src/Microsoft.NuGet.Build.Tasks/NativeMethods.cs
+../../../external/nuget-buildtasks/src/Microsoft.NuGet.Build.Tasks/NuGetPackageObject.cs
+../../../external/nuget-buildtasks/src/Microsoft.NuGet.Build.Tasks/Preprocessor.cs
+../../../external/nuget-buildtasks/src/Microsoft.NuGet.Build.Tasks/ResolveNuGetPackageAssets.cs
+../../../external/nuget-buildtasks/src/Microsoft.NuGet.Build.Tasks/Strings.Designer.cs
+
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonBinaryType.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonReader.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonToken.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonType.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonWriter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonObjectId.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/BinaryConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DataSetConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DataTableConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/CustomCreationConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DateTimeConverterBase.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/EntityKeyMemberConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/ExpandoObjectConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/KeyValuePairConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/BsonObjectIdConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/RegexConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/StringEnumConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ConstructorHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/VersionConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DateFormatHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DateTimeZoneHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Formatting.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConstructorAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonPosition.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPropertyKeyedCollection.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicProxy.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPath.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JRaw.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Required.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonDynamicContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonFormatterConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonISerializableContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonLinqContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonPrimitiveContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ErrorEventArgs.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPropertyDescriptor.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultReferenceResolver.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/PreserveReferencesHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/IJsonLineInfo.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonArrayAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonContainerAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DefaultValueHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverterAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonObjectAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializerSettings.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonValidatingReader.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/IJEnumerable.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenEqualityComparer.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/MemberSerialization.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ObjectCreationHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/IsoDateTimeConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/JavaScriptDateTimeConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonTextReader.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonPropertyAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonIgnoreAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonTextWriter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonWriterException.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonReaderException.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverterCollection.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonReader.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConvert.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializationException.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializer.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/Extensions.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JConstructor.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JContainer.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JEnumerable.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JObject.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JArray.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenReader.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenWriter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JToken.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JProperty.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenType.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JValue.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/Extensions.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaModel.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaModelBuilder.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaNodeCollection.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaNode.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaResolver.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaWriter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/UndefinedSchemaIdHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/ValidationEventArgs.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/ValidationEventHandler.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/CamelCasePropertyNamesContractResolver.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultSerializationBinder.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ErrorContext.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IContractResolver.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IValueProvider.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonDictionaryContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonProperty.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonPropertyCollection.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/MissingMemberHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/NullValueHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ReferenceLoopHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchema.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaConstants.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IReferenceResolver.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaType.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonObjectContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerProxy.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonStringContract.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/CachedAttributeGetter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/LateBoundMetadataTypeAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ReflectionValueProvider.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/OnErrorAttribute.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/Base64Encoder.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicProxyMetaObject.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicWrapper.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicReflectionDelegateFactory.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ObjectConstructor.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ILGeneratorExtensions.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ReflectionDelegateFactory.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/LateBoundReflectionDelegateFactory.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MethodCall.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringReference.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/TypeNameHandling.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/BidirectionalDictionary.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/CollectionWrapper.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DateTimeUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumValue.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumValues.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/JavaScriptUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonToken.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonWriter.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringBuffer.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/CollectionUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ListWrapper.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MathUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ValidationUtils.cs
+../../../external/Newtonsoft.Json/Src/Newtonsoft.Json/WriteState.cs
index 74fc4a03cf2cbd4605da80b3f3059eec57089057..8c414dad79feaced6c3d48e6a4b7ff4865e0e3ff 100644 (file)
@@ -120,7 +120,8 @@ namespace MonoTests.EvaluatorTest
                        Evaluator.Run ("var a = new int[]{1,2,3};");
 
                        object res = Evaluator.Evaluate ("from x in a select x + 1;");
-                       CollectionAssert.AreEqual (new int[] { 2, 3, 4 }, ((IEnumerable<int>) res).ToArray ());
+
+                       Assert.AreEqual (new int[] { 2, 3, 4 }, ((IEnumerable<int>) res).ToArray ());
                }
 
                [Test]
@@ -201,4 +202,4 @@ namespace MonoTests.EvaluatorTest
                }
 
        }
-}
\ No newline at end of file
+}
diff --git a/mcs/class/Mono.CSharp/mobile_static_Mono.CSharp_test.dll.exclude.sources b/mcs/class/Mono.CSharp/mobile_static_Mono.CSharp_test.dll.exclude.sources
new file mode 100644 (file)
index 0000000..c433add
--- /dev/null
@@ -0,0 +1,6 @@
+Evaluator/BuildinCommands.cs
+Evaluator/CompletionTest.cs
+Evaluator/EvaluatorFixture.cs
+Evaluator/EvaluatorTest.cs
+Evaluator/ExpressionsTest.cs
+Evaluator/TypesTest.cs
diff --git a/mcs/class/Mono.CSharp/mobile_static_Mono.CSharp_test.dll.sources b/mcs/class/Mono.CSharp/mobile_static_Mono.CSharp_test.dll.sources
new file mode 100644 (file)
index 0000000..64b774b
--- /dev/null
@@ -0,0 +1 @@
+#include Mono.CSharp_test.dll.sources
index a6a92f06430cf0b88a0d535b86db36d8a03f4c60..65b46010fc384b28a5a9b844b25ce1cf24e189e8 100644 (file)
@@ -31,9 +31,9 @@ public class MD2Test {
                if ((array1 == null) && (array2 == null))
                        return;
                if (array1 == null)
-                       Assertion.Fail (msg + " -> First array is NULL");
+                       Assert.Fail (msg + " -> First array is NULL");
                if (array2 == null)
-                       Assertion.Fail (msg + " -> Second array is NULL");
+                       Assert.Fail (msg + " -> Second array is NULL");
         
                bool a = (array1.Length == array2.Length);
                if (a) {
@@ -48,7 +48,7 @@ public class MD2Test {
                        msg += " -> Expected " + BitConverter.ToString (array1, 0);
                        msg += " is different than " + BitConverter.ToString (array2, 0);
                }
-               Assertion.Assert (msg, a);
+               Assert.IsTrue (a, msg);
        }
 
        // MD2 ("") = 8350e5a3e24c153df2275c9f80692773
@@ -208,7 +208,7 @@ public class MD2Test {
                for (int i=0; i < input.Length - 1; i++)
                        hash.TransformBlock (input, i, 1, copy, i);
                byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
-               Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
+               Assert.AreEqual (input [input.Length - 1], output [0], testName + ".e.1");
                AssertEquals (testName + ".e.2", result, hash.Hash);
                // required or next operation will still return old hash
                hash.Initialize ();
@@ -218,9 +218,9 @@ public class MD2Test {
        public virtual void StaticInfo () 
        {
                string className = hash.ToString ();
-               Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
-               Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
-               Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+               Assert.AreEqual (128, hash.HashSize, className + ".HashSize",);
+               Assert.AreEqual (1, hash.InputBlockSize, className + ".InputBlockSize");
+               Assert.AreEqual (1, hash.OutputBlockSize, className + ".OutputBlockSize");
        }
 }
 
index 308b689b91cce34677cf481c6b557b78c4b823a1..111035eb5acebc0027d66b8a0f145ef094b79f1c 100644 (file)
@@ -31,9 +31,9 @@ public class MD4Test {
                if ((array1 == null) && (array2 == null))
                        return;
                if (array1 == null)
-                       Assertion.Fail (msg + " -> First array is NULL");
+                       Assert.Fail (msg + " -> First array is NULL");
                if (array2 == null)
-                       Assertion.Fail (msg + " -> Second array is NULL");
+                       Assert.Fail (msg + " -> Second array is NULL");
 
                bool a = (array1.Length == array2.Length);
                if (a) {
@@ -48,7 +48,7 @@ public class MD4Test {
                        msg += " -> Expected " + BitConverter.ToString (array1, 0);
                        msg += " is different than " + BitConverter.ToString (array2, 0);
                }
-               Assertion.Assert (msg, a);
+               Assert.IsTrue (a, msg);
        }
 
        // MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
@@ -208,7 +208,7 @@ public class MD4Test {
                for (int i=0; i < input.Length - 1; i++)
                        hash.TransformBlock (input, i, 1, copy, i);
                byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
-               Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
+               Assert.AreEqual (input [input.Length - 1], output [0], testName + ".e.1");
                AssertEquals (testName + ".e.2", result, hash.Hash);
                // required or next operation will still return old hash
                hash.Initialize ();
@@ -218,9 +218,9 @@ public class MD4Test {
        public virtual void StaticInfo () 
        {
                string className = hash.ToString ();
-               Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
-               Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
-               Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+               Assert.AreEqual (128, hash.HashSize, className + ".HashSize");
+               Assert.AreEqual (1, hash.InputBlockSize, className + ".InputBlockSize");
+               Assert.AreEqual (1, hash.OutputBlockSize, className + ".OutputBlockSize");
        }
 }
 
index 1eb7078938063058c27009e421bf3d59ca4c88fc..a5796e910d77de3be4ff2c9063186e803cf79a37 100644 (file)
@@ -33,9 +33,9 @@ public class MD5Test {
                if ((array1 == null) && (array2 == null))
                        return;
                if (array1 == null)
-                       Assertion.Fail (msg + " -> First array is NULL");
+                       Assert.Fail (msg + " -> First array is NULL");
                if (array2 == null)
-                       Assertion.Fail (msg + " -> Second array is NULL");
+                       Assert.Fail (msg + " -> Second array is NULL");
 
                bool a = (array1.Length == array2.Length);
                if (a) {
@@ -50,7 +50,7 @@ public class MD5Test {
                        msg += " -> Expected " + BitConverter.ToString (array1, 0);
                        msg += " is different than " + BitConverter.ToString (array2, 0);
                }
-               Assertion.Assert (msg, a);
+               Assert.IsTrue (a, msg);
        }
 
        // MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
@@ -210,7 +210,7 @@ public class MD5Test {
                for (int i=0; i < input.Length - 1; i++)
                        hash.TransformBlock (input, i, 1, copy, i);
                byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
-               Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
+               Assert.AreEqual (input [input.Length - 1], output [0], testName + ".e.1");
                AssertEquals (testName + ".e.2", result, hash.Hash);
                // required or next operation will still return old hash
                hash.Initialize ();
@@ -220,9 +220,9 @@ public class MD5Test {
        public virtual void StaticInfo () 
        {
                string className = hash.ToString ();
-               Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
-               Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
-               Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+               Assert.AreEqual (128, hash.HashSize, className + ".HashSize");
+               Assert.AreEqual (1, hash.InputBlockSize, className + ".InputBlockSize");
+               Assert.AreEqual (1, hash.OutputBlockSize, className + ".OutputBlockSize");
        }
 }
 
index 0ef2206f50bf676319b97dce97070cc25231072c..358beca8d065370879c08a4621d6a37d432d83cb 100644 (file)
@@ -33,9 +33,9 @@ public class SHA1Test {
                if ((array1 == null) && (array2 == null))
                        return;
                if (array1 == null)
-                       Assertion.Fail (msg + " -> First array is NULL");
+                       Assert.Fail (msg + " -> First array is NULL");
                if (array2 == null)
-                       Assertion.Fail (msg + " -> Second array is NULL");
+                       Assert.Fail (msg + " -> Second array is NULL");
 
                bool a = (array1.Length == array2.Length);
                if (a) {
@@ -48,7 +48,7 @@ public class SHA1Test {
                }
                msg += " -> Expected " + BitConverter.ToString (array1, 0);
                msg += " is different than " + BitConverter.ToString (array2, 0);
-               Assertion.Assert (msg, a);
+               Assert.IsTrue (a, msg);
        }
 
        [SetUp]
@@ -63,12 +63,12 @@ public class SHA1Test {
        {
                // test all values static for SHA1
                string className = hash.ToString ();
-               Assertion.AssertEquals (className + ".HashSize", 160, hash.HashSize);
-               Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
-               Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
-               Assertion.AssertEquals (className + ".CanReuseTransform", true, hash.CanReuseTransform);
-               Assertion.AssertEquals (className + ".CanTransformMultipleBlocks", true, hash.CanTransformMultipleBlocks);
-               Assertion.AssertEquals (className + ".ToString()", "Mono.Security.Cryptography.SHA1CryptoServiceProvider", className);
+               Assert.AreEqual (className + ".HashSize", 160, hash.HashSize);
+               Assert.AreEqual (className + ".InputBlockSize", 1, hash.InputBlockSize);
+               Assert.AreEqual (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+               Assert.AreEqual (className + ".CanReuseTransform", true, hash.CanReuseTransform);
+               Assert.AreEqual (className + ".CanTransformMultipleBlocks", true, hash.CanTransformMultipleBlocks);
+               Assert.AreEqual (className + ".ToString()", "Mono.Security.Cryptography.SHA1CryptoServiceProvider", className);
        }
 
        // First test, we hash the string "abc"
index 989adb7697a272b8baefa1a2b6dbd417aa6234a6..56cec328adbcb1f52a4e31f7124d1d8e83721188 100644 (file)
@@ -22,7 +22,7 @@ namespace MonoTests.Mono.Math {
 
                protected void Expect (BigInteger actual, BigInteger expected) 
                {
-                       Assertion.AssertEquals (Name, expected, actual);
+                       Assert.AreEqual (expected, actual, Name);
                }
        }
 }
index 4cf969f69d05d48bf6ba8c61e293f7811ffe5f23..2abf162a89c6869d89d07d93f78c51ee1135ca20 100644 (file)
@@ -81,12 +81,12 @@ namespace MonoTests.Mono.Math {
 
                private void ExpectComposite (BigInteger bi)
                {
-                       Assertion.AssertEquals (false, bi.IsProbablePrime ());
+                       Assert.AreEqual (false, bi.IsProbablePrime ());
                }
 
                private void ExpectPrime (BigInteger bi)
                {
-                       Assertion.AssertEquals (true, bi.IsProbablePrime ());
+                       Assert.AreEqual (true, bi.IsProbablePrime ());
                }
        }
 
@@ -195,7 +195,7 @@ namespace MonoTests.Mono.Math {
        // Adapted from http://lists.ximian.com/archives/public/mono-devel-list/2003-November/003026.html
        // Note: these primes are taken from RFC 2412 [http://www.faqs.org/rfcs/rfc2412.html]
        [TestFixture]
-       public class Rfc2412WellTestedPrimes : Assertion {
+       public class Rfc2412WellTestedPrimes {
 
                // E.1. Well-Known Group 1:  A 768 bit prime
                [Test]
@@ -203,8 +203,8 @@ namespace MonoTests.Mono.Math {
                {
                        string prime = "1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919";
                        BigInteger bi = BigInteger.Parse (prime);
-                       Assert ("isProbablePrime-768", bi.IsProbablePrime ());
-                       AssertEquals ("ToString()", prime, bi.ToString ());
+                       Assert.IsTrue (bi.IsProbablePrime (), "isProbablePrime-768");
+                       Assert.AreEqual (prime, bi.ToString (), "ToString()");
                }
 
                // E.2. Well-Known Group 2:  A 1024 bit prime
@@ -213,8 +213,8 @@ namespace MonoTests.Mono.Math {
                {
                        string prime = "179769313486231590770839156793787453197860296048756011706444423684197180216158519368947833795864925541502180565485980503646440548199239100050792877003355816639229553136239076508735759914822574862575007425302077447712589550957937778424442426617334727629299387668709205606050270810842907692932019128194467627007";
                        BigInteger bi = BigInteger.Parse (prime);
-                       Assert ("isProbablePrime-1024", bi.IsProbablePrime ());
-                       AssertEquals ("ToString()", prime, bi.ToString ());
+                       Assert.IsTrue (bi.IsProbablePrime (), "isProbablePrime-1024");
+                       Assert.AreEqual (prime, bi.ToString (), "ToString()");
                }
 
                // Note: E.3 and E.4 are for Elliptic Curve Groups
@@ -225,8 +225,8 @@ namespace MonoTests.Mono.Math {
                {
                        string prime = "2410312426921032588552076022197566074856950548502459942654116941958108831682612228890093858261341614673227141477904012196503648957050582631942730706805009223062734745341073406696246014589361659774041027169249453200378729434170325843778659198143763193776859869524088940195577346119843545301547043747207749969763750084308926339295559968882457872412993810129130294592999947926365264059284647209730384947211681434464714438488520940127459844288859336526896320919633919";
                        BigInteger bi = BigInteger.Parse (prime);
-                       Assert ("isProbablePrime-1536", bi.IsProbablePrime ());
-                       AssertEquals ("ToString()", prime, bi.ToString ());
+                       Assert.IsTrue (bi.IsProbablePrime (), "isProbablePrime-1536");
+                       Assert.AreEqual (prime, bi.ToString (), "ToString()");
                }
        }
 
index 80434f9983ca1dd3296fe96cfdfbdf61372dc34f..e77246dc9568dfe60c81d27d1009955bd487db17 100644 (file)
@@ -34,7 +34,7 @@ namespace MonoTests.Mono.Math {
                        ContextData ctx = (ContextData)Context;
 
                        
-                       Assertion.AssertEquals (ctx.bits, bits);
+                       Assert.AreEqual (ctx.bits, bits);
                        uint d = ctx.testData;
 
                        for (uint i = (uint)bits - 2; d > 0; i--, d >>= 1)
@@ -65,7 +65,7 @@ namespace MonoTests.Mono.Math {
                                Assert.IsTrue (p.TestBit (1));
                                uint d = ctx.testData;
                                for (uint j = 128 - 2; d > 0; j--, d >>= 1)
-                                       Assertion.AssertEquals ((d&1) == 1, p.TestBit (j));
+                                       Assert.AreEqual ((d&1) == 1, p.TestBit (j));
                        }
                }
        }
index 0f529496e1183d56568e8535ed5a0f53a4aa9629..8696657715e03258c3c79fa620c2e0498af263b0 100644 (file)
@@ -68,7 +68,7 @@ namespace MonoTests.Mono.Security.Authenticode {
 // makecert -n "CN=PVK1" -sv 1.pvk 1.cer
 
 [TestFixture]
-public class PrivateKeyTest : Assertion {
+public class PrivateKeyTest {
 
        // because most crypto stuff works with byte[] buffers
        static public void AssertEquals (string msg, byte[] array1, byte[] array2) 
@@ -76,9 +76,9 @@ public class PrivateKeyTest : Assertion {
                if ((array1 == null) && (array2 == null))
                        return;
                if (array1 == null)
-                       Fail (msg + " -> First array is NULL");
+                       Assert.Fail (msg + " -> First array is NULL");
                if (array2 == null)
-                       Fail (msg + " -> Second array is NULL");
+                       Assert.Fail (msg + " -> Second array is NULL");
 
                bool a = (array1.Length == array2.Length);
                if (a) {
@@ -93,7 +93,7 @@ public class PrivateKeyTest : Assertion {
                        msg += " -> Expected " + BitConverter.ToString (array1, 0);
                        msg += " is different than " + BitConverter.ToString (array2, 0);
                }
-               Assert (msg, a);
+               Assert.IsTrue (a, msg);
        }
 
        string testfile;
@@ -152,10 +152,10 @@ public class PrivateKeyTest : Assertion {
        {
                WriteBuffer (nopwd);
                PrivateKey pvk = PrivateKey.CreateFromFile (testfile);
-               AssertNotNull ("msnopwd.RSA", pvk.RSA);
-               Assert ("msnopwd.Encrypted", !pvk.Encrypted);
-               Assert ("msnopwd.Weak", pvk.Weak);
-               AssertEquals ("msnopwd.KeyType", 2, pvk.KeyType);
+               Assert.IsNotNull (pvk.RSA, "msnopwd.RSA");
+               Assert.IsTrue (!pvk.Encrypted, "msnopwd.Encrypted");
+               Assert.IsTrue (pvk.Weak, "msnopwd.Weak");
+               Assert.AreEqual (2, pvk.KeyType, "msnopwd.KeyType");
        }
 
        // this will convert a PVK file without a password to a PVK file
@@ -168,11 +168,11 @@ public class PrivateKeyTest : Assertion {
                string rsa1 = pvk.RSA.ToXmlString (true);
                pvk.Save (testfile, "password");
                pvk = PrivateKey.CreateFromFile (testfile, "password");
-               AssertNotNull ("topwd.RSA", pvk.RSA);
+               Assert.IsNotNull (pvk.RSA, "topwd.RSA");
                string rsa2 = pvk.RSA.ToXmlString (true);
-               AssertEquals ("topwd.RSA identical", rsa1, rsa2);
-               Assert ("topwd.Encrypted", pvk.Encrypted);
-               Assert ("topwd.Weak", pvk.Weak);
+               Assert.AreEqual (rsa1, rsa2, "topwd.RSA identical");
+               Assert.IsTrue (pvk.Encrypted, "topwd.Encrypted");
+               Assert.IsTrue (pvk.Weak, "topwd.Weak");
        }
 
        // this will convert a PVK file without a password to a PVK file
@@ -186,11 +186,11 @@ public class PrivateKeyTest : Assertion {
                pvk.Weak = false; // we want strong crypto
                pvk.Save (testfile, "password");
                pvk = PrivateKey.CreateFromFile (testfile, "password");
-               AssertNotNull ("topwd.RSA", pvk.RSA);
+               Assert.IsNotNull (pvk.RSA, "topwd.RSA");
                string rsa2 = pvk.RSA.ToXmlString (true);
-               AssertEquals ("topwd.RSA identical", rsa1, rsa2);
-               Assert ("topwd.Encrypted", pvk.Encrypted);
-               Assert ("topwd.Weak", !pvk.Weak);
+               Assert.AreEqual (rsa1, rsa2, "topwd.RSA identical");
+               Assert.IsTrue (pvk.Encrypted, "topwd.Encrypted");
+               Assert.IsTrue (!pvk.Weak, "topwd.Weak");
        }
 
        static byte[] pwd = { 
@@ -229,9 +229,9 @@ public class PrivateKeyTest : Assertion {
        {
                WriteBuffer (pwd);
                PrivateKey pvk = PrivateKey.CreateFromFile (testfile, "password");
-               AssertNotNull ("mspwd.RSA", pvk.RSA);
-               Assert ("mspwd.Encrypted", pvk.Encrypted);
-               Assert ("mspwd.Weak", pvk.Weak);
+               Assert.IsNotNull (pvk.RSA, "mspwd.RSA");
+               Assert.IsTrue (pvk.Encrypted, "mspwd.Encrypted");
+               Assert.IsTrue (pvk.Weak, "mspwd.Weak");
        }
 
        // this will convert a PVK file with a password to a PVK file
@@ -244,11 +244,11 @@ public class PrivateKeyTest : Assertion {
                string rsa1 = pvk.RSA.ToXmlString (true);
                pvk.Save (testfile);
                pvk = PrivateKey.CreateFromFile (testfile);
-               AssertNotNull ("nomorepwd.RSA", pvk.RSA);
+               Assert.IsNotNull (pvk.RSA, "nomorepwd.RSA");
                string rsa2 = pvk.RSA.ToXmlString (true);
-               AssertEquals ("nomorepwd.RSA identical", rsa1, rsa2);
-               Assert ("nomorepwd.Encrypted", !pvk.Encrypted);
-               Assert ("nomorepwd.Weak", pvk.Weak);
+               Assert.AreEqual (rsa1, rsa2, "nomorepwd.RSA identical");
+               Assert.IsTrue (!pvk.Encrypted, "nomorepwd.Encrypted");
+               Assert.IsTrue (pvk.Weak, "nomorepwd.Weak");
        }
        
        [Test]
@@ -261,11 +261,11 @@ public class PrivateKeyTest : Assertion {
                pvk.Save (testfile, "mono");
 
                pvk = PrivateKey.CreateFromFile (testfile, "mono");
-               AssertNotNull ("new.RSA", pvk.RSA);
+               Assert.IsNotNull (pvk.RSA, "new.RSA");
                string rsa2 = pvk.RSA.ToXmlString (true);
-               AssertEquals ("new.RSA identical", rsa1, rsa2);
-               Assert ("new.Encrypted", pvk.Encrypted);
-               Assert ("new.Weak", !pvk.Weak);
+               Assert.AreEqual (rsa1, rsa2, "new.RSA identical");
+               Assert.IsTrue (pvk.Encrypted, "new.Encrypted");
+               Assert.IsTrue (!pvk.Weak, "new.Weak");
        }
 
        [Test]
index 38ecbc3b2358952724e7b843200a136b3b013d91..a527208839abf2a3d9e02bda5c63e177d6fac637 100644 (file)
@@ -15,7 +15,7 @@ using Mono.Security.Cryptography;
 namespace MonoTests.Mono.Security.Cryptography {
 
        [TestFixture]
-       public class CryptoConvertTest : Assertion {
+       public class CryptoConvertTest {
 
                // because most crypto stuff works with byte[] buffers
                static public void AssertEquals (string msg, byte[] array1, byte[] array2) 
@@ -23,9 +23,9 @@ namespace MonoTests.Mono.Security.Cryptography {
                        if ((array1 == null) && (array2 == null))
                                return;
                        if (array1 == null)
-                               Fail (msg + " -> First array is NULL");
+                               Assert.Fail (msg + " -> First array is NULL");
                        if (array2 == null)
-                               Fail (msg + " -> Second array is NULL");
+                               Assert.Fail (msg + " -> Second array is NULL");
                
                        bool a = (array1.Length == array2.Length);
                        if (a) {
@@ -38,7 +38,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                        }
                        msg += " -> Expected " + BitConverter.ToString (array1, 0);
                        msg += " is different than " + BitConverter.ToString (array2, 0);
-                       Assert (msg, a);
+                       Assert.IsTrue (a, msg);
                }
 
                // strongname generated using "sn -k unit.snk"
@@ -163,16 +163,16 @@ namespace MonoTests.Mono.Security.Cryptography {
                {
                        // keypair
                        RSA rsa = CryptoConvert.FromCapiKeyBlob (strongName, 0);
-                       AssertEquals ("KeyPair", strongNameString, rsa.ToXmlString (true));
-                       AssertEquals ("PublicKey-1", strongNamePublicKeyString, rsa.ToXmlString (false));
+                       Assert.AreEqual (strongNameString, rsa.ToXmlString (true), "KeyPair");
+                       Assert.AreEqual (strongNamePublicKeyString, rsa.ToXmlString (false), "PublicKey-1");
 
                        // public key (direct)
                        rsa = CryptoConvert.FromCapiKeyBlob (strongNamePublicKey, 12);
-                       AssertEquals ("PublicKey-2", strongNamePublicKeyString, rsa.ToXmlString (false));
+                       Assert.AreEqual (strongNamePublicKeyString, rsa.ToXmlString (false), "PublicKey-2");
 
                        // public key (indirect - inside header)
                        rsa = CryptoConvert.FromCapiKeyBlob (strongNamePublicKey, 0);
-                       AssertEquals ("PublicKey-3", strongNamePublicKeyString, rsa.ToXmlString (false));
+                       Assert.AreEqual (strongNamePublicKeyString, rsa.ToXmlString (false), "PublicKey-3");
                }
 
                [Test]
@@ -201,7 +201,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                public void FromCapiPrivateKeyBlob () 
                {
                        RSA rsa = CryptoConvert.FromCapiPrivateKeyBlob (strongName, 0);
-                       AssertEquals ("KeyPair", strongNameString, rsa.ToXmlString (true));
+                       Assert.AreEqual (strongNameString, rsa.ToXmlString (true), "KeyPair");
                }
 
                [Test]
@@ -229,7 +229,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                public void FromCapiPublicKeyBlob () 
                {
                        RSA rsa = CryptoConvert.FromCapiPublicKeyBlob (strongNamePublicKey, 12);
-                       AssertEquals ("PublicKey", strongNamePublicKeyString, rsa.ToXmlString (false));
+                       Assert.AreEqual (strongNamePublicKeyString, rsa.ToXmlString (false), "PublicKey");
                }
 
                [Test]
@@ -262,12 +262,12 @@ namespace MonoTests.Mono.Security.Cryptography {
                        AssertEquals ("RSA-KeyPair", strongName, keypair);
 
                        byte[] publicKey = CryptoConvert.ToCapiKeyBlob (rsa, false);
-                       AssertEquals ("RSA-PublicKey", BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey));
+                       Assert.AreEqual (BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey), "RSA-PublicKey");
                        
                        AsymmetricAlgorithm dsa = DSA.Create ();
                        dsa.FromXmlString (dsaKeyPairString);
                        AssertEquals ("DSA-KeyPair", dsaPrivBlob, CryptoConvert.ToCapiKeyBlob (dsa, true));
-                       AssertEquals ("DSA-PublicKey", BitConverter.ToString (dsaPubBlob), BitConverter.ToString (CryptoConvert.ToCapiKeyBlob (dsa, false)));
+                       Assert.AreEqual (BitConverter.ToString (dsaPubBlob), BitConverter.ToString (CryptoConvert.ToCapiKeyBlob (dsa, false)), "DSA-PublicKey");
                }
 
                [Test]
@@ -279,7 +279,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                        AssertEquals ("KeyPair", strongName, keypair);
 
                        byte[] publicKey = CryptoConvert.ToCapiKeyBlob (rsa, false);
-                       AssertEquals ("PublicKey", BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey));
+                       Assert.AreEqual (BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey), "PublicKey");
                }
 
                [Test]
@@ -323,11 +323,11 @@ namespace MonoTests.Mono.Security.Cryptography {
                        // full keypair
                        rsa.FromXmlString (strongNameString);
                        byte[] publicKey = CryptoConvert.ToCapiPublicKeyBlob (rsa);
-                       AssertEquals ("PublicKey-1", BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey));
+                       Assert.AreEqual (BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey), "PublicKey-1");
                        // public key only
                        rsa.FromXmlString (strongNamePublicKeyString);
                        publicKey = CryptoConvert.ToCapiPublicKeyBlob (rsa);
-                       AssertEquals ("PublicKey-2", BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey));
+                       Assert.AreEqual (BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey), "PublicKey-2");
                }
 
                /* DSA key tests */
@@ -419,8 +419,8 @@ namespace MonoTests.Mono.Security.Cryptography {
                public void FromCapiKeyBlobDSA ()
                {
                        DSA dsa = CryptoConvert.FromCapiKeyBlobDSA (dsaPrivBlob);
-                       AssertEquals ("KeyPair", dsaKeyPairString, dsa.ToXmlString (true));
-                       AssertEquals ("PublicKey", dsaPubKeyString, dsa.ToXmlString (false));
+                       Assert.AreEqual (dsaKeyPairString, dsa.ToXmlString (true), "KeyPair");
+                       Assert.AreEqual (dsaPubKeyString, dsa.ToXmlString (false), "PublicKey");
                }
 
                [Test]
@@ -449,7 +449,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                public void FromCapiPrivateKeyBlobDSA ()
                {
                        DSA dsa = CryptoConvert.FromCapiPrivateKeyBlobDSA (dsaPrivBlob, 0);
-                       AssertEquals ("KeyPair", dsaKeyPairString, dsa.ToXmlString (true));
+                       Assert.AreEqual (dsaKeyPairString, dsa.ToXmlString (true), "KeyPair");
                }
 
                [Test]
@@ -478,7 +478,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                public void FromCapiPublicKeyBlobDSA ()
                {
                        DSA dsa = CryptoConvert.FromCapiPublicKeyBlobDSA (dsaPubBlob, 0);
-                       AssertEquals ("PublicKey", dsaPubKeyString, dsa.ToXmlString (false));
+                       Assert.AreEqual (dsaPubKeyString, dsa.ToXmlString (false), "PublicKey");
                }
 
                [Test]
@@ -512,7 +512,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                        AssertEquals ("KeyPair", dsaPrivBlob, keypair);
 
                        byte[] pubkey = CryptoConvert.ToCapiKeyBlob (dsa, false);
-                       AssertEquals ("PublicKey", BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey));
+                       Assert.AreEqual (BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey), "PublicKey");
                }
 
                [Test]
@@ -548,20 +548,20 @@ namespace MonoTests.Mono.Security.Cryptography {
                        // full keypair
                        dsa.FromXmlString (dsaKeyPairString);
                        byte[] pubkey = CryptoConvert.ToCapiPublicKeyBlob (dsa);
-                       AssertEquals ("PublicKey-1", BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey));
+                       Assert.AreEqual (BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey), "PublicKey-1");
 
                        // public key only
                        dsa.FromXmlString (dsaPubKeyString);
                        pubkey = CryptoConvert.ToCapiPublicKeyBlob (dsa);
-                       AssertEquals ("PublicKey-2", BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey));
+                       Assert.AreEqual (BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey), "PublicKey-2");
                }
 
                [Test]
                public void FromHex () 
                {
-                       AssertNull ("FromHex(null)", CryptoConvert.FromHex (null));
+                       Assert.IsNull (CryptoConvert.FromHex (null), "FromHex(null)");
                        string result = BitConverter.ToString (CryptoConvert.FromHex ("0123456789aBcDeF"));
-                       AssertEquals ("0123456789abcdef", "01-23-45-67-89-AB-CD-EF", result);
+                       Assert.AreEqual ("01-23-45-67-89-AB-CD-EF", result, "0123456789abcdef");
                }
 
                [Test]
@@ -581,9 +581,9 @@ namespace MonoTests.Mono.Security.Cryptography {
                [Test]
                public void ToHex () 
                {
-                       AssertNull ("FromHex(null)", CryptoConvert.FromHex (null));
+                       Assert.IsNull (CryptoConvert.FromHex (null), "FromHex(null)");
                        byte[] data = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
-                       AssertEquals ("0123456789abcdef", "0123456789ABCDEF", CryptoConvert.ToHex (data));
+                       Assert.AreEqual ("0123456789ABCDEF", CryptoConvert.ToHex (data), "0123456789abcdef");
                }
                
                [Test]
@@ -595,8 +595,8 @@ namespace MonoTests.Mono.Security.Cryptography {
                        RSA rsa = CryptoConvert.FromCapiKeyBlob (strongNameNUnit, 0);
                        // note the bad D parameters !!!
                        // this only works because CRT is being used
-                       AssertEquals ("KeyPair", "<RSAKeyValue><Modulus>rB8h0TaMs8fWA+5WMdcjOjejCZwhYwuFHUZPS0cC9TOG6FJtvlHPpZLQAg0xfLr2SivPRol1Xw9SqhuaYQNJA7sAaOb8Rvgmx93XbmcNotY9ob4TGaesk+M8VsdexsIJ3WlyLbmRlf0EjT52nboyauEL3UC85zkMjW1LNb8LSs8=</Modulus><Exponent>AQAB</Exponent><P>2d4pGForvc792ztFxhNuzxIihDnXp+qK9F8t/NduhRBdu+JXK4d8a9EGwzpMxLUPlHjCZfXRraZiSQszkH+nzQ==</P><Q>yj9BeGmOrucOUCNZYTtXI0ykzz+1g+cVMSxi+6xzoLEOqmdE4gjcWaxak4MF1+pIR6UycnNa/jg1LBl7MKxpCw==</Q><DP>cMkAjznG4Sjx4/dIRKU0vP/PXJIxIR1bN+y5+uVvsnTpgWVH6SHneE0qahCZQ0/UM/Fb+bqLBJFY2iVxWUGslQ==</DP><DQ>gz6TXPGbLzMv3Z9i5C8e+ABHv1pHj6ZI4VU9kraxfmkH7FsBn3FClUq8qJdRFnGpoBy65Pyo4upUzx5mDAsGSw==</DQ><InverseQ>x+UShV+0d9cicoiB9fkSLqpLDyF4dYzVu0uqX0eCcoGJpk19jtSaMI3Eo8VN6MJAW1zrRy+MA1Fqb9qeThLqZQ==</InverseQ><D>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</D></RSAKeyValue>", rsa.ToXmlString (true));
-                       AssertEquals ("PublicKey", "<RSAKeyValue><Modulus>rB8h0TaMs8fWA+5WMdcjOjejCZwhYwuFHUZPS0cC9TOG6FJtvlHPpZLQAg0xfLr2SivPRol1Xw9SqhuaYQNJA7sAaOb8Rvgmx93XbmcNotY9ob4TGaesk+M8VsdexsIJ3WlyLbmRlf0EjT52nboyauEL3UC85zkMjW1LNb8LSs8=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>", rsa.ToXmlString (false));
+                       Assert.AreEqual ("<RSAKeyValue><Modulus>rB8h0TaMs8fWA+5WMdcjOjejCZwhYwuFHUZPS0cC9TOG6FJtvlHPpZLQAg0xfLr2SivPRol1Xw9SqhuaYQNJA7sAaOb8Rvgmx93XbmcNotY9ob4TGaesk+M8VsdexsIJ3WlyLbmRlf0EjT52nboyauEL3UC85zkMjW1LNb8LSs8=</Modulus><Exponent>AQAB</Exponent><P>2d4pGForvc792ztFxhNuzxIihDnXp+qK9F8t/NduhRBdu+JXK4d8a9EGwzpMxLUPlHjCZfXRraZiSQszkH+nzQ==</P><Q>yj9BeGmOrucOUCNZYTtXI0ykzz+1g+cVMSxi+6xzoLEOqmdE4gjcWaxak4MF1+pIR6UycnNa/jg1LBl7MKxpCw==</Q><DP>cMkAjznG4Sjx4/dIRKU0vP/PXJIxIR1bN+y5+uVvsnTpgWVH6SHneE0qahCZQ0/UM/Fb+bqLBJFY2iVxWUGslQ==</DP><DQ>gz6TXPGbLzMv3Z9i5C8e+ABHv1pHj6ZI4VU9kraxfmkH7FsBn3FClUq8qJdRFnGpoBy65Pyo4upUzx5mDAsGSw==</DQ><InverseQ>x+UShV+0d9cicoiB9fkSLqpLDyF4dYzVu0uqX0eCcoGJpk19jtSaMI3Eo8VN6MJAW1zrRy+MA1Fqb9qeThLqZQ==</InverseQ><D>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</D></RSAKeyValue>", rsa.ToXmlString (true), "KeyPair");
+                       Assert.AreEqual ("<RSAKeyValue><Modulus>rB8h0TaMs8fWA+5WMdcjOjejCZwhYwuFHUZPS0cC9TOG6FJtvlHPpZLQAg0xfLr2SivPRol1Xw9SqhuaYQNJA7sAaOb8Rvgmx93XbmcNotY9ob4TGaesk+M8VsdexsIJ3WlyLbmRlf0EjT52nboyauEL3UC85zkMjW1LNb8LSs8=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>", rsa.ToXmlString (false), "PublicKey");
                }
        }
 }
index 2a38eb819dc21dca2764a0f76d80c7ff007a84a0..a0d3caf1f7d2aa4f6b1c4f866b36fe06a6200ca0 100644 (file)
@@ -24,7 +24,7 @@ namespace MonoTests.Mono.Security.Cryptography {
        //      http://www.ietf.org/rfc/rfc2631.txt
 
        [TestFixture]
-       public class DiffieHellmanManagedTest : Assertion {
+       public class DiffieHellmanManagedTest {
 
                // because most crypto stuff works with byte[] buffers
                static public void AssertEquals (string msg, byte[] array1, byte[] array2) 
@@ -32,9 +32,9 @@ namespace MonoTests.Mono.Security.Cryptography {
                        if ((array1 == null) && (array2 == null))
                                return;
                        if (array1 == null)
-                               Assertion.Fail (msg + " -> First array is NULL");
+                               Assert.Fail (msg + " -> First array is NULL");
                        if (array2 == null)
-                               Assertion.Fail (msg + " -> Second array is NULL");
+                               Assert.Fail (msg + " -> Second array is NULL");
 
                        bool a = (array1.Length == array2.Length);
                        if (a) {
@@ -49,7 +49,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                                msg += " -> Expected " + BitConverter.ToString (array1, 0);
                                msg += " is different than " + BitConverter.ToString (array2, 0);
                        }
-                       Assertion.Assert (msg, a);
+                       Assert.IsTrue (a, msg);
                }
 
                [Test]
@@ -70,7 +70,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                        // let the second DH instance compute the shared secret using the first DH public key
                        byte[] dh2k = dh2.DecryptKeyExchange (ke1);
                        // both shared secrets are the same
-                       AssertEquals ("Shared Secret", dh1k, dh2k);
+                       Assert.AreEqual (dh1k, dh2k, "Shared Secret");
                }
 
                // TODO: More is needed !
index 42f7584e1c9683712c3a668fd4aabad1dfc6041c..8ec9779b2db08e6ed676fa9033f4b8775b2a9cbe 100644 (file)
@@ -19,7 +19,7 @@ using NUnit.Framework;
 namespace MonoTests.Mono.Security.Cryptography {
 
        [TestFixture]
-       public class PKCS8Test : Assertion {
+       public class PKCS8Test {
 
                static public byte[] pkcs8_der = { 0x30, 0x82, 0x02, 0xB2, 0x30, 0x1C, 0x06, 0x0A, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x0C, 0x01, 0x03, 0x30, 0x0E, 0x04, 0x08, 0x86, 0x2A, 0xA9, 0x71, 0x6D, 0xA4, 0xB8, 0x2D, 0x02, 0x02, 0x07, 0xD0, 0x04, 0x82, 0x02, 0x90, 0x90, 0x14, 0xB5, 0xF0, 0xB6, 0x86, 0x56, 0xCB, 0xFA, 0x63, 0xAD, 0x9F, 0x5A, 0x59, 0x6C, 0xAD, 0x00, 0x3C, 0x37, 0x8A, 0xC3, 0x88, 0x58, 0x8B, 0xD7, 0x48, 0x53, 0x7A, 0xC8, 0x5B, 0x0D, 0x98, 0xDD, 0x8B, 0xB3, 0xEC, 0x4C, 0xAC, 0x61, 0x18, 0xE3, 0x5E, 0x47, 0xAD, 0xC7, 0x92, 0xBC, 0xD3, 0x00, 0x07, 0xFF, 0x1A, 0x68, 0x74, 0x45, 0x8E, 0xD8, 0x7C, 0x9F, 0x18, 0x7B, 0xD7, 0xC8, 
                        0x47, 0xBA, 0x6B, 0x19, 0xF2, 0xBF, 0x7E, 0x51, 0x0B, 0x4B, 0x43, 0xE8, 0xB9, 0x56, 0x7E, 0xD0, 0x74, 0xC7, 0xDE, 0x76, 0xDB, 0xFF, 0x5C, 0x6B, 0x53, 0xBE, 0x31, 0x06, 0xAE, 0x6C, 0x8F, 0xDC, 0x49, 0x04, 0x71, 0x74, 0xEE, 0xB8, 0x06, 0xCB, 0xAD, 0x86, 0xB4, 0x4E, 0xB9, 0x46, 0xA1, 0x03, 0x5E, 0x0E, 0xA7, 0xC7, 0x37, 0x6B, 0xB0, 0x8D, 0x2D, 0x81, 0x1F, 0xE3, 0xC2, 0x05, 0xDE, 0xEF, 0x51, 0x07, 0x70, 0x6E, 0x35, 0x9A, 0xAD, 0x19, 0x5E, 0xAF, 0xEB, 0x7F, 0xEF, 0xE4, 0xAB, 0x07, 0xF3, 0xF6, 0xEA, 0xFA, 0x0E, 0x83, 0x65, 0x06, 0x3C, 0xF3, 0xBD, 0x96, 0x08, 0x14, 0xC5, 0x34, 0x26, 0xED, 0xC0, 0x10, 
@@ -32,13 +32,13 @@ namespace MonoTests.Mono.Security.Cryptography {
                [Test]
                public void EncryptedPrivateKey_Farscape () 
                {
-                       AssertEquals ("PKCS8.GetType", PKCS8.KeyInfo.EncryptedPrivateKey, PKCS8.GetType (pkcs8_der));
+                       Assert.AreEqual (PKCS8.KeyInfo.EncryptedPrivateKey, PKCS8.GetType (pkcs8_der), "PKCS8.GetType");
                        PKCS8.EncryptedPrivateKeyInfo p8 = new PKCS8.EncryptedPrivateKeyInfo (pkcs8_der);
-                       AssertEquals ("Algorithm", "1.2.840.113549.1.12.1.3", p8.Algorithm);
-                       AssertEquals ("EncryptedData", "90-14-B5-F0-B6-86-56-CB-FA-63-AD-9F-5A-59-6C-AD-00-3C-37-8A-C3-88-58-8B-D7-48-53-7A-C8-5B-0D-98-DD-8B-B3-EC-4C-AC-61-18-E3-5E-47-AD-C7-92-BC-D3-00-07-FF-1A-68-74-45-8E-D8-7C-9F-18-7B-D7-C8-47-BA-6B-19-F2-BF-7E-51-0B-4B-43-E8-B9-56-7E-D0-74-C7-DE-76-DB-FF-5C-6B-53-BE-31-06-AE-6C-8F-DC-49-04-71-74-EE-B8-06-CB-AD-86-B4-4E-B9-46-A1-03-5E-0E-A7-C7-37-6B-B0-8D-2D-81-1F-E3-C2-05-DE-EF-51-07-70-6E-35-9A-AD-19-5E-AF-EB-7F-EF-E4-AB-07-F3-F6-EA-FA-0E-83-65-06-3C-F3-BD-96-08-14-C5-34-26-ED-C0-10-CC-AE-2D-8F-BE-ED-98-0D-88-1B-1E-C7-37-F0-FC-DB-3C-E3-1B-66-52-45-6E-05-A6-D9-12-23-05-5F-E3-9F-7D-21-9B-2E-3E-9E-3C-EE-D1-9B-55-DE-57-60-A5-24-2D-C7-94-EC-FC-B1-6A-65-BD-85-02-5C-58-AA-5A-6A-F3-AC-6B-DD-0E-63-B2-4B-5B-67-3D-C3-BF-E4-C8-EF-3F-89-5A-CD-6D-EF-05-22-2B-72-FF-80-7A-DD-F1-59-A7-6F-00-B1-BD-4D-88-D6-E4-8A-DD-A9-FC-D9-01-0A-65-8E-52-F9-7E-20-72-67-0D-5B-EE-67-5B-46-4A-15-A2-6F-15-2B-5B-9A-93-12-4F-F4-AD-49-D0-11-F1-7E-40-DE-32-96-2E-B3-E8-71-60-27-6E-A2-71-83-C7-FE-0E-8B-31-06-64-E1-19-02-B9-44-25-0C-94-64-7E-5F-89-4D-7E-99-0B-91-B8-22-A5-33-92-D3-49-07-1D-C6-25-4A-D7-6D-E2-94-3F-FA-10-72-59-62-F5-C6-D4-3A-EE-8F-BC-9C-BC-FC-C7-37-BF-7C-A0-67-B0-FF-0F-29-A0-A2-71-6B-21-00-F4-54-D9-3D-1B-CE-F4-FE-6F-F5-21-CB-47-58-17-F6-45-2F-A0-3B-8B-D9-B8-8A-33-3F-16-E0-C7-8A-B8-11-2F-A8-7E-7D-A7-7B-65-27-89-3C-67-4D-D5-70-28-76-60-96-68-BF-FB-CD-49-E0-8A-7C-6F-76-06-48-6D-63-67-8A-47-82-5E-7F-0E-AC-46-B6-BC-0A-6D-E2-1A-3A-20-A5-C7-81-71-6E-2B-16-97-D4-FA-C0-DD-72-5B-9F-A3-43-F4-85-B1-C6-A8-E0-62-81-5D-A5-07-29-6A-6A-2D-E1-1D-BE-12-6D-42-58-6F-4E-30-3D-BF-32-11-38-BC-36-76-60-FC-57-2F-D3-9E-C4-1A-92-EA-DE-85-FD-E7-AA-30-A6-97-2C-36-3B-3B-0E-92-52-FF-42-D7-62-6C-C1-3A-E7-1B-4E-13-8C-95-B3-4B-A7-9E-42-75-A8-CA-63-76-C4-45-74-96-43-D8-86-82-BE-37-FF-9B-EB-B7-18-A1-2F-E3-6C-08-E8-11-96-8C-5E-9E-2B-E7-DB-7D-54-E1-DB-1E-D3-8F-B5-19-4B-B2-16-DB-CF-EC-88-0B-6C-3C-E4-F2-C4-FF-4D-3E-53-52-3A-81-0B-6E-AC-95-EA-5A-6E-4D-83-23-82-C9-90-02-74-10-2A-6C-FB-97-4F-5F-70-8E-F0-B9"
-                               BitConverter.ToString (p8.EncryptedData));
-                       AssertEquals ("Salt", "86-2A-A9-71-6D-A4-B8-2D", BitConverter.ToString (p8.Salt));
-                       AssertEquals ("IterationCount", 2000, p8.IterationCount);
+                       Assert.AreEqual ("1.2.840.113549.1.12.1.3", p8.Algorithm, "Algorithm");
+                       Assert.AreEqual ("90-14-B5-F0-B6-86-56-CB-FA-63-AD-9F-5A-59-6C-AD-00-3C-37-8A-C3-88-58-8B-D7-48-53-7A-C8-5B-0D-98-DD-8B-B3-EC-4C-AC-61-18-E3-5E-47-AD-C7-92-BC-D3-00-07-FF-1A-68-74-45-8E-D8-7C-9F-18-7B-D7-C8-47-BA-6B-19-F2-BF-7E-51-0B-4B-43-E8-B9-56-7E-D0-74-C7-DE-76-DB-FF-5C-6B-53-BE-31-06-AE-6C-8F-DC-49-04-71-74-EE-B8-06-CB-AD-86-B4-4E-B9-46-A1-03-5E-0E-A7-C7-37-6B-B0-8D-2D-81-1F-E3-C2-05-DE-EF-51-07-70-6E-35-9A-AD-19-5E-AF-EB-7F-EF-E4-AB-07-F3-F6-EA-FA-0E-83-65-06-3C-F3-BD-96-08-14-C5-34-26-ED-C0-10-CC-AE-2D-8F-BE-ED-98-0D-88-1B-1E-C7-37-F0-FC-DB-3C-E3-1B-66-52-45-6E-05-A6-D9-12-23-05-5F-E3-9F-7D-21-9B-2E-3E-9E-3C-EE-D1-9B-55-DE-57-60-A5-24-2D-C7-94-EC-FC-B1-6A-65-BD-85-02-5C-58-AA-5A-6A-F3-AC-6B-DD-0E-63-B2-4B-5B-67-3D-C3-BF-E4-C8-EF-3F-89-5A-CD-6D-EF-05-22-2B-72-FF-80-7A-DD-F1-59-A7-6F-00-B1-BD-4D-88-D6-E4-8A-DD-A9-FC-D9-01-0A-65-8E-52-F9-7E-20-72-67-0D-5B-EE-67-5B-46-4A-15-A2-6F-15-2B-5B-9A-93-12-4F-F4-AD-49-D0-11-F1-7E-40-DE-32-96-2E-B3-E8-71-60-27-6E-A2-71-83-C7-FE-0E-8B-31-06-64-E1-19-02-B9-44-25-0C-94-64-7E-5F-89-4D-7E-99-0B-91-B8-22-A5-33-92-D3-49-07-1D-C6-25-4A-D7-6D-E2-94-3F-FA-10-72-59-62-F5-C6-D4-3A-EE-8F-BC-9C-BC-FC-C7-37-BF-7C-A0-67-B0-FF-0F-29-A0-A2-71-6B-21-00-F4-54-D9-3D-1B-CE-F4-FE-6F-F5-21-CB-47-58-17-F6-45-2F-A0-3B-8B-D9-B8-8A-33-3F-16-E0-C7-8A-B8-11-2F-A8-7E-7D-A7-7B-65-27-89-3C-67-4D-D5-70-28-76-60-96-68-BF-FB-CD-49-E0-8A-7C-6F-76-06-48-6D-63-67-8A-47-82-5E-7F-0E-AC-46-B6-BC-0A-6D-E2-1A-3A-20-A5-C7-81-71-6E-2B-16-97-D4-FA-C0-DD-72-5B-9F-A3-43-F4-85-B1-C6-A8-E0-62-81-5D-A5-07-29-6A-6A-2D-E1-1D-BE-12-6D-42-58-6F-4E-30-3D-BF-32-11-38-BC-36-76-60-FC-57-2F-D3-9E-C4-1A-92-EA-DE-85-FD-E7-AA-30-A6-97-2C-36-3B-3B-0E-92-52-FF-42-D7-62-6C-C1-3A-E7-1B-4E-13-8C-95-B3-4B-A7-9E-42-75-A8-CA-63-76-C4-45-74-96-43-D8-86-82-BE-37-FF-9B-EB-B7-18-A1-2F-E3-6C-08-E8-11-96-8C-5E-9E-2B-E7-DB-7D-54-E1-DB-1E-D3-8F-B5-19-4B-B2-16-DB-CF-EC-88-0B-6C-3C-E4-F2-C4-FF-4D-3E-53-52-3A-81-0B-6E-AC-95-EA-5A-6E-4D-83-23-82-C9-90-02-74-10-2A-6C-FB-97-4F-5F-70-8E-F0-B9", BitConverter.ToString (p8.EncryptedData)
+                               "EncryptedData");
+                       Assert.AreEqual ("86-2A-A9-71-6D-A4-B8-2D", BitConverter.ToString (p8.Salt), "Salt");
+                       Assert.AreEqual (2000, p8.IterationCount, "IterationCount");
                }
 
                static public byte[] End_Certificate_CP_01_01_crtx = { 0x30, 0x82, 0x02, 0x78, 0x02, 0x01, 0x00, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x82, 0x02, 0x62, 0x30, 0x82, 0x02, 0x5E, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0xC6, 0x34, 0xEC, 0x6F, 0x0C, 0xE0, 0x59, 0x0E, 0xBC, 0x5F, 0xBA, 0x2E, 0x93, 0xBB, 0x04, 0xA7, 0x03, 0xB9, 0x70, 0x8A, 0xB9, 0xD7, 0xE5, 0xD7, 0xE6, 0xCA, 0x4A, 0x8C, 0x23, 0xD8, 0x60, 0xB3, 0x6B, 0xCB, 0x88, 0x88, 0xC7, 0xD8, 0x48, 0x7E, 0x64, 0xF9, 0xF6, 0x1B, 0xE3, 0x79, 0x46, 0x41, 0xE4, 0x61, 0xF7, 0x25, 0x47, 0x71, 0xF3, 0x50, 0x94, 0x4E, 0xF2, 0x7C, 0x6A, 0x37, 0xB6, 0x0C, 
@@ -68,25 +68,25 @@ namespace MonoTests.Mono.Security.Cryptography {
                [Test]
                public void PrivateKeyInfo_End_Certificate_CP_01_01 () 
                {
-                       AssertEquals ("PKCS8.GetType", PKCS8.KeyInfo.PrivateKey, PKCS8.GetType (End_Certificate_CP_01_01_crtx));
+                       Assert.AreEqual (PKCS8.KeyInfo.PrivateKey, PKCS8.GetType (End_Certificate_CP_01_01_crtx), "PKCS8.GetType");
                        PKCS8.PrivateKeyInfo p8 = new PKCS8.PrivateKeyInfo (End_Certificate_CP_01_01_crtx);
-                       AssertEquals ("Algorithm", "1.2.840.113549.1.1.1", p8.Algorithm);
-                       AssertEquals ("Attributes", 0, p8.Attributes.Count);
-                       AssertEquals ("PrivateKey", BitConverter.ToString (End_Certificate_CP_01_01_pki), BitConverter.ToString (p8.PrivateKey));
-                       AssertEquals ("Version", 0, p8.Version);
+                       Assert.AreEqual ("1.2.840.113549.1.1.1", p8.Algorithm, "Algorithm");
+                       Assert.AreEqual (0, p8.Attributes.Count, "Attributes");
+                       Assert.AreEqual (BitConverter.ToString (End_Certificate_CP_01_01_pki), BitConverter.ToString (p8.PrivateKey), "PrivateKey");
+                       Assert.AreEqual (0, p8.Version, "Version");
                }
 
                [Test]
                public void PrivateKeyInfo_End_Certificate_CP_01_02 () 
                {
                        PKCS8.PrivateKeyInfo p8 = new PKCS8.PrivateKeyInfo (End_Certificate_CP_01_02_crtx);
-                       AssertEquals ("Algorithm", "1.2.840.113549.1.1.1", p8.Algorithm);
-                       AssertEquals ("Attributes", 0, p8.Attributes.Count);
-                       AssertEquals ("PrivateKey", "30-82-02-5B-02-01-00-02-81-81-00-D6-39-9E-21-93-E2-BA-35-7F-E5-F8-E8-87-0B-8A-5F-28-25-85-B7-E5-CC-DA-7F-D3-C7-09-2A-63-E9-AD-8F-D0-A8-EF-BA-CF-3C-FB-55-03-B9-83-29-4E-0E-89-84-FB-E2-62-16-1F-9D-87-40-16-6B-F8-F4-66-38-58-74-67-D4-B5-A1-3A-4B-6F-13-4B-08-37-3A-3A-64-0A-06-8E-A2-7B-14-88-B7-F8-CE-6A-D1-45-9B-39-93-67-BF-0A-AB-DB-37-9D-FA-CE-54-0F-37-82-09-8F-0D-33-E4-B8-6E-46-C1-CC-4F-80-5A-B4-BD-19-80-27-40-84-49-02-03-01-00-01-02-81-80-14-95-5A-AD-4D-41-56-B4-F7-42-08-85-87-1C-43-C2-5A-E0-28-16-00-5D-8B-8D-06-B3-34-1D-3F-96-5F-57-D7-2B-B4-45-15-CE-7D-33-B0-F4-ED-36-55-CA-AD-C9-FA-4D-C9-30-E8-FE-C0-D5-16-92-6F-4C-44-5A-1B-9D-7E-AE-B8-01-6D-38-9D-DC-93-68-AB-93-D6-C0-8A-8A-63-B4-D6-DA-21-C1-A0-28-8C-24-C4-27-E1-4B-30-D2-2D-87-62-F9-17-75-21-5E-E1-3C-E2-2D-92-03-C6-A1-8D-1D-E9-67-F4-CE-FF-AC-52-86-D2-F5-0F-EB-03-01-02-41-00-ED-6A-AE-A7-33-B0-B8-86-36-91-BA-E7-D2-DD-15-3A-97-A2-66-31-98-24-A6-0D-E7-09-E3-BD-36-79-91-F2-5E-23-AA-21-C9-71-43-24-10-FA-F0-E6-FC-E4-C6-1F-08-45-E8-91-74-13-69-63-A5-40-8F-38-44-2B-54-69-02-41-00-E6-FE-39-8B-6F-DB-44-CA-E7-72-D3-CA-09-5B-3D-B1-53-85-29-36-FC-F1-B9-D8-1F-64-02-D4-F7-F5-71-E5-9F-17-D7-F3-9F-5A-3A-A6-A3-62-46-F6-93-3D-D3-CD-18-F2-12-BD-68-02-AA-91-55-DA-64-26-D7-16-34-E1-02-40-60-3F-F4-C8-72-4B-3D-B3-A3-A1-D6-FD-2E-DE-54-41-E9-C1-7B-DE-B5-48-7E-4D-7A-91-E6-D3-09-A7-A5-84-75-A7-CD-CC-5E-C7-5D-29-DC-FC-6E-F7-A6-24-F5-31-15-80-89-F5-95-F2-5C-B2-7A-07-3F-48-D7-52-1D-A9-02-40-40-1B-FC-C2-9B-57-E2-DE-E1-9F-B7-F2-11-E8-B5-D5-9A-55-91-DB-C6-16-1C-BB-43-F3-10-EA-24-AB-85-61-F2-66-BE-B3-C9-DD-53-FB-DD-CA-AF-E1-4D-7A-52-67-50-EE-16-8F-64-E7-A0-89-57-A7-96-36-45-69-CF-61-02-40-3D-9E-E3-29-D6-BD-59-FF-A5-C3-AC-57-CB-74-FE-B0-C3-67-34-A8-40-EB-04-88-C3-C2-74-4F-69-77-13-48-8A-97-3C-C2-4B-CD-E8-E0-97-98-A2-3F-B6-E2-71-D3-65-9F-5A-C6-C8-AE-FE-BA-B1-ED-DA-08-8A-5B-7B-12", BitConverter.ToString (p8.PrivateKey));
-                       AssertEquals ("Version", 0, p8.Version);
+                       Assert.AreEqual ("1.2.840.113549.1.1.1", p8.Algorithm, "Algorithm");
+                       Assert.AreEqual (0, p8.Attributes.Count, "Attributes");
+                       Assert.AreEqual ("30-82-02-5B-02-01-00-02-81-81-00-D6-39-9E-21-93-E2-BA-35-7F-E5-F8-E8-87-0B-8A-5F-28-25-85-B7-E5-CC-DA-7F-D3-C7-09-2A-63-E9-AD-8F-D0-A8-EF-BA-CF-3C-FB-55-03-B9-83-29-4E-0E-89-84-FB-E2-62-16-1F-9D-87-40-16-6B-F8-F4-66-38-58-74-67-D4-B5-A1-3A-4B-6F-13-4B-08-37-3A-3A-64-0A-06-8E-A2-7B-14-88-B7-F8-CE-6A-D1-45-9B-39-93-67-BF-0A-AB-DB-37-9D-FA-CE-54-0F-37-82-09-8F-0D-33-E4-B8-6E-46-C1-CC-4F-80-5A-B4-BD-19-80-27-40-84-49-02-03-01-00-01-02-81-80-14-95-5A-AD-4D-41-56-B4-F7-42-08-85-87-1C-43-C2-5A-E0-28-16-00-5D-8B-8D-06-B3-34-1D-3F-96-5F-57-D7-2B-B4-45-15-CE-7D-33-B0-F4-ED-36-55-CA-AD-C9-FA-4D-C9-30-E8-FE-C0-D5-16-92-6F-4C-44-5A-1B-9D-7E-AE-B8-01-6D-38-9D-DC-93-68-AB-93-D6-C0-8A-8A-63-B4-D6-DA-21-C1-A0-28-8C-24-C4-27-E1-4B-30-D2-2D-87-62-F9-17-75-21-5E-E1-3C-E2-2D-92-03-C6-A1-8D-1D-E9-67-F4-CE-FF-AC-52-86-D2-F5-0F-EB-03-01-02-41-00-ED-6A-AE-A7-33-B0-B8-86-36-91-BA-E7-D2-DD-15-3A-97-A2-66-31-98-24-A6-0D-E7-09-E3-BD-36-79-91-F2-5E-23-AA-21-C9-71-43-24-10-FA-F0-E6-FC-E4-C6-1F-08-45-E8-91-74-13-69-63-A5-40-8F-38-44-2B-54-69-02-41-00-E6-FE-39-8B-6F-DB-44-CA-E7-72-D3-CA-09-5B-3D-B1-53-85-29-36-FC-F1-B9-D8-1F-64-02-D4-F7-F5-71-E5-9F-17-D7-F3-9F-5A-3A-A6-A3-62-46-F6-93-3D-D3-CD-18-F2-12-BD-68-02-AA-91-55-DA-64-26-D7-16-34-E1-02-40-60-3F-F4-C8-72-4B-3D-B3-A3-A1-D6-FD-2E-DE-54-41-E9-C1-7B-DE-B5-48-7E-4D-7A-91-E6-D3-09-A7-A5-84-75-A7-CD-CC-5E-C7-5D-29-DC-FC-6E-F7-A6-24-F5-31-15-80-89-F5-95-F2-5C-B2-7A-07-3F-48-D7-52-1D-A9-02-40-40-1B-FC-C2-9B-57-E2-DE-E1-9F-B7-F2-11-E8-B5-D5-9A-55-91-DB-C6-16-1C-BB-43-F3-10-EA-24-AB-85-61-F2-66-BE-B3-C9-DD-53-FB-DD-CA-AF-E1-4D-7A-52-67-50-EE-16-8F-64-E7-A0-89-57-A7-96-36-45-69-CF-61-02-40-3D-9E-E3-29-D6-BD-59-FF-A5-C3-AC-57-CB-74-FE-B0-C3-67-34-A8-40-EB-04-88-C3-C2-74-4F-69-77-13-48-8A-97-3C-C2-4B-CD-E8-E0-97-98-A2-3F-B6-E2-71-D3-65-9F-5A-C6-C8-AE-FE-BA-B1-ED-DA-08-8A-5B-7B-12", BitConverter.ToString (p8.PrivateKey), "PrivateKey");
+                       Assert.AreEqual (0, p8.Version, "Version");
                        // static
                        RSA rsa = PKCS8.PrivateKeyInfo.DecodeRSA (p8.PrivateKey);
-                       AssertEquals ("DecodeRSA", "<RSAKeyValue><Modulus>1jmeIZPiujV/5fjohwuKXyglhbflzNp/08cJKmPprY/QqO+6zzz7VQO5gylODomE++JiFh+dh0AWa/j0ZjhYdGfUtaE6S28TSwg3OjpkCgaOonsUiLf4zmrRRZs5k2e/CqvbN536zlQPN4IJjw0z5LhuRsHMT4BatL0ZgCdAhEk=</Modulus><Exponent>AQAB</Exponent><P>7WqupzOwuIY2kbrn0t0VOpeiZjGYJKYN5wnjvTZ5kfJeI6ohyXFDJBD68Ob85MYfCEXokXQTaWOlQI84RCtUaQ==</P><Q>5v45i2/bRMrnctPKCVs9sVOFKTb88bnYH2QC1Pf1ceWfF9fzn1o6pqNiRvaTPdPNGPISvWgCqpFV2mQm1xY04Q==</Q><DP>YD/0yHJLPbOjodb9Lt5UQenBe961SH5NepHm0wmnpYR1p83MXsddKdz8bvemJPUxFYCJ9ZXyXLJ6Bz9I11IdqQ==</DP><DQ>QBv8wptX4t7hn7fyEei11ZpVkdvGFhy7Q/MQ6iSrhWHyZr6zyd1T+93Kr+FNelJnUO4Wj2TnoIlXp5Y2RWnPYQ==</DQ><InverseQ>PZ7jKda9Wf+lw6xXy3T+sMNnNKhA6wSIw8J0T2l3E0iKlzzCS83o4JeYoj+24nHTZZ9axsiu/rqx7doIilt7Eg==</InverseQ><D>FJVarU1BVrT3QgiFhxxDwlrgKBYAXYuNBrM0HT+WX1fXK7RFFc59M7D07TZVyq3J+k3JMOj+wNUWkm9MRFobnX6uuAFtOJ3ck2irk9bAiopjtNbaIcGgKIwkxCfhSzDSLYdi+Rd1IV7hPOItkgPGoY0d6Wf0zv+sUobS9Q/rAwE=</D></RSAKeyValue>", rsa.ToXmlString (true));
+                       Assert.AreEqual ("<RSAKeyValue><Modulus>1jmeIZPiujV/5fjohwuKXyglhbflzNp/08cJKmPprY/QqO+6zzz7VQO5gylODomE++JiFh+dh0AWa/j0ZjhYdGfUtaE6S28TSwg3OjpkCgaOonsUiLf4zmrRRZs5k2e/CqvbN536zlQPN4IJjw0z5LhuRsHMT4BatL0ZgCdAhEk=</Modulus><Exponent>AQAB</Exponent><P>7WqupzOwuIY2kbrn0t0VOpeiZjGYJKYN5wnjvTZ5kfJeI6ohyXFDJBD68Ob85MYfCEXokXQTaWOlQI84RCtUaQ==</P><Q>5v45i2/bRMrnctPKCVs9sVOFKTb88bnYH2QC1Pf1ceWfF9fzn1o6pqNiRvaTPdPNGPISvWgCqpFV2mQm1xY04Q==</Q><DP>YD/0yHJLPbOjodb9Lt5UQenBe961SH5NepHm0wmnpYR1p83MXsddKdz8bvemJPUxFYCJ9ZXyXLJ6Bz9I11IdqQ==</DP><DQ>QBv8wptX4t7hn7fyEei11ZpVkdvGFhy7Q/MQ6iSrhWHyZr6zyd1T+93Kr+FNelJnUO4Wj2TnoIlXp5Y2RWnPYQ==</DQ><InverseQ>PZ7jKda9Wf+lw6xXy3T+sMNnNKhA6wSIw8J0T2l3E0iKlzzCS83o4JeYoj+24nHTZZ9axsiu/rqx7doIilt7Eg==</InverseQ><D>FJVarU1BVrT3QgiFhxxDwlrgKBYAXYuNBrM0HT+WX1fXK7RFFc59M7D07TZVyq3J+k3JMOj+wNUWkm9MRFobnX6uuAFtOJ3ck2irk9bAiopjtNbaIcGgKIwkxCfhSzDSLYdi+Rd1IV7hPOItkgPGoY0d6Wf0zv+sUobS9Q/rAwE=</D></RSAKeyValue>", rsa.ToXmlString (true), "DecodeRSA");
                }
 
                [Test]
@@ -109,31 +109,31 @@ namespace MonoTests.Mono.Security.Cryptography {
                public void PrivateKeyInfo () 
                {
                        PKCS8.PrivateKeyInfo p8 = new PKCS8.PrivateKeyInfo ();
-                       AssertNull ("Default-Algorithm", p8.Algorithm);
-                       AssertEquals ("Default-Attributes", 0, p8.Attributes.Count);
-                       AssertNull ("Default-PrivateKey", p8.PrivateKey);
-                       AssertEquals ("Default-Version", 0, p8.Version);
+                       Assert.IsNull (p8.Algorithm, "Default-Algorithm");
+                       Assert.AreEqual (0, p8.Attributes.Count, "Default-Attributes");
+                       Assert.IsNull (p8.PrivateKey, "Default-PrivateKey");
+                       Assert.AreEqual (0, p8.Version, "Default-Version");
                        
                        byte[] key = new byte [8];
                        p8.Algorithm = "1.2.3.4.5";
                        p8.Attributes.Add (new ASN1 (0x05)); // NULL
                        p8.PrivateKey = key;
                        p8.Version = 1;
-                       AssertEquals ("Algorithm", "1.2.3.4.5", p8.Algorithm);
-                       AssertEquals ("Attributes", 1, p8.Attributes.Count);
-                       AssertEquals ("PrivateKey", 8, p8.PrivateKey.Length);
-                       AssertEquals ("Version", 1, p8.Version);
+                       Assert.AreEqual ("1.2.3.4.5", p8.Algorithm, "Algorithm");
+                       Assert.AreEqual (1, p8.Attributes.Count, "Attributes");
+                       Assert.AreEqual (8, p8.PrivateKey.Length, "PrivateKey");
+                       Assert.AreEqual (1, p8.Version, "Version");
                        
                        key [0] = 1;
-                       AssertEquals ("PrivateKey not directly accessible", 0, p8.PrivateKey [0]);
+                       Assert.AreEqual (0, p8.PrivateKey [0], "PrivateKey not directly accessible");
                        
                        byte[] p8pki = p8.GetBytes ();
                        
                        PKCS8.PrivateKeyInfo decoded = new PKCS8.PrivateKeyInfo (p8pki);
-                       AssertEquals ("Decoded-Algorithm", "1.2.3.4.5", decoded.Algorithm);
-                       AssertEquals ("Decoded-Attributes", 1, decoded.Attributes.Count);
-                       AssertEquals ("Decoded-PrivateKey", 8, decoded.PrivateKey.Length);
-                       AssertEquals ("Decoded-Version", 1, decoded.Version);
+                       Assert.AreEqual ("1.2.3.4.5", decoded.Algorithm, "Decoded-Algorithm");
+                       Assert.AreEqual (1, decoded.Attributes.Count, "Decoded-Attributes");
+                       Assert.AreEqual (8, decoded.PrivateKey.Length, "Decoded-PrivateKey");
+                       Assert.AreEqual (1, decoded.Version, "Decoded-Version");
                }
                
                [Test]
index ba0f403e8a78b8a23117ec43c446fa1ec60b3240..ef27bd73630b3446ad88310a6591eb3ba0d5d741 100644 (file)
@@ -17,7 +17,7 @@ using NUnit.Framework;
 namespace MonoTests.Mono.Security.Protocol.Ntlm {
 
        [TestFixture]
-       public class ChallengeResponseTest : Assertion {
+       public class ChallengeResponseTest {
 
                [Test]
                // Example from http://www.innovation.ch/java/ntlm.html
@@ -25,8 +25,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        byte[] SrvNonce = Encoding.ASCII.GetBytes ("SrvNonce");
                        using (ChallengeResponse ntlm = new ChallengeResponse ("Beeblebrox", SrvNonce)) {
-                               AssertEquals ("NT", "E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (ntlm.NT));
-                               AssertEquals ("LM", "AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97", BitConverter.ToString (ntlm.LM));
+                               Assert.AreEqual ("E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (ntlm.NT), "NT");
+                               Assert.AreEqual ("AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97", BitConverter.ToString (ntlm.LM), "LM");
                        }
                }
 
@@ -36,8 +36,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        byte[] SrvNonce = new byte [8] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
                        using (ChallengeResponse ntlm = new ChallengeResponse ("WELCOME", SrvNonce)) {
-                               AssertEquals ("NT", "7A-CE-90-85-AB-CC-37-59-38-0B-1C-68-62-E3-98-C3-C0-EF-9C-FC-22-E8-A2-C2", BitConverter.ToString (ntlm.NT));
-                               AssertEquals ("LM", "CA-12-00-72-3C-41-D5-77-AB-18-C7-64-C6-DE-F3-4F-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM));
+                               Assert.AreEqual ("7A-CE-90-85-AB-CC-37-59-38-0B-1C-68-62-E3-98-C3-C0-EF-9C-FC-22-E8-A2-C2", BitConverter.ToString (ntlm.NT), "NT");
+                               Assert.AreEqual ("CA-12-00-72-3C-41-D5-77-AB-18-C7-64-C6-DE-F3-4F-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM), "LM");
                        }
                }
 
@@ -46,9 +46,9 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        byte[] SrvNonce = new byte [8] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
                        using (ChallengeResponse ntlm = new ChallengeResponse (null, SrvNonce)) {
-                               AssertEquals ("NT", "4A-FD-81-EC-01-87-E8-8D-97-77-8D-F7-93-C6-DA-D4-F0-3A-36-63-66-9D-20-1C", BitConverter.ToString (ntlm.NT));
+                               Assert.AreEqual ("4A-FD-81-EC-01-87-E8-8D-97-77-8D-F7-93-C6-DA-D4-F0-3A-36-63-66-9D-20-1C", BitConverter.ToString (ntlm.NT), "NT");
                                // note the last 8 bytes... they are the same as the previous unit test ;-)
-                               AssertEquals ("LM", "0A-39-2B-11-CF-05-2B-02-6D-65-CF-F5-68-BD-E4-15-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM));
+                               Assert.AreEqual ("0A-39-2B-11-CF-05-2B-02-6D-65-CF-F5-68-BD-E4-15-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM), "LM");
                        }
                }
 
@@ -58,8 +58,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                        byte[] SrvNonce = new byte [8] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
                        using (ChallengeResponse ntlm = new ChallengeResponse (String.Empty, SrvNonce)) {
                                // same as the previous one as this is the same (null/empty) password expressed diffently
-                               AssertEquals ("NT", "4A-FD-81-EC-01-87-E8-8D-97-77-8D-F7-93-C6-DA-D4-F0-3A-36-63-66-9D-20-1C", BitConverter.ToString (ntlm.NT));
-                               AssertEquals ("LM", "0A-39-2B-11-CF-05-2B-02-6D-65-CF-F5-68-BD-E4-15-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM));
+                               Assert.AreEqual ("4A-FD-81-EC-01-87-E8-8D-97-77-8D-F7-93-C6-DA-D4-F0-3A-36-63-66-9D-20-1C", BitConverter.ToString (ntlm.NT), "NT");
+                               Assert.AreEqual ("0A-39-2B-11-CF-05-2B-02-6D-65-CF-F5-68-BD-E4-15-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM), "LM");
                        }
                }
                
@@ -68,8 +68,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        ChallengeResponse ntlm = new ChallengeResponse ("Mono", new byte [8]);
                        // no out!
-                       AssertNull ("Password", ntlm.Password);
-                       AssertNull ("Challenge", ntlm.Challenge);
+                       Assert.IsNull (ntlm.Password, "Password");
+                       Assert.IsNull (ntlm.Challenge, "Challenge");
                }
                
                [Test] 
@@ -104,7 +104,7 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        ChallengeResponse ntlm = new ChallengeResponse ("Mono", new byte [8]);
                        ntlm.Dispose ();
-                       AssertNotNull ("NT", ntlm.NT);
+                       Assert.IsNotNull (ntlm.NT, "NT");
                }
 
                [Test] 
@@ -113,7 +113,7 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        ChallengeResponse ntlm = new ChallengeResponse ("Mono", new byte [8]);
                        ntlm.Dispose ();
-                       AssertNotNull ("LM", ntlm.LM);
+                       Assert.IsNotNull (ntlm.LM, "LM");
                }
        }
 }
index 7164640be9b3d900fa1ac0ef05005fa76a8d4e9b..a02816fadc7542c256c2a71d3d7dcac870eda17d 100644 (file)
@@ -15,7 +15,7 @@ using NUnit.Framework;
 namespace MonoTests.Mono.Security.Protocol.Ntlm {
 
        [TestFixture]
-       public class MessageBaseTest : Assertion {
+       public class MessageBaseTest {
        
                // 
        
@@ -42,4 +42,4 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                }
 
        }
-}
\ No newline at end of file
+}
index c6dc2394d9393ce12cdb6746a6589f34d02ca375..5bd097e1d489536dcf85eb6931663b6099fd49f3 100644 (file)
@@ -16,17 +16,17 @@ using NUnit.Framework;
 namespace MonoTests.Mono.Security.Protocol.Ntlm {
 
        [TestFixture]
-       public class Type1MessageTest : Assertion {
+       public class Type1MessageTest {
 
                [Test]
                // Example from http://www.innovation.ch/java/ntlm.html
                public void Encode1 () 
                {
                        Type1Message msg = new Type1Message ();
-                       AssertEquals ("Type", 1, msg.Type);
+                       Assert.AreEqual (1, msg.Type, "Type");
                        msg.Domain = "Ursa-Minor";
                        msg.Host = "LightCity";
-                       AssertEquals ("GetBytes", "4E-54-4C-4D-53-53-50-00-01-00-00-00-07-B2-00-00-0A-00-0A-00-29-00-00-00-09-00-09-00-20-00-00-00-4C-49-47-48-54-43-49-54-59-55-52-53-41-2D-4D-49-4E-4F-52", BitConverter.ToString (msg.GetBytes ()));
+                       Assert.AreEqual ("4E-54-4C-4D-53-53-50-00-01-00-00-00-07-B2-00-00-0A-00-0A-00-29-00-00-00-09-00-09-00-20-00-00-00-4C-49-47-48-54-43-49-54-59-55-52-53-41-2D-4D-49-4E-4F-52", BitConverter.ToString (msg.GetBytes ()), "GetBytes");
                }
 
                [Test]
@@ -35,10 +35,10 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        byte[] data = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0xb2, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x29, 0x00, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00, 0x20, 0x00, 0x00, 0x00, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x43, 0x49, 0x54, 0x59, 0x55, 0x52, 0x53, 0x41, 0x2d, 0x4d, 0x49, 0x4e, 0x4f, 0x52 };
                        Type1Message msg = new Type1Message (data);
-                       AssertEquals ("Domain", "URSA-MINOR", msg.Domain);
-                       AssertEquals ("Flags", (NtlmFlags)0xb203, msg.Flags);
-                       AssertEquals ("Host", "LIGHTCITY", msg.Host);
-                       AssertEquals ("Type", 1, msg.Type);
+                       Assert.AreEqual ("URSA-MINOR", msg.Domain, "Domain");
+                       Assert.AreEqual ((NtlmFlags)0xb203, msg.Flags, "Flags");
+                       Assert.AreEqual ("LIGHTCITY", msg.Host, "Host");
+                       Assert.AreEqual (1, msg.Type, "Type");
                }
 
                [Test]
@@ -47,10 +47,10 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        byte[] data = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x32, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x0b, 0x00, 0x20, 0x00, 0x00, 0x00, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x44, 0x4f, 0x4d, 0x41, 0x49, 0x4e };
                        Type1Message msg = new Type1Message (data);
-                       AssertEquals ("Domain", "DOMAIN", msg.Domain);
-                       AssertEquals ("Flags", (NtlmFlags)0x3207, msg.Flags);
-                       AssertEquals ("Host", "WORKSTATION", msg.Host);
-                       AssertEquals ("Type", 1, msg.Type);
+                       Assert.AreEqual ("DOMAIN", msg.Domain, "Domain");
+                       Assert.AreEqual ((NtlmFlags)0x3207, msg.Flags, "Flags");
+                       Assert.AreEqual ("WORKSTATION", msg.Host, "Host");
+                       Assert.AreEqual (1, msg.Type, "Type");
                }
        }
 }
index bd1b38349a35d8eade0e4cd808ad1bdd56060188..6233e0fe7555d76f028e809f0295ea67864a6110 100644 (file)
@@ -17,7 +17,7 @@ using NUnit.Framework;
 namespace MonoTests.Mono.Security.Protocol.Ntlm {
 
        [TestFixture]
-       public class Type2MessageTest : Assertion {
+       public class Type2MessageTest {
 
                static byte[] nonce = { 0x53, 0x72, 0x76, 0x4e, 0x6f, 0x6e, 0x63, 0x65 };
 
@@ -26,9 +26,9 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                public void Encode1 () 
                {
                        Type2Message msg = new Type2Message ();
-                       AssertEquals ("Type", 2, msg.Type);
+                       Assert.AreEqual (2, msg.Type, "Type");
                        msg.Nonce = nonce;
-                       AssertEquals ("GetBytes", "4E-54-4C-4D-53-53-50-00-02-00-00-00-00-00-00-00-28-00-00-00-01-82-00-00-53-72-76-4E-6F-6E-63-65-00-00-00-00-00-00-00-00", BitConverter.ToString (msg.GetBytes ()));
+                       Assert.AreEqual ("4E-54-4C-4D-53-53-50-00-02-00-00-00-00-00-00-00-28-00-00-00-01-82-00-00-53-72-76-4E-6F-6E-63-65-00-00-00-00-00-00-00-00", BitConverter.ToString (msg.GetBytes ()), "GetBytes");
                }
 
                [Test]
@@ -37,9 +37,9 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        byte[] data = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x82, 0x00, 0x00, 0x53, 0x72, 0x76, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
                        Type2Message msg = new Type2Message (data);
-                       AssertEquals ("Flags", (NtlmFlags)0x8201, msg.Flags);
-                       AssertEquals ("Nonce", BitConverter.ToString (nonce), BitConverter.ToString (msg.Nonce));
-                       AssertEquals ("Type", 2, msg.Type);
+                       Assert.AreEqual ((NtlmFlags)0x8201, msg.Flags, "Flags");
+                       Assert.AreEqual (BitConverter.ToString (nonce), BitConverter.ToString (msg.Nonce), "Nonce");
+                       Assert.AreEqual (2, msg.Type, "Type");
                }
 
                [Test]
@@ -48,9 +48,9 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                {
                        byte[] data = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x02, 0x81, 0x00, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x62, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x4f, 0x00, 0x4d, 0x00, 0x41, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x44, 0x00, 0x4f, 0x00, 0x4d, 0x00, 0x41, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x53, 0x00, 0x45, 0x00, 0x52, 0x00, 0x56, 0x00, 0x45, 0x00, 0x52, 0x00, 0x04, 0x00, 0x14, 0x00, 0x64, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x03, 0x00, 0x22, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x2e, 0x00, 0x64, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00 };
                        Type2Message msg = new Type2Message (data);
-                       AssertEquals ("Flags", (NtlmFlags)0x00810201, msg.Flags);
-                       AssertEquals ("Nonce", "01-23-45-67-89-AB-CD-EF", BitConverter.ToString (msg.Nonce));
-                       AssertEquals ("Type", 2, msg.Type);
+                       Assert.AreEqual ((NtlmFlags)0x00810201, msg.Flags, "Flags");
+                       Assert.AreEqual ("01-23-45-67-89-AB-CD-EF", BitConverter.ToString (msg.Nonce), "Nonce");
+                       Assert.AreEqual (2, msg.Type, "Type");
                }
                
                [Test]
index febcb79755259ea869d3b4848d4cf458fab55bf8..e9343cc979f81b700f488fca84f1f487531308eb 100644 (file)
@@ -17,7 +17,7 @@ using NUnit.Framework;
 namespace MonoTests.Mono.Security.Protocol.Ntlm {
 
        [TestFixture]
-       public class Type3MessageTest : Assertion {
+       public class Type3MessageTest {
 
                static byte[] nonce = { 0x53, 0x72, 0x76, 0x4e, 0x6f, 0x6e, 0x63, 0x65 };
 
@@ -40,8 +40,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                        msg.Host = "HOST";
                        msg.Password = "WELCOME";
                        msg.Username = "username";
-                       AssertEquals ("Type", 3, msg.Type);
-                       AssertEquals ("GetBytes", "4E-54-4C-4D-53-53-50-00-03-00-00-00-18-00-18-00-64-00-00-00-18-00-18-00-7C-00-00-00-0C-00-0C-00-40-00-00-00-10-00-10-00-4C-00-00-00-08-00-08-00-5C-00-00-00-00-00-00-00-94-00-00-00-01-B2-00-00-44-00-4F-00-4D-00-41-00-49-00-4E-00-75-00-73-00-65-00-72-00-6E-00-61-00-6D-00-65-00-48-00-4F-00-53-00-54-00-CA-12-00-72-3C-41-D5-77-AB-18-C7-64-C6-DE-F3-4F-A6-1B-FA-06-71-EA-5F-C8-7A-CE-90-85-AB-CC-37-59-38-0B-1C-68-62-E3-98-C3-C0-EF-9C-FC-22-E8-A2-C2", BitConverter.ToString (msg.GetBytes ()));
+                       Assert.AreEqual (3, msg.Type, "Type");
+                       Assert.AreEqual ("4E-54-4C-4D-53-53-50-00-03-00-00-00-18-00-18-00-64-00-00-00-18-00-18-00-7C-00-00-00-0C-00-0C-00-40-00-00-00-10-00-10-00-4C-00-00-00-08-00-08-00-5C-00-00-00-00-00-00-00-94-00-00-00-01-B2-00-00-44-00-4F-00-4D-00-41-00-49-00-4E-00-75-00-73-00-65-00-72-00-6E-00-61-00-6D-00-65-00-48-00-4F-00-53-00-54-00-CA-12-00-72-3C-41-D5-77-AB-18-C7-64-C6-DE-F3-4F-A6-1B-FA-06-71-EA-5F-C8-7A-CE-90-85-AB-CC-37-59-38-0B-1C-68-62-E3-98-C3-C0-EF-9C-FC-22-E8-A2-C2", BitConverter.ToString (msg.GetBytes ()), "GetBytes");
                }
 
                [Test]
@@ -55,8 +55,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                        msg.Host = "LIGHTCITY";
                        msg.Password = "Beeblebrox";
                        msg.Username = "Zaphod";
-                       AssertEquals ("Type", 3, msg.Type);
-                       AssertEquals ("GetBytes", "4E-54-4C-4D-53-53-50-00-03-00-00-00-18-00-18-00-72-00-00-00-18-00-18-00-8A-00-00-00-14-00-14-00-40-00-00-00-0C-00-0C-00-54-00-00-00-12-00-12-00-60-00-00-00-00-00-00-00-A2-00-00-00-01-B2-00-00-55-00-52-00-53-00-41-00-2D-00-4D-00-49-00-4E-00-4F-00-52-00-5A-00-61-00-70-00-68-00-6F-00-64-00-4C-00-49-00-47-00-48-00-54-00-43-00-49-00-54-00-59-00-AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97-E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (msg.GetBytes ()));
+                       Assert.AreEqual (3, msg.Type, "Type");
+                       Assert.AreEqual ("4E-54-4C-4D-53-53-50-00-03-00-00-00-18-00-18-00-72-00-00-00-18-00-18-00-8A-00-00-00-14-00-14-00-40-00-00-00-0C-00-0C-00-54-00-00-00-12-00-12-00-60-00-00-00-00-00-00-00-A2-00-00-00-01-B2-00-00-55-00-52-00-53-00-41-00-2D-00-4D-00-49-00-4E-00-4F-00-52-00-5A-00-61-00-70-00-68-00-6F-00-64-00-4C-00-49-00-47-00-48-00-54-00-43-00-49-00-54-00-59-00-AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97-E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (msg.GetBytes ()), "GetBytes");
                }
 
                [Test]
@@ -64,14 +64,14 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                public void Decode1 () 
                {
                        Type3Message msg = new Type3Message (data1);
-                       AssertEquals ("Domain", "URSA-MINOR", msg.Domain);
-                       AssertEquals ("Host", "LIGHTCITY", msg.Host);
-                       AssertEquals ("Username", "Zaphod", msg.Username);
-                       AssertEquals ("Flags", (NtlmFlags)0x8201, msg.Flags);
-                       AssertEquals ("Type", 3, msg.Type);
-                       AssertNull ("Password", msg.Password);
-                       AssertEquals ("LM", "AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97", BitConverter.ToString (msg.LM));
-                       AssertEquals ("NT", "E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (msg.NT));
+                       Assert.AreEqual ("URSA-MINOR", msg.Domain, "Domain");
+                       Assert.AreEqual ("LIGHTCITY", msg.Host, "Host");
+                       Assert.AreEqual ("Zaphod", msg.Username, "Username");
+                       Assert.AreEqual ((NtlmFlags)0x8201, msg.Flags, "Flags");
+                       Assert.AreEqual (3, msg.Type, "Type");
+                       Assert.IsNull (msg.Password, "Password");
+                       Assert.AreEqual ("AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97", BitConverter.ToString (msg.LM), "LM");
+                       Assert.AreEqual ("E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (msg.NT), "NT");
                }
 
                [Test]
@@ -79,28 +79,28 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
                public void Decode2 () 
                {
                        Type3Message msg = new Type3Message (data2);
-                       AssertEquals ("Domain", "DOMAIN", msg.Domain);
-                       AssertEquals ("Host", "WORKSTATION", msg.Host);
-                       AssertEquals ("Username", "user", msg.Username);
-                       AssertEquals ("Flags", (NtlmFlags)0x201, msg.Flags);
-                       AssertEquals ("Type", 3, msg.Type);
-                       AssertNull ("Password", msg.Password);
-                       AssertEquals ("LM", "C3-37-CD-5C-BD-44-FC-97-82-A6-67-AF-6D-42-7C-6D-E6-7C-20-C2-D3-E7-7C-56", BitConverter.ToString (msg.LM));
-                       AssertEquals ("NT", "25-A9-8C-1C-31-E8-18-47-46-6B-29-B2-DF-46-80-F3-99-58-FB-8C-21-3A-9C-C6", BitConverter.ToString (msg.NT));
+                       Assert.AreEqual ("DOMAIN", msg.Domain, "Domain");
+                       Assert.AreEqual ("WORKSTATION", msg.Host, "Host");
+                       Assert.AreEqual ("user", msg.Username, "Username");
+                       Assert.AreEqual ((NtlmFlags)0x201, msg.Flags, "Flags");
+                       Assert.AreEqual (3, msg.Type, "Type");
+                       Assert.IsNull (msg.Password, "Password");
+                       Assert.AreEqual ("C3-37-CD-5C-BD-44-FC-97-82-A6-67-AF-6D-42-7C-6D-E6-7C-20-C2-D3-E7-7C-56", BitConverter.ToString (msg.LM), "LM");
+                       Assert.AreEqual ("25-A9-8C-1C-31-E8-18-47-46-6B-29-B2-DF-46-80-F3-99-58-FB-8C-21-3A-9C-C6", BitConverter.ToString (msg.NT), "NT");
                }
 
                [Test]
                public void Challenge () 
                {
                        Type3Message msg = new Type3Message ();
-                       AssertNull ("Challenge", msg.Challenge);
+                       Assert.IsNull (msg.Challenge, "Challenge");
                        
                        byte[] c = new byte [8];
                        msg.Challenge = c;
-                       AssertEquals ("Challenge.Length", 8, msg.Challenge.Length);
+                       Assert.AreEqual (8, msg.Challenge.Length, "Challenge.Length");
                        
                        c [0] = 1;
-                       AssertEquals ("Challenge not directly accessible", 0, msg.Challenge [0]);
+                       Assert.AreEqual (0, msg.Challenge [0], "Challenge not directly accessible");
                }
                
                [Test]
index 05e013cd4aa2a26d7080df77256a51e636311396..fe94f26e01bcb9dd8663c2aeceb2686b9c3e4410 100644 (file)
@@ -22,7 +22,7 @@ namespace MonoTests.Mono.Security {
        // sn -k test.snk
 
        [TestFixture]
-       public class StrongNameTest : Assertion {
+       public class StrongNameTest {
 
                // because most crypto stuff works with byte[] buffers
                static public void AssertEquals (string msg, byte[] array1, byte[] array2) 
@@ -30,9 +30,9 @@ namespace MonoTests.Mono.Security {
                        if ((array1 == null) && (array2 == null))
                                return;
                        if (array1 == null)
-                               Fail (msg + " -> First array is NULL");
+                               Assert.Fail (msg + " -> First array is NULL");
                        if (array2 == null)
-                               Fail (msg + " -> Second array is NULL");
+                               Assert.Fail (msg + " -> Second array is NULL");
 
                        bool a = (array1.Length == array2.Length);
                        if (a) {
@@ -47,7 +47,7 @@ namespace MonoTests.Mono.Security {
                                msg += " -> Expected " + BitConverter.ToString (array1, 0);
                                msg += " is different than " + BitConverter.ToString (array2, 0);
                        }
-                       Assert (msg, a);
+                       Assert.IsTrue (a, msg);
                }
 
                static byte[] test = { 
@@ -112,9 +112,9 @@ namespace MonoTests.Mono.Security {
                public void FromBuffer ()
                {
                        StrongName sn = new StrongName (test);
-                       AssertEquals ("buffer.RSA", "<RSAKeyValue><Modulus>y6T/+EoARJMHW0ilpCdn+VbTffWxb1xu187/9Q+S2DwPyZ9LTNKrZgwaYmG4FPWEEH1HJxrxwh8AlD6oTz8CCcnPGKxKVFkubpIbEyvQCSTr22gUjVXXKHc2pfcCeOuNXS9kAOjv2tqpsiDbIsu9mnxfYysHWMDBqA4rxghyvT0=</Modulus><Exponent>AQAB</Exponent><P>6qYUEleRY+Wzyk7xN05UwWRna37U2aQnq2Y2VVyJeceDZPU1u1GYdQmFQw5XgvxKwWx9DAfNh1iSyLe0YmrAcw==</P><Q>3iy1IDIkPrRWBFrCAUhpUNn4/ICiVXTT7KjuEXkGr0+1Cx/V+o3eoVIo/9x2Q3IaxMbQDSa8hisIFunz/iuPjw==</Q><DP>2BouIBpfvzX8mBSOGNZePmG+0YRUeUCyfCs9XO5Fek9h1mfynVpvY1JqVbBuria2nl7Q53SEN+M+A/cT/RO9uw==</DP><DQ>pjma1ljNh2CTTrS8nAsaSJSc1gZD7l33RQRrAgWju7yN/qG2DbzhSZ9X7355uSKA5qK8/Gnz+QnvBn3JwGvE/w==</DQ><InverseQ>3U67bp3lPExfGoiTRvRyHhNtyJs6hAq/Uj7wSHKLHNoLG20kwZux8BwZKpPBBA0bQjkLUiRv9PYs18El/45/wA==</InverseQ><D>bPVOg5FMjWRBhmTbQ3ZWGkGLjRR9KEFDiTJXHs6DWjDgnZceWe9KB6KoJ0Vzkbs/Ovdcr56qBZxC2g6gTS5ALvogBYH2PrUftr4flh/z4qgOrAYCQkTecfHAGIGEldEeF1FItMbqmQa6WzVPVp4tn/+q3PAVmZqrs6/X9EARH10=</D></RSAKeyValue>", sn.RSA.ToXmlString (true));
-                       AssertEquals ("buffer.PublicKey", testPublicKey, sn.PublicKey);
-                       AssertEquals ("buffer.PublicKeyToken", testPublicKeyToken, sn.PublicKeyToken);
+                       Assert.AreEqual ("<RSAKeyValue><Modulus>y6T/+EoARJMHW0ilpCdn+VbTffWxb1xu187/9Q+S2DwPyZ9LTNKrZgwaYmG4FPWEEH1HJxrxwh8AlD6oTz8CCcnPGKxKVFkubpIbEyvQCSTr22gUjVXXKHc2pfcCeOuNXS9kAOjv2tqpsiDbIsu9mnxfYysHWMDBqA4rxghyvT0=</Modulus><Exponent>AQAB</Exponent><P>6qYUEleRY+Wzyk7xN05UwWRna37U2aQnq2Y2VVyJeceDZPU1u1GYdQmFQw5XgvxKwWx9DAfNh1iSyLe0YmrAcw==</P><Q>3iy1IDIkPrRWBFrCAUhpUNn4/ICiVXTT7KjuEXkGr0+1Cx/V+o3eoVIo/9x2Q3IaxMbQDSa8hisIFunz/iuPjw==</Q><DP>2BouIBpfvzX8mBSOGNZePmG+0YRUeUCyfCs9XO5Fek9h1mfynVpvY1JqVbBuria2nl7Q53SEN+M+A/cT/RO9uw==</DP><DQ>pjma1ljNh2CTTrS8nAsaSJSc1gZD7l33RQRrAgWju7yN/qG2DbzhSZ9X7355uSKA5qK8/Gnz+QnvBn3JwGvE/w==</DQ><InverseQ>3U67bp3lPExfGoiTRvRyHhNtyJs6hAq/Uj7wSHKLHNoLG20kwZux8BwZKpPBBA0bQjkLUiRv9PYs18El/45/wA==</InverseQ><D>bPVOg5FMjWRBhmTbQ3ZWGkGLjRR9KEFDiTJXHs6DWjDgnZceWe9KB6KoJ0Vzkbs/Ovdcr56qBZxC2g6gTS5ALvogBYH2PrUftr4flh/z4qgOrAYCQkTecfHAGIGEldEeF1FItMbqmQa6WzVPVp4tn/+q3PAVmZqrs6/X9EARH10=</D></RSAKeyValue>", sn.RSA.ToXmlString (true), "buffer.RSA");
+                       Assert.AreEqual (testPublicKey, sn.PublicKey, "buffer.PublicKey");
+                       Assert.AreEqual (testPublicKeyToken, sn.PublicKeyToken, "buffer.PublicKeyToken");
                }
 
                [Test]
@@ -122,9 +122,9 @@ namespace MonoTests.Mono.Security {
                {
                        StrongName sn1 = new StrongName (test);
                        StrongName sn2 = new StrongName (sn1.RSA);
-                       AssertEquals ("key.RSA", sn1.RSA.ToXmlString (true), sn2.RSA.ToXmlString (true));
-                       AssertEquals ("key.PublicKey", sn1.PublicKey, sn2.PublicKey);
-                       AssertEquals ("key.PublicKeyToken", sn1.PublicKeyToken, sn2.PublicKeyToken);
+                       Assert.AreEqual (sn1.RSA.ToXmlString (true), sn2.RSA.ToXmlString (true), "key.RSA");
+                       Assert.AreEqual (sn1.PublicKey, sn2.PublicKey, "key.PublicKey");
+                       Assert.AreEqual (sn1.PublicKeyToken, sn2.PublicKeyToken, "key.PublicKeyToken");
                }
 
                string Signed;
@@ -820,28 +820,28 @@ namespace MonoTests.Mono.Security {
                {
                        // compare that both hellosigned and hellodelay are the same file expect for signature
                        byte[] s = sn.Hash (Signed);
-                       AssertNotNull ("Hash/Signed", s);
+                       Assert.IsNotNull (s, "Hash/Signed");
                        byte[] d = sn.Hash (Delay);
-                       AssertNotNull ("Hash/Delay", d);
+                       Assert.IsNotNull (d, "Hash/Delay");
                        // are they the same
-                       AssertEquals ("Hash/Compare", s, d);
+                       Assert.AreEqual (s, d, "Hash/Compare");
                        // are they the same as GetHashFromAssemblyFile
                        byte[] knownHash = { 0x7D, 0xF7, 0x1D, 0xD4, 0x24, 0x22, 0xEA, 0xAB, 0xD2, 0x91, 0xCD, 0xAB, 0x1A, 0x55, 0x6A, 0x42, 0x05, 0xBA, 0x6E, 0x7B };
-                       AssertEquals ("Hash/GetHashFromAssemblyFile", knownHash, s);
+                       Assert.AreEqual (knownHash, s, "Hash/GetHashFromAssemblyFile");
                }
 
                [Test]
                public void VerifyValid () 
                {
                        // verify that hellosigned.exe is valid
-                       Assert ("Verify/Valid", sn.Verify (Signed));
+                       Assert.IsTrue (sn.Verify (Signed), "Verify/Valid");
                }
 
                [Test]
                public void VerifyInvalid () 
                {
                        // verify that hellodelay.exe isn't valid
-                       Assert ("Verify/Invalid", !sn.Verify (Delay));
+                       Assert.IsTrue (!sn.Verify (Delay), "Verify/Invalid");
                }
 
                [Test]
@@ -849,7 +849,7 @@ namespace MonoTests.Mono.Security {
                {
                        Stream signed = new MemoryStream (signedData);
                        // verify that hellosigned.exe is valid
-                       Assert ("Verify/Valid", sn.Verify (signed));
+                       Assert.IsTrue (sn.Verify (signed), "Verify/Valid");
                }
 
                [Test]
@@ -857,25 +857,25 @@ namespace MonoTests.Mono.Security {
                {
                        Stream delay = new MemoryStream (delayData);
                        // verify that hellodelay.exe isn't valid
-                       Assert ("Verify/Invalid", !sn.Verify (delay));
+                       Assert.IsTrue (!sn.Verify (delay), "Verify/Invalid");
                }
 
                [Test]
                public void Sign () 
                {
                        // sign the (invalid) hellodelay.exe
-                       Assert ("Sign", sn.Sign (Delay));
+                       Assert.IsTrue (sn.Sign (Delay), "Sign");
                        // and verify it's now valid
-                       Assert ("Sign/Verify", sn.Verify (Delay));
+                       Assert.IsTrue (sn.Verify (Delay), "Sign/Verify");
                }
 
                [Test]
                public void ReSign () 
                {
                        // resign the (already valid) hellosigned.exe
-                       Assert ("ReSign", sn.Sign (Signed));
+                       Assert.IsTrue (sn.Sign (Signed), "ReSign");
                        // and verify it's still valid
-                       Assert ("ReSign/Verify", sn.Verify (Signed));
+                       Assert.IsTrue (sn.Verify (Signed), "ReSign/Verify");
                }
                
                [Test]
@@ -907,7 +907,7 @@ namespace MonoTests.Mono.Security {
                {
                        byte[] ecma = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 
                        sn = new StrongName (ecma);
-                       Assert ("CanSign", !sn.CanSign);
+                       Assert.IsTrue (!sn.CanSign, "CanSign");
                }
 
                [Test]
index 8883dbaf8343d4c196eb782c96fa149ca149e50c..19a6cc1ceedadb434d7cdd26a96c0d514a12ce48 100644 (file)
@@ -3,7 +3,9 @@ SUBDIRS =
 include ../../build/rules.make
 
 LIBRARY = Mono.Tasklets.dll
-NO_TEST = yes
+
+LIB_MCS_FLAGS =
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 include ../../build/library.make
 
diff --git a/mcs/class/Mono.Tasklets/Mono.Tasklets_test.dll.sources b/mcs/class/Mono.Tasklets/Mono.Tasklets_test.dll.sources
new file mode 100644 (file)
index 0000000..f994ee3
--- /dev/null
@@ -0,0 +1 @@
+Mono.Tasklets/ContinuationsTest.cs
diff --git a/mcs/class/Mono.Tasklets/Test/Mono.Tasklets/ContinuationsTest.cs b/mcs/class/Mono.Tasklets/Test/Mono.Tasklets/ContinuationsTest.cs
new file mode 100644 (file)
index 0000000..d0b2de6
--- /dev/null
@@ -0,0 +1,175 @@
+using NUnit.Framework;
+
+using System;
+using Mono.Tasklets;
+
+namespace MonoTests.System
+{
+    [TestFixture]
+       public class ContinuationsTest {
+
+               private Continuation _contA = new Continuation();
+
+               private int total = 0;
+
+               [Test]
+               public void TestContinuationsLoop() {
+                       _contA.Mark();
+                       int value = 0;
+                       int ret = _contA.Store(0);
+                       for(int i = ret; i < 10; i++) {
+                               value += i;
+                       }
+
+                       if(value > 0) {
+                               total += value;
+                               _contA.Restore(ret + 1);
+                       }
+
+                       Assert.AreEqual(total,330);
+               }
+
+               private int yields = 0;
+
+               [Test]
+               public void Yielding() {
+                       Continuation baseCont = new Continuation();
+                       Continuation taskCont = new Continuation();
+                       
+                       baseCont.Mark();
+                       taskCont.Mark();
+                       
+                       // Store the base continuation to start the task
+                       if (baseCont.Store(0) == 0) {
+                               bool done = false;
+                               int count = 0;
+
+                               while (!done) {
+                                       // Do stuff for the task.
+                                       ++count;
+                                       
+                                       // This task is counting to 100.
+                                       if (count == 100) {
+                                               done = true;
+                                       }
+
+                                       // Yield every 10 loops
+                                       else if (count % 10 == 0) {
+
+                                               // To yield, store the task continuation then restore
+                                               // the base continuation.
+                                               if (taskCont.Store(0) == 0) {
+                                                       baseCont.Restore(1);
+                                               }
+                                       }
+                               }
+                       }
+                       // When restored, 'Store' will return what was passed to Restore, in this case 1 so fall here.
+                       else {
+                               // Count the yields, then go back to the task.
+                               ++yields;
+                               taskCont.Restore(1);
+                       }
+
+                       Assert.AreEqual(9, yields);
+               }
+
+
+               public class MicroThread {
+                       
+                       public void Yield() {
+                               if (MyThread.Store(0) == 0) {
+                                       MainThread.Restore(1);
+                               }
+                       }
+
+                       public void Resume() {
+                               if (MainThread.Store(0) == 0) {
+                                       MyThread.Restore(1);
+                               }
+                       }
+
+                       public void DoWork(Action action) {
+                               if (MainThread.Store(0) == 0) {
+                                       action();
+                                       Done = true;
+                                       MainThread.Restore(1);
+                               }
+                       }
+
+                       public bool Done = false;
+                       public Continuation MainThread = new Continuation();
+                       public Continuation MyThread = new Continuation();
+               }
+               
+               public class MicroBJob {
+                       private int _Count = 0;
+                       public int Count { 
+                               get { return _Count; }
+                               set { _Count = value;}
+                       }
+
+                       public MicroThread MicroThread;
+                       public void Work() {
+                               while (Count < 100) {
+                                       ++Count;
+                                       if (Count % 10 == 0) {
+                                               MicroThread.Yield();
+                                       }
+                               }
+                       }
+               }
+
+               [Test]
+               public void MicroThreadTest() {
+                       MicroThread microA = new MicroThread();
+                       MicroThread microB = new MicroThread();
+
+                       microA.MainThread.Mark();
+                       microA.MyThread.Mark();
+                       microB.MainThread.Mark();
+                       microB.MyThread.Mark();
+
+                       Assert.AreEqual(false,microA.Done);
+                       Assert.AreEqual(false,microB.Done);
+                       
+                       microA.DoWork( () => {
+                               int count = 0;
+                               while (count < 100) {
+                                       ++count;
+                                       if (count % 10 == 0) {
+                                               microA.Yield();
+                                       }
+                               }
+                       });
+               
+                       MicroBJob jobB = new MicroBJob();
+                       jobB.MicroThread = microB;
+
+                       microB.DoWork(jobB.Work);
+
+                       Assert.AreEqual(false,microA.Done);
+                       Assert.AreEqual(false,microB.Done);
+
+                       int yields = 0;
+                       while (yields < 20) {
+                               if (!microA.Done) microA.Resume();
+                               if (!microB.Done) microB.Resume();
+                               if (microA.Done && microB.Done) break;
+                               ++yields;
+                       }
+
+                       Assert.AreEqual(true,microA.Done);
+                       Assert.AreEqual(true,microB.Done);
+                       Assert.AreEqual(100,jobB.Count);
+                       Assert.AreEqual(9,yields);
+               }
+       }
+}
+
+// vim: noexpandtab
+// Local Variables:
+// tab-width: 4
+// c-basic-offset: 4
+// indent-tabs-mode: t
+// End:
index 9e0d99d6c0b7de775b2ecfc44b3d2a0067d41f15..4f24b424a7f0f35cb1cc605534aacd209577b7ce 100644 (file)
@@ -5,25 +5,14 @@ include ../../build/rules.make
 LIBRARY = Novell.Directory.Ldap.dll
 
 LIB_REFS = System Mono.Security
-LIB_MCS_FLAGS = \
-       -warn:1 -nowarn:612 \
-       $(RESX_RES:%=/res:%)
+LIB_MCS_FLAGS = -warn:1 -nowarn:612 
 
+RESOURCE_DEFS = ResultCodeMessages,Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt
 include ../../build/library.make
 
-RESULTCODE_MESSAGES = Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resources
-
-RESX_RES = $(RESULTCODE_MESSAGES)
-
-$(the_lib): $(RESULTCODE_MESSAGES)
-
-$(RESULTCODE_MESSAGES): Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt
-       $(RESGEN) $< $@
-
 EXTRA_DISTFILES = \
        Novell.Directory.Ldap.Rfc2251/RfcLdapURL.cs \
        Novell.Directory.Ldap.Utilclass/ExceptionMessages.resx \
        Novell.Directory.Ldap.Utilclass/ExceptionMessages.txt \
-       Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx \
-       Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt 
+       Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx
 
index fe6669ed6c34fcffe0df07861a45cf5a996ce975..90e5b13419f317c41238330a6020a81ca03f0e0d 100644 (file)
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx">\r
+    <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt">\r
       <LogicalName>ResultCodeMessages.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index e0b5dab202b7e0cbabc2ea9ac88557a0472f8562..9c35c71ec5627798b735f29e46db1c9224af615b 100644 (file)
@@ -4,18 +4,16 @@ include ../../build/rules.make
 
 LIBRARY = System.ComponentModel.Composition.dll
 LIB_REFS = System System.Core
-LIB_MCS_FLAGS = -d:CLR40 -resource:$(STRING_MESSAGES) -d:USE_ECMA_KEY,FEATURE_REFLECTIONCONTEXT,FEATURE_REFLECTIONFILEIO,FEATURE_SERIALIZATION,FEATURE_SLIMLOCK -nowarn:219,414
 
-STRING_MESSAGES = Microsoft.Internal.Strings.resources
+RESOURCE_DEFS = Microsoft.Internal.Strings,src/ComponentModel/Strings.resx
+LIB_MCS_FLAGS = -d:CLR40 -d:USE_ECMA_KEY,FEATURE_REFLECTIONCONTEXT,FEATURE_REFLECTIONFILEIO,FEATURE_SERIALIZATION,FEATURE_SLIMLOCK -nowarn:219,414
+
 
 CLEAN_FILES += $(STRING_MESSAGES)
 
 EXTRA_DISTFILES = \
        src/ComponentModel/Strings.resx
-       
+
 include ../../build/library.make
 
-$(the_lib): $(STRING_MESSAGES)
 
-$(STRING_MESSAGES): src/ComponentModel/Strings.resx
-       $(RESGEN) $< $@
index a676a9be185897d8d4b914c88a57ace42cf0eada..598f507463cecd04fba5626b8c97d39b2e052aa2 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-resgen $(ProjectDir)\src\ComponentModel\Strings.resx $(ProjectDir)\Microsoft.Internal.Strings.resx
+
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-resgen $(ProjectDir)\src\ComponentModel\Strings.resx $(ProjectDir)\Microsoft.Internal.Strings.resx\r
+\r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 
@@ -262,7 +262,7 @@ resgen $(ProjectDir)\src\ComponentModel\Strings.resx $(ProjectDir)\Microsoft.Int
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Microsoft.Internal.Strings.resx">\r
+    <EmbeddedResource Include="src/ComponentModel/Strings.resx">\r
       <LogicalName>Microsoft.Internal.Strings.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs
new file mode 100644 (file)
index 0000000..873ce57
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// SafeNCryptHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public abstract class SafeNCryptHandle : System.Runtime.InteropServices.SafeHandle
+       {
+               protected SafeNCryptHandle ()
+                       : base (IntPtr.Zero, true)
+               {
+               }
+
+               public override bool IsInvalid { get { throw new NotImplementedException (); } }
+
+               protected override bool ReleaseHandle ()
+               {
+                       return false;
+               }
+
+               protected abstract bool ReleaseNativeHandle();
+       }
+}      
\ No newline at end of file
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs
new file mode 100644 (file)
index 0000000..3dcbfae
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// SafeNCryptKeyHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public sealed class SafeNCryptKeyHandle : SafeNCryptHandle
+       {
+               public SafeNCryptKeyHandle ()
+               {
+               }
+
+               protected override bool ReleaseNativeHandle ()
+               {
+                       return false;
+               }
+       }
+}      
\ No newline at end of file
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.cs
new file mode 100644 (file)
index 0000000..4a2d17a
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// SafeNCryptProviderHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public sealed class SafeNCryptProviderHandle : SafeNCryptHandle
+       {
+               public SafeNCryptProviderHandle ()
+               {
+               }
+
+               protected override bool ReleaseNativeHandle ()
+               {
+                       return false;
+               }
+       }
+}      
\ No newline at end of file
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.cs
new file mode 100644 (file)
index 0000000..8943e38
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// SafeNCryptSecretHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public sealed class SafeNCryptSecretHandle : SafeNCryptHandle
+       {
+               public SafeNCryptSecretHandle ()
+               {
+               }
+
+               protected override bool ReleaseNativeHandle ()
+               {
+                       return false;
+               }
+       }
+}      
\ No newline at end of file
index 2c195034d83fa59f0a2b62a831db6e3f97ef668a..23bf26f7482bb7654e1e5043f8381c937000f460 100644 (file)
@@ -63,7 +63,7 @@ namespace System.IO.Pipes
                {
                }
 
-               public AnonymousPipeClientStream (PipeDirection direction,SafePipeHandle safePipeHandle)
+               public AnonymousPipeClientStream (PipeDirection direction, SafePipeHandle safePipeHandle)
                        : base (direction, DefaultBufferSize)
                {
                        /*
@@ -73,7 +73,11 @@ namespace System.IO.Pipes
                                impl = new UnixAnonymousPipeClient (this, safePipeHandle);
                        */
 
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        InitializeHandle (safePipeHandle, false, false);
+#endif
                        IsConnected = true;
                }
 
index 01e4b1dbf49308e502c5209126ce33cbed4e7fd9..97455f30cdab55d78766508ad566684a21674a3b 100644 (file)
@@ -59,10 +59,18 @@ namespace System.IO.Pipes
                }
 
                public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize)
+#if MOBILE
+                       : base (direction, bufferSize)
+               {
+                       throw new NotImplementedException ();
+               }
+#else
                        : this (direction, inheritability, bufferSize, null)
                {
                }
+#endif
 
+#if !MOBILE
                public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
                        : base (direction, bufferSize)
                {
@@ -77,6 +85,7 @@ namespace System.IO.Pipes
                        InitializeHandle (impl.Handle, false, false);
                        IsConnected = true;
                }
+#endif
 
                [MonoTODO]
                public AnonymousPipeServerStream (PipeDirection direction, SafePipeHandle serverSafePipeHandle, SafePipeHandle clientSafePipeHandle)
@@ -90,6 +99,9 @@ namespace System.IO.Pipes
                        if (direction == PipeDirection.InOut)
                                throw new NotSupportedException ("Anonymous pipe direction can only be either in or out.");
 
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32AnonymousPipeServer (this, serverSafePipeHandle, clientSafePipeHandle);
                        else
@@ -99,6 +111,12 @@ namespace System.IO.Pipes
                        IsConnected = true;
 
                        ClientSafePipeHandle = clientSafePipeHandle;
+#endif
+               }
+
+               ~AnonymousPipeServerStream ()
+               {
+                       // To be compatible with .net
                }
 
                IAnonymousPipeServer impl;
index 357f7387d23681febef3fbd4bf1bc440688d6c43..181ab1ccbf0b44cd4f14ca719e5f49d71f498647 100644 (file)
@@ -72,21 +72,33 @@ namespace System.IO.Pipes
                }
 
                public NamedPipeClientStream (string serverName, string pipeName, PipeDirection direction, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
+#if MOBILE
+                       : base (direction, DefaultBufferSize)
+               {
+                       throw new NotImplementedException ();
+               }
+#else
                        : this (serverName, pipeName, ToAccessRights (direction), options, impersonationLevel, inheritability)
                {
                }
+#endif
 
                public NamedPipeClientStream (PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
                        : base (direction, DefaultBufferSize)
                {
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32NamedPipeClient (this, safePipeHandle);
                        else
                                impl = new UnixNamedPipeClient (this, safePipeHandle);
                        IsConnected = isConnected;
                        InitializeHandle (safePipeHandle, true, isAsync);
+#endif
                }
 
+#if !MOBILE
                public NamedPipeClientStream (string serverName, string pipeName, PipeAccessRights desiredAccessRights, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
                        : base (ToDirection (desiredAccessRights), DefaultBufferSize)
                {
@@ -99,21 +111,30 @@ namespace System.IO.Pipes
                        else
                                impl = new UnixNamedPipeClient (this, serverName, pipeName, desiredAccessRights, options, inheritability);
                }
+#endif
 
                INamedPipeClient impl;
 
                public void Connect ()
                {
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        impl.Connect ();
                        InitializeHandle (impl.Handle, false, impl.IsAsync);
                        IsConnected = true;
+#endif
                }
 
                public void Connect (int timeout)
                {
+#if MOBILE
+                       throw new NotImplementedException ();
+#else                  
                        impl.Connect (timeout);
                        InitializeHandle (impl.Handle, false, impl.IsAsync);
                        IsConnected = true;
+#endif
                }
 
                public int NumberOfServerInstances {
index b29deaf3301489decd3473fe85db39af83ecfbf6..2723109bd988f7e2ec1a34558cb600b810a77027 100644 (file)
@@ -70,10 +70,18 @@ namespace System.IO.Pipes
                }
 
                public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize)
+#if MOBILE             
+                       : base (direction, inBufferSize)
+               {
+                       throw new NotImplementedException ();
+               }
+#else
                        : this (pipeName, direction, maxNumberOfServerInstances, transmissionMode, options, inBufferSize, outBufferSize, null)
                {
                }
+#endif
 
+#if !MOBILE
                public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize, PipeSecurity pipeSecurity)
                        : this (pipeName, direction, maxNumberOfServerInstances, transmissionMode, options, inBufferSize, outBufferSize, pipeSecurity, HandleInheritability.None)
                {
@@ -101,16 +109,26 @@ namespace System.IO.Pipes
 
                        InitializeHandle (impl.Handle, false, (options & PipeOptions.Asynchronous) != PipeOptions.None);
                }
+#endif
 
                public NamedPipeServerStream (PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
                        : base (direction, DefaultBufferSize)
                {
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32NamedPipeServer (this, safePipeHandle);
                        else
                                impl = new UnixNamedPipeServer (this, safePipeHandle);
                        IsConnected = isConnected;
                        InitializeHandle (safePipeHandle, true, isAsync);
+#endif
+               }
+
+               ~NamedPipeServerStream ()
+               {
+                       // To be compatible with .net
                }
 
                INamedPipeServer impl;
@@ -120,12 +138,14 @@ namespace System.IO.Pipes
                        impl.Disconnect ();
                }
 
+#if !MOBILE
                [MonoTODO]
                [SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlPrincipal)]
                public void RunAsClient (PipeStreamImpersonationWorker impersonationWorker)
                {
                        throw new NotImplementedException ();
                }
+#endif
 
                public void WaitForConnection ()
                {
@@ -140,6 +160,7 @@ namespace System.IO.Pipes
                        throw new NotImplementedException ();
                }
 
+#if !MOBILE
                // async operations
 
                Action wait_connect_delegate;
@@ -156,6 +177,7 @@ namespace System.IO.Pipes
                {
                        wait_connect_delegate.EndInvoke (asyncResult);
                }
+#endif
        }
 }
 
index fd4a57a693063f4b21c28f755bd953d42089206b..ed030e7608bde8da0cf99b23f88752f042804491 100644 (file)
@@ -46,15 +46,18 @@ namespace System.IO.Pipes
                // FIXME: not precise.
                internal const int DefaultBufferSize = 0x400;
 
+#if !MOBILE
                internal static bool IsWindows {
                        get { return Win32Marshal.IsWindows; }
                }
+#endif
 
                internal Exception ThrowACLException ()
                {
                        return new NotImplementedException ("ACL is not supported in Mono");
                }
 
+#if !MOBILE
                internal static PipeAccessRights ToAccessRights (PipeDirection direction)
                {
                        switch (direction) {
@@ -85,6 +88,7 @@ namespace System.IO.Pipes
                                        throw new ArgumentOutOfRangeException ();
                        }
                }
+#endif
 
                protected PipeStream (PipeDirection direction, int bufferSize)
                        : this (direction, PipeTransmissionMode.Byte, bufferSize)
@@ -140,7 +144,9 @@ namespace System.IO.Pipes
                        set { stream = value; }
                }
 
+#if !MOBILE
                protected bool IsHandleExposed { get; private set; }
+#endif
 
                [MonoTODO]
                public bool IsMessageComplete { get; private set; }
@@ -176,7 +182,19 @@ namespace System.IO.Pipes
                }
 
                // initialize/dispose/state check
+#if MOBILE
+               internal static void CheckPipePropertyOperations ()
+               {
+               }
 
+               static void CheckReadOperations ()
+               {
+               }
+
+               static void CheckWriteOperations ()
+               {
+               }
+#else
                [MonoTODO]
                protected internal virtual void CheckPipePropertyOperations ()
                {
@@ -206,6 +224,7 @@ namespace System.IO.Pipes
                        this.IsHandleExposed = isExposed;
                        this.IsAsync = isAsync;
                }
+#endif
 
                protected override void Dispose (bool disposing)
                {
@@ -234,6 +253,7 @@ namespace System.IO.Pipes
                        throw new NotSupportedException ();
                }
 
+#if !MOBILE
                public PipeSecurity GetAccessControl ()
                {
                        return new PipeSecurity (SafePipeHandle,
@@ -255,6 +275,7 @@ namespace System.IO.Pipes
                public void WaitForPipeDrain ()
                {
                }
+#endif
 
                [MonoTODO]
                public override int Read ([In] byte [] buffer, int offset, int count)
@@ -298,6 +319,7 @@ namespace System.IO.Pipes
 
                // async
 
+#if !MOBILE
                Func<byte [],int,int,int> read_delegate;
 
                [HostProtection (SecurityAction.LinkDemand, ExternalThreading = true)]
@@ -327,6 +349,7 @@ namespace System.IO.Pipes
                {
                        write_delegate.EndInvoke (asyncResult);
                }
+#endif
        }
 }
 
diff --git a/mcs/class/System.Core/System.Security.Cryptography.X509Certificates/ECDsaCertificateExtensions.cs b/mcs/class/System.Core/System.Security.Cryptography.X509Certificates/ECDsaCertificateExtensions.cs
new file mode 100644 (file)
index 0000000..aa5da44
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// ECDsaCertificateExtensions.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography.X509Certificates
+{
+       public static class ECDsaCertificateExtensions
+       {
+               [MonoTODO]
+               public static ECDsa GetECDsaPrivateKey (this X509Certificate2 certificate)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ECDsa GetECDsaPublicKey (this X509Certificate2 certificate)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
diff --git a/mcs/class/System.Core/System.Security.Cryptography.X509Certificates/RSACertificateExtensions.cs b/mcs/class/System.Core/System.Security.Cryptography.X509Certificates/RSACertificateExtensions.cs
new file mode 100644 (file)
index 0000000..0e322e4
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// RsaCertificateExtensions.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography.X509Certificates
+{
+       public static class RSACertificateExtensions
+       {
+               [MonoTODO]
+               public static RSA GetRSAPrivateKey(this X509Certificate2 certificate)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static RSA GetRSAPublicKey(this X509Certificate2 certificate)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
diff --git a/mcs/class/System.Core/System.Security.Cryptography/AesCng.cs b/mcs/class/System.Core/System.Security.Cryptography/AesCng.cs
new file mode 100644 (file)
index 0000000..64377b7
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// AesCng.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class AesCng : Aes
+       {
+               public AesCng ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public AesCng (string keyName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public AesCng (string keyName, CngProvider provider)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public AesCng (string keyName, CngProvider provider, CngKeyOpenOptions openOptions)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override Byte[] Key {
+                       get {
+                               throw new NotImplementedException ();
+                       } set {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override int KeySize {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override ICryptoTransform CreateDecryptor ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateDecryptor (Byte[] rgbKey, Byte[] rgbIV)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateEncryptor ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateEncryptor (Byte[] rgbKey, Byte[] rgbIV)
+               {
+                       return default(System.Security.Cryptography.ICryptoTransform);
+               }
+
+               protected override void Dispose (bool disposing) {
+                       throw new NotImplementedException ();
+               }
+
+               public override void GenerateIV ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void GenerateKey ()
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Security.Cryptography/TripleDESCng.cs b/mcs/class/System.Core/System.Security.Cryptography/TripleDESCng.cs
new file mode 100644 (file)
index 0000000..48f9377
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// TripleDESCng.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class TripleDESCng : TripleDES
+       {
+               public TripleDESCng ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public TripleDESCng (string keyName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public TripleDESCng (string keyName, CngProvider provider)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public TripleDESCng (string keyName, CngProvider provider, CngKeyOpenOptions openOptions)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override Byte[] Key {
+                       get {
+                               throw new NotImplementedException ();
+                       } set {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override int KeySize {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override ICryptoTransform CreateDecryptor ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateDecryptor (Byte[] rgbKey, Byte[] rgbIV)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateEncryptor ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateEncryptor (Byte[] rgbKey, Byte[] rgbIV)
+               {
+                       return default(System.Security.Cryptography.ICryptoTransform);
+               }
+
+               protected override void Dispose (bool disposing) {
+                       throw new NotImplementedException ();
+               }
+
+               public override void GenerateIV ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void GenerateKey ()
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
index b61fcb2bf4dbda1e403cf6b0c84d9539361b605d..27191c37ed2b7b121d2f1926471d459add1d013f 100644 (file)
@@ -379,7 +379,9 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
                [Test]
                public void CreateViewStreamAlignToPageSize ()
                {
-#if MONOTOUCH
+#if __WATCHOS__
+                       int pageSize = 4096;
+#elif MONOTOUCH
                        // iOS bugs on ARM64 - bnc #27667 - apple #
                        int pageSize = (IntPtr.Size == 4) ? Environment.SystemPageSize : 4096;
 #else
index 676127096e1f7ce4cd110a3b85e3c3ee4ca6e1de..4489cceea185442afc7b62e8476f80ee2436ab13 100644 (file)
@@ -6,6 +6,25 @@ System.IO.MemoryMappedFiles/MemoryMappedFile.cs
 System.IO.MemoryMappedFiles/MemoryMappedView.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
+System.Security.Cryptography/AesCng.cs
+System.Security.Cryptography/TripleDESCng.cs
+System.Security.Cryptography.X509Certificates/ECDsaCertificateExtensions.cs
+System.Security.Cryptography.X509Certificates/RSACertificateExtensions.cs
+Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs
+Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs
+Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.cs
+Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.cs
+Microsoft.Win32.SafeHandles/SafePipeHandle.cs
+
+System.IO.Pipes/AnonymousPipeClientStream.cs
+System.IO.Pipes/AnonymousPipeServerStream.cs
+System.IO.Pipes/NamedPipeClientStream.cs
+System.IO.Pipes/NamedPipeServerStream.cs
+System.IO.Pipes/PipeDirection.cs
+System.IO.Pipes/PipeInterfaces.cs
+System.IO.Pipes/PipeOptions.cs
+System.IO.Pipes/PipeStream.cs
+System.IO.Pipes/PipeTransmissionMode.cs
 
 ReferenceSources/SR.cs
 ReferenceSources/SR.missing.cs
@@ -185,9 +204,20 @@ ReferenceSources/Strings.cs
 ../referencesource/System.Core/System/Runtime/CompilerServices/ExecutionScope.cs
 
 ../referencesource/System.Core/System/Security/Cryptography/Aes.cs
+../referencesource/System.Core/System/Security/Cryptography/BCryptNative.cs
+../referencesource/System.Core/System/Security/Cryptography/CngAlgorithm.cs
+../referencesource/System.Core/System/Security/Cryptography/CngAlgorithmGroup.cs
+../referencesource/System.Core/System/Security/Cryptography/CngKey.cs
 ../referencesource/System.Core/System/Security/Cryptography/CngKeyBlobFormat.cs
+../referencesource/System.Core/System/Security/Cryptography/CngKeyCreationParameters.cs
+../referencesource/System.Core/System/Security/Cryptography/CngProperty.cs
+../referencesource/System.Core/System/Security/Cryptography/CngProvider.cs
+../referencesource/System.Core/System/Security/Cryptography/CngUIPolicy.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellmanPublicKey.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECDsa.cs
+../referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs
+../referencesource/System.Core/System/Security/Cryptography/NCryptNative.cs
+../referencesource/System.Core/System/Security/Cryptography/RsaCng.cs
 
 ../referencesource/System.Core/System/threading/ReaderWriterLockSlim/ReaderWriterLockSlim.cs
 
index 0d79ec4913e03f5878ac587c69a5a5324589d5a6..8b8fef0e40e738565956982bb7c19e8fb8c0f9ee 100644 (file)
@@ -3,8 +3,6 @@
 
 System.Security.Cryptography/AesCryptoServiceProvider.cs
 System.Security.Cryptography/AesTransform.cs
-System.Security.Cryptography/CngAlgorithm.cs
-System.Security.Cryptography/CngAlgorithmGroup.cs
 System.Security.Cryptography/MD5Cng.cs
 System.Security.Cryptography/SHA1Cng.cs
 System.Security.Cryptography/SHA256Cng.cs
index 5dedcbf316cf764099726b96424a0bdbabcad725..f367efd60c7562e4d1253707eed5828ace4a90e5 100644 (file)
@@ -1,29 +1,16 @@
 #include common_System.Core.dll.sources
 #include dynamic_System.Core.dll.sources
 
-Microsoft.Win32.SafeHandles/SafePipeHandle.cs
-
-System.IO.Pipes/AnonymousPipeClientStream.cs
-System.IO.Pipes/AnonymousPipeServerStream.cs
-System.IO.Pipes/NamedPipeClientStream.cs
-System.IO.Pipes/NamedPipeServerStream.cs
 System.IO.Pipes/PipeAccessRights.cs
 System.IO.Pipes/PipeAccessRule.cs
 System.IO.Pipes/PipeAuditRule.cs
-System.IO.Pipes/PipeDirection.cs
-System.IO.Pipes/PipeInterfaces.cs
-System.IO.Pipes/PipeOptions.cs
 System.IO.Pipes/PipeSecurity.cs
-System.IO.Pipes/PipeStream.cs
 System.IO.Pipes/PipeStreamImpersonationWorker.cs
-System.IO.Pipes/PipeTransmissionMode.cs
 System.IO.Pipes/PipeUnix.cs
 System.IO.Pipes/PipeWin32.cs
 
 System.Security.Cryptography/AesCryptoServiceProvider.cs
 System.Security.Cryptography/AesTransform.cs
-System.Security.Cryptography/CngAlgorithm.cs
-System.Security.Cryptography/CngAlgorithmGroup.cs
 System.Security.Cryptography/MD5Cng.cs
 System.Security.Cryptography/SHA1Cng.cs
 System.Security.Cryptography/SHA256Cng.cs
index 108d98cf1499262eecf3a67dcca510a3d5711b57..f635e808fc329658af874cfc435ce89e38f985b1 100644 (file)
@@ -4,13 +4,11 @@ include ../../build/rules.make
 
 LIBRARY = System.Data.Services.Client.dll
 
-Client/System.Data.Services.Client.resources: Client/System.Data.Services.Client.txt
-       $(RESGEN) "$<" "$@"
+RESOURCE_DEFS = System.Data.Services.Client,Client/System.Data.Services.Client.txt
 
 LIB_REFS = System System.Core System.Xml.Linq System.Data System.Xml
 LIB_MCS_FLAGS = \
        -d:NET_3_5      \
-       -resource:Client/System.Data.Services.Client.resources \
        -warn:2
 
 ifndef NO_WINDOWS_BASE
@@ -21,7 +19,5 @@ endif
 
 include ../../build/library.make
 
-$(the_lib): Client/System.Data.Services.Client.resources
-
 EXTRA_DISTFILES = Client/System.Data.Services.Client.txt
-CLEAN_FILES += Client/System.Data.Services.Client.resources
+
index 55b9e130c8cb94ae7b31498208e72f82e704d284..e5d64222fa84dd2641e4f4a7f659b3028e15c7fd 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-resgen $(ProjectDir)\Client\System.Data.Services.Client.txt $(ProjectDir)\Client\System.Data.Services.Client.resx
+
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-resgen $(ProjectDir)\Client\System.Data.Services.Client.txt $(ProjectDir)\Client\System.Data.Services.Client.resx\r
+\r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 
@@ -219,7 +219,7 @@ resgen $(ProjectDir)\Client\System.Data.Services.Client.txt $(ProjectDir)\Client
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Client/System.Data.Services.Client.resx">\r
+    <EmbeddedResource Include="Client/System.Data.Services.Client.txt">\r
       <LogicalName>System.Data.Services.Client.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index b928fc4086aa72b6ef1c26353187c972223afad2..04a93d20c2dfb28f6caf3366b63edf152ecf6de8 100644 (file)
@@ -35,87 +35,87 @@ namespace Microsoft.SqlServer.Server
 {
        public sealed class SqlDataRecord : IDataRecord
        {
-               public bool GetBoolean (int i)
+               public bool GetBoolean (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public byte GetByte (int i)
+               public byte GetByte (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public long GetBytes (int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
+               public long GetBytes (int ordinal, long fieldOffset, byte[] buffer, int bufferOffset, int length)
                {
                        throw new NotImplementedException ();
                }
 
-               public char GetChar (int i)
+               public char GetChar (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public long GetChars (int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
+               public long GetChars (int ordinal, long fieldOffset, char[] buffer, int bufferOffset, int length)
                {
                        throw new NotImplementedException ();
                }
 
-               public IDataReader GetData (int i)
+               public IDataReader GetData (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public string GetDataTypeName (int i)
+               public string GetDataTypeName (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public DateTime GetDateTime (int i)
+               public DateTime GetDateTime (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public decimal GetDecimal (int i)
+               public decimal GetDecimal (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public double GetDouble (int i)
+               public double GetDouble (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public System.Type GetFieldType (int i)
+               public System.Type GetFieldType (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public float GetFloat (int i)
+               public float GetFloat (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public Guid GetGuid (int i)
+               public Guid GetGuid (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public short GetInt16 (int i)
+               public short GetInt16 (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public int GetInt32 (int i)
+               public int GetInt32 (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public long GetInt64 (int i)
+               public long GetInt64 (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public string GetName (int i)
+               public string GetName (int ordinal)
                {
                        throw new NotImplementedException ();
                }
@@ -125,12 +125,12 @@ namespace Microsoft.SqlServer.Server
                        throw new NotImplementedException ();
                }
 
-               public string GetString (int i)
+               public string GetString (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public object GetValue (int i)
+               public object GetValue (int ordinal)
                {
                        throw new NotImplementedException ();
                }
@@ -140,7 +140,7 @@ namespace Microsoft.SqlServer.Server
                        throw new NotImplementedException ();
                }
 
-               public bool IsDBNull (int i)
+               public bool IsDBNull (int ordinal)
                {
                        throw new NotImplementedException ();
                }
@@ -151,13 +151,13 @@ namespace Microsoft.SqlServer.Server
                        }
                }
 
-               public object this [string index] {
+               public object this [string name] {
                        get {
                                throw new NotImplementedException ();
                        }
                }
 
-               public object this [int index] {
+               public object this [int ordinal] {
                        get {
                                throw new NotImplementedException ();
                        }
index 8673fc48022bf86c218f9fbb97b6079e121206c1..66c126fd520bd656e795eea1109cf12028a27684 100644 (file)
@@ -447,7 +447,7 @@ namespace MonoTests.System.Data
                {
                        DataTable dt = DataProvider.CreateParentDataTable();
                        dt.Constraints.Add("UniqueConstraint",dt.Columns["ParentId"],true);
-                       Assert.AreEqual(1,dt.Constraints.Count,1); 
+                       Assert.AreEqual(1,(double) dt.Constraints.Count,1); 
                        Assert.AreEqual("UniqueConstraint",dt.Constraints[0].ConstraintName,"CN34");                    
                }
                
index 5b2fd8ca9f3d66c97964d7d1ae0b44fc596f32cd..e8487efaf6bc0cae842a9839adafe27c6a84960a 100644 (file)
@@ -41,7 +41,7 @@ using System.Data;
 namespace MonoTests.System.Data
 {
        [TestFixture]
-       public class DataRowTest : Assertion {
+       public class DataRowTest {
                private DataTable table;                                                
                 private DataRow row;    
 
@@ -101,7 +101,7 @@ namespace MonoTests.System.Data
                 private  void GetColumnErrorTest ()
                 {
                         // Print the error of a specified column.
-                        AssertEquals ("#A01", "Some error!", row.GetColumnError (1));
+                        Assert.AreEqual ("Some error!", row.GetColumnError (1), "#A01");
                 }
 
                 private void GetAllErrorsTest ()
@@ -112,7 +112,7 @@ namespace MonoTests.System.Data
                                 colArr = row.GetColumnsInError ();
                                                                                                     
                                 for (int i = 0; i < colArr.Length; i++) {
-                                        AssertEquals ("#A02", table.Columns [1], colArr [i]);
+                                        Assert.AreEqual (table.Columns [1], colArr [i], "#A02");
                                 }
                                 row.ClearErrors ();
                         }
@@ -135,7 +135,7 @@ namespace MonoTests.System.Data
                         int cnt = 1;
                         for (int i = 1; i < table.Rows.Count; i++) {
                                 DataRow r = table.Rows [i];
-                                AssertEquals ("#A03", "Name " + cnt, r ["fName"]);
+                                Assert.AreEqual ("Name " + cnt, r ["fName"], "#A03");
                                 cnt++;
                         }
                                                                                                     
@@ -146,20 +146,20 @@ namespace MonoTests.System.Data
                        rc [2].Delete ();
                                                                                                     
                                                                                                     
-                        AssertEquals ("#A04", "Deleted", rc [0].RowState.ToString ());
-                        AssertEquals ("#A05", "Deleted", rc [2].RowState.ToString ());
+                        Assert.AreEqual ("Deleted", rc [0].RowState.ToString (), "#A04");
+                        Assert.AreEqual ("Deleted", rc [2].RowState.ToString (), "#A05");
                                                                                                     
                                                                                                     
                         // Accept changes
                         table.AcceptChanges ();
-                        AssertEquals ("#A06", "Name 1", (table.Rows [0]) [1]);
+                        Assert.AreEqual ("Name 1", (table.Rows [0]) [1], "#A06");
                         try  {
                                 object o = rc [2];
-                                Fail ("#A07");
+                                Assert.Fail ("#A07");
                         }
                         catch (Exception e) {
                                // Never premise English.
-                                //AssertEquals ("#A08", "There is no row at position 2.", e.Message);
+                                //Assert.AreEqual ("#A08", "There is no row at position 2.", e.Message);
                         }
                 }
 
@@ -179,40 +179,40 @@ namespace MonoTests.System.Data
                                                                                                     
                                 // Stage 1
                                 //Initially: After Add (Row) But Before Accept Changes");
-                                AssertEquals ("#A09", "My FName", row [1, DataRowVersion.Default]);
-                                AssertEquals ("#A10", "LName", row [2, DataRowVersion.Default]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Default], "#A09");
+                                Assert.AreEqual ("LName", row [2, DataRowVersion.Default], "#A10");
                                                                                                     
-                                AssertEquals ("#A11", "My FName", row [1, DataRowVersion.Current]);
-                                AssertEquals ("#A12", "LName", row [2, DataRowVersion.Current]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Current], "#A11");
+                                Assert.AreEqual ("LName", row [2, DataRowVersion.Current], "#A12");
                                                                                                     
                                 try {
                                       object o = row [1, DataRowVersion.Original];
                                       o = row [1, DataRowVersion.Proposed];
-                                        Fail ("#A13");
+                                        Assert.Fail ("#A13");
                                 }
                                 catch (Exception e) {
                                         if (e.GetType () != typeof (AssertionException)) {
-                                                AssertEquals ("#A14", typeof (VersionNotFoundException), e.GetType ());
+                                                Assert.AreEqual (typeof (VersionNotFoundException), e.GetType (), "#A14");
                                         }
                                 }
                                                                                                     
                                 // Stage 2
                                 //After Accept Changes
                                 table.AcceptChanges ();
-                                AssertEquals ("#A15", "My FName", row [1, DataRowVersion.Default]);
-                                AssertEquals ("#A16", "LName", row [2, DataRowVersion.Default]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Default], "#A15");
+                                Assert.AreEqual ("LName", row [2, DataRowVersion.Default], "#A16");
                                                                                                     
                                                                                                     
-                                AssertEquals ("#A17", "My FName", row [1, DataRowVersion.Current]);
-                                AssertEquals ("#A18", "LName", row [2, DataRowVersion.Current]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Current], "#A17");
+                                Assert.AreEqual ("LName", row [2, DataRowVersion.Current], "#A18");
                                 
                                try {
                                       object o = row [1, DataRowVersion.Proposed];
-                                        Fail ("#A19");
+                                        Assert.Fail ("#A19");
                                 }
                                 catch (Exception e) {
                                         if (e.GetType () != typeof (AssertionException)) {
-                                                AssertEquals ("#A20", typeof (VersionNotFoundException), e.GetType ());
+                                                Assert.AreEqual (typeof (VersionNotFoundException), e.GetType (), "#A20");
                                         }
                                 }
                                                                                                     
@@ -221,63 +221,64 @@ namespace MonoTests.System.Data
                                 table.Rows [0].BeginEdit ();
                                 table.Rows [0] ["LName"] = "My LName";
                                                                                                     
-                                AssertEquals ("#A21", "My FName", row [1, DataRowVersion.Default]);
-                                AssertEquals ("#A22", "My LName", row [2, DataRowVersion.Default]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Default], "#A21");
+                                Assert.AreEqual ("My LName", row [2, DataRowVersion.Default], "#A22");
                                                                                                                                                                                                          
-                                AssertEquals ("#A23", "My FName", row [1, DataRowVersion.Current]);
-                                AssertEquals ("#A24", "LName", row [2, DataRowVersion.Current]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Current], "#A23");
+                                Assert.AreEqual ("LName", row [2, DataRowVersion.Current], "#A24");
                                                                                                     
                                                                                                     
-                                AssertEquals ("#A25", "My FName", row [1, DataRowVersion.Original]);                                AssertEquals ("#A26", "LName", row [2, DataRowVersion.Original]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Original], "#A25");
+                                Assert.AreEqual ("LName", row [2, DataRowVersion.Original], "#A26");
                                                                                                     
-                                AssertEquals ("#A26", "My FName", row [1, DataRowVersion.Proposed]);
-                               AssertEquals ("#A27", "My LName", row [2, DataRowVersion.Proposed]);                                                                                                    
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Proposed], "#A26");
+                                Assert.AreEqual ("My LName", row [2, DataRowVersion.Proposed], "#A27");                                                                                                    
                                                                                                     
                                                                                                     
                                 // Stage 4
                                 //After Edit sessions
                                 for (int i=0; i < table.Rows.Count;i++)
                                         table.Rows [i].EndEdit ();
-                                AssertEquals ("#A28", "My FName", row [1, DataRowVersion.Default]);
-                                AssertEquals ("#A29", "My LName", row [2, DataRowVersion.Default]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Default], "#A28");
+                                Assert.AreEqual ("My LName", row [2, DataRowVersion.Default], "#A29");
                                                                                                                                                                                                          
-                                AssertEquals ("#A30", "My FName", row [1, DataRowVersion.Original]);                                AssertEquals ("#A31", "LName", row [2, DataRowVersion.Original]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Original], "#A30");                                Assert.AreEqual ("LName", row [2, DataRowVersion.Original], "#A31");
                                                                                                     
                                                                                                     
-                                AssertEquals ("#A32", "My FName", row [1, DataRowVersion.Current]);
-                                AssertEquals ("#A33", "My LName", row [2, DataRowVersion.Current]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Current], "#A32");
+                                Assert.AreEqual ("My LName", row [2, DataRowVersion.Current], "#A33");
                                                                                                     
                                 try {
                                       object o = row [1, DataRowVersion.Proposed];
-                                        Fail ("#A34");
+                                        Assert.Fail ("#A34");
                                 }
                                 catch (Exception e) {
                                         if (e.GetType ()!=typeof (AssertionException)) {
-                                                AssertEquals ("#A35", typeof (VersionNotFoundException), e.GetType ());
+                                                Assert.AreEqual (typeof (VersionNotFoundException), e.GetType (), "#A35");
                                         }
                                 }
                                                                                                     
                                 //Stage 5
                                 //After Accept Changes
                                table.AcceptChanges ();
-                               AssertEquals ("#A36", "My FName", row [1, DataRowVersion.Default]);
-                                AssertEquals ("#A37", "My LName", row [2, DataRowVersion.Default]);
+                               Assert.AreEqual ("My FName", row [1, DataRowVersion.Default], "#A36");
+                                Assert.AreEqual ("My LName", row [2, DataRowVersion.Default], "#A37");
                                                                                                     
                                                                                                     
-                                AssertEquals ("#A38", "My FName", row [1, DataRowVersion.Original]);                                AssertEquals ("#A39", "My LName", row [2, DataRowVersion.Original]);                                                                                                    
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Original], "#A38");                                Assert.AreEqual (row [2, DataRowVersion.Original], "#A39", "My LName");                                                                                                    
                                                                                                     
-                                AssertEquals ("#A40", "My FName", row [1, DataRowVersion.Current]);
-                                AssertEquals ("#A41", "My LName", row [2, DataRowVersion.Current]);
+                                Assert.AreEqual ("My FName", row [1, DataRowVersion.Current], "#A40");
+                                Assert.AreEqual ("My LName", row [2, DataRowVersion.Current], "#A41");
                                                                                                     
                                                                                                     
                                 try {
                                       object o = row [1, DataRowVersion.Proposed];
-                                        Fail ("#A42");
+                                        Assert.Fail ("#A42");
                                 }
                                 catch (Exception e) {
                                                 if (e.GetType () != typeof (AssertionException)) {
-                                                        AssertEquals ("#A43", typeof (VersionNotFoundException),
-                                                                e.GetType ());
+                                                        Assert.AreEqual (typeof (VersionNotFoundException), e.GetType (),
+                                                                "#A43");
                                                 }
                                         }
                                                                                                     
@@ -328,22 +329,22 @@ namespace MonoTests.System.Data
                                                                                                     
                         rowC.SetParentRow (table.Rows [0], dr);
                                                                                                     
-                        AssertEquals ("#PRT-01", table.Rows [0], (tableC.Rows [0]).GetParentRow (dr));
-                       AssertEquals ("#PRT-02", tableC.Rows [0], (table.Rows [0]).GetChildRows (dr) [0]);
+                        Assert.AreEqual (table.Rows [0], (tableC.Rows [0]).GetParentRow (dr), "#PRT-01");
+                       Assert.AreEqual (tableC.Rows [0], (table.Rows [0]).GetChildRows (dr) [0], "#PRT-02");
 
                         ds.Relations.Clear ();
                         dr = new DataRelation ("PO", table.Columns ["Id"], tableC.Columns ["Id"], false);
                         ds.Relations.Add (dr);
                         rowC.SetParentRow (table.Rows [0], dr);
-                        AssertEquals ("#PRT-03", table.Rows [0], (tableC.Rows [0]).GetParentRow (dr));
-                       AssertEquals ("#PRT-04", tableC.Rows [0], (table.Rows [0]).GetChildRows (dr) [0]);
+                        Assert.AreEqual (table.Rows [0], (tableC.Rows [0]).GetParentRow (dr), "#PRT-03");
+                       Assert.AreEqual (tableC.Rows [0], (table.Rows [0]).GetChildRows (dr) [0], "#PRT-04");
 
                         ds.Relations.Clear ();
                         dr = new DataRelation ("PO", table.Columns ["Id"], tableC.Columns ["Id"], false);
                         tableC.ParentRelations.Add (dr);
                         rowC.SetParentRow (table.Rows [0]);
-                        AssertEquals ("#PRT-05", table.Rows [0], (tableC.Rows [0]).GetParentRow (dr));
-                        AssertEquals ("#PRT-06", tableC.Rows [0], (table.Rows [0]).GetChildRows (dr) [0]);
+                        Assert.AreEqual (table.Rows [0], (tableC.Rows [0]).GetParentRow (dr), "#PRT-05");
+                        Assert.AreEqual (tableC.Rows [0], (table.Rows [0]).GetChildRows (dr) [0], "#PRT-06");
                                                
                 } 
 
@@ -377,8 +378,8 @@ namespace MonoTests.System.Data
                         rowC.SetParentRow (row, dr);
                         DataRow [] rows = rowC.GetParentRows (dr);
 
-                        AssertEquals ("#A49", 1, rows.Length);
-                        AssertEquals ("#A50", tableP.Rows [0], rows [0]);
+                        Assert.AreEqual (1, rows.Length, "#A49");
+                        Assert.AreEqual (tableP.Rows [0], rows [0], "#A50");
 
                         try{
                                 rows = row.GetParentRows (dr);
@@ -386,10 +387,10 @@ namespace MonoTests.System.Data
                                 //Test done
                                 return ;
                         }catch(Exception e){
-                                Fail("#A51, InvalidConstraintException expected, got : " + e);
+                                Assert.Fail("#A51, InvalidConstraintException expected, got : " + e);
                         }
                         
-                        Fail("#A52, InvalidConstraintException expected but got none.");
+                        Assert.Fail("#A52, InvalidConstraintException expected but got none.");
                 }
 
                 [Test]
@@ -434,8 +435,8 @@ namespace MonoTests.System.Data
                                                                                                     
                         DataRow [] rows = (table.Rows [0]).GetChildRows (dr);
 
-                        AssertEquals ("#A45", 1, rows.Length);
-                        AssertEquals ("#A46", tableC.Rows [0], rows [0]);
+                        Assert.AreEqual (1, rows.Length, "#A45");
+                        Assert.AreEqual (tableC.Rows [0], rows [0], "#A46");
                         
                 } 
 
@@ -469,8 +470,8 @@ namespace MonoTests.System.Data
                         rowC.SetParentRow (row, dr);
                         DataRow [] rows = row.GetChildRows (dr);
                         
-                        AssertEquals ("#A47", 1, rows.Length);
-                        AssertEquals ("#A48", tableC.Rows [0], rows [0]);
+                        Assert.AreEqual (1, rows.Length, "#A47");
+                        Assert.AreEqual (tableC.Rows [0], rows [0], "#A48");
 
                         try{
                             rows = rowC.GetChildRows (dr);
@@ -478,10 +479,10 @@ namespace MonoTests.System.Data
                             //Test done
                             return ;
                         }catch(Exception e){
-                            Fail("#A53, InvalidConstraintException expected, got : " + e);
+                            Assert.Fail("#A53, InvalidConstraintException expected, got : " + e);
                         }
                         
-                        Fail("#A54, InvalidConstraintException expected but got none.");
+                        Assert.Fail("#A54, InvalidConstraintException expected but got none.");
                 }
 
                 [Category ("NotWorking")] //Mismatch in Exception namespace/class reference
@@ -528,35 +529,35 @@ namespace MonoTests.System.Data
                                 //Test Done
                                 return ;
                             }catch (Exception e){
-                                Fail ("#A55, VersionNotFoundException expected, got : " + e);
+                                Assert.Fail ("#A55, VersionNotFoundException expected, got : " + e);
                             }
-                            Fail ("#A56, VersionNotFoundException expected but got none.");
+                            Assert.Fail ("#A56, VersionNotFoundException expected but got none.");
                         }catch (Exception e){
-                            Fail ("#A57, VersionNotFoundException expected, got : " + e);
+                            Assert.Fail ("#A57, VersionNotFoundException expected, got : " + e);
                         }
                         
-                        Fail("#A58, VersionNotFoundException expected but got none.");
+                        Assert.Fail("#A58, VersionNotFoundException expected but got none.");
                 }
 
                // tests item at row, column in table to be DBNull.Value
                private void DBNullTest (string message, DataTable dt, int row, int column) 
                {
                        object val = dt.Rows[row].ItemArray[column];
-                       AssertEquals(message, DBNull.Value, val);
+                       Assert.AreEqual(DBNull.Value, val, message);
                }
 
                // tests item at row, column in table to be null
                private void NullTest (string message, DataTable dt, int row, int column) 
                {
                        object val = dt.Rows[row].ItemArray[column];
-                       AssertEquals(message, null, val);
+                       Assert.AreEqual(null, val, message);
                }
 
                // tests item at row, column in table to be 
                private void ValueTest (string message, DataTable dt, int row, int column, object value) 
                {
                        object val = dt.Rows[row].ItemArray[column];
-                       AssertEquals(message, value, val);
+                       Assert.AreEqual(value, val, message);
                }
 
                // test set null, DBNull.Value, and ItemArray short count
@@ -588,7 +589,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e1) {
-                               Fail("DR1: Exception Caught: " + e1);
+                               Assert.Fail("DR1: Exception Caught: " + e1);
                        }
                        
                        table.Rows.Add(row);
@@ -606,7 +607,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e2) {
-                               Fail("DR2: Exception Caught: " + e2);
+                               Assert.Fail("DR2: Exception Caught: " + e2);
                        }
                        
                        table.Rows.Add(row);
@@ -624,7 +625,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e3) {
-                               Fail("DR3: Exception Caught: " + e3);
+                               Assert.Fail("DR3: Exception Caught: " + e3);
                        }
                        
                        table.Rows.Add(row);
@@ -646,7 +647,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e3) {
-                               Fail("DR4: Exception Caught: " + e3);
+                               Assert.Fail("DR4: Exception Caught: " + e3);
                        }
                        
                        table.Rows.Add(row);
@@ -698,7 +699,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e1) {
-                               Fail("DR17: Exception Caught: " + e1);
+                               Assert.Fail("DR17: Exception Caught: " + e1);
                        }
                        
                        table.Rows.Add(row);
@@ -715,7 +716,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e2) {
-                               Fail("DR18: Exception Caught: " + e2);
+                               Assert.Fail("DR18: Exception Caught: " + e2);
                        }
                        
                        table.Rows.Add(row);
@@ -733,7 +734,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e3) {
-                               Fail("DR19: Exception Caught: " + e3);
+                               Assert.Fail("DR19: Exception Caught: " + e3);
                        }
                        
                        table.Rows.Add(row);
@@ -753,7 +754,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e3) {
-                               Fail("DR20: Exception Caught: " + e3);
+                               Assert.Fail("DR20: Exception Caught: " + e3);
                        }
                        
                        table.Rows.Add(row);
@@ -802,7 +803,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e1) {
-                               Fail("DR28:  Exception Caught: " + e1);
+                               Assert.Fail("DR28:  Exception Caught: " + e1);
                        }
                        
                        table.Rows.Add(row);
@@ -819,7 +820,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e2) {
-                               Fail("DR29:  Exception Caught: " + e2);
+                               Assert.Fail("DR29:  Exception Caught: " + e2);
                        }
                        
                        table.Rows.Add(row);
@@ -836,7 +837,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e2) {
-                               Fail("DR30: Exception Caught: " + e2);
+                               Assert.Fail("DR30: Exception Caught: " + e2);
                        }
                        
                        table.Rows.Add(row);
@@ -853,7 +854,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e2) {
-                               Fail("DR31: Exception Caught: " + e2);
+                               Assert.Fail("DR31: Exception Caught: " + e2);
                        }
                        
                        table.Rows.Add(row);
@@ -872,7 +873,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e3) {
-                               Fail("DR32: Exception Caught: " + e3);
+                               Assert.Fail("DR32: Exception Caught: " + e3);
                        }
                        
                        table.Rows.Add(row);
@@ -889,7 +890,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e2) {
-                               Fail("DR48: Exception Caught: " + e2);
+                               Assert.Fail("DR48: Exception Caught: " + e2);
                        }
                        
                        table.Rows.Add(row);
@@ -909,7 +910,7 @@ namespace MonoTests.System.Data
                                row.ItemArray = obj;
                        }
                        catch(Exception e3) {
-                               Fail("DR33: Exception Caught: " + e3);
+                               Assert.Fail("DR33: Exception Caught: " + e3);
                        }
                        
                        table.Rows.Add(row);
@@ -986,7 +987,7 @@ namespace MonoTests.System.Data
                        DataRow childRow = child.Rows.Add(new object[] { id });
                        if (parentRow == childRow.GetParentRow(relateParentChild)) {
                            foreach(DataColumn dc in parent.Columns)
-                               AssertEquals(100,parentRow[dc]);
+                               Assert.AreEqual(100,parentRow[dc]);
                            
                        }
                                        
@@ -1002,9 +1003,9 @@ namespace MonoTests.System.Data
                        dt.Rows.Add ((new object [] {"val"}));
 
                        DataRow dr = dt.NewRow ();
-                       AssertEquals (DataRowState.Detached, dr.RowState);
+                       Assert.AreEqual (DataRowState.Detached, dr.RowState);
                        dr.CancelEdit ();
-                       AssertEquals (DataRowState.Detached, dr.RowState);
+                       Assert.AreEqual (DataRowState.Detached, dr.RowState);
                        object o = dr ["col"];
                }
 
@@ -1056,20 +1057,20 @@ namespace MonoTests.System.Data
                        parent2.Rows.Add(parent2Row);
 
                        childRow1.SetParentRow(parent1Row);
-                       AssertEquals ("p1c1", childRow1[childColumn1]);
-                       AssertEquals (DBNull.Value, childRow1[childColumn2]);
+                       Assert.AreEqual ("p1c1", childRow1[childColumn1]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn2]);
 
                        childRow1.SetParentRow(parent2Row);
-                       AssertEquals ("p1c1", childRow1[childColumn1]);
-                       AssertEquals ("p2c2", childRow1[childColumn2]);
+                       Assert.AreEqual ("p1c1", childRow1[childColumn1]);
+                       Assert.AreEqual ("p2c2", childRow1[childColumn2]);
 
                        childRow1.SetParentRow(null);
-                       AssertEquals (DBNull.Value, childRow1[childColumn1]);
-                       AssertEquals (DBNull.Value, childRow1[childColumn2]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn1]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn2]);
 
                        childRow1.SetParentRow(parent2Row);
-                       AssertEquals (DBNull.Value, childRow1[childColumn1]);
-                       AssertEquals ("p2c2", childRow1[childColumn2]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn1]);
+                       Assert.AreEqual ("p2c2", childRow1[childColumn2]);
                }
 
                [Test]
@@ -1108,29 +1109,29 @@ namespace MonoTests.System.Data
 
 
                        childRow1.SetParentRow (null, relation2);
-                       AssertEquals (DBNull.Value, childRow1[childColumn1]);
-                       AssertEquals (DBNull.Value, childRow1[childColumn2]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn1]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn2]);
 
                        try {
                                childRow1.SetParentRow(parent1Row, relation2);
-                               Fail ("Must throw InvalidConstaintException");
+                               Assert.Fail ("Must throw InvalidConstaintException");
                        } catch (InvalidConstraintException e) {
                        }
-                       AssertEquals (DBNull.Value, childRow1[childColumn1]);
-                       AssertEquals (DBNull.Value, childRow1[childColumn2]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn1]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn2]);
 
                        childRow1.SetParentRow(parent1Row, relation1);
-                       AssertEquals ("p1c1", childRow1[childColumn1]);
-                       AssertEquals (DBNull.Value, childRow1[childColumn2]);
+                       Assert.AreEqual ("p1c1", childRow1[childColumn1]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn2]);
 
 
                        childRow1.SetParentRow (null, relation2);
-                       AssertEquals ("p1c1", childRow1[childColumn1]);
-                       AssertEquals (DBNull.Value, childRow1[childColumn2]);
+                       Assert.AreEqual ("p1c1", childRow1[childColumn1]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn2]);
 
                        childRow1.SetParentRow (null, relation1);
-                       AssertEquals (DBNull.Value, childRow1[childColumn1]);
-                       AssertEquals (DBNull.Value, childRow1[childColumn2]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn1]);
+                       Assert.AreEqual (DBNull.Value, childRow1[childColumn2]);
                }
 
                [Test]
@@ -1161,8 +1162,8 @@ namespace MonoTests.System.Data
                        parent2.Rows.Add(parentRow);
 
                        childRow.SetParentRow(parentRow);
-                       AssertEquals (DBNull.Value, childRow[childColumn1]);
-                       AssertEquals ("value", childRow[childColumn2]);
+                       Assert.AreEqual (DBNull.Value, childRow[childColumn1]);
+                       Assert.AreEqual ("value", childRow[childColumn2]);
                }
 
        }
index 51885f37bcb0a2cc4f5e2cd883495bc9b3166c38..60dbb9d39339dc98b2a526703428273d5b7a10e9 100644 (file)
@@ -36,7 +36,7 @@ using System.ComponentModel;
 namespace MonoTests.System.Data
 {
        [TestFixture]
-       public class DataRowViewTest : Assertion
+       public class DataRowViewTest 
        {
                private DataView CreateTestView ()
                {
@@ -96,8 +96,8 @@ namespace MonoTests.System.Data
                        DataView dv = new DataView (dt1);
                        DataRowView dvr = dv [0];
                        DataView v = dvr.CreateChildView (dr);
-                       AssertEquals ("RowFilter", "", v.RowFilter);
-                       AssertEquals ("Sort", "", v.Sort);
+                       Assert.AreEqual ("", v.RowFilter, "RowFilter");
+                       Assert.AreEqual ("", v.Sort, "Sort");
                }
 
                [Test]
@@ -110,12 +110,12 @@ namespace MonoTests.System.Data
                        DataView dv = new DataView (dt);
                        DataRowView drv = dv [0];
                        dt.Rows [0].BeginEdit ();
-                       AssertEquals ("DataView.Item", true, drv.IsEdit);
+                       Assert.AreEqual (true, drv.IsEdit, "DataView.Item");
 
                        drv = dv.AddNew ();
                        drv.Row ["col"] = "test";
                        drv.Row.CancelEdit ();
-                       AssertEquals ("AddNew", false, drv.IsEdit);
+                       Assert.AreEqual (false, drv.IsEdit, "AddNew");
                }
 
                [Test]
@@ -127,7 +127,7 @@ namespace MonoTests.System.Data
                        DataView dv = new DataView (dt);
                        DataRowView drv = dv [0];
                        dt.Rows [0].BeginEdit ();
-                       AssertEquals ("DataView.Item", "val", drv ["col"]);
+                       Assert.AreEqual ("val", drv ["col"], "DataView.Item");
                }
 
                [Test]
@@ -153,18 +153,18 @@ namespace MonoTests.System.Data
                        dt.Rows.Add (new object [] {1});
                        DataView dv = new DataView (dt);
                        DataRowView drv = dv.AddNew ();
-                       AssertEquals (DataRowVersion.Current, drv.RowVersion);
-                       AssertEquals (DataRowVersion.Current, dv [0].RowVersion);
+                       Assert.AreEqual (DataRowVersion.Current, drv.RowVersion);
+                       Assert.AreEqual (DataRowVersion.Current, dv [0].RowVersion);
                        drv ["col"] = "mod";
-                       AssertEquals (DataRowVersion.Current, drv.RowVersion);
-                       AssertEquals (DataRowVersion.Current, dv [0].RowVersion);
+                       Assert.AreEqual (DataRowVersion.Current, drv.RowVersion);
+                       Assert.AreEqual (DataRowVersion.Current, dv [0].RowVersion);
                        dt.AcceptChanges ();
-                       AssertEquals (DataRowVersion.Current, drv.RowVersion);
-                       AssertEquals (DataRowVersion.Current, dv [0].RowVersion);
+                       Assert.AreEqual (DataRowVersion.Current, drv.RowVersion);
+                       Assert.AreEqual (DataRowVersion.Current, dv [0].RowVersion);
                        drv.EndEdit ();
                        dv [0].EndEdit ();
-                       AssertEquals (DataRowVersion.Current, drv.RowVersion);
-                       AssertEquals (DataRowVersion.Current, dv [0].RowVersion);
+                       Assert.AreEqual (DataRowVersion.Current, drv.RowVersion);
+                       Assert.AreEqual (DataRowVersion.Current, dv [0].RowVersion);
                }
        }
 }
index 05d0eddc7fba37c4b61b41c75063272fec799956..bf34b01d1c61a9fe7921050a5e0f168b7e3430ba 100644 (file)
@@ -37,7 +37,7 @@ namespace MonoTests.System.Data
 {
 
        [TestFixture]
-       public class DataTableCollectionTest : Assertion {
+       public class DataTableCollectionTest {
                // common variables here
                private DataSet [] _dataset;
                private DataTable [] _tables;
@@ -76,11 +76,11 @@ namespace MonoTests.System.Data
                        
                        foreach( DataTable table in tbcol )
                        {
-                               AssertEquals("test#1",_tables[i].TableName,table.TableName);
+                               Assert.AreEqual(_tables[i].TableName,table.TableName,"test#1");
                                j=0;
                                foreach( DataColumn column in table.Columns )
                                {
-                                       AssertEquals("test#2",_tables[i].Columns[j].ColumnName,column.ColumnName);
+                                       Assert.AreEqual(_tables[i].Columns[j].ColumnName,column.ColumnName,"test#2");
                                        j++;
                                }
                                i++;
@@ -90,11 +90,11 @@ namespace MonoTests.System.Data
                        i=0;
                        foreach( DataTable table in tbcol )
                        {
-                               AssertEquals("test#3",_tables[i].TableName,table.TableName);
+                               Assert.AreEqual(_tables[i].TableName,table.TableName,"test#3");
                                j=0;
                                foreach( DataColumn column in table.Columns )
                                {
-                                       AssertEquals("test#4",_tables[i].Columns[j].ColumnName,column.ColumnName);
+                                       Assert.AreEqual(_tables[i].Columns[j].ColumnName,column.ColumnName,"test#4");
                                        j++;
                                }
                                i++;
@@ -143,9 +143,9 @@ namespace MonoTests.System.Data
                {
                        DataTableCollection tbcol = _dataset[0].Tables;
                        tbcol.Add(_tables[0]);
-                       AssertEquals("test#1",1, tbcol.Count);
+                       Assert.AreEqual(1,tbcol.Count, "test#1");
                        tbcol.Add(_tables[1]);
-                       AssertEquals("test#2",2, tbcol.Count);
+                       Assert.AreEqual(2,tbcol.Count, "test#2");
                }
                
                [Test]
@@ -159,11 +159,11 @@ namespace MonoTests.System.Data
                        i=0;
                        foreach( DataTable table in tbcol )
                        {
-                               AssertEquals("test#1",_tables[i].TableName,table.TableName);
+                               Assert.AreEqual(_tables[i].TableName,table.TableName,"test#1");
                                j=0;
                                foreach( DataColumn column in table.Columns )
                                {
-                                       AssertEquals("test#2",_tables[i].Columns[j].ColumnName,column.ColumnName);
+                                       Assert.AreEqual(_tables[i].Columns[j].ColumnName,column.ColumnName,"test#2");
                                        j++;
                                }
                                i++;
@@ -179,11 +179,11 @@ namespace MonoTests.System.Data
                        tbcol.AddRange(_tables);
                        DataTable tbl = null;
                        /* checking for a recently input table, expecting true */
-                       AssertEquals("test#1",true,tbcol.CanRemove(_tables[0]));
+                       Assert.AreEqual(true,tbcol.CanRemove(_tables[0]),"test#1");
                        /* trying to check with a null reference, expecting false */
-                       AssertEquals("test#2",false,tbcol.CanRemove(tbl));
+                       Assert.AreEqual(false,tbcol.CanRemove(tbl),"test#2");
                        /* trying to check with a table that does not exist in collection, expecting false */
-                       AssertEquals("test#3",false,tbcol.CanRemove(new DataTable("newTable")));
+                       Assert.AreEqual(false,tbcol.CanRemove(new DataTable("newTable")),"test#3");
                }
                
                [Test]
@@ -197,27 +197,27 @@ namespace MonoTests.System.Data
                        /* removing a recently added table */
                        int count = tbcol.Count;
                        tbcol.Remove(_tables[0]);
-                       AssertEquals("test#1",count-1,tbcol.Count);
+                       Assert.AreEqual(count-1,tbcol.Count,"test#1");
                        DataTable tbl = null;
                        /* removing a null reference. must generate an Exception */
                        try
                        {
                                tbcol.Remove(tbl);
-                               Fail("Err:: tbcol.Rmove(null) must fail");
+                               Assert.Fail("Err:: tbcol.Rmove(null) must fail");
                        }
                        catch(Exception e)
                        {
-                               AssertEquals ("test#2", typeof (ArgumentNullException), e.GetType());
+                               Assert.AreEqual (typeof (ArgumentNullException), e.GetType(), "test#2");
                        }
                        /* removing a table that is not there in collection */
                        try
                        {
                                tbcol.Remove(new DataTable("newTable"));
-                               Fail("Err:: cannot remove a table that is not there in collection");
+                               Assert.Fail("Err:: cannot remove a table that is not there in collection");
                        }
                        catch(Exception e)
                        {
-                               AssertEquals ("test#3", typeof (ArgumentException), e.GetType());
+                               Assert.AreEqual (typeof (ArgumentException), e.GetType(), "test#3");
                        }
                        
                }
@@ -227,11 +227,11 @@ namespace MonoTests.System.Data
                        DataTableCollection tbcol = _dataset[0].Tables;
                        tbcol.Add(_tables[0]);
                        tbcol.Clear();
-                       AssertEquals("Test#1",0,tbcol.Count);
+                       Assert.AreEqual(0,tbcol.Count,"Test#1");
                        
                        tbcol.AddRange(new DataTable[] {_tables[0],_tables[1]});
                        tbcol.Clear();
-                       AssertEquals("Test#2",0,tbcol.Count);
+                       Assert.AreEqual(0,tbcol.Count,"Test#2");
                }
                [Test]
                public void Contains()
@@ -242,11 +242,11 @@ namespace MonoTests.System.Data
                        tbcol.AddRange(_tables);
                        string tblname = "";
                        /* checking for a recently input table, expecting true */
-                       AssertEquals("test#1",true,tbcol.Contains(_tables[0].TableName));
+                       Assert.AreEqual(true,tbcol.Contains(_tables[0].TableName),"test#1");
                        /* trying to check with a empty string, expecting false */
-                       AssertEquals("test#2",false,tbcol.Contains(tblname));
+                       Assert.AreEqual(false,tbcol.Contains(tblname),"test#2");
                        /* trying to check for a table that donot exist, expecting false */
-                       AssertEquals("test#3",false,tbcol.Contains("InvalidTableName"));
+                       Assert.AreEqual(false,tbcol.Contains("InvalidTableName"),"test#3");
                }
                
                [Test]
@@ -261,21 +261,21 @@ namespace MonoTests.System.Data
                        DataTable [] array = new DataTable[4];
                        /* copying to the beginning of the array */
                        tbcol.CopyTo(array,0);
-                       AssertEquals ("test#01", 4, array.Length);
-                       AssertEquals ("test#02", "Table1", array[0].TableName);
-                       AssertEquals ("test#03", "Table2", array[1].TableName);
-                       AssertEquals ("test#04", "Table3", array[2].TableName);
-                       AssertEquals ("test#05", "Table4", array[3].TableName);
+                       Assert.AreEqual (4, array.Length, "test#01");
+                       Assert.AreEqual ("Table1", array[0].TableName, "test#02");
+                       Assert.AreEqual ("Table2", array[1].TableName, "test#03");
+                       Assert.AreEqual ("Table3", array[2].TableName, "test#04");
+                       Assert.AreEqual ("Table4", array[3].TableName, "test#05");
 
                        /* copying with in a array */
                        DataTable [] array1 = new DataTable[6];
                        tbcol.CopyTo(array1,2);
-                       AssertEquals("test#06",null,array1[0]);
-                       AssertEquals("test#07",null,array1[1]);
-                       AssertEquals("test#08","Table1",array1[2].TableName);
-                       AssertEquals("test#09","Table2",array1[3].TableName);
-                       AssertEquals("test#10","Table3",array1[4].TableName);
-                       AssertEquals("test#11","Table4",array1[5].TableName);                   
+                       Assert.AreEqual(null,array1[0],"test#06");
+                       Assert.AreEqual(null,array1[1],"test#07");
+                       Assert.AreEqual("Table1",array1[2].TableName,"test#08");
+                       Assert.AreEqual("Table2",array1[3].TableName,"test#09");
+                       Assert.AreEqual("Table3",array1[4].TableName,"test#10");
+                       Assert.AreEqual("Table4",array1[5].TableName,"test#11");                        
                }
                [Test]
                public void Equals()
@@ -287,16 +287,16 @@ namespace MonoTests.System.Data
                        tbcol2.Add(_tables[1]);
                        tbcol3 = tbcol1;
                        
-                       AssertEquals("test#1",true,tbcol1.Equals(tbcol1));
-                       AssertEquals("test#2",true,tbcol1.Equals(tbcol3));
-                       AssertEquals("test#3",true,tbcol3.Equals(tbcol1));
+                       Assert.AreEqual(true,tbcol1.Equals(tbcol1),"test#1");
+                       Assert.AreEqual(true,tbcol1.Equals(tbcol3),"test#2");
+                       Assert.AreEqual(true,tbcol3.Equals(tbcol1),"test#3");
                        
-                       AssertEquals("test#4",false,tbcol1.Equals(tbcol2));
-                       AssertEquals("test#5",false,tbcol2.Equals(tbcol1));
+                       Assert.AreEqual(false,tbcol1.Equals(tbcol2),"test#4");
+                       Assert.AreEqual(false,tbcol2.Equals(tbcol1),"test#5");
                        
-                       AssertEquals("test#6",true,Object.Equals(tbcol1,tbcol3));
-                       AssertEquals("test#7",true,Object.Equals(tbcol1,tbcol1));
-                       AssertEquals("test#8",false,Object.Equals(tbcol1,tbcol2));
+                       Assert.AreEqual(true,Object.Equals(tbcol1,tbcol3),"test#6");
+                       Assert.AreEqual(true,Object.Equals(tbcol1,tbcol1),"test#7");
+                       Assert.AreEqual(false,Object.Equals(tbcol1,tbcol2),"test#8");
                }
                [Test]
                public void IndexOf()
@@ -306,16 +306,16 @@ namespace MonoTests.System.Data
                        tbcol.Add("table1");
                        tbcol.Add("table2");
                        
-                       AssertEquals("test#1",0,tbcol.IndexOf(_tables[0]));
-                       AssertEquals("test#2",-1,tbcol.IndexOf(_tables[1]));
-                       AssertEquals("test#3",1,tbcol.IndexOf("table1"));
-                       AssertEquals("test#4",2,tbcol.IndexOf("table2"));
+                       Assert.AreEqual(0,tbcol.IndexOf(_tables[0]),"test#1");
+                       Assert.AreEqual(-1,tbcol.IndexOf(_tables[1]),"test#2");
+                       Assert.AreEqual(1,tbcol.IndexOf("table1"),"test#3");
+                       Assert.AreEqual(2,tbcol.IndexOf("table2"),"test#4");
                        
-                       AssertEquals("test#5",0,tbcol.IndexOf(tbcol[0]));
-                       AssertEquals("test#6",1,tbcol.IndexOf(tbcol[1]));
-                       AssertEquals("test#7",-1,tbcol.IndexOf("_noTable_"));
+                       Assert.AreEqual(0,tbcol.IndexOf(tbcol[0]),"test#5");
+                       Assert.AreEqual(1,tbcol.IndexOf(tbcol[1]),"test#6");
+                       Assert.AreEqual(-1,tbcol.IndexOf("_noTable_"),"test#7");
                        DataTable tb = new DataTable("new_table");
-                       AssertEquals("test#8",-1,tbcol.IndexOf(tb));
+                       Assert.AreEqual(-1,tbcol.IndexOf(tb),"test#8");
                        
                }
                [Test]
@@ -328,7 +328,7 @@ namespace MonoTests.System.Data
                        try
                        {
                                tbcol.RemoveAt(-1);
-                               Fail("the index was out of bound: must have failed");
+                               Assert.Fail("the index was out of bound: must have failed");
                        }
                        catch(IndexOutOfRangeException e)
                        {
@@ -336,15 +336,15 @@ namespace MonoTests.System.Data
                        try
                        {
                                tbcol.RemoveAt(101);
-                               Fail("the index was out of bound: must have failed");
+                               Assert.Fail("the index was out of bound: must have failed");
                        }
                        catch(IndexOutOfRangeException e)
                        {
                        }
                        tbcol.RemoveAt (1);
-                       AssertEquals ("test#5", 1, tbcol.Count);
+                       Assert.AreEqual (1, tbcol.Count, "test#5");
                        tbcol.RemoveAt (0);
-                       AssertEquals ("test#6", 0, tbcol.Count);
+                       Assert.AreEqual (0, tbcol.Count, "test#6");
                }
 
                [Test]
@@ -354,46 +354,46 @@ namespace MonoTests.System.Data
                        tbcol.Add("Table1");
                        tbcol.Add("Table2");
                        tbcol.Add("Table3");
-                       AssertEquals("test#1","System.Data.DataTableCollection",tbcol.ToString());
+                       Assert.AreEqual("System.Data.DataTableCollection",tbcol.ToString(),"test#1");
                }
 
                [Test]
                public void TableDataSetNamespaces ()
                {
                        DataTable dt = new DataTable ("dt1");
-                       AssertEquals ("#1-1", String.Empty, dt.Namespace);
-                       AssertNull ("#1-2", dt.DataSet);
+                       Assert.AreEqual (String.Empty, dt.Namespace, "#1-1");
+                       Assert.IsNull (dt.DataSet, "#1-2");
 
                        DataSet ds1 = new DataSet ("ds1");
                        ds1.Tables.Add (dt);
-                       AssertEquals ("#2-1", String.Empty, dt.Namespace);
-                       AssertEquals ("#2-2", ds1, dt.DataSet);
+                       Assert.AreEqual (String.Empty, dt.Namespace, "#2-1");
+                       Assert.AreEqual (ds1, dt.DataSet, "#2-2");
 
                        ds1.Namespace = "ns1";
-                       AssertEquals ("#3", "ns1", dt.Namespace);
+                       Assert.AreEqual ("ns1", dt.Namespace, "#3");
 
                        // back to null again
                        ds1.Tables.Remove (dt);
-                       AssertEquals ("#4-1", String.Empty, dt.Namespace);
-                       AssertNull ("#4-2", dt.DataSet);
+                       Assert.AreEqual (String.Empty, dt.Namespace, "#4-1");
+                       Assert.IsNull (dt.DataSet, "#4-2");
 
                        // This table is being added to _already namespaced_
                        // dataset.
                        dt = new DataTable ("dt2");
 
                        ds1.Tables.Add (dt);
-                       AssertEquals ("#5-1", "ns1", dt.Namespace);
-                       AssertEquals ("#5-2", ds1, dt.DataSet);
+                       Assert.AreEqual ("ns1", dt.Namespace, "#5-1");
+                       Assert.AreEqual (ds1, dt.DataSet, "#5-2");
 
                        ds1.Tables.Remove (dt);
-                       AssertEquals ("#6-1", String.Empty, dt.Namespace);
-                       AssertNull ("#6-2", dt.DataSet);
+                       Assert.AreEqual (String.Empty, dt.Namespace, "#6-1");
+                       Assert.IsNull (dt.DataSet, "#6-2");
 
                        DataSet ds2 = new DataSet ("ds2");
                        ds2.Namespace = "ns2";
                        ds2.Tables.Add (dt);
-                       AssertEquals ("#7-1", "ns2", dt.Namespace);
-                       AssertEquals ("#7-2", ds2, dt.DataSet);
+                       Assert.AreEqual ("ns2", dt.Namespace, "#7-1");
+                       Assert.AreEqual (ds2, dt.DataSet, "#7-2");
                }
        }
 }
index a44a225534eee1f385f9f5b2ef5e9f5b07097656..388f547212ad45907957b767ab265f33591a724b 100644 (file)
@@ -4197,7 +4197,7 @@ namespace MonoTests.System.Data
                        Assert.AreEqual (5, n, "n");
                }
 
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
                [Test]
                public void NFIFromBug55978 ()
                {
index 57b5eb30846c9f6fddbfbce275d26caa6ad3bf71..392f9b0d4f4e28b48cfa26448425de1e06edbe34 100644 (file)
@@ -36,7 +36,7 @@ using System.ComponentModel;
 namespace MonoTests.System.Data
 {
        [TestFixture]
-       public class DataViewManagerTest : Assertion
+       public class DataViewManagerTest 
        {
                [Test]
                public void Ctor ()
@@ -46,40 +46,40 @@ namespace MonoTests.System.Data
                        string deleted = @"<DataViewSettingCollectionString><table2-1 Sort="""" RowFilter="""" RowStateFilter=""Deleted""/></DataViewSettingCollectionString>";
 
                        DataViewManager m = new DataViewManager (null);
-                       AssertNull (m.DataSet);
-                       AssertEquals ("", m.DataViewSettingCollectionString);
-                       AssertNotNull (m.DataViewSettings);
+                       Assert.IsNull (m.DataSet);
+                       Assert.AreEqual ("", m.DataViewSettingCollectionString);
+                       Assert.IsNotNull (m.DataViewSettings);
                        DataSet ds = new DataSet ("ds");
                        m.DataSet = ds;
-                       AssertEquals ("default#1", defaultString,
-                               m.DataViewSettingCollectionString);
+                       Assert.AreEqual (defaultString, m.DataViewSettingCollectionString,
+                               "default#1");
 
                        DataSet ds2 = new DataSet ("ds2");
-                       AssertEquals ("default#2", defaultString,
-                               ds.DefaultViewManager.DataViewSettingCollectionString);
+                       Assert.AreEqual (defaultString, ds.DefaultViewManager.DataViewSettingCollectionString,
+                               "default#2");
                        DataTable dt2_1 = new DataTable ("table2-1");
                        dt2_1.Namespace ="urn:foo"; // It is ignored though.
                        ds2.Tables.Add (dt2_1);
                        m.DataSet = ds2;
-                       AssertEquals ("#3", current, m.DataViewSettingCollectionString);
+                       Assert.AreEqual (current, m.DataViewSettingCollectionString, "#3");
 
                        // Note that " Deleted " is trimmed.
                        m.DataViewSettingCollectionString = @"<DataViewSettingCollectionString><table2-1 Sort='' RowFilter='' RowStateFilter=' Deleted '/></DataViewSettingCollectionString>";
-                       AssertEquals ("#4", deleted, m.DataViewSettingCollectionString);
+                       Assert.AreEqual (deleted, m.DataViewSettingCollectionString, "#4");
 
                        m.DataSet = ds2; //resets modified string.
-                       AssertEquals ("#5", current, m.DataViewSettingCollectionString);
+                       Assert.AreEqual (current, m.DataViewSettingCollectionString, "#5");
 
                        m.DataViewSettingCollectionString = @"<DataViewSettingCollectionString><table2-1 Sort='' RowFilter='' RowStateFilter='Deleted'/></DataViewSettingCollectionString>";
                        // it does not clear anything.
                        m.DataViewSettingCollectionString = "<DataViewSettingCollectionString/>";
-                       AssertEquals ("#6", deleted, m.DataViewSettingCollectionString);
+                       Assert.AreEqual (deleted, m.DataViewSettingCollectionString, "#6");
 
                        // text node is not rejected (ignored).
                        // RowFilter is not examined.
                        m.DataViewSettingCollectionString = "<DataViewSettingCollectionString>blah<table2-1 RowFilter='a=b' ApplyDefaultSort='true' /></DataViewSettingCollectionString>";
                        // LAMESPEC: MS.NET ignores ApplyDefaultSort.
-//                     AssertEquals ("#7", @"<DataViewSettingCollectionString><table2-1 Sort="""" RowFilter=""a=b"" RowStateFilter=""Deleted""/></DataViewSettingCollectionString>", m.DataViewSettingCollectionString);
+//                     Assert.AreEqual (@"<DataViewSettingCollectionString><table2-1 Sort="""" RowFilter=""a=b"" RowStateFilter=""Deleted""/></DataViewSettingCollectionString>", m.DataViewSettingCollectionString, "#7");
                }
 
                [Test]
index 4be1824f6674c064bd460a4a3f0cab070727b250..8829819a4503b3337adf66c5a9ac6d08436f5ca3 100644 (file)
@@ -42,7 +42,7 @@ using System.IO;
 namespace MonoTests.System.Data
 {
        [TestFixture]
-       public class DataViewTest : Assertion
+       public class DataViewTest
        {
                DataTable dataTable;
                DataView  dataView;
@@ -145,7 +145,7 @@ namespace MonoTests.System.Data
                        dv.Sort = "abc";
                        dv.Sort = string.Empty;
                        dv.Sort = "abc";
-                       AssertEquals ("test#01", "abc", dv.Sort);
+                       Assert.AreEqual ("abc", dv.Sort, "test#01");
                }
 
                [Test]
@@ -154,24 +154,24 @@ namespace MonoTests.System.Data
                        DataView dv1,dv2,dv3;
                        dv1 = new DataView ();
                        // AssertEquals ("test#01",null,dv1.Table);
-                       AssertEquals ("test#02",true,dv1.AllowNew);
-                       AssertEquals ("test#03",true,dv1.AllowEdit);
-                       AssertEquals ("test#04",true,dv1.AllowDelete);
-                       AssertEquals ("test#05",false,dv1.ApplyDefaultSort);
-                       AssertEquals ("test#06",string.Empty,dv1.RowFilter);
-                       AssertEquals ("test#07",DataViewRowState.CurrentRows,dv1.RowStateFilter);
-                       AssertEquals ("test#08",string.Empty,dv1.Sort);
+                       Assert.AreEqual (true,dv1.AllowNew,"test#02");;
+                       Assert.AreEqual (true,dv1.AllowEdit,"test#03");;
+                       Assert.AreEqual (true,dv1.AllowDelete,"test#04");;
+                       Assert.AreEqual (false,dv1.ApplyDefaultSort,"test#05");;
+                       Assert.AreEqual (string.Empty,dv1.RowFilter,"test#06");;
+                       Assert.AreEqual (DataViewRowState.CurrentRows,dv1.RowStateFilter,"test#07");;
+                       Assert.AreEqual (string.Empty,dv1.Sort,"test#08");;
                        
                        dv2 = new DataView (dataTable);
-                       AssertEquals ("test#09","itemTable",dv2.Table.TableName);
-                       AssertEquals ("test#10",string.Empty,dv2.Sort);
-                       AssertEquals ("test#11",false,dv2.ApplyDefaultSort);
-                       AssertEquals ("test#12",dataTable.Rows[0],dv2[0].Row);
+                       Assert.AreEqual ("itemTable",dv2.Table.TableName,"test#09");;
+                       Assert.AreEqual (string.Empty,dv2.Sort,"test#10");;
+                       Assert.AreEqual (false,dv2.ApplyDefaultSort,"test#11");;
+                       Assert.AreEqual (dataTable.Rows[0],dv2[0].Row,"test#12");;
                        
                        dv3 = new DataView (dataTable,"","itemId DESC",DataViewRowState.CurrentRows);
-                       AssertEquals ("test#13","",dv3.RowFilter);
-                       AssertEquals ("test#14","itemId DESC",dv3.Sort);
-                       AssertEquals ("test#15",DataViewRowState.CurrentRows,dv3.RowStateFilter);
+                       Assert.AreEqual ("",dv3.RowFilter,"test#13");;
+                       Assert.AreEqual ("itemId DESC",dv3.Sort,"test#14");;
+                       Assert.AreEqual (DataViewRowState.CurrentRows,dv3.RowStateFilter,"test#15");;
                        //AssertEquals ("test#16",dataTable.Rows.[(dataTable.Rows.Count-1)],dv3[0]);
                }
 
@@ -179,20 +179,20 @@ namespace MonoTests.System.Data
                 public void TestValue ()
                 {
                        DataView TestView = new DataView (dataTable);
-                       Assertion.AssertEquals ("Dv #1", "item 1", TestView [0]["itemId"]);
+                       Assert.AreEqual ("item 1", TestView [0]["itemId"], "Dv #1");
                 }
 
                 [Test]
                 public void TestCount ()
                 {
                        DataView TestView = new DataView (dataTable);
-                       Assertion.AssertEquals ("Dv #3", 5, TestView.Count);
+                       Assert.AreEqual (5, TestView.Count, "Dv #3");
                 }
 
                [Test]
                public void AllowNew ()
                {
-                       AssertEquals ("test#01",true,dataView.AllowNew);
+                       Assert.AreEqual (true, dataView.AllowNew, "test#01");
                }
 
                [Test]
@@ -203,7 +203,7 @@ namespace MonoTests.System.Data
                        dataView.ApplyDefaultSort = true;
                        // dataView.Sort = "itemName";
                        // AssertEquals ("test#01","item 1",dataView[0]["itemId"]);
-                       AssertEquals ("test#02",ListChangedType.Reset,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.Reset,listChangedArgs.ListChangedType, "test#02");
                        // UnComment the line below to see if dataView is sorted
                        //   PrintTableOrView (dataView,"* OnApplyDefaultSort");
                }
@@ -212,7 +212,7 @@ namespace MonoTests.System.Data
                public void RowStateFilter ()
                {
                        dataView.RowStateFilter = DataViewRowState.Deleted;
-                       AssertEquals ("test#01",ListChangedType.Reset,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.Reset,listChangedArgs.ListChangedType, "test#01");
                }
 
                [Test]
@@ -239,16 +239,16 @@ namespace MonoTests.System.Data
                        dataView [0] ["col1"] = -1;
                        dataView.RowStateFilter = DataViewRowState.ModifiedOriginal;
                        v = dataView [0] [0].ToString ();
-                       AssertEquals ("ModifiedOriginal.Count", 1, dataView.Count);
-                       AssertEquals ("ModifiedOriginal.Value", "1", v);
+                       Assert.AreEqual (1, dataView.Count, "ModifiedOriginal.Count");
+                       Assert.AreEqual ("1", v, "ModifiedOriginal.Value");
 
                        // Deleting the row
                        dataView.Delete (0);
                        dataView.RowStateFilter = DataViewRowState.Deleted;
 
                        v = dataView [0] [0].ToString ();
-                       AssertEquals ("Deleted.Count", 1, dataView.Count);
-                       AssertEquals ("Deleted.Value", "1", v);
+                       Assert.AreEqual (1, dataView.Count, "Deleted.Count");
+                       Assert.AreEqual ("1", v, "Deleted.Value");
                }
 
                //xamarin bug #18898 # / novell bug #595899
@@ -276,10 +276,10 @@ namespace MonoTests.System.Data
                        another_new_row[0] = "9";
                        another_new_row[1] = "10";
 
-                       AssertEquals ("#1", dv[2][0], "9");
+                       Assert.AreEqual (dv[2][0], "9", "#1");
 
                        //This should not throw a System.Data.VersionNotFoundException: "There is no Proposed data to accces"
-                       AssertEquals ("#1", dv[1][0], "7");     
+                       Assert.AreEqual (dv[1][0], "7", "#1");  
 
                }
 
@@ -288,7 +288,7 @@ namespace MonoTests.System.Data
                {
                        DataView dataview = new DataView ();
                        PropertyDescriptorCollection col = ((ITypedList)dataview).GetItemProperties (null);
-                       AssertEquals ("1", 0, col.Count);
+                       Assert.AreEqual (0, col.Count, "1");
                }
 
                #region Sort Tests
@@ -296,7 +296,7 @@ namespace MonoTests.System.Data
                public void SortListChangedTest ()
                {
                        dataView.Sort = "itemName DESC";
-                       AssertEquals ("test#01",ListChangedType.Reset,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.Reset,listChangedArgs.ListChangedType, "test#01");
                        // UnComment the line below to see if dataView is sorted
                        // PrintTableOrView (dataView);
                }
@@ -338,60 +338,60 @@ namespace MonoTests.System.Data
                        DataView dataView = dataTable.DefaultView;
 
                        string s = "Default sorting: ";
-                       AssertEquals (s + "First entry has wrong item", 1, dataView[0][0]);
-                       AssertEquals (s + "Second entry has wrong item", 0, dataView[1][0]);
-                       AssertEquals (s + "Third entry has wrong item", 3, dataView[2][0]);
-                       AssertEquals (s + "Fourth entry has wrong item", 2, dataView[3][0]);
+                       Assert.AreEqual (1, dataView[0][0], s + "First entry has wrong item");
+                       Assert.AreEqual (0, dataView[1][0], s + "Second entry has wrong item");
+                       Assert.AreEqual (3, dataView[2][0], s + "Third entry has wrong item");
+                       Assert.AreEqual (2, dataView[3][0], s + "Fourth entry has wrong item");
 
                        s = "Ascending sorting 1: ";
                        dataView.Sort = "itemId ASC";
-                       AssertEquals (s + "First entry has wrong item", 0, dataView[0][0]);
-                       AssertEquals (s + "Second entry has wrong item", 1, dataView[1][0]);
-                       AssertEquals (s + "Third entry has wrong item", 2, dataView[2][0]);
-                       AssertEquals (s + "Fourth entry has wrong item", 3, dataView[3][0]);
+                       Assert.AreEqual (0, dataView[0][0], s + "First entry has wrong item");
+                       Assert.AreEqual (1, dataView[1][0], s + "Second entry has wrong item");
+                       Assert.AreEqual (2, dataView[2][0], s + "Third entry has wrong item");
+                       Assert.AreEqual (3, dataView[3][0], s + "Fourth entry has wrong item");
 
                        // bug #77104 (2-5)
                        s = "Ascending sorting 2: ";
                        dataView.Sort = "itemId     ASC";
-                       AssertEquals (s + "First entry has wrong item", 0, dataView[0][0]);
-                       AssertEquals (s + "Second entry has wrong item", 1, dataView[1][0]);
-                       AssertEquals (s + "Third entry has wrong item", 2, dataView[2][0]);
-                       AssertEquals (s + "Fourth entry has wrong item", 3, dataView[3][0]);
+                       Assert.AreEqual (0, dataView[0][0], s + "First entry has wrong item");
+                       Assert.AreEqual (1, dataView[1][0], s + "Second entry has wrong item");
+                       Assert.AreEqual (2, dataView[2][0], s + "Third entry has wrong item");
+                       Assert.AreEqual (3, dataView[3][0], s + "Fourth entry has wrong item");
 
                        s = "Ascending sorting 3: ";
                        dataView.Sort = "[itemId] ASC";
-                       AssertEquals (s + "First entry has wrong item", 0, dataView[0][0]);
-                       AssertEquals (s + "Second entry has wrong item", 1, dataView[1][0]);
-                       AssertEquals (s + "Third entry has wrong item", 2, dataView[2][0]);
-                       AssertEquals (s + "Fourth entry has wrong item", 3, dataView[3][0]);
+                       Assert.AreEqual (0, dataView[0][0], s + "First entry has wrong item");
+                       Assert.AreEqual (1, dataView[1][0], s + "Second entry has wrong item");
+                       Assert.AreEqual (2, dataView[2][0], s + "Third entry has wrong item");
+                       Assert.AreEqual (3, dataView[3][0], s + "Fourth entry has wrong item");
 
                        s = "Ascending sorting 4: ";
                        dataView.Sort = "[itemId]       ASC";
-                       AssertEquals (s + "First entry has wrong item", 0, dataView[0][0]);
-                       AssertEquals (s + "Second entry has wrong item", 1, dataView[1][0]);
-                       AssertEquals (s + "Third entry has wrong item", 2, dataView[2][0]);
-                       AssertEquals (s + "Fourth entry has wrong item", 3, dataView[3][0]);
+                       Assert.AreEqual (0, dataView[0][0], s + "First entry has wrong item");
+                       Assert.AreEqual (1, dataView[1][0], s + "Second entry has wrong item");
+                       Assert.AreEqual (2, dataView[2][0], s + "Third entry has wrong item");
+                       Assert.AreEqual (3, dataView[3][0], s + "Fourth entry has wrong item");
 
                        s = "Ascending sorting 5: ";
                        try {
                                dataView.Sort = "itemId \tASC";
-                               AssertEquals (s + "Tab cannot be a separator" , true, false);
+                               Assert.AreEqual (true, false, s + "Tab cannot be a separator");
                        }catch (IndexOutOfRangeException e) {
                        }
 
                        s = "Descending sorting : ";
                        dataView.Sort = "itemId DESC";
-                       AssertEquals (s + "First entry has wrong item", 3, dataView[0][0]);
-                       AssertEquals (s + "Second entry has wrong item", 2, dataView[1][0]);
-                       AssertEquals (s + "Third entry has wrong item", 1, dataView[2][0]);
-                       AssertEquals (s + "Fourth entry has wrong item", 0, dataView[3][0]);
+                       Assert.AreEqual (3, dataView[0][0], s + "First entry has wrong item");
+                       Assert.AreEqual (2, dataView[1][0], s + "Second entry has wrong item");
+                       Assert.AreEqual (1, dataView[2][0], s + "Third entry has wrong item");
+                       Assert.AreEqual (0, dataView[3][0], s + "Fourth entry has wrong item");
 
                        s = "Reverted to default sorting: ";
                        dataView.Sort = null;
-                       AssertEquals (s + "First entry has wrong item", 1, dataView[0][0]);
-                       AssertEquals (s + "Second entry has wrong item", 0, dataView[1][0]);
-                       AssertEquals (s + "Third entry has wrong item", 3, dataView[2][0]);
-                       AssertEquals (s + "Fourth entry has wrong item", 2, dataView[3][0]);
+                       Assert.AreEqual (1, dataView[0][0], s + "First entry has wrong item");
+                       Assert.AreEqual (0, dataView[1][0], s + "Second entry has wrong item");
+                       Assert.AreEqual (3, dataView[2][0], s + "Third entry has wrong item");
+                       Assert.AreEqual (2, dataView[3][0], s + "Fourth entry has wrong item");
                }
                
                #endregion // Sort Tests
@@ -409,21 +409,21 @@ namespace MonoTests.System.Data
                {
                        dataView.AllowNew = true;
                        DataRowView drv = dataView.AddNew ();
-                       AssertEquals ("test#01",ListChangedType.ItemAdded,listChangedArgs.ListChangedType);
-                       AssertEquals ("test#02",-1,listChangedArgs.OldIndex);
-                       AssertEquals ("test#03",5,listChangedArgs.NewIndex);
-                       AssertEquals ("test#04",drv["itemName"],dataView [dataView.Count - 1]["itemName"]);
+                       Assert.AreEqual (ListChangedType.ItemAdded,listChangedArgs.ListChangedType, "test#01");
+                       Assert.AreEqual (-1,listChangedArgs.OldIndex, "test#02");
+                       Assert.AreEqual (5,listChangedArgs.NewIndex, "test#03");
+                       Assert.AreEqual (drv["itemName"],dataView [dataView.Count - 1]["itemName"], "test#04");
                        listChangedArgs = null;
                        drv["itemId"] = "item " + 1001;
                        drv["itemName"] = "name " + rndm.Next();
                        drv["itemPrice"] = "Rs. " + (rndm.Next() % 1000);
                        drv["itemCategory"] = "Cat " + ((rndm.Next() % 10) + 1);
                        // Actually no events are arisen when items are set.
-                       AssertNull ("test#05", listChangedArgs);
+                       Assert.IsNull (listChangedArgs, "test#05");
                        drv.CancelEdit ();
-                       AssertEquals ("test#06",ListChangedType.ItemDeleted,listChangedArgs.ListChangedType);
-                       AssertEquals ("test#07",-1,listChangedArgs.OldIndex);
-                       AssertEquals ("test#08",5,listChangedArgs.NewIndex);
+                       Assert.AreEqual (ListChangedType.ItemDeleted,listChangedArgs.ListChangedType, "test#06");
+                       Assert.AreEqual (-1,listChangedArgs.OldIndex, "test#07");
+                       Assert.AreEqual (5,listChangedArgs.NewIndex, "test#08");
                }
 
                [Test]
@@ -439,15 +439,15 @@ namespace MonoTests.System.Data
                        table.Columns.AddRange (new DataColumn[] {col1,col2});
 
                        dv.Table = table;
-                       AssertNull ("#1", dv.Table);
+                       Assert.IsNull (dv.Table, "#1");
                        dv.EndInit ();
 
-                       AssertNull ("#2", dv.Table); // still.
-                       AssertEquals ("#3", 0, table.Columns.Count);
+                       Assert.IsNull (dv.Table, "#2"); // still.
+                       Assert.AreEqual (0, table.Columns.Count, "#3");
 
                        table.EndInit ();
-                       AssertEquals ("#5", table, dv.Table);
-                       AssertEquals ("#4", 2, table.Columns.Count);
+                       Assert.AreEqual (table, dv.Table, "#4");
+                       Assert.AreEqual (2, table.Columns.Count, "#5");
                }
 
                private bool dvInitialized;
@@ -472,19 +472,19 @@ namespace MonoTests.System.Data
                        table.Columns.AddRange (new DataColumn[] {col1,col2});
 
                        dv.Table = table;
-                       AssertNull ("#1", dv.Table);
+                       Assert.IsNull (dv.Table, "#1");
                        dv.EndInit ();
                        
-                       AssertNull ("#2", dv.Table);
-                       AssertEquals ("#3", 0, table.Columns.Count);
+                       Assert.IsNull (dv.Table, "#2");
+                       Assert.AreEqual (0, table.Columns.Count, "#3");
 
                        table.EndInit ();
 
                        dv.Initialized -= new EventHandler (OnDataViewInitialized); // this should not be unregistered before table.EndInit().
                        
-                       AssertEquals ("#4", 2, table.Columns.Count);
-                       AssertEquals ("#6", table, dv.Table);
-                       AssertEquals ("DataViewInitialized #5", true, dvInitialized);
+                       Assert.AreEqual (2, table.Columns.Count, "#4");
+                       Assert.AreEqual (table, dv.Table, "#6");
+                       Assert.AreEqual (true, dvInitialized, "DataViewInitialized #5");
                }
 
                [Test]
@@ -503,21 +503,21 @@ namespace MonoTests.System.Data
                        randInt = rndm.Next () % rowCount;
                        dataView.Sort = "itemId";
                        drv = dataView [randInt];
-                       AssertEquals ("test#01",randInt,dataView.Find (drv ["itemId"]));
+                       Assert.AreEqual (randInt,dataView.Find (drv ["itemId"]), "test#01");
                        
                        dataView.Sort = "itemId DESC";
                        drv = dataView [randInt];
-                       AssertEquals ("test#02",randInt,dataView.Find (drv ["itemId"]));
+                       Assert.AreEqual (randInt,dataView.Find (drv ["itemId"]), "test#02");
                        
                        dataView.Sort = "itemId, itemName";
                        drv = dataView [randInt];
                        object [] keys = new object [2];
                        keys [0] = drv ["itemId"];
                        keys [1] = drv ["itemName"];
-                       AssertEquals ("test#03",randInt,dataView.Find (keys));
+                       Assert.AreEqual (randInt,dataView.Find (keys), "test#03");
                        
                        dataView.Sort = "itemId";
-                       AssertEquals ("test#04",-1,dataView.Find("no item"));
+                       Assert.AreEqual (-1,dataView.Find("no item"), "test#04");
 
                }
 
@@ -540,7 +540,7 @@ namespace MonoTests.System.Data
                [Test]
                public void ToStringTest ()
                {
-                       AssertEquals ("test#01","System.Data.DataView",dataView.ToString());
+                       Assert.AreEqual ("System.Data.DataView",dataView.ToString(), "test#01");
                }
 
                [Test]
@@ -556,38 +556,38 @@ namespace MonoTests.System.Data
                        dataTable.Rows.Add(dr);
 
                        //PrintTableOrView(dataView, "ItemAdded");
-                       AssertEquals ("test#01",ListChangedType.ItemAdded,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.ItemAdded,listChangedArgs.ListChangedType, "test#01");
                        listChangedArgs = null;
 
                        dr ["itemId"] = "aitem 0";
                        // PrintTableOrView(dataView, "ItemChanged");
-                       AssertEquals ("test#02",ListChangedType.ItemChanged,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.ItemChanged,listChangedArgs.ListChangedType, "test#02");
                        listChangedArgs = null;
 
                        dr ["itemId"] = "zitem 0";
                        // PrintTableOrView(dataView, "ItemMoved");
-                       AssertEquals ("test#03",ListChangedType.ItemMoved,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.ItemMoved,listChangedArgs.ListChangedType, "test#03");
                        listChangedArgs = null;
 
                        dataTable.Rows.Remove (dr);
                        // PrintTableOrView(dataView, "ItemDeleted");
-                       AssertEquals ("test#04",ListChangedType.ItemDeleted,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.ItemDeleted,listChangedArgs.ListChangedType, "test#04");
                        
                        listChangedArgs = null;
                        DataColumn dc5 = new DataColumn ("itemDesc");
                        dataTable.Columns.Add (dc5);
                        // PrintTableOrView(dataView, "PropertyDescriptorAdded");
-                       AssertEquals ("test#05",ListChangedType.PropertyDescriptorAdded,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.PropertyDescriptorAdded,listChangedArgs.ListChangedType, "test#05");
                        
                        listChangedArgs = null;
                        dc5.ColumnName = "itemDescription";
                        // PrintTableOrView(dataView, "PropertyDescriptorChanged");
-                       // AssertEquals ("test#06",ListChangedType.PropertyDescriptorChanged,listChangedArgs.ListChangedType);
+                       // Assert.AreEqual ("test#06",ListChangedType.PropertyDescriptorChanged,listChangedArgs.ListChangedType);
                        
                        listChangedArgs = null;
                        dataTable.Columns.Remove (dc5);
                        // PrintTableOrView(dataView, "PropertyDescriptorDeleted");
-                       AssertEquals ("test#07",ListChangedType.PropertyDescriptorDeleted,listChangedArgs.ListChangedType);
+                       Assert.AreEqual (ListChangedType.PropertyDescriptorDeleted,listChangedArgs.ListChangedType, "test#07");
                }
        
                [Test]
@@ -596,8 +596,8 @@ namespace MonoTests.System.Data
                        DataView TestView = new DataView (dataTable);
                        TestView.Sort = "itemId";
                        DataRowView[] Result = TestView.FindRows ("item 3");
-                       Assertion.AssertEquals ("Dv #1", 1, Result.Length);
-                       Assertion.AssertEquals ("Dv #2", "item 3", Result [0]["itemId"]);
+                       Assert.AreEqual (1, Result.Length, "Dv #1");
+                       Assert.AreEqual ("item 3", Result [0]["itemId"], "Dv #2");
                }
 
                [Test]
@@ -642,7 +642,7 @@ namespace MonoTests.System.Data
                        DataView TestView = new DataView (dataTable);
                        TestView.Delete (0);
                        DataRow r = TestView.Table.Rows [0];
-                       Assertion.Assert ("Dv #1", !((string)r ["itemId"] == "item 1"));
+                       Assert.IsTrue (!((string)r ["itemId"] == "item 1"), "Dv #1");
                }
 
                [Test]
@@ -685,13 +685,13 @@ namespace MonoTests.System.Data
 
                        DataView dataView = new DataView (dataset.Tables[0]);
 
-                       AssertEquals ("before delete", 3, dataView.Count);
+                       Assert.AreEqual (3, dataView.Count, "before delete");
                        dataView.AllowDelete = true;
 
                        // Deleting the first row
                        dataView.Delete (0);
 
-                       AssertEquals ("before delete", 2, dataView.Count);
+                       Assert.AreEqual (2, dataView.Count, "before delete");
                }
 
                [Test]
@@ -746,7 +746,7 @@ namespace MonoTests.System.Data
                        eventWriter.Write (" ------" + dv.Count);
                        DataRowView a3 = dv.AddNew ();
 
-                       AssertEquals (reference, eventWriter.ToString ());
+                       Assert.AreEqual (reference, eventWriter.ToString ());
                }
 
                [Test]
@@ -766,7 +766,7 @@ table was set.
 
                        dc2.ColumnName = "new_column_name";
 
-                       AssertEquals (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
+                       Assert.AreEqual (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
                }
 
                private void ListChanged (object o, ListChangedEventArgs e)
@@ -830,7 +830,7 @@ removed relation 2
                        ds.Relations.Remove (dr);
                        eventWriter.WriteLine ("removed relation 2");
 
-                       AssertEquals (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
+                       Assert.AreEqual (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
                }
 
                [Test]
@@ -942,7 +942,7 @@ table changed.
                        dv.Table = new DataTable ("table2");
                        eventWriter.WriteLine ("table changed.");
 
-                       AssertEquals (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
+                       Assert.AreEqual (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
                }
 
                [Test]
@@ -982,7 +982,7 @@ table was set.
                        dt.Columns.Add ("");
                        eventWriter.WriteLine (" add a column with an empty name.");
 
-                       AssertEquals (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
+                       Assert.AreEqual (result.Replace ("\r\n", "\n"), eventWriter.ToString ().Replace ("\r\n", "\n"));
                        GC.KeepAlive (dv);
                }
 
index f727d736d2a05a639ce2441350bd4bb9eedc5651..50850b6d23f57e8edd44b15c64d2f78ac7e61fa4 100644 (file)
@@ -1158,6 +1158,9 @@ namespace MonoTests.System.Data
                        Assert.AreEqual (-1, evProp.NewIndex, "#10");
                        Assert.AreEqual (-1, evProp.OldIndex, "#11");
                        Assert.AreEqual (ListChangedType.Reset, evProp.lstType, "#12");
+
+                       // Keep the view alive otherwise we might miss events
+                       GC.KeepAlive (view);
                }
 
                [Test]
index 6e5d2a4df927114b5c0499ff38153f2b41c00ba5..21742eb3aa3cef106b3dd46a42018b4ba70a5d05 100644 (file)
@@ -38,7 +38,7 @@ using System.Data;
 namespace MonoTests.System.Data
 {
        [TestFixture]
-       public class ForeignKeyConstraintTest : Assertion
+       public class ForeignKeyConstraintTest
        {
                private DataSet _ds;
 
@@ -73,23 +73,23 @@ namespace MonoTests.System.Data
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#01");
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#02");
                        
                        // ctor (string, DataColumn, DataColumn
                        ForeignKeyConstraint Constraint = new ForeignKeyConstraint ("test", _ds.Tables [0].Columns [2], _ds.Tables [1].Columns [0]);
                        Table = _ds.Tables [1];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 1, Table.Constraints.Count);
-                       AssertEquals ("test#04", "test", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
+                       Assert.AreEqual (1, Table.Constraints.Count, "test#03");
+                       Assert.AreEqual ("test", Table.Constraints [0].ConstraintName, "test#04");
+                       Assert.AreEqual (typeof (ForeignKeyConstraint), Table.Constraints [0].GetType (), "test#05");
 
                        Table = _ds.Tables [0];
-                       AssertEquals ("test#06", 1, Table.Constraints.Count);
-                       AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
+                       Assert.AreEqual (1, Table.Constraints.Count, "test#06");
+                       Assert.AreEqual ("Constraint1", Table.Constraints [0].ConstraintName, "test#07");
+                       Assert.AreEqual (typeof (UniqueConstraint), Table.Constraints [0].GetType (), "test#08");
                }
                
                // Tests ctor (DataColumn, DataColumn)
@@ -98,23 +98,23 @@ namespace MonoTests.System.Data
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#01");
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#02");
                        
                        // ctor (string, DataColumn, DataColumn
                        ForeignKeyConstraint Constraint = new ForeignKeyConstraint (_ds.Tables [0].Columns [2], _ds.Tables [1].Columns [0]);
                        Table = _ds.Tables [1];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 1, Table.Constraints.Count);
-                       AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
+                       Assert.AreEqual (1, Table.Constraints.Count, "test#03");
+                       Assert.AreEqual ("Constraint1", Table.Constraints [0].ConstraintName, "test#04");
+                       Assert.AreEqual (typeof (ForeignKeyConstraint), Table.Constraints [0].GetType (), "test#05");
 
                        Table = _ds.Tables [0];
-                       AssertEquals ("test#06", 1, Table.Constraints.Count);
-                       AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
+                       Assert.AreEqual (1, Table.Constraints.Count, "test#06");
+                       Assert.AreEqual ("Constraint1", Table.Constraints [0].ConstraintName, "test#07");
+                       Assert.AreEqual (typeof (UniqueConstraint), Table.Constraints [0].GetType (), "test#08");
                }
                
                // Test ctor (DataColumn [], DataColumn [])
@@ -123,9 +123,9 @@ namespace MonoTests.System.Data
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#01");
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#02");
                                                
                        DataColumn [] Cols1 = new DataColumn [2];
                        Cols1 [0] = _ds.Tables [0].Columns [1];
@@ -139,14 +139,14 @@ namespace MonoTests.System.Data
                        Table = _ds.Tables [1];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 1, Table.Constraints.Count);
-                       AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
+                       Assert.AreEqual (1, Table.Constraints.Count, "test#03");
+                       Assert.AreEqual ("Constraint1", Table.Constraints [0].ConstraintName, "test#04");
+                       Assert.AreEqual (typeof (ForeignKeyConstraint), Table.Constraints [0].GetType (), "test#05");
 
                        Table = _ds.Tables [0];
-                       AssertEquals ("test#06", 1, Table.Constraints.Count);
-                       AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
+                       Assert.AreEqual (1, Table.Constraints.Count, "test#06");
+                       Assert.AreEqual ("Constraint1", Table.Constraints [0].ConstraintName, "test#07");
+                       Assert.AreEqual (typeof (UniqueConstraint), Table.Constraints [0].GetType (), "test#08");
 
                }
        
@@ -156,9 +156,9 @@ namespace MonoTests.System.Data
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#01");
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#02");
                                                
                        DataColumn [] Cols1 = new DataColumn [2];
                        Cols1 [0] = _ds.Tables [0].Columns [1];
@@ -172,14 +172,14 @@ namespace MonoTests.System.Data
                        Table = _ds.Tables [1];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 1, Table.Constraints.Count);
-                       AssertEquals ("test#04", "Test", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
+                       Assert.AreEqual (1, Table.Constraints.Count, "test#03");
+                       Assert.AreEqual ("Test", Table.Constraints [0].ConstraintName, "test#04");
+                       Assert.AreEqual (typeof (ForeignKeyConstraint), Table.Constraints [0].GetType (), "test#05");
 
                        Table = _ds.Tables [0];
-                       AssertEquals ("test#06", 1, Table.Constraints.Count);
-                       AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());                  
+                       Assert.AreEqual (1, Table.Constraints.Count, "test#06");
+                       Assert.AreEqual ("Constraint1", Table.Constraints [0].ConstraintName, "test#07");
+                       Assert.AreEqual (typeof (UniqueConstraint), Table.Constraints [0].GetType (), "test#08");
                }
                
                [Test]
@@ -211,7 +211,7 @@ namespace MonoTests.System.Data
                         ForeignKeyConstraint fkc = new ForeignKeyConstraint ("hello world", parentTableName, parentColumnNames, childColumnNames, AcceptRejectRule.Cascade, Rule.Cascade, Rule.Cascade);                                                                                                                            // Assert that the Constraint object does not belong to any table yet
                        try {
                                DataTable tmp = fkc.Table;
-                               Fail ("When table is null, get_Table causes an InvalidOperationException.");
+                               Assert.Fail ("When table is null, get_Table causes an InvalidOperationException.");
                        } catch (NullReferenceException) { // actually .NET throws this (bug)
                        } catch (InvalidOperationException) {
                        }
@@ -234,9 +234,12 @@ namespace MonoTests.System.Data
                         // OK - So AddRange() is the only way!
                         table2.Constraints.AddRange (constraints);
                           // After AddRange(), Check the properties of ForeignKeyConstraint object
-                        Assertion.Assert("#A04", fkc.RelatedColumns [0].ColumnName.Equals ("col1"));                        Assertion.Assert("#A05", fkc.RelatedColumns [1].ColumnName.Equals ("col2"));                        Assertion.Assert("#A06", fkc.RelatedColumns [2].ColumnName.Equals ("col3"));                        Assertion.Assert("#A07", fkc.Columns [0].ColumnName.Equals ("col4"));
-                        Assertion.Assert("#A08", fkc.Columns [1].ColumnName.Equals ("col5"));
-                        Assertion.Assert("#A09", fkc.Columns [2].ColumnName.Equals ("col6"));
+                        Assert.IsTrue(fkc.RelatedColumns [0].ColumnName.Equals ("col1"), "#A04");
+                        Assert.IsTrue(fkc.RelatedColumns [1].ColumnName.Equals ("col2"), "#A05");
+                        Assert.IsTrue(fkc.RelatedColumns [2].ColumnName.Equals ("col3"), "#A06");
+                        Assert.IsTrue(fkc.Columns [0].ColumnName.Equals ("col4"), "#A07");
+                        Assert.IsTrue(fkc.Columns [1].ColumnName.Equals ("col5"), "#A08");
+                        Assert.IsTrue(fkc.Columns [2].ColumnName.Equals ("col6"), "#A09");
 #endif
                         // Try to add columns with names which do not exist in the table
                         parentColumnNames [2] = "noColumn";
@@ -255,7 +258,7 @@ namespace MonoTests.System.Data
                         
 #if false // FIXME: Here this test crashes under MS.NET.
                         // Check whether the child table really contains the foreign key constraint named "hello world"
-                        Assertion.Assert("#A11 ", table2.Constraints.Contains ("hello world"));
+                        Assert.IsTrue(table2.Constraints.Contains ("hello world"), "#A11 ");
 #endif
                 }
 
@@ -267,20 +270,20 @@ namespace MonoTests.System.Data
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#01");
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assert.AreEqual (0, Table.Constraints.Count, "test#02");
                                                
                        
                        ForeignKeyConstraint Constraint = new ForeignKeyConstraint ("Test", _ds.Tables [0].Columns [0], _ds.Tables [0].Columns [2]);
                        Table = _ds.Tables [0];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 2, Table.Constraints.Count);
-                       AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
-                       AssertEquals ("test#04", "Test", Table.Constraints [1].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [1].GetType ());
+                       Assert.AreEqual (2, Table.Constraints.Count, "test#03");
+                       Assert.AreEqual ("Constraint1", Table.Constraints [0].ConstraintName, "test#04");
+                       Assert.AreEqual (typeof (UniqueConstraint), Table.Constraints [0].GetType (), "test#05");
+                       Assert.AreEqual ("Test", Table.Constraints [1].ConstraintName, "test#04");
+                       Assert.AreEqual (typeof (ForeignKeyConstraint), Table.Constraints [1].GetType (), "test#05");
 
                }
 
@@ -297,45 +300,45 @@ namespace MonoTests.System.Data
                        try
                        {
                                fkc = new ForeignKeyConstraint((DataColumn)null,(DataColumn)null);
-                               Fail("Failed to throw ArgumentNullException.");
+                               Assert.Fail("Assert.Failed to throw ArgumentNullException.");
                        }
                        catch (NullReferenceException) {}
                        catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
-                               Fail("A1: Wrong Exception type. " + exc.ToString());
+                               Assert.Fail("A1: Wrong Exception type. " + exc.ToString());
                        }
 
                        //zero length collection
                        try
                        {
                                fkc = new ForeignKeyConstraint(new DataColumn[]{},new DataColumn[]{});
-                               Fail("B1: Failed to throw ArgumentException.");
+                               Assert.Fail("B1: Assert.Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException) {}
                        catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
-                               Fail("A2: Wrong Exception type. " + exc.ToString());
+                               Assert.Fail("A2: Wrong Exception type. " + exc.ToString());
                        }
 
                        //different datasets
                        try
                        {
                                fkc = new ForeignKeyConstraint(_ds.Tables[0].Columns[0], localTable.Columns[0]);
-                               Fail("Failed to throw InvalidOperationException.");
+                               Assert.Fail("Assert.Failed to throw InvalidOperationException.");
                        }
                        catch (InvalidOperationException) {}
                        catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
-                               Fail("A3: Wrong Exception type. " + exc.ToString());
+                               Assert.Fail("A3: Wrong Exception type. " + exc.ToString());
                        }
 
                        try
                        {
                                fkc = new ForeignKeyConstraint(_ds.Tables[0].Columns[0], localTable.Columns[1]);
-                               Fail("Failed to throw InvalidConstraintException.");
+                               Assert.Fail("Assert.Failed to throw InvalidConstraintException.");
                        }
                        // tables in different datasets
                        catch (InvalidOperationException) {}
@@ -345,7 +348,7 @@ namespace MonoTests.System.Data
                         try                                           
                         {                                             
                                 fkc = new ForeignKeyConstraint(new DataColumn [] {_ds.Tables[0].Columns[0], _ds.Tables[0].Columns[1]}, new DataColumn [] {localTable.Columns[1], _ds.Tables[1].Columns [0]});    
-                                Fail("Failed to throw InvalidOperationException.");                                         
+                                Assert.Fail("Assert.Failed to throw InvalidOperationException.");                                         
                         }                                             
                         catch (InvalidConstraintException) {}         
                         catch (AssertionException exc) {throw exc;} 
@@ -362,13 +365,13 @@ namespace MonoTests.System.Data
                        try 
                        {
                                fkc = new ForeignKeyConstraint(col, _ds.Tables[0].Columns[0]);
-                               Fail("FTT1: Failed to throw ArgumentException.");
+                               Assert.Fail("FTT1: Assert.Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException) {}
                        catch (AssertionException exc) {throw exc;}
 //                     catch (Exception exc)
 //                     {
-//                             Fail("WET1: Wrong Exception type. " + exc.ToString());
+//                             Assert.Fail("WET1: Wrong Exception type. " + exc.ToString());
 //                     }
 
                        //Columns must belong to the same table
@@ -382,13 +385,13 @@ namespace MonoTests.System.Data
                                                                 _ds.Tables[0].Columns[1],
                                                                _ds.Tables[0].Columns[0]});
                                        
-                               Fail("FTT2: Failed to throw InvalidConstraintException.");
+                               Assert.Fail("FTT2: Assert.Failed to throw InvalidConstraintException.");
                        }
                        catch (InvalidConstraintException) {}
                        catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
-                               Fail("WET2: Wrong Exception type. " + exc.ToString());
+                               Assert.Fail("WET2: Wrong Exception type. " + exc.ToString());
                        }
 
 
@@ -403,13 +406,13 @@ namespace MonoTests.System.Data
                                fkc = new ForeignKeyConstraint(twoCol, 
                                        new DataColumn[] { _ds.Tables[0].Columns[0]});
                                        
-                               Fail("FTT3: Failed to throw ArgumentException.");
+                               Assert.Fail("FTT3: Assert.Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException) {}
                        catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
-                               Fail("WET3: Wrong Exception type. " + exc.ToString());
+                               Assert.Fail("WET3: Wrong Exception type. " + exc.ToString());
                        }
 
                        //InvalidOperation: Parent and child are the same column.
@@ -418,13 +421,13 @@ namespace MonoTests.System.Data
                                fkc = new ForeignKeyConstraint( _ds.Tables[0].Columns[0],
                                        _ds.Tables[0].Columns[0] );
                                        
-                               Fail("FTT4: Failed to throw InvalidOperationException.");
+                               Assert.Fail("FTT4: Assert.Failed to throw InvalidOperationException.");
                        }
                        catch (InvalidOperationException) {}
                        catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
-                               Fail("WET4: Wrong Exception type. " + exc.ToString());
+                               Assert.Fail("WET4: Wrong Exception type. " + exc.ToString());
                        }
 
                }
@@ -446,14 +449,14 @@ namespace MonoTests.System.Data
                        ForeignKeyConstraint fkcDiff = 
                                new ForeignKeyConstraint( tbl.Columns[1], tbl.Columns[2]);
                
-                       Assert( "Equals failed. 1" , fkc.Equals(fkc2));
-                       Assert( "Equals failed. 2" , fkc2.Equals(fkc));
-                       Assert( "Equals failed. 3" , fkc.Equals(fkc));
+                       Assert.IsTrue( fkc.Equals(fkc2) , "Equals Assert.IsTrue.Failed. 1");
+                       Assert.IsTrue( fkc2.Equals(fkc) , "Equals Assert.IsTrue.Failed. 2");
+                       Assert.IsTrue( fkc.Equals(fkc) , "Equals Assert.IsTrue.Failed. 3");
 
-                       Assert( "Equals failed diff. 1" , fkc.Equals(fkcDiff) == false);
+                       Assert.IsTrue( fkc.Equals(fkcDiff) == false , "Equals Assert.IsTrue.Failed diff. 1");
 
-                       //Assert( "Hash Code Failed. 1", fkc.GetHashCode() == fkc2.GetHashCode() );
-                       Assert( "Hash Code Failed. 2", fkc.GetHashCode() != fkcDiff.GetHashCode() );
+                       //Assert.IsTrue( "Hash Code Assert.IsTrue.Failed. 1", fkc.GetHashCode() == fkc2.GetHashCode() );
+                       Assert.IsTrue( fkc.GetHashCode() != fkcDiff.GetHashCode() , "Hash Code Assert.IsTrue.Failed. 2");
        
                }
 
@@ -512,7 +515,7 @@ namespace MonoTests.System.Data
                        t2.Rows.Add (new object [] {10});
 
                        t1.Rows [0][0]=20;
-                       Assert("#1", (int)t2.Rows [0][0] == 20);
+                       Assert.IsTrue((int)t2.Rows [0][0] == 20, "#1");
                }
 
                [Test]
index cc8196e0c9681eb1f568b93e8cc7f6ccb8e2b72c..0a99b71bc323319293eddc6fbbfde4d7053512f7 100644 (file)
@@ -38,7 +38,7 @@ using NUnit.Framework;
 namespace MonoTests.System.Xml
 {
        [TestFixture]
-       public class XmlDataDocumentTest2 : Assertion
+       public class XmlDataDocumentTest2 
        {
                string xml = "<NewDataSet><table><row><col1>1</col1><col2>2</col2></row></table></NewDataSet>";
 
@@ -53,8 +53,8 @@ namespace MonoTests.System.Xml
                public void TestDefaultCtor ()
                {
                        XmlDataDocument doc = new XmlDataDocument ();
-                       AssertNotNull (doc.DataSet);
-                       AssertEquals ("NewDataSet", doc.DataSet.DataSetName);
+                       Assert.IsNotNull (doc.DataSet);
+                       Assert.AreEqual ("NewDataSet", doc.DataSet.DataSetName);
                }
 
                [Test]
@@ -117,73 +117,73 @@ namespace MonoTests.System.Xml
                        ds.Relations.Add (rel);\r
                        XmlDataDocument doc = new XmlDataDocument (ds);\r
                        doc.LoadXml ("<set><tab1><col1>1</col1><col2/><child><ref>1</ref><val>aaa</val></child></tab1></set>");\r
-                       AssertEquals (1, ds.Tables [0].Rows.Count);\r
-                       AssertEquals (1, ds.Tables [1].Rows.Count);\r
+                       Assert.AreEqual (1, ds.Tables [0].Rows.Count);\r
+                       Assert.AreEqual (1, ds.Tables [1].Rows.Count);\r
 \r
                        // document element - no mapped row\r
                        XmlElement el = doc.DocumentElement;\r
-                       AssertNull (doc.GetRowFromElement (el));\r
+                       Assert.IsNull (doc.GetRowFromElement (el));\r
 \r
                        // tab1 element - has mapped row\r
                        el = el.FirstChild as XmlElement;\r
                        DataRow row = doc.GetRowFromElement (el);\r
-                       AssertNotNull (row);\r
-                       AssertEquals (DataRowState.Added, row.RowState);\r
+                       Assert.IsNotNull (row);\r
+                       Assert.AreEqual (DataRowState.Added, row.RowState);\r
 \r
                        // col1 - it is column. no mapped row\r
                        el = el.FirstChild as XmlElement;\r
                        row = doc.GetRowFromElement (el);\r
-                       AssertNull (row);\r
+                       Assert.IsNull (row);\r
 \r
                        // col2 - it is column. np mapped row\r
                        el = el.NextSibling as XmlElement;\r
                        row = doc.GetRowFromElement (el);\r
-                       AssertNull (row);\r
+                       Assert.IsNull (row);\r
 \r
                        // child - has mapped row\r
                        el = el.NextSibling as XmlElement;\r
                        row = doc.GetRowFromElement (el);\r
-                       AssertNotNull (row);\r
-                       AssertEquals (DataRowState.Added, row.RowState);\r
+                       Assert.IsNotNull (row);\r
+                       Assert.AreEqual (DataRowState.Added, row.RowState);\r
 \r
                        // created (detached) table 1 element (used later)\r
                        el = doc.CreateElement ("tab1");\r
                        row = doc.GetRowFromElement (el);\r
-                       AssertEquals (DataRowState.Detached, row.RowState);\r
-                       AssertEquals (1, dt.Rows.Count); // not added yet\r
+                       Assert.AreEqual (DataRowState.Detached, row.RowState);\r
+                       Assert.AreEqual (1, dt.Rows.Count); // not added yet\r
 \r
                        // adding a node before setting EnforceConstraints\r
                        // raises an error\r
                        try {\r
                                doc.DocumentElement.AppendChild (el);\r
-                               Fail ("Invalid Operation should occur; EnforceConstraints prevents addition.");\r
+                               Assert.Fail ("Invalid Operation should occur; EnforceConstraints prevents addition.");\r
                        } catch (InvalidOperationException) {\r
                        }\r
 \r
                        // try again...\r
                        ds.EnforceConstraints = false;\r
-                       AssertEquals (1, dt.Rows.Count); // not added yet\r
+                       Assert.AreEqual (1, dt.Rows.Count); // not added yet\r
                        doc.DocumentElement.AppendChild (el);\r
-                       AssertEquals (2, dt.Rows.Count); // added\r
+                       Assert.AreEqual (2, dt.Rows.Count); // added\r
                        row = doc.GetRowFromElement (el);\r
-                       AssertEquals (DataRowState.Added, row.RowState); // changed\r
+                       Assert.AreEqual (DataRowState.Added, row.RowState); // changed\r
 \r
                        // Irrelevant element\r
                        XmlElement el2 = doc.CreateElement ("hoge");\r
                        row = doc.GetRowFromElement (el2);\r
-                       AssertNull (row);\r
+                       Assert.IsNull (row);\r
 \r
                        // created table 2 element (used later)\r
                        el = doc.CreateElement ("child");\r
                        row = doc.GetRowFromElement (el);\r
-                       AssertEquals (DataRowState.Detached, row.RowState);\r
+                       Assert.AreEqual (DataRowState.Detached, row.RowState);\r
 \r
                        // Adding it to irrelevant element performs no row state change.\r
-                       AssertEquals (1, dt2.Rows.Count); // not added yet\r
+                       Assert.AreEqual (1, dt2.Rows.Count); // not added yet\r
                        el2.AppendChild (el);\r
-                       AssertEquals (1, dt2.Rows.Count); // still not added\r
+                       Assert.AreEqual (1, dt2.Rows.Count); // still not added\r
                        row = doc.GetRowFromElement (el);\r
-                       AssertEquals (DataRowState.Detached, row.RowState); // still detached here\r
+                       Assert.AreEqual (DataRowState.Detached, row.RowState); // still detached here\r
                }\r
 
                // bug #54505
@@ -244,8 +244,8 @@ namespace MonoTests.System.Xml
                        StringReader sr = new StringReader (sw.ToString());
                        doc1.Load (sr);
 
-                       AssertEquals ("#1", 1, ds1.Tables [0].Rows.Count);
-                       AssertEquals ("#2", 1, ds1.Tables [0].Rows [0][0]);
+                       Assert.AreEqual (1, ds1.Tables [0].Rows.Count, "#1");
+                       Assert.AreEqual (1, ds1.Tables [0].Rows [0][0], "#2");
                }
 
                [Test]
@@ -267,8 +267,8 @@ namespace MonoTests.System.Xml
                        StringReader sr = new StringReader (sw.ToString());
                        doc1.Load (sr);
 
-                       AssertEquals ("#1", 1, ds1.Tables [0].Rows [0][0]);
-                       AssertEquals ("#2", true, ds1.Tables [0].Rows [0].IsNull (1));
+                       Assert.AreEqual (1, ds1.Tables [0].Rows [0][0], "#1");
+                       Assert.AreEqual (true, ds1.Tables [0].Rows [0].IsNull (1), "#2");
                }
 
                [Test]
@@ -301,9 +301,9 @@ namespace MonoTests.System.Xml
                        StringReader sreader = new StringReader (swriter.ToString ());
                        DataSet ds1 = ds.Clone ();
                        XmlDataDocument doc1 = new XmlDataDocument (ds1);
-                       AssertEquals ("#2" , 0, ds1.Tables [0].Rows.Count);
+                       Assert.AreEqual (0 , ds1.Tables [0].Rows.Count, "#2");
                        doc1.Load (sreader);
-                       AssertEquals ("#3" , 3, ds1.Tables [0].Rows.Count);
+                       Assert.AreEqual (3 , ds1.Tables [0].Rows.Count, "#3");
                }
        }
 }
diff --git a/mcs/class/System.Data/app_test_mobile_static.config b/mcs/class/System.Data/app_test_mobile_static.config
new file mode 100644 (file)
index 0000000..4f31597
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+       <configSections>
+               <section name="system.data_test" 
+                       type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
+               <section name="connectionStrings_test"
+                       type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
+       </configSections>
+       <system.data>
+               <DbProviderFactories>
+                       <add name="ProviderTest2.Name"
+                               invariant="ProviderTest2.InvariantName"
+                               support="FF"
+                               description="ProviderTest2.Description"
+                               type="ProviderTest2.AssemblyQualifiedName"/>
+               </DbProviderFactories>
+       </system.data>
+       <system.data_test>
+               <DbProviderFactories>
+                       <add name="ProviderTest3.Name"
+                               invariant="ProviderTest3.InvariantName"
+                               support="FF"
+                               description="ProviderTest3.Description"
+                               type="ProviderTest3.AssemblyQualifiedName"/>
+                       <clear />
+                       <add name="ProviderTest4.Name"
+                               invariant="ProviderTest4.InvariantName"
+                               support="FF"
+                               description="ProviderTest4.Description"
+                               type="ProviderTest4.AssemblyQualifiedName"/>
+                       <add name="ProviderTest5.Name"
+                               invariant="ProviderTest5.InvariantName"
+                               support="FF"
+                               description="ProviderTest5.Description"
+                               type="ProviderTest5.AssemblyQualifiedName"/>
+                       <remove invariant="ProviderTest5.InvariantName" />
+                       <add name="ProviderTest.Name"
+                               invariant="ProviderTest.InvariantName"
+                               support="FF"
+                               description="ProviderTest.Description"
+                               type="ProviderTest.AssemblyQualifiedName"/>
+               </DbProviderFactories>
+       </system.data_test>
+       <connectionStrings_test>
+               <add name="Publications" providerName="System.Data.SqlClient" 
+                       connectionString="Data Source=MyServer;Initial Catalog=pubs;integrated security=SSPI" />
+       </connectionStrings_test>
+</configuration>
index 59ff776b9f1ccbf1bb35ea36e60206a59417782f..e815bbf4afb76ab33d200014641888020c38484d 100644 (file)
@@ -5,7 +5,7 @@ SUBDIRS =
 LIBRARY = System.Drawing.dll
 
 LIB_REFS = System
-LIB_MCS_FLAGS = /unsafe \
+LIB_MCS_FLAGS = /unsafe -d:FEATURE_TYPECONVERTER \
        -resource:Assembly/Mono.ico,Mono.ico -resource:Assembly/Information.ico,Information.ico \
        -resource:Assembly/Error.ico,Error.ico -resource:Assembly/Warning.ico,Warning.ico \
        -resource:Assembly/Question.ico,Question.ico -resource:Assembly/Shield.ico,Shield.ico
index 88a8390b564906d2f34fc3785f8393481fd9dbc0..53f9568067a9c89753e9819535766698858c3661 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Drawing
 {
        [Serializable]  
        [ComVisible (true)]
-#if !MONOTOUCH && !MONOMAC
+#if !MONOTOUCH && !MONOMAC && FEATURE_TYPECONVERTER
        [TypeConverter (typeof (PointConverter))]
 #endif
        public struct Point
index c2ffbc80e5e647b589ed5aec55c96c1fb0703439..0d1194675b223e54710ff551d3e8644ec9471b95 100644 (file)
@@ -39,7 +39,7 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
-#if !MONOTOUCH && !MONOMAC
+#if !MONOTOUCH && !MONOMAC && FEATURE_TYPECONVERTER
        [TypeConverter (typeof (RectangleConverter))]
 #endif
        public struct Rectangle
index be8fda0ea8ef0b73bf815febb8e8d4e025eab3aa..3c657dc29f26a1836d132f075f63cf4d004f1949 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
-#if !MONOTOUCH && !MONOMAC
+#if !MONOTOUCH && !MONOMAC && FEATURE_TYPECONVERTER
        [TypeConverter (typeof (SizeConverter))]
 #endif
        public struct Size
index 38714d1c9968f30ae18e363a4c811a82dc38de99..922ab4e35e29dc35378e9a66c8d78e019962f23a 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
-#if !MONOTOUCH && !MONOMAC
+#if !MONOTOUCH && !MONOMAC && FEATURE_TYPECONVERTER
        [TypeConverter (typeof (SizeFConverter))]
 #endif
        public struct SizeF
index 96af8c4131db2de4bf4b2d0d0b949f2ca6af6278..f844e5cb47158fff394b67ffc0c2454855b3f16f 100644 (file)
@@ -82,10 +82,14 @@ namespace SharpCompress.Archive
             {
                 key = key.Substring(1);
             }
+            // .NET allows duplicate entries when saving and loading Zip files.
+            // The following lines are disabled from upstream SharpCompress to allow this.
+#if ZIP_ALLOW_DUPLICATE_KEYS
             if (DoesKeyMatchExisting(key))
             {
                 throw new ArchiveException("Cannot add entry with duplicate key: " + key);
             }
+#endif
             var entry = CreateEntry(key, source, size, modified, closeStream);
             newEntries.Add(entry);
             RebuildModifiedCollection();
@@ -101,7 +105,8 @@ namespace SharpCompress.Archive
                 {
                     p = p.Substring(1);
                 }
-                return string.Equals(p, key, StringComparison.OrdinalIgnoreCase);
+                if (string.Equals(p, key, StringComparison.OrdinalIgnoreCase))
+                    return true;
             }
             return false;
         }
index 121a6b311302ba0d125c6fa1b35a64fda25272d6..37cf1fcf7a85fabfbb2c5b702efb02500e71d687 100644 (file)
@@ -32,5 +32,10 @@ namespace SharpCompress.Archive.Zip
         {
             get { return (Parts.Single() as SeekableZipFilePart).Comment; }
         }
+
+        public override string ToString()
+        {
+            return this.Key;
+        }
     }
 }
\ No newline at end of file
index 6ed742eeca357f3d356466d2f7e36f4b27cd1ec7..2c0ec07e78426d580f3fcd29f61e4f53e8cb6106 100644 (file)
@@ -16,6 +16,13 @@ namespace SharpCompress.Common.Zip
                 this.filePart = filePart;
                 lastModifiedTime = Utility.DosDateToDateTime(filePart.Header.LastModifiedDate,
                                                              filePart.Header.LastModifiedTime);
+                if (lastModifiedTime == default(DateTime))
+                {
+                    // On .NET on Windows, for zip entries that don't have a last write time,
+                    // the return value for ZipArchiveEntry.LastWriteTime is:
+                    //   1/1/1980 12:00:00 AM, Ticks=624511296000000000
+                    lastModifiedTime = new DateTime(624511296000000000);
+                }
             }
         }
 
index 1393dd6c70c4fc9c8ae9b2bf9fa8e0cf6647d11d..05c89d3719423914db872f1aba03314a22e883c7 100644 (file)
@@ -16,6 +16,7 @@ namespace SharpCompress.IO
             {
                 stream.Position = origin.Value;
             }
+            length = bytesToRead;
             BytesLeftToRead = bytesToRead;
         }
 
@@ -27,6 +28,8 @@ namespace SharpCompress.IO
             }
         }
 
+        private long length;
+
         private long BytesLeftToRead { get; set; }
 
         public Stream Stream { get; private set; }
@@ -53,12 +56,12 @@ namespace SharpCompress.IO
 
         public override long Length
         {
-            get { throw new System.NotImplementedException(); }
+            get { return length; }
         }
 
         public override long Position
         {
-            get { throw new System.NotImplementedException(); }
+            get { return Length - BytesLeftToRead; }
             set { throw new System.NotImplementedException(); }
         }
 
index 5060897cb9abf3b3fa7ceb7419e65d548f5e1def..fb58a3c1fbb160c87c9e1812ed920b97db19ab73 100644 (file)
@@ -22,7 +22,7 @@ namespace SharpCompress.Writer.Zip
             byte[] encodedFilename = Encoding.UTF8.GetBytes(FileName);
             byte[] encodedComment = Encoding.UTF8.GetBytes(Comment);
 
-            outputStream.Write(new byte[] {80, 75, 1, 2, 0x14, 0, 0x0A, 0}, 0, 8);
+            outputStream.Write(new byte[] {80, 75, 1, 2, 0x14, 0, 0x14, 0}, 0, 8);
             HeaderFlags flags = HeaderFlags.UTF8;
             if (!outputStream.CanSeek)
             {
index d461600299ffbbb1ee8e883897fd10787bd22ff9..2d03d559d4e08d402254d2a9d739f0c290484f35 100644 (file)
@@ -263,6 +263,56 @@ namespace MonoTests.System.IO.Compression
                        File.Delete ("test.zip");
                }               
 
+               [Test]
+               public void ZipEnumerateArchiveDefaultLastWriteTime()
+               {
+                       using (var archive = new ZipArchive(File.Open("test.nupkg", FileMode.Open),
+                               ZipArchiveMode.Read))
+                       {
+                               var entry = archive.GetEntry("_rels/.rels");
+                               Assert.AreEqual(new DateTime(624511296000000000).Ticks, entry.LastWriteTime.Ticks);
+                               Assert.IsNotNull(entry);
+                       }
+               }
+
+               public void ZipGetArchiveEntryStreamLengthPosition(ZipArchiveMode mode)
+               {
+                       File.Copy("test.nupkg", "test2.nupkg", overwrite: true);
+                       using (var archive = new ZipArchive(File.Open("test2.nupkg", FileMode.Open), mode))
+                       {
+                               var entry = archive.GetEntry("_rels/.rels");
+                               using (var stream = entry.Open())
+                               {
+                                       Assert.AreEqual(0, stream.Position);
+                                       Assert.AreEqual(425, stream.Length);
+                               }
+
+                               // .NET does not support these in Read mode but we do.
+                               var entry2 = archive.GetEntry("modernhttpclient.nuspec");
+                               using (var stream = entry2.Open())
+                               {
+                                       Assert.AreEqual(857, stream.Length);
+                                       if (mode == ZipArchiveMode.Update)
+                                       {
+                                               Assert.AreEqual(0, stream.Position);
+                                       }
+                               }
+                       }
+                       File.Delete ("test2.nupkg");    
+               }
+
+               [Test]
+               public void ZipGetArchiveEntryStreamLengthPositionReadMode()
+               {
+                       ZipGetArchiveEntryStreamLengthPosition(ZipArchiveMode.Read);
+               }
+
+               [Test]
+               public void ZipGetArchiveEntryStreamLengthPositionUpdateMode()
+               {
+                       ZipGetArchiveEntryStreamLengthPosition(ZipArchiveMode.Update);
+               }               
+
                [Test]
                public void ZipEnumerateEntriesReadMode()
                {
@@ -283,6 +333,104 @@ namespace MonoTests.System.IO.Compression
                        File.Delete ("test.zip");
                }
 
+               [Test]
+               public void ZipWriteEntriesUpdateMode()
+               {
+                       File.Copy("archive.zip", "test.zip", overwrite: true);
+                       using (var archive = new ZipArchive(File.Open("test.zip", FileMode.Open),
+                               ZipArchiveMode.Update))
+                       {
+                               var foo = archive.GetEntry("foo.txt");
+                               using (var stream = foo.Open())
+                               using (var sw = new StreamWriter(stream))
+                               {
+                                       sw.Write("TEST");
+                               }
+                       }
+
+                       using (var archive = new ZipArchive(File.Open("test.zip", FileMode.Open),
+                               ZipArchiveMode.Read))
+                       {
+                               var foo = archive.GetEntry("foo.txt");
+                               using (var stream = foo.Open())
+                               using (var sr = new StreamReader(stream))
+                               {
+                                       var line = sr.ReadLine();
+                                       Assert.AreEqual("TEST", line);
+                               }
+                       }
+
+                       File.Delete ("test.zip");
+               }
+
+               [Test]
+               public void ZipWriteEntriesUpdateModeNewEntry()
+               {
+                       var stream = new MemoryStream();
+                       var zipArchive = new ZipArchive(stream, ZipArchiveMode.Update);
+
+                       var newEntry = zipArchive.CreateEntry("testEntry");
+
+                       using (var newStream = newEntry.Open())
+                       {
+                               using (var sw = new StreamWriter(newStream))
+                               {
+                                       sw.Write("TEST");
+                               }
+                       }
+               }
+
+               [Test]
+               public void ZipCreateDuplicateEntriesUpdateMode()
+               {
+                       var stream = new MemoryStream();
+                       using (var zipArchive = new ZipArchive(stream, ZipArchiveMode.Update, true))
+                       {
+                               var e2 = zipArchive.CreateEntry("BBB");
+                               var e3 = zipArchive.CreateEntry("BBB");
+                       }
+
+                       stream.Position = 0;
+                       using (var zipArchive = new ZipArchive(stream, ZipArchiveMode.Read))
+                       {
+                               Assert.AreEqual(2, zipArchive.Entries.Count);
+                       }
+               }
+
+               [Test]
+               public void ZipWriteEntriesUpdateModeNonZeroPosition()
+               {
+                       File.Copy("archive.zip", "test.zip", overwrite: true);
+                       using (var archive = new ZipArchive(File.Open("test.zip", FileMode.Open),
+                               ZipArchiveMode.Update))
+                       {
+                               var foo = archive.GetEntry("foo.txt");
+                               using (var stream = foo.Open())
+                               {
+                                       var line = stream.ReadByte();
+                                       using (var sw = new StreamWriter(stream))
+                                       {
+                                               sw.Write("TEST");
+                                       }
+                               }
+                       }
+
+                       using (var archive = new ZipArchive(File.Open("test.zip", FileMode.Open),
+                               ZipArchiveMode.Read))
+                       {
+                               var entries = archive.Entries;
+                               var foo = archive.GetEntry("foo.txt");
+                               using (var stream = foo.Open())
+                               using (var sr = new StreamReader(stream))
+                               {
+                                       var line = sr.ReadLine();
+                                       Assert.AreEqual("fTEST", line);
+                               }
+                       }
+
+                       File.Delete ("test.zip");
+               }
+
                [Test]
                public void ZipEnumerateEntriesUpdateMode()
                {
@@ -332,5 +480,24 @@ namespace MonoTests.System.IO.Compression
                        }
                        File.Delete ("empty.zip");
                }
+
+               class MyFakeStream : FileStream 
+               {
+                       public MyFakeStream (string path, FileMode mode) : base(path, mode) {}
+
+                       /// <summary>
+                       /// Simulate "CanSeek" is false, which is the case when you are retreiving data from web.
+                       /// </summary>
+                       public override bool CanSeek => false;
+               }
+
+               [Test]
+               public void ZipReadNonSeekableStream()
+               {
+                       var stream = new MyFakeStream("test.nupkg", FileMode.Open);
+                       using (var archive = new ZipArchive (stream, ZipArchiveMode.Read))
+                       {
+                       }
+               }
        }
 }
index f2ef892a910e4432e1331874b5a75c722b4133fc..c1a3df57566020c08cf0509ddfc9f44c097dfe87 100644 (file)
@@ -39,7 +39,7 @@ namespace System.IO.Compression
                internal readonly ZipArchiveMode mode;
                internal Encoding entryNameEncoding;
                internal bool disposed;
-               internal Dictionary<string, ZipArchiveEntry> entries; 
+               internal List<ZipArchiveEntry> entries; 
                internal SharpCompress.Archive.Zip.ZipArchive zipFile;
 
                public ZipArchive (Stream stream)
@@ -49,7 +49,7 @@ namespace System.IO.Compression
 
                        this.stream = stream;
                        mode = ZipArchiveMode.Read;
-                       CreateZip(stream, mode);
+                       CreateZip(mode);
                }
 
                public ZipArchive (Stream stream, ZipArchiveMode mode)
@@ -59,7 +59,7 @@ namespace System.IO.Compression
 
                        this.stream = stream;
                        this.mode = mode;
-                       CreateZip(stream, mode);
+                       CreateZip(mode);
                }
 
                public ZipArchive (Stream stream, ZipArchiveMode mode, bool leaveOpen)
@@ -70,7 +70,7 @@ namespace System.IO.Compression
                        this.stream = stream;
                        this.mode = mode;
                        leaveStreamOpen = leaveOpen;
-                       CreateZip(stream, mode);
+                       CreateZip(mode);
                }
 
                public ZipArchive (Stream stream, ZipArchiveMode mode, bool leaveOpen, Encoding entryNameEncoding)
@@ -82,10 +82,10 @@ namespace System.IO.Compression
                        this.mode = mode;
                        leaveStreamOpen = leaveOpen;
                        this.entryNameEncoding = entryNameEncoding;
-                       CreateZip(stream, mode);
+                       CreateZip(mode);
                }
 
-               private void CreateZip(Stream stream, ZipArchiveMode mode)
+               private void CreateZip(ZipArchiveMode mode)
                {
                        try {
                                if (mode != ZipArchiveMode.Read && mode != ZipArchiveMode.Create && mode != ZipArchiveMode.Update)
@@ -103,6 +103,18 @@ namespace System.IO.Compression
                                if (mode == ZipArchiveMode.Update && (!stream.CanRead || !stream.CanWrite || !stream.CanSeek))
                                        throw new ArgumentException("Stream must support reading, writing and seeking for Update archive mode");
 
+                               // If the stream is not seekable, then buffer it into memory (same behavior as .NET). 
+                               if (mode == ZipArchiveMode.Read && !stream.CanSeek)
+                               {
+                                       var memoryStream = new MemoryStream();
+                                       stream.CopyTo(memoryStream);
+
+                                       if (!leaveStreamOpen)
+                                               stream.Dispose();
+
+                                       this.stream = memoryStream;
+                               }
+
                                try {
                                        zipFile = mode != ZipArchiveMode.Create && stream.Length != 0
                                                ? SharpCompress.Archive.Zip.ZipArchive.Open(stream)
@@ -111,11 +123,11 @@ namespace System.IO.Compression
                                        throw new InvalidDataException("The contents of the stream are not in the zip archive format.", e);
                                }
 
-                               entries = new Dictionary<string, ZipArchiveEntry>();
+                               entries = new List<ZipArchiveEntry>();
                                if (Mode != ZipArchiveMode.Create) {
                                        foreach (var entry in zipFile.Entries) {
                                                var zipEntry = new ZipArchiveEntry(this, entry);
-                                               entries[entry.Key] = zipEntry;
+                                               entries.Add(zipEntry);
                                        }
                                }
                        }
@@ -140,7 +152,7 @@ namespace System.IO.Compression
                                if (entries == null)
                                        return new ReadOnlyCollection<ZipArchiveEntry>(new List<ZipArchiveEntry>());
 
-                               return new ReadOnlyCollection<ZipArchiveEntry>(entries.Values.ToList());
+                               return new ReadOnlyCollection<ZipArchiveEntry>(entries);
                        }
                }
 
@@ -161,6 +173,14 @@ namespace System.IO.Compression
                        return CreateEntry(entryName, CompressionLevel.Optimal);
                }
 
+               internal SharpCompress.Archive.Zip.ZipArchiveEntry CreateEntryInternal(string entryName)
+               {
+                       var memoryStream = new MemoryStream();
+                       var entry = zipFile.AddEntry(entryName, memoryStream);
+
+                       return entry;
+               }
+
                public ZipArchiveEntry CreateEntry (string entryName, CompressionLevel compressionLevel)
                {
                        if (disposed)
@@ -178,10 +198,9 @@ namespace System.IO.Compression
                        if (zipFile == null)
                                throw new InvalidDataException("The zip archive is corrupt, and its entries cannot be retrieved.");
 
-                       var memoryStream = new MemoryStream();
-                       var entry = zipFile.AddEntry(entryName, memoryStream);
-                       var archiveEntry = new ZipArchiveEntry(this, entry);
-                       entries[entryName] = archiveEntry;
+                       var internalEntry = CreateEntryInternal(entryName);
+                       var archiveEntry = new ZipArchiveEntry(this, internalEntry);
+                       entries.Add(archiveEntry);
 
                        return archiveEntry;
                }
@@ -203,7 +222,7 @@ namespace System.IO.Compression
                        if (zipFile == null)
                                throw new InvalidDataException("The zip archive is corrupt, and its entries cannot be retrieved.");
 
-                       return entries.ContainsKey(entryName) ? entries[entryName] : null;
+                       return entries.FirstOrDefault(e => e.FullName == entryName);
                }
 
                private void Save()
index 0bc69786418acd9e49b53a51b51dc7fe2dce320c..9b415fbe6fd6a31487539a655c6a99bbe46b1644 100644 (file)
@@ -32,7 +32,7 @@ namespace System.IO.Compression
        internal class ZipArchiveEntryStream : Stream, IDisposable
        {
                private readonly ZipArchiveEntry entry;
-               private readonly Stream stream;
+               private Stream stream;
 
                public override bool CanRead {
                        get { 
@@ -42,19 +42,19 @@ namespace System.IO.Compression
 
                public override bool CanSeek {
                        get {
-                               return stream.CanSeek;
+                               return entry.Archive.Mode != ZipArchiveMode.Read;
                        }
                }
 
                public override bool CanWrite {
                        get {
-                               return stream.CanWrite;
+                               return entry.Archive.Mode != ZipArchiveMode.Read;
                        }
                }
 
                public override long Length {
                        get {
-                               return stream.Length;
+                               return stream.CanWrite ? stream.Length : entry.Length;
                        }
                }
 
@@ -98,6 +98,34 @@ namespace System.IO.Compression
                        stream.Write(buffer, offset, count);
                }
 
+               internal void EnsureWriteable()
+               {
+                       if (entry.Archive.Mode == ZipArchiveMode.Update && !stream.CanWrite)
+                       {
+                               // Replace the read-only stream with a writeable memory stream.
+                               SetWriteable();
+                       }
+               }
+
+               internal void SetWriteable()
+               {
+                       var archive = entry.Archive;
+
+                       var internalEntry = entry.entry;
+                       var newEntry = archive.CreateEntryInternal(internalEntry.Key);
+                       var newStream = newEntry.OpenEntryStream();
+
+                       var openStream = stream;
+                       openStream.CopyTo(newStream);
+                       openStream.Dispose();
+
+                       newStream.Position = 0;
+
+                       archive.zipFile.RemoveEntry(internalEntry);
+                       entry.entry = newEntry;
+                       stream = newStream;
+               }
+
                public new void Dispose()
                {
                        Dispose(true);
@@ -117,8 +145,9 @@ namespace System.IO.Compression
 
        public class ZipArchiveEntry
        {
-               readonly SharpCompress.Archive.Zip.ZipArchiveEntry entry;
+               internal SharpCompress.Archive.Zip.ZipArchiveEntry entry;
                internal ZipArchiveEntryStream openStream;
+        internal bool wasWritten;
                private bool wasDeleted;
 
                internal ZipArchiveEntry(ZipArchive     archive, SharpCompress.Archive.Zip.ZipArchiveEntry entry)
@@ -174,7 +203,7 @@ namespace System.IO.Compression
                        if (Archive.disposed)
                                throw new ObjectDisposedException("The zip archive for this entry has been disposed.");
 
-                       if (Archive.Mode !=     ZipArchiveMode.Update)
+                       if (Archive.Mode != ZipArchiveMode.Update)
                                throw new NotSupportedException("The zip archive for this entry was opened in a mode other than Update.");
 
                        if (openStream != null)
@@ -198,9 +227,16 @@ namespace System.IO.Compression
                        if (Archive.Mode == ZipArchiveMode.Create && openStream != null)
                                throw new IOException("The archive for this entry was opened with the Create mode, and this entry has already been written to.");
 
-                       openStream = new ZipArchiveEntryStream(this, entry.OpenEntryStream());
+                       var entryStream = entry.OpenEntryStream();
+                       openStream = new ZipArchiveEntryStream(this, entryStream);
+                       openStream.EnsureWriteable();
 
                        return openStream;
                }
+
+               public override string ToString()
+               {
+                       return FullName;
+               }
        }
 }
diff --git a/mcs/class/System.IO.Compression/test.nupkg b/mcs/class/System.IO.Compression/test.nupkg
new file mode 100644 (file)
index 0000000..0a7fe05
Binary files /dev/null and b/mcs/class/System.IO.Compression/test.nupkg differ
index 2d13a176b82062e17226712e87b4dada3555eca8..56c51c6330d93cd5a7c0dfa05716bdf170d4eb85 100644 (file)
@@ -2,14 +2,11 @@ thisdir = class/System.Json.Microsoft
 SUBDIRS = 
 include ../../build/rules.make
 
-System.Json/Properties/Resources.resources: System.Json/Properties/Resources.resx
-       $(RESGEN) "$<" "$@"
+RESOURCE_DEFS = System.Json.Properties.Resources,System.Json/Properties/Resources.resx
 
 LIBRARY = System.Json.Microsoft.dll
 LIB_REFS = System System.Xml System.Core System.Runtime.Serialization
-LIB_MCS_FLAGS = /d:ASPNETMVC -keyfile:../winfx.pub -delaysign \
-               /resource:System.Json/Properties/Resources.resources,System.Json.Properties.Resources.resources
-
+LIB_MCS_FLAGS = /d:ASPNETMVC -keyfile:../winfx.pub -delaysign 
 EXTRA_DISTFILES = System.Json/Properties/Resources.resx
 
 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
@@ -24,5 +21,3 @@ endif
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 include ../../build/library.make
-
-$(the_lib): System.Json/Properties/Resources.resources
index 1f7a48e137fa0774445e41b9748978bbc29b8a14..136d3cc0f0f60f82bbb5d4a99d7c281a053c8537 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-cp $(ProjectDir)\System.Json\Properties\Resources.resx System.Json.Properties.Resources.resx
+
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-cp $(ProjectDir)\System.Json\Properties\Resources.resx System.Json.Properties.Resources.resx\r
+\r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 
index e6bee285bd1b640de15d29342c9b9f12a62b72a0..43895c07c86e10ac9da418cf287010265cde4310 100644 (file)
@@ -4,19 +4,12 @@ include ../../build/rules.make
 
 LIBRARY = System.Net.Http.Formatting.dll
 
-System.Net.Http.Properties.CommonWebApiResources.resources: ../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx
-       $(RESGEN) "$<" "$@"
+RESOURCE_DEFS = \
+       System.Net.Http.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx \
+       System.Net.Http.Properties.Resources,../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.resx
 
-System.Net.Http.Properties.Resources.resources: ../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.resx
-       $(RESGEN) "$<" "$@"
 
 LIB_REFS = System.Core System System.Net.Http System.Xml System.Runtime.Serialization System.Xml.Linq System.Data System.Configuration
-LIB_MCS_FLAGS = \
-               -d:ASPNETMVC -keyfile:../winfx.pub -delaysign \
-               -resource:System.Net.Http.Properties.CommonWebApiResources.resources \
-               -resource:System.Net.Http.Properties.Resources.resources
+LIB_MCS_FLAGS = -d:ASPNETMVC -keyfile:../winfx.pub -delaysign 
 
 include ../../build/library.make
-
-$(the_lib): System.Net.Http.Properties.CommonWebApiResources.resources \
-       System.Net.Http.Properties.Resources.resources
index 9a5218b298bbfcb69eec94da58280ccb9a99383e..f987c65b4e4ef67b74ca0df3da3e416ea08872d0 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx $(ProjectDir)/System.Net.Http.Properties.CommonWebApiResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.resx $(ProjectDir)/System.Net.Http.Properties.Resources.resx
 
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx $(ProjectDir)/System.Net.Http.Properties.CommonWebApiResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.resx $(ProjectDir)/System.Net.Http.Properties.Resources.resx
 \r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
@@ -357,10 +353,10 @@ cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Net.Http.Formatting
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Net.Http.Properties.CommonWebApiResources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx">\r
       <LogicalName>System.Net.Http.Properties.CommonWebApiResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Net.Http.Properties.Resources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.resx">\r
       <LogicalName>System.Net.Http.Properties.Resources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/Assembly/AssemblyInfo.cs b/mcs/class/System.Net.Http.WinHttpHandler/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..d477aee
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Net.Http.WinHttpHandler.dll")]
+[assembly: AssemblyDescription ("System.Net.Http.WinHttpHandler.dll")]
+[assembly: AssemblyDefaultAlias ("System.Net.Http.WinHttpHandler.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/Makefile b/mcs/class/System.Net.Http.WinHttpHandler/Makefile
new file mode 100644 (file)
index 0000000..55b07ff
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Net.Http.WinHttpHandler
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Net.Http.WinHttpHandler.dll
+LIB_REFS = System System.Net.Http
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.dll.sources b/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.dll.sources
new file mode 100644 (file)
index 0000000..97feb39
--- /dev/null
@@ -0,0 +1,8 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+
+System.Net.Http/CookieUsePolicy.cs
+System.Net.Http/WindowsProxyUsePolicy.cs
+System.Net.Http/WinHttpHandler.cs
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/CookieUsePolicy.cs b/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/CookieUsePolicy.cs
new file mode 100644 (file)
index 0000000..f27cb2c
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// CookieUsePolicy.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Net.Http
+{
+       public enum CookieUsePolicy
+       {
+               IgnoreCookies = 0,
+               UseInternalCookieStoreOnly = 1,
+               UseSpecifiedCookieContainer = 2,
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WinHttpHandler.cs b/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WinHttpHandler.cs
new file mode 100644 (file)
index 0000000..e2db5f6
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// WinHttpHandler.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using System.Net.Security;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.Net.Http
+{
+       public class WinHttpHandler : HttpMessageHandler
+       {
+               public WinHttpHandler() { throw new PlatformNotSupportedException (); }
+
+               public DecompressionMethods AutomaticDecompression { get { throw new PlatformNotSupportedException ();  } set { throw new PlatformNotSupportedException (); } }
+
+               public bool AutomaticRedirection { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public bool CheckCertificateRevocationList { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public ClientCertificateOption ClientCertificateOption { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public X509Certificate2Collection ClientCertificates { get { throw new PlatformNotSupportedException (); } }
+
+               public CookieContainer CookieContainer { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public CookieUsePolicy CookieUsePolicy { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public ICredentials DefaultProxyCredentials { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public int MaxAutomaticRedirections { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public int MaxConnectionsPerServer { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public int MaxResponseDrainSize { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public int MaxResponseHeadersLength { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public bool PreAuthenticate { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public IDictionary<string, object> Properties { get { throw new PlatformNotSupportedException (); } }
+
+               public IWebProxy Proxy { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public TimeSpan ReceiveDataTimeout { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public TimeSpan ReceiveHeadersTimeout { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public TimeSpan SendTimeout { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateValidationCallback { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public ICredentials ServerCredentials { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public SslProtocols SslProtocols { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public WindowsProxyUsePolicy WindowsProxyUsePolicy { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               protected override void Dispose (bool disposing) { throw new PlatformNotSupportedException (); }
+
+               protected override Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, Threading.CancellationToken cancellationToken) { throw new PlatformNotSupportedException (); }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WindowsProxyUsePolicy.cs b/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WindowsProxyUsePolicy.cs
new file mode 100644 (file)
index 0000000..48de6bb
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// WindowsProxyUsePolicy.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Net.Http
+{
+       public enum WindowsProxyUsePolicy
+       {
+               DoNotUseProxy = 0,
+               UseCustomProxy = 3,
+               UseWinHttpProxy = 1,
+               UseWinInetProxy = 2,
+       }
+}
\ No newline at end of file
index 2b9a54d7fdc0000eddd99e1658c42c983ed26a63..6daf9e10a279d7ea4e3092d07dbb97036b3ba1ed 100644 (file)
@@ -100,7 +100,7 @@ namespace System.Net.Http
 
                public CookieContainer CookieContainer {
                        get {
-                               return cookies;
+                               return cookies ?? (cookies = new CookieContainer ());
                        }
                        set {
                                EnsureModifiability ();
diff --git a/mcs/class/System.Numerics.Vectors/Assembly/TypeForwarders.cs b/mcs/class/System.Numerics.Vectors/Assembly/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..b2929d8
--- /dev/null
@@ -0,0 +1,36 @@
+//
+// TypeForwarders.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2011 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System.Numerics;
+using System.Runtime.CompilerServices;
+
+[assembly: TypeForwardedTo(typeof(Matrix3x2))]
+[assembly: TypeForwardedTo(typeof(Matrix4x4))]
+[assembly: TypeForwardedTo(typeof(Plane))]
+[assembly: TypeForwardedTo(typeof(Quaternion))]
+[assembly: TypeForwardedTo(typeof(Vector2))]
+[assembly: TypeForwardedTo(typeof(Vector3))]
+[assembly: TypeForwardedTo(typeof(Vector4))]
index f5ff0937ead8a08e5a225e4973a4b96f8ed94dc6..42fb194dbfb9e8b675f08bbeb0b63bfb9ce1d3d0 100644 (file)
@@ -3,8 +3,8 @@ SUBDIRS =
 include ../../build/rules.make
 
 LIBRARY = System.Numerics.Vectors.dll
-LIB_REFS = System
-LIB_MCS_FLAGS =
+LIB_REFS = System System.Numerics
+LIB_MCS_FLAGS = -unsafe
 
 EXTRA_DISTFILES =
 
diff --git a/mcs/class/System.Numerics.Vectors/SR.cs b/mcs/class/System.Numerics.Vectors/SR.cs
new file mode 100644 (file)
index 0000000..72e9cfb
--- /dev/null
@@ -0,0 +1,17 @@
+// generated from Strings.resx in corefx
+
+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.";
+
+       public static string Format (string message, object data)
+       {
+               return string.Format (message, data);
+       }
+}
index 45b755ee19b43a81d67982f0855f0b4effa95340..01bdfc1724e2fd772bf1fd4b25f18ede8bbe7375 100644 (file)
@@ -1,3 +1,11 @@
 ../../build/common/Consts.cs
 ../../build/common/SR.cs
 Assembly/AssemblyInfo.cs
+Assembly/TypeForwarders.cs
+SR.cs
+System.Numerics/ConstantHelper.cs
+System.Numerics/HashCodeHelper.cs
+System.Numerics/JitIntrinsicAttribute.cs
+System.Numerics/Register.cs
+System.Numerics/Vector_Operations.cs
+System.Numerics/Vector.cs
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/ConstantHelper.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/ConstantHelper.cs
new file mode 100644 (file)
index 0000000..ea32ed3
--- /dev/null
@@ -0,0 +1,142 @@
+// 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.
+
+using System.Runtime.CompilerServices;
+
+namespace System.Numerics
+{
+    internal class ConstantHelper
+    {
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Byte GetByteWithAllBitsSet()
+        {
+            Byte value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Byte*)&value) = (Byte)0xff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static SByte GetSByteWithAllBitsSet()
+        {
+            SByte value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((SByte*)&value) = (SByte)0xff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static UInt16 GetUInt16WithAllBitsSet()
+        {
+            UInt16 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((UInt16*)&value) = (UInt16)0xffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Int16 GetInt16WithAllBitsSet()
+        {
+            Int16 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int16*)&value) = (Int16)0xffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static UInt32 GetUInt32WithAllBitsSet()
+        {
+            UInt32 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((UInt32*)&value) = (UInt32)0xffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Int32 GetInt32WithAllBitsSet()
+        {
+            Int32 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int32*)&value) = (Int32)0xffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static UInt64 GetUInt64WithAllBitsSet()
+        {
+            UInt64 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((UInt64*)&value) = (UInt64)0xffffffffffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Int64 GetInt64WithAllBitsSet()
+        {
+            Int64 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int64*)&value) = (Int64)0xffffffffffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Single GetSingleWithAllBitsSet()
+        {
+            Single value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int32*)&value) = (Int32)0xffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Double GetDoubleWithAllBitsSet()
+        {
+            Double value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int64*)&value) = (Int64)0xffffffffffffffff;
+                }
+            }
+            return value;
+        }
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/HashCodeHelper.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/HashCodeHelper.cs
new file mode 100644 (file)
index 0000000..1467e2f
--- /dev/null
@@ -0,0 +1,17 @@
+// 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.
+
+namespace System.Numerics
+{
+    internal static class HashCodeHelper
+    {
+        /// <summary>
+        /// Combines two hash codes, useful for combining hash codes of individual vector elements
+        /// </summary>
+        internal static int CombineHashCodes(int h1, int h2)
+        {
+            return (((h1 << 5) + h1) ^ h2);
+        }
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/JitIntrinsicAttribute.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/JitIntrinsicAttribute.cs
new file mode 100644 (file)
index 0000000..7410412
--- /dev/null
@@ -0,0 +1,14 @@
+// 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.
+
+namespace System.Numerics
+{
+    /// <summary>
+    /// An attribute that can be attached to JIT Intrinsic methods/properties
+    /// </summary>
+    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property)]
+    internal class JitIntrinsicAttribute : Attribute
+    {
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/Register.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/Register.cs
new file mode 100644 (file)
index 0000000..a27e922
--- /dev/null
@@ -0,0 +1,172 @@
+// 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.
+
+using System.Runtime.InteropServices;
+
+namespace System.Numerics
+{
+    /// <summary>
+    /// A structure describing the layout of an SSE2-sized register.
+    /// Contains overlapping fields representing the set of valid numeric types.
+    /// Allows the generic Vector'T struct to contain an explicit field layout.
+    /// </summary>
+    [StructLayout(LayoutKind.Explicit)]
+    internal struct Register
+    {
+        #region Internal Storage Fields
+        // Internal System.Byte Fields
+        [FieldOffset(0)]
+        internal Byte byte_0;
+        [FieldOffset(1)]
+        internal Byte byte_1;
+        [FieldOffset(2)]
+        internal Byte byte_2;
+        [FieldOffset(3)]
+        internal Byte byte_3;
+        [FieldOffset(4)]
+        internal Byte byte_4;
+        [FieldOffset(5)]
+        internal Byte byte_5;
+        [FieldOffset(6)]
+        internal Byte byte_6;
+        [FieldOffset(7)]
+        internal Byte byte_7;
+        [FieldOffset(8)]
+        internal Byte byte_8;
+        [FieldOffset(9)]
+        internal Byte byte_9;
+        [FieldOffset(10)]
+        internal Byte byte_10;
+        [FieldOffset(11)]
+        internal Byte byte_11;
+        [FieldOffset(12)]
+        internal Byte byte_12;
+        [FieldOffset(13)]
+        internal Byte byte_13;
+        [FieldOffset(14)]
+        internal Byte byte_14;
+        [FieldOffset(15)]
+        internal Byte byte_15;
+
+        // Internal System.SByte Fields
+        [FieldOffset(0)]
+        internal SByte sbyte_0;
+        [FieldOffset(1)]
+        internal SByte sbyte_1;
+        [FieldOffset(2)]
+        internal SByte sbyte_2;
+        [FieldOffset(3)]
+        internal SByte sbyte_3;
+        [FieldOffset(4)]
+        internal SByte sbyte_4;
+        [FieldOffset(5)]
+        internal SByte sbyte_5;
+        [FieldOffset(6)]
+        internal SByte sbyte_6;
+        [FieldOffset(7)]
+        internal SByte sbyte_7;
+        [FieldOffset(8)]
+        internal SByte sbyte_8;
+        [FieldOffset(9)]
+        internal SByte sbyte_9;
+        [FieldOffset(10)]
+        internal SByte sbyte_10;
+        [FieldOffset(11)]
+        internal SByte sbyte_11;
+        [FieldOffset(12)]
+        internal SByte sbyte_12;
+        [FieldOffset(13)]
+        internal SByte sbyte_13;
+        [FieldOffset(14)]
+        internal SByte sbyte_14;
+        [FieldOffset(15)]
+        internal SByte sbyte_15;
+
+        // Internal System.UInt16 Fields
+        [FieldOffset(0)]
+        internal UInt16 uint16_0;
+        [FieldOffset(2)]
+        internal UInt16 uint16_1;
+        [FieldOffset(4)]
+        internal UInt16 uint16_2;
+        [FieldOffset(6)]
+        internal UInt16 uint16_3;
+        [FieldOffset(8)]
+        internal UInt16 uint16_4;
+        [FieldOffset(10)]
+        internal UInt16 uint16_5;
+        [FieldOffset(12)]
+        internal UInt16 uint16_6;
+        [FieldOffset(14)]
+        internal UInt16 uint16_7;
+
+        // Internal System.Int16 Fields
+        [FieldOffset(0)]
+        internal Int16 int16_0;
+        [FieldOffset(2)]
+        internal Int16 int16_1;
+        [FieldOffset(4)]
+        internal Int16 int16_2;
+        [FieldOffset(6)]
+        internal Int16 int16_3;
+        [FieldOffset(8)]
+        internal Int16 int16_4;
+        [FieldOffset(10)]
+        internal Int16 int16_5;
+        [FieldOffset(12)]
+        internal Int16 int16_6;
+        [FieldOffset(14)]
+        internal Int16 int16_7;
+
+        // Internal System.UInt32 Fields
+        [FieldOffset(0)]
+        internal UInt32 uint32_0;
+        [FieldOffset(4)]
+        internal UInt32 uint32_1;
+        [FieldOffset(8)]
+        internal UInt32 uint32_2;
+        [FieldOffset(12)]
+        internal UInt32 uint32_3;
+
+        // Internal System.Int32 Fields
+        [FieldOffset(0)]
+        internal Int32 int32_0;
+        [FieldOffset(4)]
+        internal Int32 int32_1;
+        [FieldOffset(8)]
+        internal Int32 int32_2;
+        [FieldOffset(12)]
+        internal Int32 int32_3;
+
+        // Internal System.UInt64 Fields
+        [FieldOffset(0)]
+        internal UInt64 uint64_0;
+        [FieldOffset(8)]
+        internal UInt64 uint64_1;
+
+        // Internal System.Int64 Fields
+        [FieldOffset(0)]
+        internal Int64 int64_0;
+        [FieldOffset(8)]
+        internal Int64 int64_1;
+
+        // Internal System.Single Fields
+        [FieldOffset(0)]
+        internal Single single_0;
+        [FieldOffset(4)]
+        internal Single single_1;
+        [FieldOffset(8)]
+        internal Single single_2;
+        [FieldOffset(12)]
+        internal Single single_3;
+
+        // Internal System.Double Fields
+        [FieldOffset(0)]
+        internal Double double_0;
+        [FieldOffset(8)]
+        internal Double double_1;
+
+        #endregion Internal Storage Fields
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/Vector.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/Vector.cs
new file mode 100644 (file)
index 0000000..13785ed
--- /dev/null
@@ -0,0 +1,5002 @@
+// 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.
+
+using System.Diagnostics.Contracts;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace System.Numerics
+{
+    /* Note: The following patterns are used throughout the code here and are described here
+    *
+    * PATTERN:
+    *    if (typeof(T) == typeof(Int32)) { ... }
+    *    else if (typeof(T) == typeof(Single)) { ... }
+    * EXPLANATION:
+    *    At runtime, each instantiation of Vector<T> will be type-specific, and each of these typeof blocks will be eliminated,
+    *    as typeof(T) is a (JIT) compile-time constant for each instantiation. This design was chosen to eliminate any overhead from
+    *    delegates and other patterns.
+    *
+    * PATTERN:
+    *    if (Vector.IsHardwareAccelerated) { ... }
+    *    else { ... }
+    * EXPLANATION
+    *    This pattern solves two problems:
+    *        1. Allows us to unroll loops when we know the size (when no hardware acceleration is present)
+    *        2. Allows reflection to work:
+    *            - If a method is called via reflection, it will not be "intrinsified", which would cause issues if we did
+    *              not provide an implementation for that case (i.e. if it only included a case which assumed 16-byte registers)
+    *    (NOTE: It is assumed that Vector.IsHardwareAccelerated will be a compile-time constant, eliminating these checks
+    *        from the JIT'd code.)
+    *
+    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+    /// <summary>
+    /// A structure that represents a single Vector. The count of this Vector is fixed but CPU register dependent.
+    /// This struct only supports numerical types. This type is intended to be used as a building block for vectorizing
+    /// large algorithms. This type is immutable, individual elements cannot be modified.
+    /// </summary>
+    public struct Vector<T> : IEquatable<Vector<T>>, IFormattable where T : struct
+    {
+        #region Fields
+        private Register register;
+        #endregion Fields
+
+        #region Static Members
+        /// <summary>
+        /// Returns the number of elements stored in the vector. This value is hardware dependent.
+        /// </summary>
+        [JitIntrinsic]
+        public static int Count
+        {
+            get
+            {
+                return s_count;
+            }
+        }
+        private static readonly int s_count = InitializeCount();
+
+        /// <summary>
+        /// Returns a vector containing all zeroes.
+        /// </summary>
+        [JitIntrinsic]
+        public static Vector<T> Zero { get { return zero; } }
+        private static readonly Vector<T> zero = new Vector<T>(GetZeroValue());
+
+        /// <summary>
+        /// Returns a vector containing all ones.
+        /// </summary>
+        [JitIntrinsic]
+        public static Vector<T> One { get { return one; } }
+        private static readonly Vector<T> one = new Vector<T>(GetOneValue());
+
+        internal static Vector<T> AllOnes { get { return allOnes; } }
+        private static readonly Vector<T> allOnes = new Vector<T>(GetAllBitsSetValue());
+        #endregion Static Members
+
+        #region Static Initialization
+        private struct VectorSizeHelper
+        {
+            internal Vector<T> _placeholder;
+            internal byte _byte;
+        }
+
+               // Calculates the size of this struct in bytes, by computing the offset of a field in a structure
+        private static unsafe int InitializeCount()
+        {
+            VectorSizeHelper vsh;
+            byte* vectorBase = &vsh._placeholder.register.byte_0;
+            byte* byteBase = &vsh._byte;
+            int vectorSizeInBytes = (int)(byteBase - vectorBase);
+
+            int typeSizeInBytes = -1;
+            if (typeof(T) == typeof(Byte))
+            {
+                typeSizeInBytes = sizeof(Byte);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                typeSizeInBytes = sizeof(SByte);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                typeSizeInBytes = sizeof(UInt16);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                typeSizeInBytes = sizeof(Int16);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                typeSizeInBytes = sizeof(UInt32);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                typeSizeInBytes = sizeof(Int32);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                typeSizeInBytes = sizeof(UInt64);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                typeSizeInBytes = sizeof(Int64);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                typeSizeInBytes = sizeof(Single);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                typeSizeInBytes = sizeof(Double);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+
+            return vectorSizeInBytes / typeSizeInBytes;
+        }
+        #endregion Static Initialization
+
+        #region Constructors
+        /// <summary>
+        /// Constructs a vector whose components are all <code>value</code>
+        /// </summary>
+        [JitIntrinsic]
+        public unsafe Vector(T value)
+            : this()
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    fixed (Byte* basePtr = &this.register.byte_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Byte)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    fixed (SByte* basePtr = &this.register.sbyte_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (SByte)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    fixed (UInt16* basePtr = &this.register.uint16_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt16)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    fixed (Int16* basePtr = &this.register.int16_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int16)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    fixed (UInt32* basePtr = &this.register.uint32_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt32)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    fixed (Int32* basePtr = &this.register.int32_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int32)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    fixed (UInt64* basePtr = &this.register.uint64_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt64)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    fixed (Int64* basePtr = &this.register.int64_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int64)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    fixed (Single* basePtr = &this.register.single_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Single)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    fixed (Double* basePtr = &this.register.double_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Double)(object)value;
+                        }
+                    }
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    register.byte_0 = (Byte)(object)value;
+                    register.byte_1 = (Byte)(object)value;
+                    register.byte_2 = (Byte)(object)value;
+                    register.byte_3 = (Byte)(object)value;
+                    register.byte_4 = (Byte)(object)value;
+                    register.byte_5 = (Byte)(object)value;
+                    register.byte_6 = (Byte)(object)value;
+                    register.byte_7 = (Byte)(object)value;
+                    register.byte_8 = (Byte)(object)value;
+                    register.byte_9 = (Byte)(object)value;
+                    register.byte_10 = (Byte)(object)value;
+                    register.byte_11 = (Byte)(object)value;
+                    register.byte_12 = (Byte)(object)value;
+                    register.byte_13 = (Byte)(object)value;
+                    register.byte_14 = (Byte)(object)value;
+                    register.byte_15 = (Byte)(object)value;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    register.sbyte_0 = (SByte)(object)value;
+                    register.sbyte_1 = (SByte)(object)value;
+                    register.sbyte_2 = (SByte)(object)value;
+                    register.sbyte_3 = (SByte)(object)value;
+                    register.sbyte_4 = (SByte)(object)value;
+                    register.sbyte_5 = (SByte)(object)value;
+                    register.sbyte_6 = (SByte)(object)value;
+                    register.sbyte_7 = (SByte)(object)value;
+                    register.sbyte_8 = (SByte)(object)value;
+                    register.sbyte_9 = (SByte)(object)value;
+                    register.sbyte_10 = (SByte)(object)value;
+                    register.sbyte_11 = (SByte)(object)value;
+                    register.sbyte_12 = (SByte)(object)value;
+                    register.sbyte_13 = (SByte)(object)value;
+                    register.sbyte_14 = (SByte)(object)value;
+                    register.sbyte_15 = (SByte)(object)value;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    register.uint16_0 = (UInt16)(object)value;
+                    register.uint16_1 = (UInt16)(object)value;
+                    register.uint16_2 = (UInt16)(object)value;
+                    register.uint16_3 = (UInt16)(object)value;
+                    register.uint16_4 = (UInt16)(object)value;
+                    register.uint16_5 = (UInt16)(object)value;
+                    register.uint16_6 = (UInt16)(object)value;
+                    register.uint16_7 = (UInt16)(object)value;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    register.int16_0 = (Int16)(object)value;
+                    register.int16_1 = (Int16)(object)value;
+                    register.int16_2 = (Int16)(object)value;
+                    register.int16_3 = (Int16)(object)value;
+                    register.int16_4 = (Int16)(object)value;
+                    register.int16_5 = (Int16)(object)value;
+                    register.int16_6 = (Int16)(object)value;
+                    register.int16_7 = (Int16)(object)value;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    register.uint32_0 = (UInt32)(object)value;
+                    register.uint32_1 = (UInt32)(object)value;
+                    register.uint32_2 = (UInt32)(object)value;
+                    register.uint32_3 = (UInt32)(object)value;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    register.int32_0 = (Int32)(object)value;
+                    register.int32_1 = (Int32)(object)value;
+                    register.int32_2 = (Int32)(object)value;
+                    register.int32_3 = (Int32)(object)value;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    register.uint64_0 = (UInt64)(object)value;
+                    register.uint64_1 = (UInt64)(object)value;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    register.int64_0 = (Int64)(object)value;
+                    register.int64_1 = (Int64)(object)value;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    register.single_0 = (Single)(object)value;
+                    register.single_1 = (Single)(object)value;
+                    register.single_2 = (Single)(object)value;
+                    register.single_3 = (Single)(object)value;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    register.double_0 = (Double)(object)value;
+                    register.double_1 = (Double)(object)value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Constructs a vector from the given array. The size of the given array must be at least Vector'T.Count.
+        /// </summary>
+        [JitIntrinsic]
+        public unsafe Vector(T[] values) : this(values, 0) { }
+
+        /// <summary>
+        /// Constructs a vector from the given array, starting from the given index.
+        /// The array must contain at least Vector'T.Count from the given index.
+        /// </summary>
+        public unsafe Vector(T[] values, int index)
+            : this()
+        {
+            if (values == null)
+            {
+                // Match the JIT's exception type here. For perf, a NullReference is thrown instead of an ArgumentNull.
+                throw new NullReferenceException(SR.Arg_NullArgumentNullRef);
+            }
+            if (index < 0 || (values.Length - index) < Count)
+            {
+                throw new IndexOutOfRangeException();
+            }
+
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    fixed (Byte* basePtr = &this.register.byte_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Byte)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    fixed (SByte* basePtr = &this.register.sbyte_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (SByte)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    fixed (UInt16* basePtr = &this.register.uint16_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt16)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    fixed (Int16* basePtr = &this.register.int16_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int16)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    fixed (UInt32* basePtr = &this.register.uint32_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt32)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    fixed (Int32* basePtr = &this.register.int32_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int32)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    fixed (UInt64* basePtr = &this.register.uint64_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt64)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    fixed (Int64* basePtr = &this.register.int64_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int64)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    fixed (Single* basePtr = &this.register.single_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Single)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    fixed (Double* basePtr = &this.register.double_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Double)(object)values[g + index];
+                        }
+                    }
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    fixed (Byte* basePtr = &this.register.byte_0)
+                    {
+                        *(basePtr + 0) = (Byte)(object)values[0 + index];
+                        *(basePtr + 1) = (Byte)(object)values[1 + index];
+                        *(basePtr + 2) = (Byte)(object)values[2 + index];
+                        *(basePtr + 3) = (Byte)(object)values[3 + index];
+                        *(basePtr + 4) = (Byte)(object)values[4 + index];
+                        *(basePtr + 5) = (Byte)(object)values[5 + index];
+                        *(basePtr + 6) = (Byte)(object)values[6 + index];
+                        *(basePtr + 7) = (Byte)(object)values[7 + index];
+                        *(basePtr + 8) = (Byte)(object)values[8 + index];
+                        *(basePtr + 9) = (Byte)(object)values[9 + index];
+                        *(basePtr + 10) = (Byte)(object)values[10 + index];
+                        *(basePtr + 11) = (Byte)(object)values[11 + index];
+                        *(basePtr + 12) = (Byte)(object)values[12 + index];
+                        *(basePtr + 13) = (Byte)(object)values[13 + index];
+                        *(basePtr + 14) = (Byte)(object)values[14 + index];
+                        *(basePtr + 15) = (Byte)(object)values[15 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    fixed (SByte* basePtr = &this.register.sbyte_0)
+                    {
+                        *(basePtr + 0) = (SByte)(object)values[0 + index];
+                        *(basePtr + 1) = (SByte)(object)values[1 + index];
+                        *(basePtr + 2) = (SByte)(object)values[2 + index];
+                        *(basePtr + 3) = (SByte)(object)values[3 + index];
+                        *(basePtr + 4) = (SByte)(object)values[4 + index];
+                        *(basePtr + 5) = (SByte)(object)values[5 + index];
+                        *(basePtr + 6) = (SByte)(object)values[6 + index];
+                        *(basePtr + 7) = (SByte)(object)values[7 + index];
+                        *(basePtr + 8) = (SByte)(object)values[8 + index];
+                        *(basePtr + 9) = (SByte)(object)values[9 + index];
+                        *(basePtr + 10) = (SByte)(object)values[10 + index];
+                        *(basePtr + 11) = (SByte)(object)values[11 + index];
+                        *(basePtr + 12) = (SByte)(object)values[12 + index];
+                        *(basePtr + 13) = (SByte)(object)values[13 + index];
+                        *(basePtr + 14) = (SByte)(object)values[14 + index];
+                        *(basePtr + 15) = (SByte)(object)values[15 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    fixed (UInt16* basePtr = &this.register.uint16_0)
+                    {
+                        *(basePtr + 0) = (UInt16)(object)values[0 + index];
+                        *(basePtr + 1) = (UInt16)(object)values[1 + index];
+                        *(basePtr + 2) = (UInt16)(object)values[2 + index];
+                        *(basePtr + 3) = (UInt16)(object)values[3 + index];
+                        *(basePtr + 4) = (UInt16)(object)values[4 + index];
+                        *(basePtr + 5) = (UInt16)(object)values[5 + index];
+                        *(basePtr + 6) = (UInt16)(object)values[6 + index];
+                        *(basePtr + 7) = (UInt16)(object)values[7 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    fixed (Int16* basePtr = &this.register.int16_0)
+                    {
+                        *(basePtr + 0) = (Int16)(object)values[0 + index];
+                        *(basePtr + 1) = (Int16)(object)values[1 + index];
+                        *(basePtr + 2) = (Int16)(object)values[2 + index];
+                        *(basePtr + 3) = (Int16)(object)values[3 + index];
+                        *(basePtr + 4) = (Int16)(object)values[4 + index];
+                        *(basePtr + 5) = (Int16)(object)values[5 + index];
+                        *(basePtr + 6) = (Int16)(object)values[6 + index];
+                        *(basePtr + 7) = (Int16)(object)values[7 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    fixed (UInt32* basePtr = &this.register.uint32_0)
+                    {
+                        *(basePtr + 0) = (UInt32)(object)values[0 + index];
+                        *(basePtr + 1) = (UInt32)(object)values[1 + index];
+                        *(basePtr + 2) = (UInt32)(object)values[2 + index];
+                        *(basePtr + 3) = (UInt32)(object)values[3 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    fixed (Int32* basePtr = &this.register.int32_0)
+                    {
+                        *(basePtr + 0) = (Int32)(object)values[0 + index];
+                        *(basePtr + 1) = (Int32)(object)values[1 + index];
+                        *(basePtr + 2) = (Int32)(object)values[2 + index];
+                        *(basePtr + 3) = (Int32)(object)values[3 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    fixed (UInt64* basePtr = &this.register.uint64_0)
+                    {
+                        *(basePtr + 0) = (UInt64)(object)values[0 + index];
+                        *(basePtr + 1) = (UInt64)(object)values[1 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    fixed (Int64* basePtr = &this.register.int64_0)
+                    {
+                        *(basePtr + 0) = (Int64)(object)values[0 + index];
+                        *(basePtr + 1) = (Int64)(object)values[1 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    fixed (Single* basePtr = &this.register.single_0)
+                    {
+                        *(basePtr + 0) = (Single)(object)values[0 + index];
+                        *(basePtr + 1) = (Single)(object)values[1 + index];
+                        *(basePtr + 2) = (Single)(object)values[2 + index];
+                        *(basePtr + 3) = (Single)(object)values[3 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    fixed (Double* basePtr = &this.register.double_0)
+                    {
+                        *(basePtr + 0) = (Double)(object)values[0 + index];
+                        *(basePtr + 1) = (Double)(object)values[1 + index];
+                    }
+                }
+            }
+        }
+
+#pragma warning disable 3001 // void* is not a CLS-Compliant argument type
+        private unsafe Vector(void* dataPointer) : this(dataPointer, 0) { }
+#pragma warning restore 3001 // void* is not a CLS-Compliant argument type
+
+#pragma warning disable 3001 // void* is not a CLS-Compliant argument type
+        // Implemented with offset if this API ever becomes public; an offset of 0 is used internally.
+        private unsafe Vector(void* dataPointer, int offset)
+            : this()
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                Byte* castedPtr = (Byte*)dataPointer;
+                castedPtr += offset;
+                fixed (Byte* registerBase = &this.register.byte_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                SByte* castedPtr = (SByte*)dataPointer;
+                castedPtr += offset;
+                fixed (SByte* registerBase = &this.register.sbyte_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                UInt16* castedPtr = (UInt16*)dataPointer;
+                castedPtr += offset;
+                fixed (UInt16* registerBase = &this.register.uint16_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                Int16* castedPtr = (Int16*)dataPointer;
+                castedPtr += offset;
+                fixed (Int16* registerBase = &this.register.int16_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                UInt32* castedPtr = (UInt32*)dataPointer;
+                castedPtr += offset;
+                fixed (UInt32* registerBase = &this.register.uint32_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                Int32* castedPtr = (Int32*)dataPointer;
+                castedPtr += offset;
+                fixed (Int32* registerBase = &this.register.int32_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                UInt64* castedPtr = (UInt64*)dataPointer;
+                castedPtr += offset;
+                fixed (UInt64* registerBase = &this.register.uint64_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                Int64* castedPtr = (Int64*)dataPointer;
+                castedPtr += offset;
+                fixed (Int64* registerBase = &this.register.int64_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                Single* castedPtr = (Single*)dataPointer;
+                castedPtr += offset;
+                fixed (Single* registerBase = &this.register.single_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                Double* castedPtr = (Double*)dataPointer;
+                castedPtr += offset;
+                fixed (Double* registerBase = &this.register.double_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+#pragma warning restore 3001 // void* is not a CLS-Compliant argument type
+
+        private Vector(ref Register existingRegister)
+        {
+            this.register = existingRegister;
+        }
+        #endregion Constructors
+
+        #region Public Instance Methods
+        /// <summary>
+        /// Copies the vector to the given destination array. The destination array must be at least size Vector'T.Count.
+        /// </summary>
+        /// <param name="destination">The destination array which the values are copied into</param>
+        /// <exception cref="ArgumentNullException">If the destination array is null</exception>
+        /// <exception cref="ArgumentException">If number of elements in source vector is greater than those available in destination array</exception>
+        [JitIntrinsic]
+        public unsafe void CopyTo(T[] destination)
+        {
+            CopyTo(destination, 0);
+        }
+
+        /// <summary>
+        /// Copies the vector to the given destination array. The destination array must be at least size Vector'T.Count.
+        /// </summary>
+        /// <param name="destination">The destination array which the values are copied into</param>
+        /// <param name="startIndex">The index to start copying to</param>
+        /// <exception cref="ArgumentNullException">If the destination array is null</exception>
+        /// <exception cref="ArgumentOutOfRangeException">If index is greater than end of the array or index is less than zero</exception>
+        /// <exception cref="ArgumentException">If number of elements in source vector is greater than those available in destination array</exception>
+        [JitIntrinsic]
+        public unsafe void CopyTo(T[] destination, int startIndex)
+        {
+            if (destination == null)
+            {
+                // Match the JIT's exception type here. For perf, a NullReference is thrown instead of an ArgumentNull.
+                throw new NullReferenceException(SR.Arg_NullArgumentNullRef);
+            }
+            if (startIndex < 0 || startIndex >= destination.Length)
+            {
+                throw new ArgumentOutOfRangeException(nameof(startIndex), SR.Format(SR.Arg_ArgumentOutOfRangeException, startIndex));
+            }
+            if ((destination.Length - startIndex) < Count)
+            {
+                throw new ArgumentException(SR.Format(SR.Arg_ElementsInSourceIsGreaterThanDestination, startIndex));
+            }
+
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte[] byteArray = (Byte[])(object)destination;
+                    fixed (Byte* destinationBase = byteArray)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Byte)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte[] sbyteArray = (SByte[])(object)destination;
+                    fixed (SByte* destinationBase = sbyteArray)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (SByte)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16[] uint16Array = (UInt16[])(object)destination;
+                    fixed (UInt16* destinationBase = uint16Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (UInt16)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16[] int16Array = (Int16[])(object)destination;
+                    fixed (Int16* destinationBase = int16Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Int16)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32[] uint32Array = (UInt32[])(object)destination;
+                    fixed (UInt32* destinationBase = uint32Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (UInt32)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32[] int32Array = (Int32[])(object)destination;
+                    fixed (Int32* destinationBase = int32Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Int32)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64[] uint64Array = (UInt64[])(object)destination;
+                    fixed (UInt64* destinationBase = uint64Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (UInt64)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64[] int64Array = (Int64[])(object)destination;
+                    fixed (Int64* destinationBase = int64Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Int64)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single[] singleArray = (Single[])(object)destination;
+                    fixed (Single* destinationBase = singleArray)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Single)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double[] doubleArray = (Double[])(object)destination;
+                    fixed (Double* destinationBase = doubleArray)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Double)(object)this[g];
+                        }
+                    }
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte[] byteArray = (Byte[])(object)destination;
+                    fixed (Byte* destinationBase = byteArray)
+                    {
+                        destinationBase[startIndex + 0] = this.register.byte_0;
+                        destinationBase[startIndex + 1] = this.register.byte_1;
+                        destinationBase[startIndex + 2] = this.register.byte_2;
+                        destinationBase[startIndex + 3] = this.register.byte_3;
+                        destinationBase[startIndex + 4] = this.register.byte_4;
+                        destinationBase[startIndex + 5] = this.register.byte_5;
+                        destinationBase[startIndex + 6] = this.register.byte_6;
+                        destinationBase[startIndex + 7] = this.register.byte_7;
+                        destinationBase[startIndex + 8] = this.register.byte_8;
+                        destinationBase[startIndex + 9] = this.register.byte_9;
+                        destinationBase[startIndex + 10] = this.register.byte_10;
+                        destinationBase[startIndex + 11] = this.register.byte_11;
+                        destinationBase[startIndex + 12] = this.register.byte_12;
+                        destinationBase[startIndex + 13] = this.register.byte_13;
+                        destinationBase[startIndex + 14] = this.register.byte_14;
+                        destinationBase[startIndex + 15] = this.register.byte_15;
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte[] sbyteArray = (SByte[])(object)destination;
+                    fixed (SByte* destinationBase = sbyteArray)
+                    {
+                        destinationBase[startIndex + 0] = this.register.sbyte_0;
+                        destinationBase[startIndex + 1] = this.register.sbyte_1;
+                        destinationBase[startIndex + 2] = this.register.sbyte_2;
+                        destinationBase[startIndex + 3] = this.register.sbyte_3;
+                        destinationBase[startIndex + 4] = this.register.sbyte_4;
+                        destinationBase[startIndex + 5] = this.register.sbyte_5;
+                        destinationBase[startIndex + 6] = this.register.sbyte_6;
+                        destinationBase[startIndex + 7] = this.register.sbyte_7;
+                        destinationBase[startIndex + 8] = this.register.sbyte_8;
+                        destinationBase[startIndex + 9] = this.register.sbyte_9;
+                        destinationBase[startIndex + 10] = this.register.sbyte_10;
+                        destinationBase[startIndex + 11] = this.register.sbyte_11;
+                        destinationBase[startIndex + 12] = this.register.sbyte_12;
+                        destinationBase[startIndex + 13] = this.register.sbyte_13;
+                        destinationBase[startIndex + 14] = this.register.sbyte_14;
+                        destinationBase[startIndex + 15] = this.register.sbyte_15;
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16[] uint16Array = (UInt16[])(object)destination;
+                    fixed (UInt16* destinationBase = uint16Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.uint16_0;
+                        destinationBase[startIndex + 1] = this.register.uint16_1;
+                        destinationBase[startIndex + 2] = this.register.uint16_2;
+                        destinationBase[startIndex + 3] = this.register.uint16_3;
+                        destinationBase[startIndex + 4] = this.register.uint16_4;
+                        destinationBase[startIndex + 5] = this.register.uint16_5;
+                        destinationBase[startIndex + 6] = this.register.uint16_6;
+                        destinationBase[startIndex + 7] = this.register.uint16_7;
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16[] int16Array = (Int16[])(object)destination;
+                    fixed (Int16* destinationBase = int16Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.int16_0;
+                        destinationBase[startIndex + 1] = this.register.int16_1;
+                        destinationBase[startIndex + 2] = this.register.int16_2;
+                        destinationBase[startIndex + 3] = this.register.int16_3;
+                        destinationBase[startIndex + 4] = this.register.int16_4;
+                        destinationBase[startIndex + 5] = this.register.int16_5;
+                        destinationBase[startIndex + 6] = this.register.int16_6;
+                        destinationBase[startIndex + 7] = this.register.int16_7;
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32[] uint32Array = (UInt32[])(object)destination;
+                    fixed (UInt32* destinationBase = uint32Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.uint32_0;
+                        destinationBase[startIndex + 1] = this.register.uint32_1;
+                        destinationBase[startIndex + 2] = this.register.uint32_2;
+                        destinationBase[startIndex + 3] = this.register.uint32_3;
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32[] int32Array = (Int32[])(object)destination;
+                    fixed (Int32* destinationBase = int32Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.int32_0;
+                        destinationBase[startIndex + 1] = this.register.int32_1;
+                        destinationBase[startIndex + 2] = this.register.int32_2;
+                        destinationBase[startIndex + 3] = this.register.int32_3;
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64[] uint64Array = (UInt64[])(object)destination;
+                    fixed (UInt64* destinationBase = uint64Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.uint64_0;
+                        destinationBase[startIndex + 1] = this.register.uint64_1;
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64[] int64Array = (Int64[])(object)destination;
+                    fixed (Int64* destinationBase = int64Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.int64_0;
+                        destinationBase[startIndex + 1] = this.register.int64_1;
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single[] singleArray = (Single[])(object)destination;
+                    fixed (Single* destinationBase = singleArray)
+                    {
+                        destinationBase[startIndex + 0] = this.register.single_0;
+                        destinationBase[startIndex + 1] = this.register.single_1;
+                        destinationBase[startIndex + 2] = this.register.single_2;
+                        destinationBase[startIndex + 3] = this.register.single_3;
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double[] doubleArray = (Double[])(object)destination;
+                    fixed (Double* destinationBase = doubleArray)
+                    {
+                        destinationBase[startIndex + 0] = this.register.double_0;
+                        destinationBase[startIndex + 1] = this.register.double_1;
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// Returns the element at the given index.
+        /// </summary>
+        [JitIntrinsic]
+        public unsafe T this[int index]
+        {
+            get
+            {
+                if (index >= Count || index < 0)
+                {
+                    throw new IndexOutOfRangeException(SR.Format(SR.Arg_ArgumentOutOfRangeException, index));
+                }
+                if (typeof(T) == typeof(Byte))
+                {
+                    fixed (Byte* basePtr = &this.register.byte_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    fixed (SByte* basePtr = &this.register.sbyte_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    fixed (UInt16* basePtr = &this.register.uint16_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    fixed (Int16* basePtr = &this.register.int16_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    fixed (UInt32* basePtr = &this.register.uint32_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    fixed (Int32* basePtr = &this.register.int32_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    fixed (UInt64* basePtr = &this.register.uint64_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    fixed (Int64* basePtr = &this.register.int64_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    fixed (Single* basePtr = &this.register.single_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    fixed (Double* basePtr = &this.register.double_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether the given Object is equal to this vector instance.
+        /// </summary>
+        /// <param name="obj">The Object to compare against.</param>
+        /// <returns>True if the Object is equal to this vector; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public override bool Equals(object obj)
+        {
+            if (!(obj is Vector<T>))
+            {
+                return false;
+            }
+            return Equals((Vector<T>)obj);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether the given vector is equal to this vector instance.
+        /// </summary>
+        /// <param name="other">The vector to compare this instance to.</param>
+        /// <returns>True if the other vector is equal to this instance; False otherwise.</returns>
+        [JitIntrinsic]
+        public bool Equals(Vector<T> other)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                for (int g = 0; g < Count; g++)
+                {
+                    if (!ScalarEquals(this[g], other[g]))
+                    {
+                        return false;
+                    }
+                }
+                return true;
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    return
+                        this.register.byte_0 == other.register.byte_0
+                        && this.register.byte_1 == other.register.byte_1
+                        && this.register.byte_2 == other.register.byte_2
+                        && this.register.byte_3 == other.register.byte_3
+                        && this.register.byte_4 == other.register.byte_4
+                        && this.register.byte_5 == other.register.byte_5
+                        && this.register.byte_6 == other.register.byte_6
+                        && this.register.byte_7 == other.register.byte_7
+                        && this.register.byte_8 == other.register.byte_8
+                        && this.register.byte_9 == other.register.byte_9
+                        && this.register.byte_10 == other.register.byte_10
+                        && this.register.byte_11 == other.register.byte_11
+                        && this.register.byte_12 == other.register.byte_12
+                        && this.register.byte_13 == other.register.byte_13
+                        && this.register.byte_14 == other.register.byte_14
+                        && this.register.byte_15 == other.register.byte_15;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    return
+                        this.register.sbyte_0 == other.register.sbyte_0
+                        && this.register.sbyte_1 == other.register.sbyte_1
+                        && this.register.sbyte_2 == other.register.sbyte_2
+                        && this.register.sbyte_3 == other.register.sbyte_3
+                        && this.register.sbyte_4 == other.register.sbyte_4
+                        && this.register.sbyte_5 == other.register.sbyte_5
+                        && this.register.sbyte_6 == other.register.sbyte_6
+                        && this.register.sbyte_7 == other.register.sbyte_7
+                        && this.register.sbyte_8 == other.register.sbyte_8
+                        && this.register.sbyte_9 == other.register.sbyte_9
+                        && this.register.sbyte_10 == other.register.sbyte_10
+                        && this.register.sbyte_11 == other.register.sbyte_11
+                        && this.register.sbyte_12 == other.register.sbyte_12
+                        && this.register.sbyte_13 == other.register.sbyte_13
+                        && this.register.sbyte_14 == other.register.sbyte_14
+                        && this.register.sbyte_15 == other.register.sbyte_15;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    return
+                        this.register.uint16_0 == other.register.uint16_0
+                        && this.register.uint16_1 == other.register.uint16_1
+                        && this.register.uint16_2 == other.register.uint16_2
+                        && this.register.uint16_3 == other.register.uint16_3
+                        && this.register.uint16_4 == other.register.uint16_4
+                        && this.register.uint16_5 == other.register.uint16_5
+                        && this.register.uint16_6 == other.register.uint16_6
+                        && this.register.uint16_7 == other.register.uint16_7;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    return
+                        this.register.int16_0 == other.register.int16_0
+                        && this.register.int16_1 == other.register.int16_1
+                        && this.register.int16_2 == other.register.int16_2
+                        && this.register.int16_3 == other.register.int16_3
+                        && this.register.int16_4 == other.register.int16_4
+                        && this.register.int16_5 == other.register.int16_5
+                        && this.register.int16_6 == other.register.int16_6
+                        && this.register.int16_7 == other.register.int16_7;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    return
+                        this.register.uint32_0 == other.register.uint32_0
+                        && this.register.uint32_1 == other.register.uint32_1
+                        && this.register.uint32_2 == other.register.uint32_2
+                        && this.register.uint32_3 == other.register.uint32_3;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    return
+                        this.register.int32_0 == other.register.int32_0
+                        && this.register.int32_1 == other.register.int32_1
+                        && this.register.int32_2 == other.register.int32_2
+                        && this.register.int32_3 == other.register.int32_3;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    return
+                        this.register.uint64_0 == other.register.uint64_0
+                        && this.register.uint64_1 == other.register.uint64_1;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    return
+                        this.register.int64_0 == other.register.int64_0
+                        && this.register.int64_1 == other.register.int64_1;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    return
+                        this.register.single_0 == other.register.single_0
+                        && this.register.single_1 == other.register.single_1
+                        && this.register.single_2 == other.register.single_2
+                        && this.register.single_3 == other.register.single_3;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    return
+                        this.register.double_0 == other.register.double_0
+                        && this.register.double_1 == other.register.double_1;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Returns the hash code for this instance.
+        /// </summary>
+        /// <returns>The hash code.</returns>
+        public override int GetHashCode()
+        {
+            int hash = 0;
+
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Byte)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((SByte)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((UInt16)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Int16)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((UInt32)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Int32)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((UInt64)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Int64)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Single)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Double)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_3.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_4.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_5.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_6.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_7.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_8.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_9.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_10.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_11.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_12.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_13.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_14.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_15.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_3.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_4.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_5.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_6.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_7.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_8.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_9.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_10.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_11.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_12.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_13.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_14.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_15.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_3.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_4.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_5.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_6.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_7.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_3.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_4.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_5.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_6.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_7.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint32_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint32_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint32_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint32_3.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int32_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int32_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int32_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int32_3.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint64_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint64_1.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int64_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int64_1.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.single_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.single_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.single_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.single_3.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.double_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.double_1.GetHashCode());
+                    return hash;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Returns a String representing this vector.
+        /// </summary>
+        /// <returns>The string representation.</returns>
+        public override string ToString()
+        {
+            return ToString("G", CultureInfo.CurrentCulture);
+        }
+
+        /// <summary>
+        /// Returns a String representing this vector, using the specified format string to format individual elements.
+        /// </summary>
+        /// <param name="format">The format of individual elements.</param>
+        /// <returns>The string representation.</returns>
+        public string ToString(string format)
+        {
+            return ToString(format, CultureInfo.CurrentCulture);
+        }
+
+        /// <summary>
+        /// Returns a String representing this vector, using the specified format string to format individual elements
+        /// and the given IFormatProvider.
+        /// </summary>
+        /// <param name="format">The format of individual elements.</param>
+        /// <param name="formatProvider">The format provider to use when formatting elements.</param>
+        /// <returns>The string representation.</returns>
+        public string ToString(string format, IFormatProvider formatProvider)
+        {
+            StringBuilder sb = new StringBuilder();
+            string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator;
+            sb.Append('<');
+            for (int g = 0; g < Count - 1; g++)
+            {
+                sb.Append(((IFormattable)this[g]).ToString(format, formatProvider));
+                sb.Append(separator);
+                sb.Append(' ');
+            }
+            // Append last element w/out separator
+            sb.Append(((IFormattable)this[Count - 1]).ToString(format, formatProvider));
+            sb.Append('>');
+            return sb.ToString();
+        }
+        #endregion Public Instance Methods
+
+        #region Arithmetic Operators
+        /// <summary>
+        /// Adds two vectors together.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The summed vector.</returns>
+        public static unsafe Vector<T> operator +(Vector<T> left, Vector<T> right)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        Byte* dataPtr = stackalloc Byte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Byte)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        SByte* dataPtr = stackalloc SByte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (SByte)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        UInt16* dataPtr = stackalloc UInt16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt16)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        Int16* dataPtr = stackalloc Int16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int16)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        UInt32* dataPtr = stackalloc UInt32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt32)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        Int32* dataPtr = stackalloc Int32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int32)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        UInt64* dataPtr = stackalloc UInt64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt64)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        Int64* dataPtr = stackalloc Int64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int64)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        Single* dataPtr = stackalloc Single[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Single)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        Double* dataPtr = stackalloc Double[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Double)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                    }
+                }
+                else
+                {
+                    Vector<T> sum = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        sum.register.byte_0 = (Byte)(left.register.byte_0 + right.register.byte_0);
+                        sum.register.byte_1 = (Byte)(left.register.byte_1 + right.register.byte_1);
+                        sum.register.byte_2 = (Byte)(left.register.byte_2 + right.register.byte_2);
+                        sum.register.byte_3 = (Byte)(left.register.byte_3 + right.register.byte_3);
+                        sum.register.byte_4 = (Byte)(left.register.byte_4 + right.register.byte_4);
+                        sum.register.byte_5 = (Byte)(left.register.byte_5 + right.register.byte_5);
+                        sum.register.byte_6 = (Byte)(left.register.byte_6 + right.register.byte_6);
+                        sum.register.byte_7 = (Byte)(left.register.byte_7 + right.register.byte_7);
+                        sum.register.byte_8 = (Byte)(left.register.byte_8 + right.register.byte_8);
+                        sum.register.byte_9 = (Byte)(left.register.byte_9 + right.register.byte_9);
+                        sum.register.byte_10 = (Byte)(left.register.byte_10 + right.register.byte_10);
+                        sum.register.byte_11 = (Byte)(left.register.byte_11 + right.register.byte_11);
+                        sum.register.byte_12 = (Byte)(left.register.byte_12 + right.register.byte_12);
+                        sum.register.byte_13 = (Byte)(left.register.byte_13 + right.register.byte_13);
+                        sum.register.byte_14 = (Byte)(left.register.byte_14 + right.register.byte_14);
+                        sum.register.byte_15 = (Byte)(left.register.byte_15 + right.register.byte_15);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        sum.register.sbyte_0 = (SByte)(left.register.sbyte_0 + right.register.sbyte_0);
+                        sum.register.sbyte_1 = (SByte)(left.register.sbyte_1 + right.register.sbyte_1);
+                        sum.register.sbyte_2 = (SByte)(left.register.sbyte_2 + right.register.sbyte_2);
+                        sum.register.sbyte_3 = (SByte)(left.register.sbyte_3 + right.register.sbyte_3);
+                        sum.register.sbyte_4 = (SByte)(left.register.sbyte_4 + right.register.sbyte_4);
+                        sum.register.sbyte_5 = (SByte)(left.register.sbyte_5 + right.register.sbyte_5);
+                        sum.register.sbyte_6 = (SByte)(left.register.sbyte_6 + right.register.sbyte_6);
+                        sum.register.sbyte_7 = (SByte)(left.register.sbyte_7 + right.register.sbyte_7);
+                        sum.register.sbyte_8 = (SByte)(left.register.sbyte_8 + right.register.sbyte_8);
+                        sum.register.sbyte_9 = (SByte)(left.register.sbyte_9 + right.register.sbyte_9);
+                        sum.register.sbyte_10 = (SByte)(left.register.sbyte_10 + right.register.sbyte_10);
+                        sum.register.sbyte_11 = (SByte)(left.register.sbyte_11 + right.register.sbyte_11);
+                        sum.register.sbyte_12 = (SByte)(left.register.sbyte_12 + right.register.sbyte_12);
+                        sum.register.sbyte_13 = (SByte)(left.register.sbyte_13 + right.register.sbyte_13);
+                        sum.register.sbyte_14 = (SByte)(left.register.sbyte_14 + right.register.sbyte_14);
+                        sum.register.sbyte_15 = (SByte)(left.register.sbyte_15 + right.register.sbyte_15);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        sum.register.uint16_0 = (UInt16)(left.register.uint16_0 + right.register.uint16_0);
+                        sum.register.uint16_1 = (UInt16)(left.register.uint16_1 + right.register.uint16_1);
+                        sum.register.uint16_2 = (UInt16)(left.register.uint16_2 + right.register.uint16_2);
+                        sum.register.uint16_3 = (UInt16)(left.register.uint16_3 + right.register.uint16_3);
+                        sum.register.uint16_4 = (UInt16)(left.register.uint16_4 + right.register.uint16_4);
+                        sum.register.uint16_5 = (UInt16)(left.register.uint16_5 + right.register.uint16_5);
+                        sum.register.uint16_6 = (UInt16)(left.register.uint16_6 + right.register.uint16_6);
+                        sum.register.uint16_7 = (UInt16)(left.register.uint16_7 + right.register.uint16_7);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        sum.register.int16_0 = (Int16)(left.register.int16_0 + right.register.int16_0);
+                        sum.register.int16_1 = (Int16)(left.register.int16_1 + right.register.int16_1);
+                        sum.register.int16_2 = (Int16)(left.register.int16_2 + right.register.int16_2);
+                        sum.register.int16_3 = (Int16)(left.register.int16_3 + right.register.int16_3);
+                        sum.register.int16_4 = (Int16)(left.register.int16_4 + right.register.int16_4);
+                        sum.register.int16_5 = (Int16)(left.register.int16_5 + right.register.int16_5);
+                        sum.register.int16_6 = (Int16)(left.register.int16_6 + right.register.int16_6);
+                        sum.register.int16_7 = (Int16)(left.register.int16_7 + right.register.int16_7);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        sum.register.uint32_0 = (UInt32)(left.register.uint32_0 + right.register.uint32_0);
+                        sum.register.uint32_1 = (UInt32)(left.register.uint32_1 + right.register.uint32_1);
+                        sum.register.uint32_2 = (UInt32)(left.register.uint32_2 + right.register.uint32_2);
+                        sum.register.uint32_3 = (UInt32)(left.register.uint32_3 + right.register.uint32_3);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        sum.register.int32_0 = (Int32)(left.register.int32_0 + right.register.int32_0);
+                        sum.register.int32_1 = (Int32)(left.register.int32_1 + right.register.int32_1);
+                        sum.register.int32_2 = (Int32)(left.register.int32_2 + right.register.int32_2);
+                        sum.register.int32_3 = (Int32)(left.register.int32_3 + right.register.int32_3);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        sum.register.uint64_0 = (UInt64)(left.register.uint64_0 + right.register.uint64_0);
+                        sum.register.uint64_1 = (UInt64)(left.register.uint64_1 + right.register.uint64_1);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        sum.register.int64_0 = (Int64)(left.register.int64_0 + right.register.int64_0);
+                        sum.register.int64_1 = (Int64)(left.register.int64_1 + right.register.int64_1);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        sum.register.single_0 = (Single)(left.register.single_0 + right.register.single_0);
+                        sum.register.single_1 = (Single)(left.register.single_1 + right.register.single_1);
+                        sum.register.single_2 = (Single)(left.register.single_2 + right.register.single_2);
+                        sum.register.single_3 = (Single)(left.register.single_3 + right.register.single_3);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        sum.register.double_0 = (Double)(left.register.double_0 + right.register.double_0);
+                        sum.register.double_1 = (Double)(left.register.double_1 + right.register.double_1);
+                    }
+                    return sum;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Subtracts the second vector from the first.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The difference vector.</returns>
+        public static unsafe Vector<T> operator -(Vector<T> left, Vector<T> right)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        Byte* dataPtr = stackalloc Byte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Byte)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        SByte* dataPtr = stackalloc SByte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (SByte)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        UInt16* dataPtr = stackalloc UInt16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt16)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        Int16* dataPtr = stackalloc Int16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int16)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        UInt32* dataPtr = stackalloc UInt32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt32)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        Int32* dataPtr = stackalloc Int32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int32)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        UInt64* dataPtr = stackalloc UInt64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt64)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        Int64* dataPtr = stackalloc Int64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int64)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        Single* dataPtr = stackalloc Single[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Single)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        Double* dataPtr = stackalloc Double[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Double)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                    }
+                }
+                else
+                {
+                    Vector<T> difference = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        difference.register.byte_0 = (Byte)(left.register.byte_0 - right.register.byte_0);
+                        difference.register.byte_1 = (Byte)(left.register.byte_1 - right.register.byte_1);
+                        difference.register.byte_2 = (Byte)(left.register.byte_2 - right.register.byte_2);
+                        difference.register.byte_3 = (Byte)(left.register.byte_3 - right.register.byte_3);
+                        difference.register.byte_4 = (Byte)(left.register.byte_4 - right.register.byte_4);
+                        difference.register.byte_5 = (Byte)(left.register.byte_5 - right.register.byte_5);
+                        difference.register.byte_6 = (Byte)(left.register.byte_6 - right.register.byte_6);
+                        difference.register.byte_7 = (Byte)(left.register.byte_7 - right.register.byte_7);
+                        difference.register.byte_8 = (Byte)(left.register.byte_8 - right.register.byte_8);
+                        difference.register.byte_9 = (Byte)(left.register.byte_9 - right.register.byte_9);
+                        difference.register.byte_10 = (Byte)(left.register.byte_10 - right.register.byte_10);
+                        difference.register.byte_11 = (Byte)(left.register.byte_11 - right.register.byte_11);
+                        difference.register.byte_12 = (Byte)(left.register.byte_12 - right.register.byte_12);
+                        difference.register.byte_13 = (Byte)(left.register.byte_13 - right.register.byte_13);
+                        difference.register.byte_14 = (Byte)(left.register.byte_14 - right.register.byte_14);
+                        difference.register.byte_15 = (Byte)(left.register.byte_15 - right.register.byte_15);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        difference.register.sbyte_0 = (SByte)(left.register.sbyte_0 - right.register.sbyte_0);
+                        difference.register.sbyte_1 = (SByte)(left.register.sbyte_1 - right.register.sbyte_1);
+                        difference.register.sbyte_2 = (SByte)(left.register.sbyte_2 - right.register.sbyte_2);
+                        difference.register.sbyte_3 = (SByte)(left.register.sbyte_3 - right.register.sbyte_3);
+                        difference.register.sbyte_4 = (SByte)(left.register.sbyte_4 - right.register.sbyte_4);
+                        difference.register.sbyte_5 = (SByte)(left.register.sbyte_5 - right.register.sbyte_5);
+                        difference.register.sbyte_6 = (SByte)(left.register.sbyte_6 - right.register.sbyte_6);
+                        difference.register.sbyte_7 = (SByte)(left.register.sbyte_7 - right.register.sbyte_7);
+                        difference.register.sbyte_8 = (SByte)(left.register.sbyte_8 - right.register.sbyte_8);
+                        difference.register.sbyte_9 = (SByte)(left.register.sbyte_9 - right.register.sbyte_9);
+                        difference.register.sbyte_10 = (SByte)(left.register.sbyte_10 - right.register.sbyte_10);
+                        difference.register.sbyte_11 = (SByte)(left.register.sbyte_11 - right.register.sbyte_11);
+                        difference.register.sbyte_12 = (SByte)(left.register.sbyte_12 - right.register.sbyte_12);
+                        difference.register.sbyte_13 = (SByte)(left.register.sbyte_13 - right.register.sbyte_13);
+                        difference.register.sbyte_14 = (SByte)(left.register.sbyte_14 - right.register.sbyte_14);
+                        difference.register.sbyte_15 = (SByte)(left.register.sbyte_15 - right.register.sbyte_15);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        difference.register.uint16_0 = (UInt16)(left.register.uint16_0 - right.register.uint16_0);
+                        difference.register.uint16_1 = (UInt16)(left.register.uint16_1 - right.register.uint16_1);
+                        difference.register.uint16_2 = (UInt16)(left.register.uint16_2 - right.register.uint16_2);
+                        difference.register.uint16_3 = (UInt16)(left.register.uint16_3 - right.register.uint16_3);
+                        difference.register.uint16_4 = (UInt16)(left.register.uint16_4 - right.register.uint16_4);
+                        difference.register.uint16_5 = (UInt16)(left.register.uint16_5 - right.register.uint16_5);
+                        difference.register.uint16_6 = (UInt16)(left.register.uint16_6 - right.register.uint16_6);
+                        difference.register.uint16_7 = (UInt16)(left.register.uint16_7 - right.register.uint16_7);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        difference.register.int16_0 = (Int16)(left.register.int16_0 - right.register.int16_0);
+                        difference.register.int16_1 = (Int16)(left.register.int16_1 - right.register.int16_1);
+                        difference.register.int16_2 = (Int16)(left.register.int16_2 - right.register.int16_2);
+                        difference.register.int16_3 = (Int16)(left.register.int16_3 - right.register.int16_3);
+                        difference.register.int16_4 = (Int16)(left.register.int16_4 - right.register.int16_4);
+                        difference.register.int16_5 = (Int16)(left.register.int16_5 - right.register.int16_5);
+                        difference.register.int16_6 = (Int16)(left.register.int16_6 - right.register.int16_6);
+                        difference.register.int16_7 = (Int16)(left.register.int16_7 - right.register.int16_7);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        difference.register.uint32_0 = (UInt32)(left.register.uint32_0 - right.register.uint32_0);
+                        difference.register.uint32_1 = (UInt32)(left.register.uint32_1 - right.register.uint32_1);
+                        difference.register.uint32_2 = (UInt32)(left.register.uint32_2 - right.register.uint32_2);
+                        difference.register.uint32_3 = (UInt32)(left.register.uint32_3 - right.register.uint32_3);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        difference.register.int32_0 = (Int32)(left.register.int32_0 - right.register.int32_0);
+                        difference.register.int32_1 = (Int32)(left.register.int32_1 - right.register.int32_1);
+                        difference.register.int32_2 = (Int32)(left.register.int32_2 - right.register.int32_2);
+                        difference.register.int32_3 = (Int32)(left.register.int32_3 - right.register.int32_3);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        difference.register.uint64_0 = (UInt64)(left.register.uint64_0 - right.register.uint64_0);
+                        difference.register.uint64_1 = (UInt64)(left.register.uint64_1 - right.register.uint64_1);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        difference.register.int64_0 = (Int64)(left.register.int64_0 - right.register.int64_0);
+                        difference.register.int64_1 = (Int64)(left.register.int64_1 - right.register.int64_1);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        difference.register.single_0 = (Single)(left.register.single_0 - right.register.single_0);
+                        difference.register.single_1 = (Single)(left.register.single_1 - right.register.single_1);
+                        difference.register.single_2 = (Single)(left.register.single_2 - right.register.single_2);
+                        difference.register.single_3 = (Single)(left.register.single_3 - right.register.single_3);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        difference.register.double_0 = (Double)(left.register.double_0 - right.register.double_0);
+                        difference.register.double_1 = (Double)(left.register.double_1 - right.register.double_1);
+                    }
+                    return difference;
+                }
+            }
+        }
+
+        // This method is intrinsic only for certain types. It cannot access fields directly unless we are sure the context is unaccelerated.
+        /// <summary>
+        /// Multiplies two vectors together.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The product vector.</returns>
+        public static unsafe Vector<T> operator *(Vector<T> left, Vector<T> right)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        Byte* dataPtr = stackalloc Byte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Byte)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        SByte* dataPtr = stackalloc SByte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (SByte)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        UInt16* dataPtr = stackalloc UInt16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt16)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        Int16* dataPtr = stackalloc Int16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int16)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        UInt32* dataPtr = stackalloc UInt32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt32)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        Int32* dataPtr = stackalloc Int32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int32)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        UInt64* dataPtr = stackalloc UInt64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt64)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        Int64* dataPtr = stackalloc Int64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int64)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        Single* dataPtr = stackalloc Single[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Single)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        Double* dataPtr = stackalloc Double[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Double)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                    }
+                }
+                else
+                {
+                    Vector<T> product = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        product.register.byte_0 = (Byte)(left.register.byte_0 * right.register.byte_0);
+                        product.register.byte_1 = (Byte)(left.register.byte_1 * right.register.byte_1);
+                        product.register.byte_2 = (Byte)(left.register.byte_2 * right.register.byte_2);
+                        product.register.byte_3 = (Byte)(left.register.byte_3 * right.register.byte_3);
+                        product.register.byte_4 = (Byte)(left.register.byte_4 * right.register.byte_4);
+                        product.register.byte_5 = (Byte)(left.register.byte_5 * right.register.byte_5);
+                        product.register.byte_6 = (Byte)(left.register.byte_6 * right.register.byte_6);
+                        product.register.byte_7 = (Byte)(left.register.byte_7 * right.register.byte_7);
+                        product.register.byte_8 = (Byte)(left.register.byte_8 * right.register.byte_8);
+                        product.register.byte_9 = (Byte)(left.register.byte_9 * right.register.byte_9);
+                        product.register.byte_10 = (Byte)(left.register.byte_10 * right.register.byte_10);
+                        product.register.byte_11 = (Byte)(left.register.byte_11 * right.register.byte_11);
+                        product.register.byte_12 = (Byte)(left.register.byte_12 * right.register.byte_12);
+                        product.register.byte_13 = (Byte)(left.register.byte_13 * right.register.byte_13);
+                        product.register.byte_14 = (Byte)(left.register.byte_14 * right.register.byte_14);
+                        product.register.byte_15 = (Byte)(left.register.byte_15 * right.register.byte_15);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        product.register.sbyte_0 = (SByte)(left.register.sbyte_0 * right.register.sbyte_0);
+                        product.register.sbyte_1 = (SByte)(left.register.sbyte_1 * right.register.sbyte_1);
+                        product.register.sbyte_2 = (SByte)(left.register.sbyte_2 * right.register.sbyte_2);
+                        product.register.sbyte_3 = (SByte)(left.register.sbyte_3 * right.register.sbyte_3);
+                        product.register.sbyte_4 = (SByte)(left.register.sbyte_4 * right.register.sbyte_4);
+                        product.register.sbyte_5 = (SByte)(left.register.sbyte_5 * right.register.sbyte_5);
+                        product.register.sbyte_6 = (SByte)(left.register.sbyte_6 * right.register.sbyte_6);
+                        product.register.sbyte_7 = (SByte)(left.register.sbyte_7 * right.register.sbyte_7);
+                        product.register.sbyte_8 = (SByte)(left.register.sbyte_8 * right.register.sbyte_8);
+                        product.register.sbyte_9 = (SByte)(left.register.sbyte_9 * right.register.sbyte_9);
+                        product.register.sbyte_10 = (SByte)(left.register.sbyte_10 * right.register.sbyte_10);
+                        product.register.sbyte_11 = (SByte)(left.register.sbyte_11 * right.register.sbyte_11);
+                        product.register.sbyte_12 = (SByte)(left.register.sbyte_12 * right.register.sbyte_12);
+                        product.register.sbyte_13 = (SByte)(left.register.sbyte_13 * right.register.sbyte_13);
+                        product.register.sbyte_14 = (SByte)(left.register.sbyte_14 * right.register.sbyte_14);
+                        product.register.sbyte_15 = (SByte)(left.register.sbyte_15 * right.register.sbyte_15);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        product.register.uint16_0 = (UInt16)(left.register.uint16_0 * right.register.uint16_0);
+                        product.register.uint16_1 = (UInt16)(left.register.uint16_1 * right.register.uint16_1);
+                        product.register.uint16_2 = (UInt16)(left.register.uint16_2 * right.register.uint16_2);
+                        product.register.uint16_3 = (UInt16)(left.register.uint16_3 * right.register.uint16_3);
+                        product.register.uint16_4 = (UInt16)(left.register.uint16_4 * right.register.uint16_4);
+                        product.register.uint16_5 = (UInt16)(left.register.uint16_5 * right.register.uint16_5);
+                        product.register.uint16_6 = (UInt16)(left.register.uint16_6 * right.register.uint16_6);
+                        product.register.uint16_7 = (UInt16)(left.register.uint16_7 * right.register.uint16_7);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        product.register.int16_0 = (Int16)(left.register.int16_0 * right.register.int16_0);
+                        product.register.int16_1 = (Int16)(left.register.int16_1 * right.register.int16_1);
+                        product.register.int16_2 = (Int16)(left.register.int16_2 * right.register.int16_2);
+                        product.register.int16_3 = (Int16)(left.register.int16_3 * right.register.int16_3);
+                        product.register.int16_4 = (Int16)(left.register.int16_4 * right.register.int16_4);
+                        product.register.int16_5 = (Int16)(left.register.int16_5 * right.register.int16_5);
+                        product.register.int16_6 = (Int16)(left.register.int16_6 * right.register.int16_6);
+                        product.register.int16_7 = (Int16)(left.register.int16_7 * right.register.int16_7);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        product.register.uint32_0 = (UInt32)(left.register.uint32_0 * right.register.uint32_0);
+                        product.register.uint32_1 = (UInt32)(left.register.uint32_1 * right.register.uint32_1);
+                        product.register.uint32_2 = (UInt32)(left.register.uint32_2 * right.register.uint32_2);
+                        product.register.uint32_3 = (UInt32)(left.register.uint32_3 * right.register.uint32_3);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        product.register.int32_0 = (Int32)(left.register.int32_0 * right.register.int32_0);
+                        product.register.int32_1 = (Int32)(left.register.int32_1 * right.register.int32_1);
+                        product.register.int32_2 = (Int32)(left.register.int32_2 * right.register.int32_2);
+                        product.register.int32_3 = (Int32)(left.register.int32_3 * right.register.int32_3);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        product.register.uint64_0 = (UInt64)(left.register.uint64_0 * right.register.uint64_0);
+                        product.register.uint64_1 = (UInt64)(left.register.uint64_1 * right.register.uint64_1);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        product.register.int64_0 = (Int64)(left.register.int64_0 * right.register.int64_0);
+                        product.register.int64_1 = (Int64)(left.register.int64_1 * right.register.int64_1);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        product.register.single_0 = (Single)(left.register.single_0 * right.register.single_0);
+                        product.register.single_1 = (Single)(left.register.single_1 * right.register.single_1);
+                        product.register.single_2 = (Single)(left.register.single_2 * right.register.single_2);
+                        product.register.single_3 = (Single)(left.register.single_3 * right.register.single_3);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        product.register.double_0 = (Double)(left.register.double_0 * right.register.double_0);
+                        product.register.double_1 = (Double)(left.register.double_1 * right.register.double_1);
+                    }
+                    return product;
+                }
+            }
+        }
+
+        // This method is intrinsic only for certain types. It cannot access fields directly unless we are sure the context is unaccelerated.
+        /// <summary>
+        /// Multiplies a vector by the given scalar.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <param name="factor">The scalar value.</param>
+        /// <returns>The scaled vector.</returns>
+        public static Vector<T> operator *(Vector<T> value, T factor)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    return new Vector<T>(factor) * value;
+                }
+                else
+                {
+                    Vector<T> product = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        product.register.byte_0 = (Byte)(value.register.byte_0 * (Byte)(object)factor);
+                        product.register.byte_1 = (Byte)(value.register.byte_1 * (Byte)(object)factor);
+                        product.register.byte_2 = (Byte)(value.register.byte_2 * (Byte)(object)factor);
+                        product.register.byte_3 = (Byte)(value.register.byte_3 * (Byte)(object)factor);
+                        product.register.byte_4 = (Byte)(value.register.byte_4 * (Byte)(object)factor);
+                        product.register.byte_5 = (Byte)(value.register.byte_5 * (Byte)(object)factor);
+                        product.register.byte_6 = (Byte)(value.register.byte_6 * (Byte)(object)factor);
+                        product.register.byte_7 = (Byte)(value.register.byte_7 * (Byte)(object)factor);
+                        product.register.byte_8 = (Byte)(value.register.byte_8 * (Byte)(object)factor);
+                        product.register.byte_9 = (Byte)(value.register.byte_9 * (Byte)(object)factor);
+                        product.register.byte_10 = (Byte)(value.register.byte_10 * (Byte)(object)factor);
+                        product.register.byte_11 = (Byte)(value.register.byte_11 * (Byte)(object)factor);
+                        product.register.byte_12 = (Byte)(value.register.byte_12 * (Byte)(object)factor);
+                        product.register.byte_13 = (Byte)(value.register.byte_13 * (Byte)(object)factor);
+                        product.register.byte_14 = (Byte)(value.register.byte_14 * (Byte)(object)factor);
+                        product.register.byte_15 = (Byte)(value.register.byte_15 * (Byte)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        product.register.sbyte_0 = (SByte)(value.register.sbyte_0 * (SByte)(object)factor);
+                        product.register.sbyte_1 = (SByte)(value.register.sbyte_1 * (SByte)(object)factor);
+                        product.register.sbyte_2 = (SByte)(value.register.sbyte_2 * (SByte)(object)factor);
+                        product.register.sbyte_3 = (SByte)(value.register.sbyte_3 * (SByte)(object)factor);
+                        product.register.sbyte_4 = (SByte)(value.register.sbyte_4 * (SByte)(object)factor);
+                        product.register.sbyte_5 = (SByte)(value.register.sbyte_5 * (SByte)(object)factor);
+                        product.register.sbyte_6 = (SByte)(value.register.sbyte_6 * (SByte)(object)factor);
+                        product.register.sbyte_7 = (SByte)(value.register.sbyte_7 * (SByte)(object)factor);
+                        product.register.sbyte_8 = (SByte)(value.register.sbyte_8 * (SByte)(object)factor);
+                        product.register.sbyte_9 = (SByte)(value.register.sbyte_9 * (SByte)(object)factor);
+                        product.register.sbyte_10 = (SByte)(value.register.sbyte_10 * (SByte)(object)factor);
+                        product.register.sbyte_11 = (SByte)(value.register.sbyte_11 * (SByte)(object)factor);
+                        product.register.sbyte_12 = (SByte)(value.register.sbyte_12 * (SByte)(object)factor);
+                        product.register.sbyte_13 = (SByte)(value.register.sbyte_13 * (SByte)(object)factor);
+                        product.register.sbyte_14 = (SByte)(value.register.sbyte_14 * (SByte)(object)factor);
+                        product.register.sbyte_15 = (SByte)(value.register.sbyte_15 * (SByte)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        product.register.uint16_0 = (UInt16)(value.register.uint16_0 * (UInt16)(object)factor);
+                        product.register.uint16_1 = (UInt16)(value.register.uint16_1 * (UInt16)(object)factor);
+                        product.register.uint16_2 = (UInt16)(value.register.uint16_2 * (UInt16)(object)factor);
+                        product.register.uint16_3 = (UInt16)(value.register.uint16_3 * (UInt16)(object)factor);
+                        product.register.uint16_4 = (UInt16)(value.register.uint16_4 * (UInt16)(object)factor);
+                        product.register.uint16_5 = (UInt16)(value.register.uint16_5 * (UInt16)(object)factor);
+                        product.register.uint16_6 = (UInt16)(value.register.uint16_6 * (UInt16)(object)factor);
+                        product.register.uint16_7 = (UInt16)(value.register.uint16_7 * (UInt16)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        product.register.int16_0 = (Int16)(value.register.int16_0 * (Int16)(object)factor);
+                        product.register.int16_1 = (Int16)(value.register.int16_1 * (Int16)(object)factor);
+                        product.register.int16_2 = (Int16)(value.register.int16_2 * (Int16)(object)factor);
+                        product.register.int16_3 = (Int16)(value.register.int16_3 * (Int16)(object)factor);
+                        product.register.int16_4 = (Int16)(value.register.int16_4 * (Int16)(object)factor);
+                        product.register.int16_5 = (Int16)(value.register.int16_5 * (Int16)(object)factor);
+                        product.register.int16_6 = (Int16)(value.register.int16_6 * (Int16)(object)factor);
+                        product.register.int16_7 = (Int16)(value.register.int16_7 * (Int16)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        product.register.uint32_0 = (UInt32)(value.register.uint32_0 * (UInt32)(object)factor);
+                        product.register.uint32_1 = (UInt32)(value.register.uint32_1 * (UInt32)(object)factor);
+                        product.register.uint32_2 = (UInt32)(value.register.uint32_2 * (UInt32)(object)factor);
+                        product.register.uint32_3 = (UInt32)(value.register.uint32_3 * (UInt32)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        product.register.int32_0 = (Int32)(value.register.int32_0 * (Int32)(object)factor);
+                        product.register.int32_1 = (Int32)(value.register.int32_1 * (Int32)(object)factor);
+                        product.register.int32_2 = (Int32)(value.register.int32_2 * (Int32)(object)factor);
+                        product.register.int32_3 = (Int32)(value.register.int32_3 * (Int32)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        product.register.uint64_0 = (UInt64)(value.register.uint64_0 * (UInt64)(object)factor);
+                        product.register.uint64_1 = (UInt64)(value.register.uint64_1 * (UInt64)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        product.register.int64_0 = (Int64)(value.register.int64_0 * (Int64)(object)factor);
+                        product.register.int64_1 = (Int64)(value.register.int64_1 * (Int64)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        product.register.single_0 = (Single)(value.register.single_0 * (Single)(object)factor);
+                        product.register.single_1 = (Single)(value.register.single_1 * (Single)(object)factor);
+                        product.register.single_2 = (Single)(value.register.single_2 * (Single)(object)factor);
+                        product.register.single_3 = (Single)(value.register.single_3 * (Single)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        product.register.double_0 = (Double)(value.register.double_0 * (Double)(object)factor);
+                        product.register.double_1 = (Double)(value.register.double_1 * (Double)(object)factor);
+                    }
+                    return product;
+                }
+            }
+        }
+
+        // This method is intrinsic only for certain types. It cannot access fields directly unless we are sure the context is unaccelerated.
+        /// <summary>
+        /// Multiplies a vector by the given scalar.
+        /// </summary>
+        /// <param name="factor">The scalar value.</param>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The scaled vector.</returns>
+        public static Vector<T> operator *(T factor, Vector<T> value)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    return new Vector<T>(factor) * value;
+                }
+                else
+                {
+                    Vector<T> product = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        product.register.byte_0 = (Byte)(value.register.byte_0 * (Byte)(object)factor);
+                        product.register.byte_1 = (Byte)(value.register.byte_1 * (Byte)(object)factor);
+                        product.register.byte_2 = (Byte)(value.register.byte_2 * (Byte)(object)factor);
+                        product.register.byte_3 = (Byte)(value.register.byte_3 * (Byte)(object)factor);
+                        product.register.byte_4 = (Byte)(value.register.byte_4 * (Byte)(object)factor);
+                        product.register.byte_5 = (Byte)(value.register.byte_5 * (Byte)(object)factor);
+                        product.register.byte_6 = (Byte)(value.register.byte_6 * (Byte)(object)factor);
+                        product.register.byte_7 = (Byte)(value.register.byte_7 * (Byte)(object)factor);
+                        product.register.byte_8 = (Byte)(value.register.byte_8 * (Byte)(object)factor);
+                        product.register.byte_9 = (Byte)(value.register.byte_9 * (Byte)(object)factor);
+                        product.register.byte_10 = (Byte)(value.register.byte_10 * (Byte)(object)factor);
+                        product.register.byte_11 = (Byte)(value.register.byte_11 * (Byte)(object)factor);
+                        product.register.byte_12 = (Byte)(value.register.byte_12 * (Byte)(object)factor);
+                        product.register.byte_13 = (Byte)(value.register.byte_13 * (Byte)(object)factor);
+                        product.register.byte_14 = (Byte)(value.register.byte_14 * (Byte)(object)factor);
+                        product.register.byte_15 = (Byte)(value.register.byte_15 * (Byte)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        product.register.sbyte_0 = (SByte)(value.register.sbyte_0 * (SByte)(object)factor);
+                        product.register.sbyte_1 = (SByte)(value.register.sbyte_1 * (SByte)(object)factor);
+                        product.register.sbyte_2 = (SByte)(value.register.sbyte_2 * (SByte)(object)factor);
+                        product.register.sbyte_3 = (SByte)(value.register.sbyte_3 * (SByte)(object)factor);
+                        product.register.sbyte_4 = (SByte)(value.register.sbyte_4 * (SByte)(object)factor);
+                        product.register.sbyte_5 = (SByte)(value.register.sbyte_5 * (SByte)(object)factor);
+                        product.register.sbyte_6 = (SByte)(value.register.sbyte_6 * (SByte)(object)factor);
+                        product.register.sbyte_7 = (SByte)(value.register.sbyte_7 * (SByte)(object)factor);
+                        product.register.sbyte_8 = (SByte)(value.register.sbyte_8 * (SByte)(object)factor);
+                        product.register.sbyte_9 = (SByte)(value.register.sbyte_9 * (SByte)(object)factor);
+                        product.register.sbyte_10 = (SByte)(value.register.sbyte_10 * (SByte)(object)factor);
+                        product.register.sbyte_11 = (SByte)(value.register.sbyte_11 * (SByte)(object)factor);
+                        product.register.sbyte_12 = (SByte)(value.register.sbyte_12 * (SByte)(object)factor);
+                        product.register.sbyte_13 = (SByte)(value.register.sbyte_13 * (SByte)(object)factor);
+                        product.register.sbyte_14 = (SByte)(value.register.sbyte_14 * (SByte)(object)factor);
+                        product.register.sbyte_15 = (SByte)(value.register.sbyte_15 * (SByte)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        product.register.uint16_0 = (UInt16)(value.register.uint16_0 * (UInt16)(object)factor);
+                        product.register.uint16_1 = (UInt16)(value.register.uint16_1 * (UInt16)(object)factor);
+                        product.register.uint16_2 = (UInt16)(value.register.uint16_2 * (UInt16)(object)factor);
+                        product.register.uint16_3 = (UInt16)(value.register.uint16_3 * (UInt16)(object)factor);
+                        product.register.uint16_4 = (UInt16)(value.register.uint16_4 * (UInt16)(object)factor);
+                        product.register.uint16_5 = (UInt16)(value.register.uint16_5 * (UInt16)(object)factor);
+                        product.register.uint16_6 = (UInt16)(value.register.uint16_6 * (UInt16)(object)factor);
+                        product.register.uint16_7 = (UInt16)(value.register.uint16_7 * (UInt16)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        product.register.int16_0 = (Int16)(value.register.int16_0 * (Int16)(object)factor);
+                        product.register.int16_1 = (Int16)(value.register.int16_1 * (Int16)(object)factor);
+                        product.register.int16_2 = (Int16)(value.register.int16_2 * (Int16)(object)factor);
+                        product.register.int16_3 = (Int16)(value.register.int16_3 * (Int16)(object)factor);
+                        product.register.int16_4 = (Int16)(value.register.int16_4 * (Int16)(object)factor);
+                        product.register.int16_5 = (Int16)(value.register.int16_5 * (Int16)(object)factor);
+                        product.register.int16_6 = (Int16)(value.register.int16_6 * (Int16)(object)factor);
+                        product.register.int16_7 = (Int16)(value.register.int16_7 * (Int16)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        product.register.uint32_0 = (UInt32)(value.register.uint32_0 * (UInt32)(object)factor);
+                        product.register.uint32_1 = (UInt32)(value.register.uint32_1 * (UInt32)(object)factor);
+                        product.register.uint32_2 = (UInt32)(value.register.uint32_2 * (UInt32)(object)factor);
+                        product.register.uint32_3 = (UInt32)(value.register.uint32_3 * (UInt32)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        product.register.int32_0 = (Int32)(value.register.int32_0 * (Int32)(object)factor);
+                        product.register.int32_1 = (Int32)(value.register.int32_1 * (Int32)(object)factor);
+                        product.register.int32_2 = (Int32)(value.register.int32_2 * (Int32)(object)factor);
+                        product.register.int32_3 = (Int32)(value.register.int32_3 * (Int32)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        product.register.uint64_0 = (UInt64)(value.register.uint64_0 * (UInt64)(object)factor);
+                        product.register.uint64_1 = (UInt64)(value.register.uint64_1 * (UInt64)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        product.register.int64_0 = (Int64)(value.register.int64_0 * (Int64)(object)factor);
+                        product.register.int64_1 = (Int64)(value.register.int64_1 * (Int64)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        product.register.single_0 = (Single)(value.register.single_0 * (Single)(object)factor);
+                        product.register.single_1 = (Single)(value.register.single_1 * (Single)(object)factor);
+                        product.register.single_2 = (Single)(value.register.single_2 * (Single)(object)factor);
+                        product.register.single_3 = (Single)(value.register.single_3 * (Single)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        product.register.double_0 = (Double)(value.register.double_0 * (Double)(object)factor);
+                        product.register.double_1 = (Double)(value.register.double_1 * (Double)(object)factor);
+                    }
+                    return product;
+                }
+            }
+        }
+
+        // This method is intrinsic only for certain types. It cannot access fields directly unless we are sure the context is unaccelerated.
+        /// <summary>
+        /// Divides the first vector by the second.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The vector resulting from the division.</returns>
+        public static unsafe Vector<T> operator /(Vector<T> left, Vector<T> right)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        Byte* dataPtr = stackalloc Byte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Byte)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        SByte* dataPtr = stackalloc SByte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (SByte)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        UInt16* dataPtr = stackalloc UInt16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt16)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        Int16* dataPtr = stackalloc Int16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int16)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        UInt32* dataPtr = stackalloc UInt32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt32)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        Int32* dataPtr = stackalloc Int32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int32)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        UInt64* dataPtr = stackalloc UInt64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt64)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        Int64* dataPtr = stackalloc Int64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int64)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        Single* dataPtr = stackalloc Single[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Single)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        Double* dataPtr = stackalloc Double[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Double)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                    }
+                }
+                else
+                {
+                    Vector<T> quotient = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        quotient.register.byte_0 = (Byte)(left.register.byte_0 / right.register.byte_0);
+                        quotient.register.byte_1 = (Byte)(left.register.byte_1 / right.register.byte_1);
+                        quotient.register.byte_2 = (Byte)(left.register.byte_2 / right.register.byte_2);
+                        quotient.register.byte_3 = (Byte)(left.register.byte_3 / right.register.byte_3);
+                        quotient.register.byte_4 = (Byte)(left.register.byte_4 / right.register.byte_4);
+                        quotient.register.byte_5 = (Byte)(left.register.byte_5 / right.register.byte_5);
+                        quotient.register.byte_6 = (Byte)(left.register.byte_6 / right.register.byte_6);
+                        quotient.register.byte_7 = (Byte)(left.register.byte_7 / right.register.byte_7);
+                        quotient.register.byte_8 = (Byte)(left.register.byte_8 / right.register.byte_8);
+                        quotient.register.byte_9 = (Byte)(left.register.byte_9 / right.register.byte_9);
+                        quotient.register.byte_10 = (Byte)(left.register.byte_10 / right.register.byte_10);
+                        quotient.register.byte_11 = (Byte)(left.register.byte_11 / right.register.byte_11);
+                        quotient.register.byte_12 = (Byte)(left.register.byte_12 / right.register.byte_12);
+                        quotient.register.byte_13 = (Byte)(left.register.byte_13 / right.register.byte_13);
+                        quotient.register.byte_14 = (Byte)(left.register.byte_14 / right.register.byte_14);
+                        quotient.register.byte_15 = (Byte)(left.register.byte_15 / right.register.byte_15);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        quotient.register.sbyte_0 = (SByte)(left.register.sbyte_0 / right.register.sbyte_0);
+                        quotient.register.sbyte_1 = (SByte)(left.register.sbyte_1 / right.register.sbyte_1);
+                        quotient.register.sbyte_2 = (SByte)(left.register.sbyte_2 / right.register.sbyte_2);
+                        quotient.register.sbyte_3 = (SByte)(left.register.sbyte_3 / right.register.sbyte_3);
+                        quotient.register.sbyte_4 = (SByte)(left.register.sbyte_4 / right.register.sbyte_4);
+                        quotient.register.sbyte_5 = (SByte)(left.register.sbyte_5 / right.register.sbyte_5);
+                        quotient.register.sbyte_6 = (SByte)(left.register.sbyte_6 / right.register.sbyte_6);
+                        quotient.register.sbyte_7 = (SByte)(left.register.sbyte_7 / right.register.sbyte_7);
+                        quotient.register.sbyte_8 = (SByte)(left.register.sbyte_8 / right.register.sbyte_8);
+                        quotient.register.sbyte_9 = (SByte)(left.register.sbyte_9 / right.register.sbyte_9);
+                        quotient.register.sbyte_10 = (SByte)(left.register.sbyte_10 / right.register.sbyte_10);
+                        quotient.register.sbyte_11 = (SByte)(left.register.sbyte_11 / right.register.sbyte_11);
+                        quotient.register.sbyte_12 = (SByte)(left.register.sbyte_12 / right.register.sbyte_12);
+                        quotient.register.sbyte_13 = (SByte)(left.register.sbyte_13 / right.register.sbyte_13);
+                        quotient.register.sbyte_14 = (SByte)(left.register.sbyte_14 / right.register.sbyte_14);
+                        quotient.register.sbyte_15 = (SByte)(left.register.sbyte_15 / right.register.sbyte_15);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        quotient.register.uint16_0 = (UInt16)(left.register.uint16_0 / right.register.uint16_0);
+                        quotient.register.uint16_1 = (UInt16)(left.register.uint16_1 / right.register.uint16_1);
+                        quotient.register.uint16_2 = (UInt16)(left.register.uint16_2 / right.register.uint16_2);
+                        quotient.register.uint16_3 = (UInt16)(left.register.uint16_3 / right.register.uint16_3);
+                        quotient.register.uint16_4 = (UInt16)(left.register.uint16_4 / right.register.uint16_4);
+                        quotient.register.uint16_5 = (UInt16)(left.register.uint16_5 / right.register.uint16_5);
+                        quotient.register.uint16_6 = (UInt16)(left.register.uint16_6 / right.register.uint16_6);
+                        quotient.register.uint16_7 = (UInt16)(left.register.uint16_7 / right.register.uint16_7);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        quotient.register.int16_0 = (Int16)(left.register.int16_0 / right.register.int16_0);
+                        quotient.register.int16_1 = (Int16)(left.register.int16_1 / right.register.int16_1);
+                        quotient.register.int16_2 = (Int16)(left.register.int16_2 / right.register.int16_2);
+                        quotient.register.int16_3 = (Int16)(left.register.int16_3 / right.register.int16_3);
+                        quotient.register.int16_4 = (Int16)(left.register.int16_4 / right.register.int16_4);
+                        quotient.register.int16_5 = (Int16)(left.register.int16_5 / right.register.int16_5);
+                        quotient.register.int16_6 = (Int16)(left.register.int16_6 / right.register.int16_6);
+                        quotient.register.int16_7 = (Int16)(left.register.int16_7 / right.register.int16_7);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        quotient.register.uint32_0 = (UInt32)(left.register.uint32_0 / right.register.uint32_0);
+                        quotient.register.uint32_1 = (UInt32)(left.register.uint32_1 / right.register.uint32_1);
+                        quotient.register.uint32_2 = (UInt32)(left.register.uint32_2 / right.register.uint32_2);
+                        quotient.register.uint32_3 = (UInt32)(left.register.uint32_3 / right.register.uint32_3);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        quotient.register.int32_0 = (Int32)(left.register.int32_0 / right.register.int32_0);
+                        quotient.register.int32_1 = (Int32)(left.register.int32_1 / right.register.int32_1);
+                        quotient.register.int32_2 = (Int32)(left.register.int32_2 / right.register.int32_2);
+                        quotient.register.int32_3 = (Int32)(left.register.int32_3 / right.register.int32_3);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        quotient.register.uint64_0 = (UInt64)(left.register.uint64_0 / right.register.uint64_0);
+                        quotient.register.uint64_1 = (UInt64)(left.register.uint64_1 / right.register.uint64_1);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        quotient.register.int64_0 = (Int64)(left.register.int64_0 / right.register.int64_0);
+                        quotient.register.int64_1 = (Int64)(left.register.int64_1 / right.register.int64_1);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        quotient.register.single_0 = (Single)(left.register.single_0 / right.register.single_0);
+                        quotient.register.single_1 = (Single)(left.register.single_1 / right.register.single_1);
+                        quotient.register.single_2 = (Single)(left.register.single_2 / right.register.single_2);
+                        quotient.register.single_3 = (Single)(left.register.single_3 / right.register.single_3);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        quotient.register.double_0 = (Double)(left.register.double_0 / right.register.double_0);
+                        quotient.register.double_1 = (Double)(left.register.double_1 / right.register.double_1);
+                    }
+                    return quotient;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Negates a given vector.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The negated vector.</returns>
+        public static Vector<T> operator -(Vector<T> value)
+        {
+            return Zero - value;
+        }
+        #endregion Arithmetic Operators
+
+        #region Bitwise Operators
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-and operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [JitIntrinsic]
+        public static unsafe Vector<T> operator &(Vector<T> left, Vector<T> right)
+        {
+            Vector<T> result = new Vector<T>();
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    Int64* resultBase = &result.register.int64_0;
+                    Int64* leftBase = &left.register.int64_0;
+                    Int64* rightBase = &right.register.int64_0;
+                    for (int g = 0; g < Vector<Int64>.Count; g++)
+                    {
+                        resultBase[g] = leftBase[g] & rightBase[g];
+                    }
+                }
+                else
+                {
+                    result.register.int64_0 = left.register.int64_0 & right.register.int64_0;
+                    result.register.int64_1 = left.register.int64_1 & right.register.int64_1;
+                }
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-or operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [JitIntrinsic]
+        public static unsafe Vector<T> operator |(Vector<T> left, Vector<T> right)
+        {
+            Vector<T> result = new Vector<T>();
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    Int64* resultBase = &result.register.int64_0;
+                    Int64* leftBase = &left.register.int64_0;
+                    Int64* rightBase = &right.register.int64_0;
+                    for (int g = 0; g < Vector<Int64>.Count; g++)
+                    {
+                        resultBase[g] = leftBase[g] | rightBase[g];
+                    }
+                }
+                else
+                {
+                    result.register.int64_0 = left.register.int64_0 | right.register.int64_0;
+                    result.register.int64_1 = left.register.int64_1 | right.register.int64_1;
+                }
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-exclusive-or operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [JitIntrinsic]
+        public static unsafe Vector<T> operator ^(Vector<T> left, Vector<T> right)
+        {
+            Vector<T> result = new Vector<T>();
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    Int64* resultBase = &result.register.int64_0;
+                    Int64* leftBase = &left.register.int64_0;
+                    Int64* rightBase = &right.register.int64_0;
+                    for (int g = 0; g < Vector<Int64>.Count; g++)
+                    {
+                        resultBase[g] = leftBase[g] ^ rightBase[g];
+                    }
+                }
+                else
+                {
+                    result.register.int64_0 = left.register.int64_0 ^ right.register.int64_0;
+                    result.register.int64_1 = left.register.int64_1 ^ right.register.int64_1;
+                }
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are obtained by taking the one's complement of the given vector's elements.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The one's complement vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> operator ~(Vector<T> value)
+        {
+            return allOnes ^ value;
+        }
+        #endregion Bitwise Operators
+
+        #region Logical Operators
+        /// <summary>
+        /// Returns a boolean indicating whether each pair of elements in the given vectors are equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The first vector to compare.</param>
+        /// <returns>True if all elements are equal; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool operator ==(Vector<T> left, Vector<T> right)
+        {
+            return left.Equals(right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any single pair of elements in the given vectors are equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any element pairs are equal; False if no element pairs are equal.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool operator !=(Vector<T> left, Vector<T> right)
+        {
+            return !(left == right);
+        }
+        #endregion Logical Operators
+
+        #region Conversions
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Byte>(Vector<T> value)
+        {
+            return new Vector<Byte>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [JitIntrinsic]
+        public static explicit operator Vector<SByte>(Vector<T> value)
+        {
+            return new Vector<SByte>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [JitIntrinsic]
+        public static explicit operator Vector<UInt16>(Vector<T> value)
+        {
+            return new Vector<UInt16>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Int16>(Vector<T> value)
+        {
+            return new Vector<Int16>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [JitIntrinsic]
+        public static explicit operator Vector<UInt32>(Vector<T> value)
+        {
+            return new Vector<UInt32>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Int32>(Vector<T> value)
+        {
+            return new Vector<Int32>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [JitIntrinsic]
+        public static explicit operator Vector<UInt64>(Vector<T> value)
+        {
+            return new Vector<UInt64>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Int64>(Vector<T> value)
+        {
+            return new Vector<Int64>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Single>(Vector<T> value)
+        {
+            return new Vector<Single>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Double>(Vector<T> value)
+        {
+            return new Vector<Double>(ref value.register);
+        }
+
+        #endregion Conversions
+
+        #region Internal Comparison Methods
+        [JitIntrinsic]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        internal static unsafe Vector<T> Equals(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Register register = new Register();
+                if (typeof(T) == typeof(Byte))
+                {
+                    register.byte_0 = left.register.byte_0 == right.register.byte_0 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_1 = left.register.byte_1 == right.register.byte_1 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_2 = left.register.byte_2 == right.register.byte_2 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_3 = left.register.byte_3 == right.register.byte_3 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_4 = left.register.byte_4 == right.register.byte_4 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_5 = left.register.byte_5 == right.register.byte_5 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_6 = left.register.byte_6 == right.register.byte_6 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_7 = left.register.byte_7 == right.register.byte_7 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_8 = left.register.byte_8 == right.register.byte_8 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_9 = left.register.byte_9 == right.register.byte_9 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_10 = left.register.byte_10 == right.register.byte_10 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_11 = left.register.byte_11 == right.register.byte_11 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_12 = left.register.byte_12 == right.register.byte_12 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_13 = left.register.byte_13 == right.register.byte_13 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_14 = left.register.byte_14 == right.register.byte_14 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_15 = left.register.byte_15 == right.register.byte_15 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    register.sbyte_0 = left.register.sbyte_0 == right.register.sbyte_0 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_1 = left.register.sbyte_1 == right.register.sbyte_1 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_2 = left.register.sbyte_2 == right.register.sbyte_2 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_3 = left.register.sbyte_3 == right.register.sbyte_3 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_4 = left.register.sbyte_4 == right.register.sbyte_4 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_5 = left.register.sbyte_5 == right.register.sbyte_5 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_6 = left.register.sbyte_6 == right.register.sbyte_6 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_7 = left.register.sbyte_7 == right.register.sbyte_7 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_8 = left.register.sbyte_8 == right.register.sbyte_8 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_9 = left.register.sbyte_9 == right.register.sbyte_9 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_10 = left.register.sbyte_10 == right.register.sbyte_10 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_11 = left.register.sbyte_11 == right.register.sbyte_11 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_12 = left.register.sbyte_12 == right.register.sbyte_12 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_13 = left.register.sbyte_13 == right.register.sbyte_13 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_14 = left.register.sbyte_14 == right.register.sbyte_14 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_15 = left.register.sbyte_15 == right.register.sbyte_15 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    register.uint16_0 = left.register.uint16_0 == right.register.uint16_0 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_1 = left.register.uint16_1 == right.register.uint16_1 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_2 = left.register.uint16_2 == right.register.uint16_2 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_3 = left.register.uint16_3 == right.register.uint16_3 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_4 = left.register.uint16_4 == right.register.uint16_4 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_5 = left.register.uint16_5 == right.register.uint16_5 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_6 = left.register.uint16_6 == right.register.uint16_6 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_7 = left.register.uint16_7 == right.register.uint16_7 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    register.int16_0 = left.register.int16_0 == right.register.int16_0 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_1 = left.register.int16_1 == right.register.int16_1 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_2 = left.register.int16_2 == right.register.int16_2 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_3 = left.register.int16_3 == right.register.int16_3 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_4 = left.register.int16_4 == right.register.int16_4 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_5 = left.register.int16_5 == right.register.int16_5 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_6 = left.register.int16_6 == right.register.int16_6 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_7 = left.register.int16_7 == right.register.int16_7 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    register.uint32_0 = left.register.uint32_0 == right.register.uint32_0 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_1 = left.register.uint32_1 == right.register.uint32_1 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_2 = left.register.uint32_2 == right.register.uint32_2 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_3 = left.register.uint32_3 == right.register.uint32_3 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    register.int32_0 = left.register.int32_0 == right.register.int32_0 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_1 = left.register.int32_1 == right.register.int32_1 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_2 = left.register.int32_2 == right.register.int32_2 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_3 = left.register.int32_3 == right.register.int32_3 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    register.uint64_0 = left.register.uint64_0 == right.register.uint64_0 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    register.uint64_1 = left.register.uint64_1 == right.register.uint64_1 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    register.int64_0 = left.register.int64_0 == right.register.int64_0 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    register.int64_1 = left.register.int64_1 == right.register.int64_1 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    register.single_0 = left.register.single_0 == right.register.single_0 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_1 = left.register.single_1 == right.register.single_1 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_2 = left.register.single_2 == right.register.single_2 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_3 = left.register.single_3 == right.register.single_3 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    register.double_0 = left.register.double_0 == right.register.double_0 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    register.double_1 = left.register.double_1 == right.register.double_1 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    return new Vector<T>(ref register);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        internal static unsafe Vector<T> LessThan(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Register register = new Register();
+                if (typeof(T) == typeof(Byte))
+                {
+                    register.byte_0 = left.register.byte_0 < right.register.byte_0 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_1 = left.register.byte_1 < right.register.byte_1 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_2 = left.register.byte_2 < right.register.byte_2 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_3 = left.register.byte_3 < right.register.byte_3 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_4 = left.register.byte_4 < right.register.byte_4 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_5 = left.register.byte_5 < right.register.byte_5 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_6 = left.register.byte_6 < right.register.byte_6 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_7 = left.register.byte_7 < right.register.byte_7 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_8 = left.register.byte_8 < right.register.byte_8 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_9 = left.register.byte_9 < right.register.byte_9 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_10 = left.register.byte_10 < right.register.byte_10 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_11 = left.register.byte_11 < right.register.byte_11 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_12 = left.register.byte_12 < right.register.byte_12 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_13 = left.register.byte_13 < right.register.byte_13 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_14 = left.register.byte_14 < right.register.byte_14 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_15 = left.register.byte_15 < right.register.byte_15 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    register.sbyte_0 = left.register.sbyte_0 < right.register.sbyte_0 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_1 = left.register.sbyte_1 < right.register.sbyte_1 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_2 = left.register.sbyte_2 < right.register.sbyte_2 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_3 = left.register.sbyte_3 < right.register.sbyte_3 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_4 = left.register.sbyte_4 < right.register.sbyte_4 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_5 = left.register.sbyte_5 < right.register.sbyte_5 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_6 = left.register.sbyte_6 < right.register.sbyte_6 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_7 = left.register.sbyte_7 < right.register.sbyte_7 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_8 = left.register.sbyte_8 < right.register.sbyte_8 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_9 = left.register.sbyte_9 < right.register.sbyte_9 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_10 = left.register.sbyte_10 < right.register.sbyte_10 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_11 = left.register.sbyte_11 < right.register.sbyte_11 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_12 = left.register.sbyte_12 < right.register.sbyte_12 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_13 = left.register.sbyte_13 < right.register.sbyte_13 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_14 = left.register.sbyte_14 < right.register.sbyte_14 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_15 = left.register.sbyte_15 < right.register.sbyte_15 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    register.uint16_0 = left.register.uint16_0 < right.register.uint16_0 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_1 = left.register.uint16_1 < right.register.uint16_1 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_2 = left.register.uint16_2 < right.register.uint16_2 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_3 = left.register.uint16_3 < right.register.uint16_3 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_4 = left.register.uint16_4 < right.register.uint16_4 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_5 = left.register.uint16_5 < right.register.uint16_5 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_6 = left.register.uint16_6 < right.register.uint16_6 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_7 = left.register.uint16_7 < right.register.uint16_7 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    register.int16_0 = left.register.int16_0 < right.register.int16_0 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_1 = left.register.int16_1 < right.register.int16_1 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_2 = left.register.int16_2 < right.register.int16_2 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_3 = left.register.int16_3 < right.register.int16_3 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_4 = left.register.int16_4 < right.register.int16_4 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_5 = left.register.int16_5 < right.register.int16_5 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_6 = left.register.int16_6 < right.register.int16_6 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_7 = left.register.int16_7 < right.register.int16_7 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    register.uint32_0 = left.register.uint32_0 < right.register.uint32_0 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_1 = left.register.uint32_1 < right.register.uint32_1 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_2 = left.register.uint32_2 < right.register.uint32_2 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_3 = left.register.uint32_3 < right.register.uint32_3 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    register.int32_0 = left.register.int32_0 < right.register.int32_0 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_1 = left.register.int32_1 < right.register.int32_1 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_2 = left.register.int32_2 < right.register.int32_2 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_3 = left.register.int32_3 < right.register.int32_3 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    register.uint64_0 = left.register.uint64_0 < right.register.uint64_0 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    register.uint64_1 = left.register.uint64_1 < right.register.uint64_1 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    register.int64_0 = left.register.int64_0 < right.register.int64_0 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    register.int64_1 = left.register.int64_1 < right.register.int64_1 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    register.single_0 = left.register.single_0 < right.register.single_0 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_1 = left.register.single_1 < right.register.single_1 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_2 = left.register.single_2 < right.register.single_2 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_3 = left.register.single_3 < right.register.single_3 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    register.double_0 = left.register.double_0 < right.register.double_0 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    register.double_1 = left.register.double_1 < right.register.double_1 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    return new Vector<T>(ref register);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        internal static unsafe Vector<T> GreaterThan(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Register register = new Register();
+                if (typeof(T) == typeof(Byte))
+                {
+                    register.byte_0 = left.register.byte_0 > right.register.byte_0 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_1 = left.register.byte_1 > right.register.byte_1 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_2 = left.register.byte_2 > right.register.byte_2 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_3 = left.register.byte_3 > right.register.byte_3 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_4 = left.register.byte_4 > right.register.byte_4 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_5 = left.register.byte_5 > right.register.byte_5 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_6 = left.register.byte_6 > right.register.byte_6 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_7 = left.register.byte_7 > right.register.byte_7 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_8 = left.register.byte_8 > right.register.byte_8 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_9 = left.register.byte_9 > right.register.byte_9 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_10 = left.register.byte_10 > right.register.byte_10 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_11 = left.register.byte_11 > right.register.byte_11 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_12 = left.register.byte_12 > right.register.byte_12 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_13 = left.register.byte_13 > right.register.byte_13 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_14 = left.register.byte_14 > right.register.byte_14 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_15 = left.register.byte_15 > right.register.byte_15 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    register.sbyte_0 = left.register.sbyte_0 > right.register.sbyte_0 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_1 = left.register.sbyte_1 > right.register.sbyte_1 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_2 = left.register.sbyte_2 > right.register.sbyte_2 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_3 = left.register.sbyte_3 > right.register.sbyte_3 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_4 = left.register.sbyte_4 > right.register.sbyte_4 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_5 = left.register.sbyte_5 > right.register.sbyte_5 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_6 = left.register.sbyte_6 > right.register.sbyte_6 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_7 = left.register.sbyte_7 > right.register.sbyte_7 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_8 = left.register.sbyte_8 > right.register.sbyte_8 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_9 = left.register.sbyte_9 > right.register.sbyte_9 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_10 = left.register.sbyte_10 > right.register.sbyte_10 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_11 = left.register.sbyte_11 > right.register.sbyte_11 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_12 = left.register.sbyte_12 > right.register.sbyte_12 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_13 = left.register.sbyte_13 > right.register.sbyte_13 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_14 = left.register.sbyte_14 > right.register.sbyte_14 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_15 = left.register.sbyte_15 > right.register.sbyte_15 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    register.uint16_0 = left.register.uint16_0 > right.register.uint16_0 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_1 = left.register.uint16_1 > right.register.uint16_1 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_2 = left.register.uint16_2 > right.register.uint16_2 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_3 = left.register.uint16_3 > right.register.uint16_3 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_4 = left.register.uint16_4 > right.register.uint16_4 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_5 = left.register.uint16_5 > right.register.uint16_5 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_6 = left.register.uint16_6 > right.register.uint16_6 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_7 = left.register.uint16_7 > right.register.uint16_7 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    register.int16_0 = left.register.int16_0 > right.register.int16_0 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_1 = left.register.int16_1 > right.register.int16_1 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_2 = left.register.int16_2 > right.register.int16_2 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_3 = left.register.int16_3 > right.register.int16_3 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_4 = left.register.int16_4 > right.register.int16_4 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_5 = left.register.int16_5 > right.register.int16_5 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_6 = left.register.int16_6 > right.register.int16_6 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_7 = left.register.int16_7 > right.register.int16_7 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    register.uint32_0 = left.register.uint32_0 > right.register.uint32_0 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_1 = left.register.uint32_1 > right.register.uint32_1 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_2 = left.register.uint32_2 > right.register.uint32_2 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_3 = left.register.uint32_3 > right.register.uint32_3 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    register.int32_0 = left.register.int32_0 > right.register.int32_0 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_1 = left.register.int32_1 > right.register.int32_1 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_2 = left.register.int32_2 > right.register.int32_2 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_3 = left.register.int32_3 > right.register.int32_3 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    register.uint64_0 = left.register.uint64_0 > right.register.uint64_0 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    register.uint64_1 = left.register.uint64_1 > right.register.uint64_1 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    register.int64_0 = left.register.int64_0 > right.register.int64_0 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    register.int64_1 = left.register.int64_1 > right.register.int64_1 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    register.single_0 = left.register.single_0 > right.register.single_0 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_1 = left.register.single_1 > right.register.single_1 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_2 = left.register.single_2 > right.register.single_2 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_3 = left.register.single_3 > right.register.single_3 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    register.double_0 = left.register.double_0 > right.register.double_0 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    register.double_1 = left.register.double_1 > right.register.double_1 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    return new Vector<T>(ref register);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static Vector<T> GreaterThanOrEqual(Vector<T> left, Vector<T> right)
+        {
+            return Equals(left, right) | GreaterThan(left, right);
+        }
+
+        [JitIntrinsic]
+        internal static Vector<T> LessThanOrEqual(Vector<T> left, Vector<T> right)
+        {
+            return Equals(left, right) | LessThan(left, right);
+        }
+
+        [JitIntrinsic]
+        internal static Vector<T> ConditionalSelect(Vector<T> condition, Vector<T> left, Vector<T> right)
+        {
+            return (left & condition) | (Vector.AndNot(right, condition));
+        }
+        #endregion Comparison Methods
+
+        #region Internal Math Methods
+        [JitIntrinsic]
+        internal static unsafe Vector<T> Abs(Vector<T> value)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return value;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return value;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return value;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return value;
+            }
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (SByte)(object)(Math.Abs((SByte)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int16)(object)(Math.Abs((Int16)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int32)(object)(Math.Abs((Int32)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int64)(object)(Math.Abs((Int64)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Single)(object)(Math.Abs((Single)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Double)(object)(Math.Abs((Double)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(SByte))
+                {
+                    value.register.sbyte_0 = (SByte)(Math.Abs(value.register.sbyte_0));
+                    value.register.sbyte_1 = (SByte)(Math.Abs(value.register.sbyte_1));
+                    value.register.sbyte_2 = (SByte)(Math.Abs(value.register.sbyte_2));
+                    value.register.sbyte_3 = (SByte)(Math.Abs(value.register.sbyte_3));
+                    value.register.sbyte_4 = (SByte)(Math.Abs(value.register.sbyte_4));
+                    value.register.sbyte_5 = (SByte)(Math.Abs(value.register.sbyte_5));
+                    value.register.sbyte_6 = (SByte)(Math.Abs(value.register.sbyte_6));
+                    value.register.sbyte_7 = (SByte)(Math.Abs(value.register.sbyte_7));
+                    value.register.sbyte_8 = (SByte)(Math.Abs(value.register.sbyte_8));
+                    value.register.sbyte_9 = (SByte)(Math.Abs(value.register.sbyte_9));
+                    value.register.sbyte_10 = (SByte)(Math.Abs(value.register.sbyte_10));
+                    value.register.sbyte_11 = (SByte)(Math.Abs(value.register.sbyte_11));
+                    value.register.sbyte_12 = (SByte)(Math.Abs(value.register.sbyte_12));
+                    value.register.sbyte_13 = (SByte)(Math.Abs(value.register.sbyte_13));
+                    value.register.sbyte_14 = (SByte)(Math.Abs(value.register.sbyte_14));
+                    value.register.sbyte_15 = (SByte)(Math.Abs(value.register.sbyte_15));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    value.register.int16_0 = (Int16)(Math.Abs(value.register.int16_0));
+                    value.register.int16_1 = (Int16)(Math.Abs(value.register.int16_1));
+                    value.register.int16_2 = (Int16)(Math.Abs(value.register.int16_2));
+                    value.register.int16_3 = (Int16)(Math.Abs(value.register.int16_3));
+                    value.register.int16_4 = (Int16)(Math.Abs(value.register.int16_4));
+                    value.register.int16_5 = (Int16)(Math.Abs(value.register.int16_5));
+                    value.register.int16_6 = (Int16)(Math.Abs(value.register.int16_6));
+                    value.register.int16_7 = (Int16)(Math.Abs(value.register.int16_7));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    value.register.int32_0 = (Int32)(Math.Abs(value.register.int32_0));
+                    value.register.int32_1 = (Int32)(Math.Abs(value.register.int32_1));
+                    value.register.int32_2 = (Int32)(Math.Abs(value.register.int32_2));
+                    value.register.int32_3 = (Int32)(Math.Abs(value.register.int32_3));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    value.register.int64_0 = (Int64)(Math.Abs(value.register.int64_0));
+                    value.register.int64_1 = (Int64)(Math.Abs(value.register.int64_1));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    value.register.single_0 = (Single)(Math.Abs(value.register.single_0));
+                    value.register.single_1 = (Single)(Math.Abs(value.register.single_1));
+                    value.register.single_2 = (Single)(Math.Abs(value.register.single_2));
+                    value.register.single_3 = (Single)(Math.Abs(value.register.single_3));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    value.register.double_0 = (Double)(Math.Abs(value.register.double_0));
+                    value.register.double_1 = (Double)(Math.Abs(value.register.double_1));
+                    return value;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static unsafe Vector<T> Min(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Byte)(object)left[g] : (Byte)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (SByte)(object)left[g] : (SByte)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (UInt16)(object)left[g] : (UInt16)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Int16)(object)left[g] : (Int16)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (UInt32)(object)left[g] : (UInt32)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Int32)(object)left[g] : (Int32)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (UInt64)(object)left[g] : (UInt64)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Int64)(object)left[g] : (Int64)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Single)(object)left[g] : (Single)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Double)(object)left[g] : (Double)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Vector<T> vec = new Vector<T>();
+                if (typeof(T) == typeof(Byte))
+                {
+                    vec.register.byte_0 = left.register.byte_0 < right.register.byte_0 ? left.register.byte_0 : right.register.byte_0;
+                    vec.register.byte_1 = left.register.byte_1 < right.register.byte_1 ? left.register.byte_1 : right.register.byte_1;
+                    vec.register.byte_2 = left.register.byte_2 < right.register.byte_2 ? left.register.byte_2 : right.register.byte_2;
+                    vec.register.byte_3 = left.register.byte_3 < right.register.byte_3 ? left.register.byte_3 : right.register.byte_3;
+                    vec.register.byte_4 = left.register.byte_4 < right.register.byte_4 ? left.register.byte_4 : right.register.byte_4;
+                    vec.register.byte_5 = left.register.byte_5 < right.register.byte_5 ? left.register.byte_5 : right.register.byte_5;
+                    vec.register.byte_6 = left.register.byte_6 < right.register.byte_6 ? left.register.byte_6 : right.register.byte_6;
+                    vec.register.byte_7 = left.register.byte_7 < right.register.byte_7 ? left.register.byte_7 : right.register.byte_7;
+                    vec.register.byte_8 = left.register.byte_8 < right.register.byte_8 ? left.register.byte_8 : right.register.byte_8;
+                    vec.register.byte_9 = left.register.byte_9 < right.register.byte_9 ? left.register.byte_9 : right.register.byte_9;
+                    vec.register.byte_10 = left.register.byte_10 < right.register.byte_10 ? left.register.byte_10 : right.register.byte_10;
+                    vec.register.byte_11 = left.register.byte_11 < right.register.byte_11 ? left.register.byte_11 : right.register.byte_11;
+                    vec.register.byte_12 = left.register.byte_12 < right.register.byte_12 ? left.register.byte_12 : right.register.byte_12;
+                    vec.register.byte_13 = left.register.byte_13 < right.register.byte_13 ? left.register.byte_13 : right.register.byte_13;
+                    vec.register.byte_14 = left.register.byte_14 < right.register.byte_14 ? left.register.byte_14 : right.register.byte_14;
+                    vec.register.byte_15 = left.register.byte_15 < right.register.byte_15 ? left.register.byte_15 : right.register.byte_15;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    vec.register.sbyte_0 = left.register.sbyte_0 < right.register.sbyte_0 ? left.register.sbyte_0 : right.register.sbyte_0;
+                    vec.register.sbyte_1 = left.register.sbyte_1 < right.register.sbyte_1 ? left.register.sbyte_1 : right.register.sbyte_1;
+                    vec.register.sbyte_2 = left.register.sbyte_2 < right.register.sbyte_2 ? left.register.sbyte_2 : right.register.sbyte_2;
+                    vec.register.sbyte_3 = left.register.sbyte_3 < right.register.sbyte_3 ? left.register.sbyte_3 : right.register.sbyte_3;
+                    vec.register.sbyte_4 = left.register.sbyte_4 < right.register.sbyte_4 ? left.register.sbyte_4 : right.register.sbyte_4;
+                    vec.register.sbyte_5 = left.register.sbyte_5 < right.register.sbyte_5 ? left.register.sbyte_5 : right.register.sbyte_5;
+                    vec.register.sbyte_6 = left.register.sbyte_6 < right.register.sbyte_6 ? left.register.sbyte_6 : right.register.sbyte_6;
+                    vec.register.sbyte_7 = left.register.sbyte_7 < right.register.sbyte_7 ? left.register.sbyte_7 : right.register.sbyte_7;
+                    vec.register.sbyte_8 = left.register.sbyte_8 < right.register.sbyte_8 ? left.register.sbyte_8 : right.register.sbyte_8;
+                    vec.register.sbyte_9 = left.register.sbyte_9 < right.register.sbyte_9 ? left.register.sbyte_9 : right.register.sbyte_9;
+                    vec.register.sbyte_10 = left.register.sbyte_10 < right.register.sbyte_10 ? left.register.sbyte_10 : right.register.sbyte_10;
+                    vec.register.sbyte_11 = left.register.sbyte_11 < right.register.sbyte_11 ? left.register.sbyte_11 : right.register.sbyte_11;
+                    vec.register.sbyte_12 = left.register.sbyte_12 < right.register.sbyte_12 ? left.register.sbyte_12 : right.register.sbyte_12;
+                    vec.register.sbyte_13 = left.register.sbyte_13 < right.register.sbyte_13 ? left.register.sbyte_13 : right.register.sbyte_13;
+                    vec.register.sbyte_14 = left.register.sbyte_14 < right.register.sbyte_14 ? left.register.sbyte_14 : right.register.sbyte_14;
+                    vec.register.sbyte_15 = left.register.sbyte_15 < right.register.sbyte_15 ? left.register.sbyte_15 : right.register.sbyte_15;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    vec.register.uint16_0 = left.register.uint16_0 < right.register.uint16_0 ? left.register.uint16_0 : right.register.uint16_0;
+                    vec.register.uint16_1 = left.register.uint16_1 < right.register.uint16_1 ? left.register.uint16_1 : right.register.uint16_1;
+                    vec.register.uint16_2 = left.register.uint16_2 < right.register.uint16_2 ? left.register.uint16_2 : right.register.uint16_2;
+                    vec.register.uint16_3 = left.register.uint16_3 < right.register.uint16_3 ? left.register.uint16_3 : right.register.uint16_3;
+                    vec.register.uint16_4 = left.register.uint16_4 < right.register.uint16_4 ? left.register.uint16_4 : right.register.uint16_4;
+                    vec.register.uint16_5 = left.register.uint16_5 < right.register.uint16_5 ? left.register.uint16_5 : right.register.uint16_5;
+                    vec.register.uint16_6 = left.register.uint16_6 < right.register.uint16_6 ? left.register.uint16_6 : right.register.uint16_6;
+                    vec.register.uint16_7 = left.register.uint16_7 < right.register.uint16_7 ? left.register.uint16_7 : right.register.uint16_7;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    vec.register.int16_0 = left.register.int16_0 < right.register.int16_0 ? left.register.int16_0 : right.register.int16_0;
+                    vec.register.int16_1 = left.register.int16_1 < right.register.int16_1 ? left.register.int16_1 : right.register.int16_1;
+                    vec.register.int16_2 = left.register.int16_2 < right.register.int16_2 ? left.register.int16_2 : right.register.int16_2;
+                    vec.register.int16_3 = left.register.int16_3 < right.register.int16_3 ? left.register.int16_3 : right.register.int16_3;
+                    vec.register.int16_4 = left.register.int16_4 < right.register.int16_4 ? left.register.int16_4 : right.register.int16_4;
+                    vec.register.int16_5 = left.register.int16_5 < right.register.int16_5 ? left.register.int16_5 : right.register.int16_5;
+                    vec.register.int16_6 = left.register.int16_6 < right.register.int16_6 ? left.register.int16_6 : right.register.int16_6;
+                    vec.register.int16_7 = left.register.int16_7 < right.register.int16_7 ? left.register.int16_7 : right.register.int16_7;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    vec.register.uint32_0 = left.register.uint32_0 < right.register.uint32_0 ? left.register.uint32_0 : right.register.uint32_0;
+                    vec.register.uint32_1 = left.register.uint32_1 < right.register.uint32_1 ? left.register.uint32_1 : right.register.uint32_1;
+                    vec.register.uint32_2 = left.register.uint32_2 < right.register.uint32_2 ? left.register.uint32_2 : right.register.uint32_2;
+                    vec.register.uint32_3 = left.register.uint32_3 < right.register.uint32_3 ? left.register.uint32_3 : right.register.uint32_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    vec.register.int32_0 = left.register.int32_0 < right.register.int32_0 ? left.register.int32_0 : right.register.int32_0;
+                    vec.register.int32_1 = left.register.int32_1 < right.register.int32_1 ? left.register.int32_1 : right.register.int32_1;
+                    vec.register.int32_2 = left.register.int32_2 < right.register.int32_2 ? left.register.int32_2 : right.register.int32_2;
+                    vec.register.int32_3 = left.register.int32_3 < right.register.int32_3 ? left.register.int32_3 : right.register.int32_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    vec.register.uint64_0 = left.register.uint64_0 < right.register.uint64_0 ? left.register.uint64_0 : right.register.uint64_0;
+                    vec.register.uint64_1 = left.register.uint64_1 < right.register.uint64_1 ? left.register.uint64_1 : right.register.uint64_1;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    vec.register.int64_0 = left.register.int64_0 < right.register.int64_0 ? left.register.int64_0 : right.register.int64_0;
+                    vec.register.int64_1 = left.register.int64_1 < right.register.int64_1 ? left.register.int64_1 : right.register.int64_1;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    vec.register.single_0 = left.register.single_0 < right.register.single_0 ? left.register.single_0 : right.register.single_0;
+                    vec.register.single_1 = left.register.single_1 < right.register.single_1 ? left.register.single_1 : right.register.single_1;
+                    vec.register.single_2 = left.register.single_2 < right.register.single_2 ? left.register.single_2 : right.register.single_2;
+                    vec.register.single_3 = left.register.single_3 < right.register.single_3 ? left.register.single_3 : right.register.single_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    vec.register.double_0 = left.register.double_0 < right.register.double_0 ? left.register.double_0 : right.register.double_0;
+                    vec.register.double_1 = left.register.double_1 < right.register.double_1 ? left.register.double_1 : right.register.double_1;
+                    return vec;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static unsafe Vector<T> Max(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Byte)(object)left[g] : (Byte)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (SByte)(object)left[g] : (SByte)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (UInt16)(object)left[g] : (UInt16)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Int16)(object)left[g] : (Int16)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (UInt32)(object)left[g] : (UInt32)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Int32)(object)left[g] : (Int32)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (UInt64)(object)left[g] : (UInt64)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Int64)(object)left[g] : (Int64)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Single)(object)left[g] : (Single)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Double)(object)left[g] : (Double)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Vector<T> vec = new Vector<T>();
+                if (typeof(T) == typeof(Byte))
+                {
+                    vec.register.byte_0 = left.register.byte_0 > right.register.byte_0 ? left.register.byte_0 : right.register.byte_0;
+                    vec.register.byte_1 = left.register.byte_1 > right.register.byte_1 ? left.register.byte_1 : right.register.byte_1;
+                    vec.register.byte_2 = left.register.byte_2 > right.register.byte_2 ? left.register.byte_2 : right.register.byte_2;
+                    vec.register.byte_3 = left.register.byte_3 > right.register.byte_3 ? left.register.byte_3 : right.register.byte_3;
+                    vec.register.byte_4 = left.register.byte_4 > right.register.byte_4 ? left.register.byte_4 : right.register.byte_4;
+                    vec.register.byte_5 = left.register.byte_5 > right.register.byte_5 ? left.register.byte_5 : right.register.byte_5;
+                    vec.register.byte_6 = left.register.byte_6 > right.register.byte_6 ? left.register.byte_6 : right.register.byte_6;
+                    vec.register.byte_7 = left.register.byte_7 > right.register.byte_7 ? left.register.byte_7 : right.register.byte_7;
+                    vec.register.byte_8 = left.register.byte_8 > right.register.byte_8 ? left.register.byte_8 : right.register.byte_8;
+                    vec.register.byte_9 = left.register.byte_9 > right.register.byte_9 ? left.register.byte_9 : right.register.byte_9;
+                    vec.register.byte_10 = left.register.byte_10 > right.register.byte_10 ? left.register.byte_10 : right.register.byte_10;
+                    vec.register.byte_11 = left.register.byte_11 > right.register.byte_11 ? left.register.byte_11 : right.register.byte_11;
+                    vec.register.byte_12 = left.register.byte_12 > right.register.byte_12 ? left.register.byte_12 : right.register.byte_12;
+                    vec.register.byte_13 = left.register.byte_13 > right.register.byte_13 ? left.register.byte_13 : right.register.byte_13;
+                    vec.register.byte_14 = left.register.byte_14 > right.register.byte_14 ? left.register.byte_14 : right.register.byte_14;
+                    vec.register.byte_15 = left.register.byte_15 > right.register.byte_15 ? left.register.byte_15 : right.register.byte_15;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    vec.register.sbyte_0 = left.register.sbyte_0 > right.register.sbyte_0 ? left.register.sbyte_0 : right.register.sbyte_0;
+                    vec.register.sbyte_1 = left.register.sbyte_1 > right.register.sbyte_1 ? left.register.sbyte_1 : right.register.sbyte_1;
+                    vec.register.sbyte_2 = left.register.sbyte_2 > right.register.sbyte_2 ? left.register.sbyte_2 : right.register.sbyte_2;
+                    vec.register.sbyte_3 = left.register.sbyte_3 > right.register.sbyte_3 ? left.register.sbyte_3 : right.register.sbyte_3;
+                    vec.register.sbyte_4 = left.register.sbyte_4 > right.register.sbyte_4 ? left.register.sbyte_4 : right.register.sbyte_4;
+                    vec.register.sbyte_5 = left.register.sbyte_5 > right.register.sbyte_5 ? left.register.sbyte_5 : right.register.sbyte_5;
+                    vec.register.sbyte_6 = left.register.sbyte_6 > right.register.sbyte_6 ? left.register.sbyte_6 : right.register.sbyte_6;
+                    vec.register.sbyte_7 = left.register.sbyte_7 > right.register.sbyte_7 ? left.register.sbyte_7 : right.register.sbyte_7;
+                    vec.register.sbyte_8 = left.register.sbyte_8 > right.register.sbyte_8 ? left.register.sbyte_8 : right.register.sbyte_8;
+                    vec.register.sbyte_9 = left.register.sbyte_9 > right.register.sbyte_9 ? left.register.sbyte_9 : right.register.sbyte_9;
+                    vec.register.sbyte_10 = left.register.sbyte_10 > right.register.sbyte_10 ? left.register.sbyte_10 : right.register.sbyte_10;
+                    vec.register.sbyte_11 = left.register.sbyte_11 > right.register.sbyte_11 ? left.register.sbyte_11 : right.register.sbyte_11;
+                    vec.register.sbyte_12 = left.register.sbyte_12 > right.register.sbyte_12 ? left.register.sbyte_12 : right.register.sbyte_12;
+                    vec.register.sbyte_13 = left.register.sbyte_13 > right.register.sbyte_13 ? left.register.sbyte_13 : right.register.sbyte_13;
+                    vec.register.sbyte_14 = left.register.sbyte_14 > right.register.sbyte_14 ? left.register.sbyte_14 : right.register.sbyte_14;
+                    vec.register.sbyte_15 = left.register.sbyte_15 > right.register.sbyte_15 ? left.register.sbyte_15 : right.register.sbyte_15;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    vec.register.uint16_0 = left.register.uint16_0 > right.register.uint16_0 ? left.register.uint16_0 : right.register.uint16_0;
+                    vec.register.uint16_1 = left.register.uint16_1 > right.register.uint16_1 ? left.register.uint16_1 : right.register.uint16_1;
+                    vec.register.uint16_2 = left.register.uint16_2 > right.register.uint16_2 ? left.register.uint16_2 : right.register.uint16_2;
+                    vec.register.uint16_3 = left.register.uint16_3 > right.register.uint16_3 ? left.register.uint16_3 : right.register.uint16_3;
+                    vec.register.uint16_4 = left.register.uint16_4 > right.register.uint16_4 ? left.register.uint16_4 : right.register.uint16_4;
+                    vec.register.uint16_5 = left.register.uint16_5 > right.register.uint16_5 ? left.register.uint16_5 : right.register.uint16_5;
+                    vec.register.uint16_6 = left.register.uint16_6 > right.register.uint16_6 ? left.register.uint16_6 : right.register.uint16_6;
+                    vec.register.uint16_7 = left.register.uint16_7 > right.register.uint16_7 ? left.register.uint16_7 : right.register.uint16_7;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    vec.register.int16_0 = left.register.int16_0 > right.register.int16_0 ? left.register.int16_0 : right.register.int16_0;
+                    vec.register.int16_1 = left.register.int16_1 > right.register.int16_1 ? left.register.int16_1 : right.register.int16_1;
+                    vec.register.int16_2 = left.register.int16_2 > right.register.int16_2 ? left.register.int16_2 : right.register.int16_2;
+                    vec.register.int16_3 = left.register.int16_3 > right.register.int16_3 ? left.register.int16_3 : right.register.int16_3;
+                    vec.register.int16_4 = left.register.int16_4 > right.register.int16_4 ? left.register.int16_4 : right.register.int16_4;
+                    vec.register.int16_5 = left.register.int16_5 > right.register.int16_5 ? left.register.int16_5 : right.register.int16_5;
+                    vec.register.int16_6 = left.register.int16_6 > right.register.int16_6 ? left.register.int16_6 : right.register.int16_6;
+                    vec.register.int16_7 = left.register.int16_7 > right.register.int16_7 ? left.register.int16_7 : right.register.int16_7;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    vec.register.uint32_0 = left.register.uint32_0 > right.register.uint32_0 ? left.register.uint32_0 : right.register.uint32_0;
+                    vec.register.uint32_1 = left.register.uint32_1 > right.register.uint32_1 ? left.register.uint32_1 : right.register.uint32_1;
+                    vec.register.uint32_2 = left.register.uint32_2 > right.register.uint32_2 ? left.register.uint32_2 : right.register.uint32_2;
+                    vec.register.uint32_3 = left.register.uint32_3 > right.register.uint32_3 ? left.register.uint32_3 : right.register.uint32_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    vec.register.int32_0 = left.register.int32_0 > right.register.int32_0 ? left.register.int32_0 : right.register.int32_0;
+                    vec.register.int32_1 = left.register.int32_1 > right.register.int32_1 ? left.register.int32_1 : right.register.int32_1;
+                    vec.register.int32_2 = left.register.int32_2 > right.register.int32_2 ? left.register.int32_2 : right.register.int32_2;
+                    vec.register.int32_3 = left.register.int32_3 > right.register.int32_3 ? left.register.int32_3 : right.register.int32_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    vec.register.uint64_0 = left.register.uint64_0 > right.register.uint64_0 ? left.register.uint64_0 : right.register.uint64_0;
+                    vec.register.uint64_1 = left.register.uint64_1 > right.register.uint64_1 ? left.register.uint64_1 : right.register.uint64_1;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    vec.register.int64_0 = left.register.int64_0 > right.register.int64_0 ? left.register.int64_0 : right.register.int64_0;
+                    vec.register.int64_1 = left.register.int64_1 > right.register.int64_1 ? left.register.int64_1 : right.register.int64_1;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    vec.register.single_0 = left.register.single_0 > right.register.single_0 ? left.register.single_0 : right.register.single_0;
+                    vec.register.single_1 = left.register.single_1 > right.register.single_1 ? left.register.single_1 : right.register.single_1;
+                    vec.register.single_2 = left.register.single_2 > right.register.single_2 ? left.register.single_2 : right.register.single_2;
+                    vec.register.single_3 = left.register.single_3 > right.register.single_3 ? left.register.single_3 : right.register.single_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    vec.register.double_0 = left.register.double_0 > right.register.double_0 ? left.register.double_0 : right.register.double_0;
+                    vec.register.double_1 = left.register.double_1 > right.register.double_1 ? left.register.double_1 : right.register.double_1;
+                    return vec;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static T DotProduct(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                T product = GetZeroValue();
+                for (int g = 0; g < Count; g++)
+                {
+                    product = ScalarAdd(product, ScalarMultiply(left[g], right[g]));
+                }
+                return product;
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte product = 0;
+                    product += (Byte)(left.register.byte_0 * right.register.byte_0);
+                    product += (Byte)(left.register.byte_1 * right.register.byte_1);
+                    product += (Byte)(left.register.byte_2 * right.register.byte_2);
+                    product += (Byte)(left.register.byte_3 * right.register.byte_3);
+                    product += (Byte)(left.register.byte_4 * right.register.byte_4);
+                    product += (Byte)(left.register.byte_5 * right.register.byte_5);
+                    product += (Byte)(left.register.byte_6 * right.register.byte_6);
+                    product += (Byte)(left.register.byte_7 * right.register.byte_7);
+                    product += (Byte)(left.register.byte_8 * right.register.byte_8);
+                    product += (Byte)(left.register.byte_9 * right.register.byte_9);
+                    product += (Byte)(left.register.byte_10 * right.register.byte_10);
+                    product += (Byte)(left.register.byte_11 * right.register.byte_11);
+                    product += (Byte)(left.register.byte_12 * right.register.byte_12);
+                    product += (Byte)(left.register.byte_13 * right.register.byte_13);
+                    product += (Byte)(left.register.byte_14 * right.register.byte_14);
+                    product += (Byte)(left.register.byte_15 * right.register.byte_15);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte product = 0;
+                    product += (SByte)(left.register.sbyte_0 * right.register.sbyte_0);
+                    product += (SByte)(left.register.sbyte_1 * right.register.sbyte_1);
+                    product += (SByte)(left.register.sbyte_2 * right.register.sbyte_2);
+                    product += (SByte)(left.register.sbyte_3 * right.register.sbyte_3);
+                    product += (SByte)(left.register.sbyte_4 * right.register.sbyte_4);
+                    product += (SByte)(left.register.sbyte_5 * right.register.sbyte_5);
+                    product += (SByte)(left.register.sbyte_6 * right.register.sbyte_6);
+                    product += (SByte)(left.register.sbyte_7 * right.register.sbyte_7);
+                    product += (SByte)(left.register.sbyte_8 * right.register.sbyte_8);
+                    product += (SByte)(left.register.sbyte_9 * right.register.sbyte_9);
+                    product += (SByte)(left.register.sbyte_10 * right.register.sbyte_10);
+                    product += (SByte)(left.register.sbyte_11 * right.register.sbyte_11);
+                    product += (SByte)(left.register.sbyte_12 * right.register.sbyte_12);
+                    product += (SByte)(left.register.sbyte_13 * right.register.sbyte_13);
+                    product += (SByte)(left.register.sbyte_14 * right.register.sbyte_14);
+                    product += (SByte)(left.register.sbyte_15 * right.register.sbyte_15);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16 product = 0;
+                    product += (UInt16)(left.register.uint16_0 * right.register.uint16_0);
+                    product += (UInt16)(left.register.uint16_1 * right.register.uint16_1);
+                    product += (UInt16)(left.register.uint16_2 * right.register.uint16_2);
+                    product += (UInt16)(left.register.uint16_3 * right.register.uint16_3);
+                    product += (UInt16)(left.register.uint16_4 * right.register.uint16_4);
+                    product += (UInt16)(left.register.uint16_5 * right.register.uint16_5);
+                    product += (UInt16)(left.register.uint16_6 * right.register.uint16_6);
+                    product += (UInt16)(left.register.uint16_7 * right.register.uint16_7);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16 product = 0;
+                    product += (Int16)(left.register.int16_0 * right.register.int16_0);
+                    product += (Int16)(left.register.int16_1 * right.register.int16_1);
+                    product += (Int16)(left.register.int16_2 * right.register.int16_2);
+                    product += (Int16)(left.register.int16_3 * right.register.int16_3);
+                    product += (Int16)(left.register.int16_4 * right.register.int16_4);
+                    product += (Int16)(left.register.int16_5 * right.register.int16_5);
+                    product += (Int16)(left.register.int16_6 * right.register.int16_6);
+                    product += (Int16)(left.register.int16_7 * right.register.int16_7);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32 product = 0;
+                    product += (UInt32)(left.register.uint32_0 * right.register.uint32_0);
+                    product += (UInt32)(left.register.uint32_1 * right.register.uint32_1);
+                    product += (UInt32)(left.register.uint32_2 * right.register.uint32_2);
+                    product += (UInt32)(left.register.uint32_3 * right.register.uint32_3);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32 product = 0;
+                    product += (Int32)(left.register.int32_0 * right.register.int32_0);
+                    product += (Int32)(left.register.int32_1 * right.register.int32_1);
+                    product += (Int32)(left.register.int32_2 * right.register.int32_2);
+                    product += (Int32)(left.register.int32_3 * right.register.int32_3);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64 product = 0;
+                    product += (UInt64)(left.register.uint64_0 * right.register.uint64_0);
+                    product += (UInt64)(left.register.uint64_1 * right.register.uint64_1);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64 product = 0;
+                    product += (Int64)(left.register.int64_0 * right.register.int64_0);
+                    product += (Int64)(left.register.int64_1 * right.register.int64_1);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single product = 0;
+                    product += (Single)(left.register.single_0 * right.register.single_0);
+                    product += (Single)(left.register.single_1 * right.register.single_1);
+                    product += (Single)(left.register.single_2 * right.register.single_2);
+                    product += (Single)(left.register.single_3 * right.register.single_3);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double product = 0;
+                    product += (Double)(left.register.double_0 * right.register.double_0);
+                    product += (Double)(left.register.double_1 * right.register.double_1);
+                    return (T)(object)product;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static unsafe Vector<T> SquareRoot(Vector<T> value)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Byte)Math.Sqrt((Byte)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (SByte)Math.Sqrt((SByte)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (UInt16)Math.Sqrt((UInt16)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int16)Math.Sqrt((Int16)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (UInt32)Math.Sqrt((UInt32)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int32)Math.Sqrt((Int32)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (UInt64)Math.Sqrt((UInt64)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int64)Math.Sqrt((Int64)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Single)Math.Sqrt((Single)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Double)Math.Sqrt((Double)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    value.register.byte_0 = (Byte)Math.Sqrt(value.register.byte_0);
+                    value.register.byte_1 = (Byte)Math.Sqrt(value.register.byte_1);
+                    value.register.byte_2 = (Byte)Math.Sqrt(value.register.byte_2);
+                    value.register.byte_3 = (Byte)Math.Sqrt(value.register.byte_3);
+                    value.register.byte_4 = (Byte)Math.Sqrt(value.register.byte_4);
+                    value.register.byte_5 = (Byte)Math.Sqrt(value.register.byte_5);
+                    value.register.byte_6 = (Byte)Math.Sqrt(value.register.byte_6);
+                    value.register.byte_7 = (Byte)Math.Sqrt(value.register.byte_7);
+                    value.register.byte_8 = (Byte)Math.Sqrt(value.register.byte_8);
+                    value.register.byte_9 = (Byte)Math.Sqrt(value.register.byte_9);
+                    value.register.byte_10 = (Byte)Math.Sqrt(value.register.byte_10);
+                    value.register.byte_11 = (Byte)Math.Sqrt(value.register.byte_11);
+                    value.register.byte_12 = (Byte)Math.Sqrt(value.register.byte_12);
+                    value.register.byte_13 = (Byte)Math.Sqrt(value.register.byte_13);
+                    value.register.byte_14 = (Byte)Math.Sqrt(value.register.byte_14);
+                    value.register.byte_15 = (Byte)Math.Sqrt(value.register.byte_15);
+                    return value;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    value.register.sbyte_0 = (SByte)Math.Sqrt(value.register.sbyte_0);
+                    value.register.sbyte_1 = (SByte)Math.Sqrt(value.register.sbyte_1);
+                    value.register.sbyte_2 = (SByte)Math.Sqrt(value.register.sbyte_2);
+                    value.register.sbyte_3 = (SByte)Math.Sqrt(value.register.sbyte_3);
+                    value.register.sbyte_4 = (SByte)Math.Sqrt(value.register.sbyte_4);
+                    value.register.sbyte_5 = (SByte)Math.Sqrt(value.register.sbyte_5);
+                    value.register.sbyte_6 = (SByte)Math.Sqrt(value.register.sbyte_6);
+                    value.register.sbyte_7 = (SByte)Math.Sqrt(value.register.sbyte_7);
+                    value.register.sbyte_8 = (SByte)Math.Sqrt(value.register.sbyte_8);
+                    value.register.sbyte_9 = (SByte)Math.Sqrt(value.register.sbyte_9);
+                    value.register.sbyte_10 = (SByte)Math.Sqrt(value.register.sbyte_10);
+                    value.register.sbyte_11 = (SByte)Math.Sqrt(value.register.sbyte_11);
+                    value.register.sbyte_12 = (SByte)Math.Sqrt(value.register.sbyte_12);
+                    value.register.sbyte_13 = (SByte)Math.Sqrt(value.register.sbyte_13);
+                    value.register.sbyte_14 = (SByte)Math.Sqrt(value.register.sbyte_14);
+                    value.register.sbyte_15 = (SByte)Math.Sqrt(value.register.sbyte_15);
+                    return value;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    value.register.uint16_0 = (UInt16)Math.Sqrt(value.register.uint16_0);
+                    value.register.uint16_1 = (UInt16)Math.Sqrt(value.register.uint16_1);
+                    value.register.uint16_2 = (UInt16)Math.Sqrt(value.register.uint16_2);
+                    value.register.uint16_3 = (UInt16)Math.Sqrt(value.register.uint16_3);
+                    value.register.uint16_4 = (UInt16)Math.Sqrt(value.register.uint16_4);
+                    value.register.uint16_5 = (UInt16)Math.Sqrt(value.register.uint16_5);
+                    value.register.uint16_6 = (UInt16)Math.Sqrt(value.register.uint16_6);
+                    value.register.uint16_7 = (UInt16)Math.Sqrt(value.register.uint16_7);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    value.register.int16_0 = (Int16)Math.Sqrt(value.register.int16_0);
+                    value.register.int16_1 = (Int16)Math.Sqrt(value.register.int16_1);
+                    value.register.int16_2 = (Int16)Math.Sqrt(value.register.int16_2);
+                    value.register.int16_3 = (Int16)Math.Sqrt(value.register.int16_3);
+                    value.register.int16_4 = (Int16)Math.Sqrt(value.register.int16_4);
+                    value.register.int16_5 = (Int16)Math.Sqrt(value.register.int16_5);
+                    value.register.int16_6 = (Int16)Math.Sqrt(value.register.int16_6);
+                    value.register.int16_7 = (Int16)Math.Sqrt(value.register.int16_7);
+                    return value;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    value.register.uint32_0 = (UInt32)Math.Sqrt(value.register.uint32_0);
+                    value.register.uint32_1 = (UInt32)Math.Sqrt(value.register.uint32_1);
+                    value.register.uint32_2 = (UInt32)Math.Sqrt(value.register.uint32_2);
+                    value.register.uint32_3 = (UInt32)Math.Sqrt(value.register.uint32_3);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    value.register.int32_0 = (Int32)Math.Sqrt(value.register.int32_0);
+                    value.register.int32_1 = (Int32)Math.Sqrt(value.register.int32_1);
+                    value.register.int32_2 = (Int32)Math.Sqrt(value.register.int32_2);
+                    value.register.int32_3 = (Int32)Math.Sqrt(value.register.int32_3);
+                    return value;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    value.register.uint64_0 = (UInt64)Math.Sqrt(value.register.uint64_0);
+                    value.register.uint64_1 = (UInt64)Math.Sqrt(value.register.uint64_1);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    value.register.int64_0 = (Int64)Math.Sqrt(value.register.int64_0);
+                    value.register.int64_1 = (Int64)Math.Sqrt(value.register.int64_1);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    value.register.single_0 = (Single)Math.Sqrt(value.register.single_0);
+                    value.register.single_1 = (Single)Math.Sqrt(value.register.single_1);
+                    value.register.single_2 = (Single)Math.Sqrt(value.register.single_2);
+                    value.register.single_3 = (Single)Math.Sqrt(value.register.single_3);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    value.register.double_0 = (Double)Math.Sqrt(value.register.double_0);
+                    value.register.double_1 = (Double)Math.Sqrt(value.register.double_1);
+                    return value;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+        #endregion Internal Math Methods
+
+        #region Helper Methods
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static bool ScalarEquals(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (Byte)(object)left == (Byte)(object)right;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (SByte)(object)left == (SByte)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (UInt16)(object)left == (UInt16)(object)right;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (Int16)(object)left == (Int16)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (UInt32)(object)left == (UInt32)(object)right;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (Int32)(object)left == (Int32)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (UInt64)(object)left == (UInt64)(object)right;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (Int64)(object)left == (Int64)(object)right;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (Single)(object)left == (Single)(object)right;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (Double)(object)left == (Double)(object)right;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static bool ScalarLessThan(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (Byte)(object)left < (Byte)(object)right;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (SByte)(object)left < (SByte)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (UInt16)(object)left < (UInt16)(object)right;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (Int16)(object)left < (Int16)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (UInt32)(object)left < (UInt32)(object)right;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (Int32)(object)left < (Int32)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (UInt64)(object)left < (UInt64)(object)right;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (Int64)(object)left < (Int64)(object)right;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (Single)(object)left < (Single)(object)right;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (Double)(object)left < (Double)(object)right;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static bool ScalarGreaterThan(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (Byte)(object)left > (Byte)(object)right;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (SByte)(object)left > (SByte)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (UInt16)(object)left > (UInt16)(object)right;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (Int16)(object)left > (Int16)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (UInt32)(object)left > (UInt32)(object)right;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (Int32)(object)left > (Int32)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (UInt64)(object)left > (UInt64)(object)right;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (Int64)(object)left > (Int64)(object)right;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (Single)(object)left > (Single)(object)right;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (Double)(object)left > (Double)(object)right;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T ScalarAdd(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)(Byte)((Byte)(object)left + (Byte)(object)right);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)(SByte)((SByte)(object)left + (SByte)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)(UInt16)((UInt16)(object)left + (UInt16)(object)right);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)(Int16)((Int16)(object)left + (Int16)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)(UInt32)((UInt32)(object)left + (UInt32)(object)right);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)(Int32)((Int32)(object)left + (Int32)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)(UInt64)((UInt64)(object)left + (UInt64)(object)right);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)(Int64)((Int64)(object)left + (Int64)(object)right);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)(Single)((Single)(object)left + (Single)(object)right);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)(Double)((Double)(object)left + (Double)(object)right);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T ScalarSubtract(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)(Byte)((Byte)(object)left - (Byte)(object)right);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)(SByte)((SByte)(object)left - (SByte)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)(UInt16)((UInt16)(object)left - (UInt16)(object)right);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)(Int16)((Int16)(object)left - (Int16)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)(UInt32)((UInt32)(object)left - (UInt32)(object)right);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)(Int32)((Int32)(object)left - (Int32)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)(UInt64)((UInt64)(object)left - (UInt64)(object)right);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)(Int64)((Int64)(object)left - (Int64)(object)right);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)(Single)((Single)(object)left - (Single)(object)right);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)(Double)((Double)(object)left - (Double)(object)right);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T ScalarMultiply(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)(Byte)((Byte)(object)left * (Byte)(object)right);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)(SByte)((SByte)(object)left * (SByte)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)(UInt16)((UInt16)(object)left * (UInt16)(object)right);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)(Int16)((Int16)(object)left * (Int16)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)(UInt32)((UInt32)(object)left * (UInt32)(object)right);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)(Int32)((Int32)(object)left * (Int32)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)(UInt64)((UInt64)(object)left * (UInt64)(object)right);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)(Int64)((Int64)(object)left * (Int64)(object)right);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)(Single)((Single)(object)left * (Single)(object)right);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)(Double)((Double)(object)left * (Double)(object)right);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T ScalarDivide(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)(Byte)((Byte)(object)left / (Byte)(object)right);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)(SByte)((SByte)(object)left / (SByte)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)(UInt16)((UInt16)(object)left / (UInt16)(object)right);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)(Int16)((Int16)(object)left / (Int16)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)(UInt32)((UInt32)(object)left / (UInt32)(object)right);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)(Int32)((Int32)(object)left / (Int32)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)(UInt64)((UInt64)(object)left / (UInt64)(object)right);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)(Int64)((Int64)(object)left / (Int64)(object)right);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)(Single)((Single)(object)left / (Single)(object)right);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)(Double)((Double)(object)left / (Double)(object)right);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T GetZeroValue()
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                Byte value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                SByte value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                UInt16 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                Int16 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                UInt32 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                Int32 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                UInt64 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                Int64 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                Single value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                Double value = 0;
+                return (T)(object)value;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T GetOneValue()
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                Byte value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                SByte value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                UInt16 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                Int16 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                UInt32 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                Int32 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                UInt64 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                Int64 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                Single value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                Double value = 1;
+                return (T)(object)value;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T GetAllBitsSetValue()
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)ConstantHelper.GetByteWithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)ConstantHelper.GetSByteWithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)ConstantHelper.GetUInt16WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)ConstantHelper.GetInt16WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)ConstantHelper.GetUInt32WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)ConstantHelper.GetInt32WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)ConstantHelper.GetUInt64WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)ConstantHelper.GetInt64WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)ConstantHelper.GetSingleWithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)ConstantHelper.GetDoubleWithAllBitsSet();
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+        #endregion
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/Vector_Operations.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/Vector_Operations.cs
new file mode 100644 (file)
index 0000000..83a5ad3
--- /dev/null
@@ -0,0 +1,865 @@
+// 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.
+
+using System.Runtime.CompilerServices;
+
+namespace System.Numerics
+{
+    /// <summary>
+    /// Contains various methods useful for creating, manipulating, combining, and converting generic vectors with one another.
+    /// </summary>
+    public static class Vector
+    {
+        // JIT is not looking at the Vector class methods
+        // all methods here should be inlined and they must be implemented in terms of Vector<T> intrinsics
+        #region Select Methods
+        /// <summary>
+        /// Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.
+        /// </summary>
+        /// <param name="condition">The integral mask vector used to drive selection.</param>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The new vector with elements selected based on the mask.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Single> ConditionalSelect(Vector<int> condition, Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<Single>)Vector<Single>.ConditionalSelect((Vector<Single>)condition, left, right);
+        }
+
+        /// <summary>
+        /// Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.
+        /// </summary>
+        /// <param name="condition">The integral mask vector used to drive selection.</param>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The new vector with elements selected based on the mask.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<double> ConditionalSelect(Vector<long> condition, Vector<double> left, Vector<double> right)
+        {
+            return (Vector<double>)Vector<double>.ConditionalSelect((Vector<double>)condition, left, right);
+        }
+
+        /// <summary>
+        /// Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.
+        /// </summary>
+        /// <param name="condition">The mask vector used to drive selection.</param>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The new vector with elements selected based on the mask.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> ConditionalSelect<T>(Vector<T> condition, Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.ConditionalSelect(condition, left, right);
+        }
+        #endregion Select Methods
+
+        #region Comparison methods
+        #region Equals methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left and right were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Equals<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether elements in the left and right floating point vectors were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> Equals(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left and right were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> Equals(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether elements in the left and right floating point vectors were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> Equals(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left and right were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> Equals(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether each pair of elements in the given vectors are equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The first vector to compare.</param>
+        /// <returns>True if all elements are equal; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool EqualsAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left == right;
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any single pair of elements in the given vectors are equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any element pairs are equal; False if no element pairs are equal.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool EqualsAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return !Vector<T>.Equals(left, right).Equals(Vector<T>.Zero);
+        }
+        #endregion Equals methods
+
+        #region Lessthan Methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> LessThan<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> LessThan(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> LessThan(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> LessThan(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> LessThan(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether all of the elements in left are less than their corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if all elements in left are less than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool LessThanAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.LessThan(left, right);
+            return cond.Equals(Vector<int>.AllOnes);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any element in left is less than its corresponding element in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any elements in left are less than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool LessThanAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.LessThan(left, right);
+            return !cond.Equals(Vector<int>.Zero);
+        }
+        #endregion LessthanMethods
+
+        #region Lessthanorequal methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> LessThanOrEqual<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> LessThanOrEqual(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> LessThanOrEqual(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> LessThanOrEqual(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> LessThanOrEqual(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether all elements in left are less than or equal to their corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if all elements in left are less than or equal to their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool LessThanOrEqualAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.LessThanOrEqual(left, right);
+            return cond.Equals(Vector<int>.AllOnes);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any element in left is less than or equal to its corresponding element in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any elements in left are less than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool LessThanOrEqualAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.LessThanOrEqual(left, right);
+            return !cond.Equals(Vector<int>.Zero);
+        }
+        #endregion Lessthanorequal methods
+
+        #region Greaterthan methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> GreaterThan<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> GreaterThan(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> GreaterThan(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> GreaterThan(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> GreaterThan(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether all elements in left are greater than the corresponding elements in right.
+        /// elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if all elements in left are greater than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool GreaterThanAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.GreaterThan(left, right);
+            return cond.Equals(Vector<int>.AllOnes);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any element in left is greater than its corresponding element in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any elements in left are greater than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool GreaterThanAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.GreaterThan(left, right);
+            return !cond.Equals(Vector<int>.Zero);
+        }
+        #endregion Greaterthan methods
+
+        #region Greaterthanorequal methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> GreaterThanOrEqual<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were greater than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> GreaterThanOrEqual(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> GreaterThanOrEqual(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> GreaterThanOrEqual(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were greater than or equal to 
+        /// their corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> GreaterThanOrEqual(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether all of the elements in left are greater than or equal to 
+        /// their corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if all elements in left are greater than or equal to their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool GreaterThanOrEqualAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.GreaterThanOrEqual(left, right);
+            return cond.Equals(Vector<int>.AllOnes);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any element in left is greater than or equal to its corresponding element in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any elements in left are greater than or equal to their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool GreaterThanOrEqualAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.GreaterThanOrEqual(left, right);
+            return !cond.Equals(Vector<int>.Zero);
+        }
+        #endregion Greaterthanorequal methods
+        #endregion Comparison methods
+
+        #region Vector Math Methods
+        // Every operation must either be a JIT intrinsic or implemented over a JIT intrinsic
+        // as a thin wrapper
+        // Operations implemented over a JIT intrinsic should be inlined
+        // Methods that do not have a <T> type parameter are recognized as intrinsics
+        /// <summary>
+        /// Returns whether or not vector operations are subject to hardware acceleration through JIT intrinsic support.
+        /// </summary>
+        [JitIntrinsic]
+        public static bool IsHardwareAccelerated
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        // Vector<T>
+        // Basic Math
+        // All Math operations for Vector<T> are aggressively inlined here
+
+        /// <summary>
+        /// Returns a new vector whose elements are the absolute values of the given vector's elements.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The absolute value vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Abs<T>(Vector<T> value) where T : struct
+        {
+            return Vector<T>.Abs(value);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are the minimum of each pair of elements in the two given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The minimum vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Min<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.Min(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are the maximum of each pair of elements in the two given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The maximum vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Max<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.Max(left, right);
+        }
+
+        // Specialized vector operations
+
+        /// <summary>
+        /// Returns the dot product of two vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The dot product.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static T Dot<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.DotProduct(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are the square roots of the given vector's elements.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The square root vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> SquareRoot<T>(Vector<T> value) where T : struct
+        {
+            return Vector<T>.SquareRoot(value);
+        }
+        #endregion Vector Math Methods
+
+        #region Named Arithmetic Operators
+        /// <summary>
+        /// Creates a new vector whose values are the sum of each pair of elements from the two given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The summed vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Add<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left + right;
+        }
+
+        /// <summary>
+        /// Creates a new vector whose values are the difference between each pairs of elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The difference vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Subtract<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left - right;
+        }
+
+        /// <summary>
+        /// Creates a new vector whose values are the product of each pair of elements from the two given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The summed vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Multiply<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left * right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose values are the values of the given vector each multiplied by a scalar value.
+        /// </summary>
+        /// <param name="left">The source vector.</param>
+        /// <param name="right">The scalar factor.</param>
+        /// <returns>The scaled vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Multiply<T>(Vector<T> left, T right) where T : struct
+        {
+            return left * right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose values are the values of the given vector each multiplied by a scalar value.
+        /// </summary>
+        /// <param name="left">The scalar factor.</param>
+        /// <param name="right">The source vector.</param>
+        /// <returns>The scaled vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Multiply<T>(T left, Vector<T> right) where T : struct
+        {
+            return left * right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose values are the result of dividing the first vector's elements 
+        /// by the corresponding elements in the second vector.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The divided vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Divide<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left / right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are the given vector's elements negated.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The negated vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Negate<T>(Vector<T> value) where T : struct
+        {
+            return -value;
+        }
+        #endregion Named Arithmetic Operators
+
+        #region Named Bitwise Operators
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-and operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> BitwiseAnd<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left & right;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-or operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> BitwiseOr<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left | right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are obtained by taking the one's complement of the given vector's elements.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The one's complement vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> OnesComplement<T>(Vector<T> value) where T : struct
+        {
+            return ~value;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-exclusive-or operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Xor<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left ^ right;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-and-not operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> AndNot<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left & ~right;
+        }
+        #endregion Named Bitwise Operators
+
+        #region Conversion Methods
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of unsigned bytes.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Byte> AsVectorByte<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Byte>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of signed bytes.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<SByte> AsVectorSByte<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<SByte>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of 16-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<UInt16> AsVectorUInt16<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<UInt16>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of signed 16-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Int16> AsVectorInt16<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Int16>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of unsigned 32-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<UInt32> AsVectorUInt32<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<UInt32>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of signed 32-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Int32> AsVectorInt32<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Int32>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of unsigned 64-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<UInt64> AsVectorUInt64<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<UInt64>)value;
+        }
+
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of signed 64-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Int64> AsVectorInt64<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Int64>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of 32-bit floating point numbers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Single> AsVectorSingle<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Single>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of 64-bit floating point numbers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Double> AsVectorDouble<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Double>)value;
+        }
+        #endregion Conversion Methods
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.exclude.sources b/mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.exclude.sources
new file mode 100644 (file)
index 0000000..0b18840
--- /dev/null
@@ -0,0 +1,7 @@
+SR.cs
+System.Numerics/ConstantHelper.cs
+System.Numerics/HashCodeHelper.cs
+System.Numerics/JitIntrinsicAttribute.cs
+System.Numerics/Register.cs
+System.Numerics/Vector_Operations.cs
+System.Numerics/Vector.cs
diff --git a/mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.sources b/mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.sources
new file mode 100644 (file)
index 0000000..d4f1837
--- /dev/null
@@ -0,0 +1 @@
+#include System.Numerics.Vectors.dll.sources
index f6f93e8dc510008bc9bd8a436b8b3456845b044e..08f4dc4501e1a6b05d228077fdc3baf39483dfcb 100644 (file)
@@ -4,7 +4,7 @@ include ../../build/rules.make
 
 LIBRARY = System.Numerics.dll
 LIB_REFS = System
-LIB_MCS_FLAGS = /unsafe -d:MONO
+LIB_MCS_FLAGS = /unsafe -nowarn:414
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 TXT_RESOURCE_STRINGS = ../referencesource/System.Numerics/System.Numerics.txt
diff --git a/mcs/class/System.Numerics/ReferenceSources/Environment.cs b/mcs/class/System.Numerics/ReferenceSources/Environment.cs
deleted file mode 100644 (file)
index 5377cfe..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Globalization;
-
-namespace System
-{
-       partial class Environment
-       {
-               internal static string GetResourceString (string key)
-               {
-                       return key;
-               }
-
-               internal static string GetResourceString (string key, CultureInfo culture)
-               {
-                       return key;
-               }
-
-               internal static string GetResourceString (string key, params object[] values)
-               {
-                       return string.Format (CultureInfo.InvariantCulture, key, values);
-               }
-       }
-}
\ No newline at end of file
index 20d631a4dd80d2aa4ab2b1ad97f9b04ae9ec4459..2f52187057da0149ac696e45579f64a175841f13 100644 (file)
@@ -1,10 +1,22 @@
 ../../build/common/Consts.cs
 ../../build/common/SR.cs
 Assembly/AssemblyInfo.cs
-ReferenceSources/Environment.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
diff --git a/mcs/class/System.Reflection.Context/Assembly/AssemblyInfo.cs b/mcs/class/System.Reflection.Context/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..67d4912
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Reflection.Context.dll")]
+[assembly: AssemblyDescription ("System.Reflection.Context.dll")]
+[assembly: AssemblyDefaultAlias ("System.Reflection.Context.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Reflection.Context/Makefile b/mcs/class/System.Reflection.Context/Makefile
new file mode 100644 (file)
index 0000000..73bee9e
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Reflection.Context
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Reflection.Context.dll
+LIB_REFS = System
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Reflection.Context/System.Reflection.Context.dll.sources b/mcs/class/System.Reflection.Context/System.Reflection.Context.dll.sources
new file mode 100644 (file)
index 0000000..1820689
--- /dev/null
@@ -0,0 +1,5 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Reflection.Context/CustomReflectionContext.cs
diff --git a/mcs/class/System.Reflection.Context/System.Reflection.Context/CustomReflectionContext.cs b/mcs/class/System.Reflection.Context/System.Reflection.Context/CustomReflectionContext.cs
new file mode 100644 (file)
index 0000000..28a6e62
--- /dev/null
@@ -0,0 +1,93 @@
+//
+// CustomReflectionContext.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace System.Reflection.Context
+{
+       public abstract class CustomReflectionContext : ReflectionContext
+       {
+               [MonoTODO]
+               protected CustomReflectionContext ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected CustomReflectionContext (ReflectionContext source)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected virtual IEnumerable<PropertyInfo> AddProperties (Type type)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected PropertyInfo CreateProperty (Type propertyType, string name, Func<object, object> getter, Action<object, object> setter)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected PropertyInfo CreateProperty (Type propertyType, string name, Func<object, object> getter, Action<object, object> setter, IEnumerable<Attribute> propertyCustomAttributes, IEnumerable<Attribute> getterCustomAttributes, IEnumerable<Attribute> setterCustomAttributes)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected virtual IEnumerable<object> GetCustomAttributes (MemberInfo member, IEnumerable<object> declaredAttributes)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected virtual IEnumerable<object> GetCustomAttributes (ParameterInfo parameter, IEnumerable<object> declaredAttributes)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override Assembly MapAssembly (Assembly assembly)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override TypeInfo MapType (TypeInfo type)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
diff --git a/mcs/class/System.Reflection.DispatchProxy/Assembly/AssemblyInfo.cs b/mcs/class/System.Reflection.DispatchProxy/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..993d77c
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Reflection.DispatchProxy.dll")]
+[assembly: AssemblyDescription ("System.Reflection.DispatchProxy.dll")]
+[assembly: AssemblyDefaultAlias ("System.Reflection.DispatchProxy.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Reflection.DispatchProxy/Makefile b/mcs/class/System.Reflection.DispatchProxy/Makefile
new file mode 100644 (file)
index 0000000..ddc8396
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Reflection.DispatchProxy
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Reflection.DispatchProxy.dll
+LIB_REFS = System
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources b/mcs/class/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources
new file mode 100644 (file)
index 0000000..da5d484
--- /dev/null
@@ -0,0 +1,5 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Reflection/DispatchProxy.cs
diff --git a/mcs/class/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs b/mcs/class/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs
new file mode 100644 (file)
index 0000000..540e525
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// DispatchProxy.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Reflection
+{
+       public abstract class DispatchProxy
+       {
+               [MonoTODO]
+               protected DispatchProxy()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static T Create<T, TProxy> () where TProxy : DispatchProxy
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected abstract object Invoke (MethodInfo targetMethod, object[] args);
+       }
+}
diff --git a/mcs/class/System.Runtime.InteropServices.RuntimeInformation/Assembly/AssemblyInfo.cs b/mcs/class/System.Runtime.InteropServices.RuntimeInformation/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..21e80b5
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Runtime.InteropServices.RuntimeInformation.dll")]
+[assembly: AssemblyDescription ("System.Runtime.InteropServices.RuntimeInformation.dll")]
+[assembly: AssemblyDefaultAlias ("System.Runtime.InteropServices.RuntimeInformation.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Runtime.InteropServices.RuntimeInformation/Makefile b/mcs/class/System.Runtime.InteropServices.RuntimeInformation/Makefile
new file mode 100644 (file)
index 0000000..7415110
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Runtime.InteropServices.RuntimeInformation
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Runtime.InteropServices.RuntimeInformation.dll
+LIB_REFS = System
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices.RuntimeInformation.dll.sources b/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices.RuntimeInformation.dll.sources
new file mode 100644 (file)
index 0000000..c3c7107
--- /dev/null
@@ -0,0 +1,7 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Runtime.InteropServices/Architecture.cs
+System.Runtime.InteropServices/OSPlatform.cs
+System.Runtime.InteropServices/RuntimeInformation.cs
diff --git a/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/Architecture.cs b/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/Architecture.cs
new file mode 100644 (file)
index 0000000..9c71a33
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// Architecture.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Runtime.InteropServices
+{
+       public enum Architecture
+       {
+               X86,
+               X64,
+               Arm,
+               Arm64
+       }
+}
diff --git a/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/OSPlatform.cs b/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/OSPlatform.cs
new file mode 100644 (file)
index 0000000..b2b1b85
--- /dev/null
@@ -0,0 +1,91 @@
+//
+// OSPlatform.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Runtime.InteropServices
+{
+       public struct OSPlatform : IEquatable<OSPlatform>
+       {
+               private readonly string _osPlatform;
+
+               public static OSPlatform Linux { get; } = new OSPlatform ("LINUX");
+
+               public static OSPlatform OSX { get; } = new OSPlatform ("OSX");
+
+               public static OSPlatform Windows { get; } = new OSPlatform ("WINDOWS");
+
+               private OSPlatform (string osPlatform)
+               {
+                       if (osPlatform == null) throw new ArgumentNullException (nameof (osPlatform));
+                       if (osPlatform.Length == 0) throw new ArgumentException ("Value cannot be empty.", nameof (osPlatform));
+                       
+                       _osPlatform = osPlatform;
+               }
+
+               public static OSPlatform Create (string osPlatform)
+               {
+                       return new OSPlatform (osPlatform);
+               }
+
+               public bool Equals (OSPlatform other)
+               {
+                       return Equals (other._osPlatform);
+               }
+
+               internal bool Equals (string other)
+               {
+                       return string.Equals (_osPlatform, other, StringComparison.Ordinal);
+               }
+
+               public override bool Equals (object obj)
+               {
+                       return obj is OSPlatform && Equals ((OSPlatform)obj);
+               }
+
+               public override int GetHashCode ()
+               {
+                       return _osPlatform == null ? 0 : _osPlatform.GetHashCode ();
+               }
+
+               public override string ToString ()
+               {
+                       return _osPlatform ?? string.Empty;
+               }
+
+               public static bool operator ==(OSPlatform left, OSPlatform right)
+               {
+                       return left.Equals (right);
+               }
+
+               public static bool operator !=(OSPlatform left, OSPlatform right)
+               {
+                       return !(left == right);
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/RuntimeInformation.cs b/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/RuntimeInformation.cs
new file mode 100644 (file)
index 0000000..24be904
--- /dev/null
@@ -0,0 +1,91 @@
+//
+// RuntimeInformation.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.IO;
+using System.Reflection;
+
+namespace System.Runtime.InteropServices
+{
+       public static class RuntimeInformation
+       {
+               [DllImport ("__Internal")]
+               extern static string mono_get_runtime_build_info ();
+
+               public static string FrameworkDescription
+               {
+                       get
+                       {
+                               return mono_get_runtime_build_info ();
+                       }
+               }
+
+               public static bool IsOSPlatform (OSPlatform osPlatform)
+               {
+                       // TODO: very barebones implementation
+
+                       if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+                               return osPlatform == OSPlatform.Windows;
+
+                       if (Environment.OSVersion.Platform == PlatformID.Unix && File.Exists ("/usr/lib/libc.dylib"))
+                               return osPlatform == OSPlatform.OSX;
+
+                       if (Environment.OSVersion.Platform == PlatformID.Unix)
+                               return osPlatform == OSPlatform.Linux;
+
+                       return false;
+               }
+
+               public static string OSDescription
+               {
+                       get
+                       {
+                               return Environment.OSVersion.VersionString;
+                       }
+               }
+
+               public static Architecture OSArchitecture
+               {
+                       get
+                       {
+                               // TODO: very barebones implementation, doesn't respect ARM
+                               return Environment.Is64BitOperatingSystem ? Architecture.X64 : Architecture.X86;
+                       }
+               }
+
+               public static Architecture ProcessArchitecture
+               {
+                       get
+                       {
+                               // TODO: very barebones implementation, doesn't respect ARM                     
+                               return Environment.Is64BitProcess ? Architecture.X64 : Architecture.X86;
+                       }
+               }
+       }
+}
index cbab4c217e351dd889fb43deb4e38ddaf89e334c..86b4617162fc6748ee66e72bc260d87eb70c45d4 100644 (file)
@@ -53,7 +53,7 @@ namespace SoapShared
                        Serialize(obj, ms);\r
                        ms.Position = 0;\r
                        Object des = Deserialize(ms);\r
-                       Assertion.AssertEquals(obj.GetType(), des.GetType());\r
+                       Assert.AreEqual (obj.GetType(), des.GetType());\r
                }\r
 \r
                private void Serialize(object ob, Stream stream)\r
index d3914d9b327e196bbcb49272f85209a824af0798..3aee88df4a84300bb5aa06789fee44bc0d07f56d 100644 (file)
@@ -222,7 +222,7 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap
                        if (expected != null && expected.GetType().IsArray)\r
                                EqualsArray (message, (Array)expected, (Array)actual);\r
                        else\r
-                               Assertion.AssertEquals (message, expected, actual);\r
+                               Assert.AreEqual (expected, actual, message);\r\r
                }\r
 \r
                public static void EqualsArray (string message, object oar1, object oar2)\r
index 9735ce04b04384613adcd857558bf1c0e3010d9e..91fdd7857d861780fc152c39bed8dd11247859a7 100644 (file)
@@ -171,8 +171,8 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                \r
                private object Serialize(object objGraph) {\r
                        MemoryStream stream = new MemoryStream();\r
-                       Assertion.Assert(objGraph != null);\r
-                       Assertion.Assert(stream != null);\r
+                       Assert.IsTrue(objGraph != null);\r
+                       Assert.IsTrue(stream != null);\r
                        _soapFormatter.SurrogateSelector = _surrogate;\r
                        _soapFormatter.Serialize(stream, objGraph);\r
                        \r
@@ -182,8 +182,8 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                        stream.Position = 0;\r
                        \r
                        object objReturn = _soapFormatterDeserializer.Deserialize(stream);\r
-                       Assertion.Assert(objReturn != null);\r
-                       Assertion.AssertEquals("#Tests "+objGraph.GetType(), objGraph.GetType(), objReturn.GetType());\r
+                       Assert.IsTrue(objReturn != null);\r
+                       Assert.AreEqual(objGraph.GetType(), objReturn.GetType(), "#Tests "+objGraph.GetType());\r
                        stream = new MemoryStream();\r
                        _soapFormatter.Serialize(stream, objReturn);\r
                        stream.Position = 0;\r
@@ -209,19 +209,19 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                public void TestValueTypes() {\r
                        object objReturn;\r
                        objReturn = Serialize((short)1);\r
-                       Assertion.AssertEquals("#int16", objReturn, 1);\r
+                       Assert.AreEqual(objReturn, 1, "#int16");\r
                        objReturn = Serialize(1);\r
-                       Assertion.AssertEquals("#int32", objReturn, 1);\r
+                       Assert.AreEqual(objReturn, 1, "#int32");\r
                        objReturn = Serialize((Single)0.1234);\r
-                       Assertion.AssertEquals("#Single", objReturn, 0.123400003f);\r
+                       Assert.AreEqual(objReturn, 0.123400003f, "#Single");\r
                        objReturn = Serialize((Double)1234567890.0987654321);\r
-                       Assertion.AssertEquals("#iDouble", objReturn, 1234567890.0987654321);\r
+                       Assert.AreEqual(objReturn, 1234567890.0987654321, "#iDouble");\r
                        objReturn = Serialize(true);\r
-                       Assertion.AssertEquals("#Bool", objReturn, true);\r
+                       Assert.AreEqual(objReturn, true, "#Bool");\r
                        objReturn = Serialize((Int64) 1234567890);\r
-                       Assertion.AssertEquals("#Int64", objReturn, 1234567890);\r
+                       Assert.AreEqual(objReturn, 1234567890, "#Int64");\r
                        objReturn = Serialize('c');\r
-                       Assertion.AssertEquals("#Char", objReturn, 'c');\r
+                       Assert.AreEqual(objReturn, 'c', "#Char");\r
                }\r
                \r
                [Test]\r
@@ -229,7 +229,7 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                        object objReturn;\r
                        objReturn = Serialize("");\r
                        objReturn = Serialize("hello world!");\r
-                       Assertion.AssertEquals("#string", "hello world!", objReturn);\r
+                       Assert.AreEqual("hello world!", objReturn, "#string");\r
                        SoapMessage soapMsg = new SoapMessage();\r
                        soapMsg.Headers = new Header[0];\r
                        soapMsg.MethodName = "Equals";\r
@@ -242,27 +242,27 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                        _soapFormatterDeserializer.TopObject = null;\r
                        SimpleObject obj = new SimpleObject("simple object", 1);\r
                        objReturn = Serialize(obj);\r
-                       Assertion.AssertEquals("#SimpleObject", obj, objReturn);\r
+                       Assert.AreEqual(obj, objReturn, "#SimpleObject");\r
                        objReturn = Serialize(typeof(SimpleObject));\r
-                       Assertion.AssertEquals("#Type", typeof(SimpleObject), (Type)objReturn);\r
+                       Assert.AreEqual(typeof(SimpleObject), (Type)objReturn, "#Type");\r
                        objReturn = Serialize(obj.GetType().Assembly);\r
-                       Assertion.AssertEquals("#Assembly", obj.GetType().Assembly, objReturn);\r
+                       Assert.AreEqual(obj.GetType().Assembly, objReturn, "#Assembly");\r
                }\r
                \r
                public static bool CheckArray(object objTest, object objReturn) {\r
                        Array objTestAsArray = objTest as Array;\r
                        Array objReturnAsArray = objReturn as Array;\r
                        \r
-                       Assertion.Assert("#Not an Array "+objTest, objReturnAsArray != null);\r
-                       Assertion.AssertEquals("#Different lengths "+objTest, objTestAsArray.Length, objReturnAsArray.Length);\r
-                       \r
+                       Assert.IsTrue(objReturnAsArray != null, "#Not an Array "+objTest);\r
+                       Assert.AreEqual(objTestAsArray.Length, objReturnAsArray.Length, "#Different lengths "+objTest);\r
+                       
                        IEnumerator iEnum = objReturnAsArray.GetEnumerator();\r
                        iEnum.Reset();\r
                        object obj2;\r
                        foreach(object obj1 in objTestAsArray) {\r
                                iEnum.MoveNext();\r
                                obj2 = iEnum.Current;\r
-                               Assertion.AssertEquals("#The content of the 2 arrays is different", obj1, obj2);\r
+                               Assert.AreEqual(obj1, obj2, "#The content of the 2 arrays is different");\r
                        }\r
                        \r
                        return true;\r
@@ -315,9 +315,9 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                        MoreComplexObject objReturn;\r
                        MoreComplexObject objTest = new MoreComplexObject();\r
                        objReturn = (MoreComplexObject) Serialize(objTest);\r
-                       Assertion.AssertEquals("#Equals", objTest, objReturn);\r
+                       Assert.AreEqual(objTest, objReturn, "#Equals");\r
                        objReturn.OnTrucEvent("bidule");\r
-                       Assertion.AssertEquals("#dlg", "bidule", objReturn.ObjString);\r
+                       Assert.AreEqual("bidule", objReturn.ObjString, "#dlg");\r
                }\r
 \r
                [Test]\r
@@ -333,9 +333,9 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                        _soapFormatterDeserializer.Binder = new Version1ToVersion2Binder();\r
                        objReturn = _soapFormatterDeserializer.Deserialize(stream);\r
 \r
-                       Assertion.AssertEquals("#Version1 Version2", "Version2", objReturn.GetType().Name);\r
-                       Assertion.AssertEquals("#_value", 123, ((Version2) objReturn)._value);\r
-                       Assertion.AssertEquals("#_foo", "Default value", ((Version2) objReturn)._foo);\r
+                       Assert.AreEqual("Version2", objReturn.GetType().Name, "#Version1 Version2");\r
+                       Assert.AreEqual(123, ((Version2) objReturn)._value, "#_value");\r
+                       Assert.AreEqual("Default value", ((Version2) objReturn)._foo, "#_foo");\r
                }\r
                \r
                [Test]\r
@@ -360,17 +360,17 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                        sf.TopObject = t;\r
                        t = (SoapMessage) sf.Deserialize (ms);\r
                        \r
-                       Assertion.AssertNotNull ("#1", t.Headers[0].Value);\r
-                       Assertion.AssertEquals ("#2", t.Headers[0].Value.GetType (), typeof(Type[]));\r
+                       Assert.IsNotNull (t.Headers[0].Value, "#1");\r
+                       Assert.AreEqual (t.Headers[0].Value.GetType (), typeof(Type[]), "#2");\r
                        \r
                        Type[] ts = (Type[]) t.Headers[0].Value;\r
                        \r
-                       Assertion.AssertEquals ("#3", 2, ts.Length);\r
-                       Assertion.AssertNotNull ("#4", ts[0]);\r
-                       Assertion.AssertNotNull ("#5", ts[1]);\r
+                       Assert.AreEqual (2, ts.Length, "#3");\r
+                       Assert.IsNotNull (ts[0], "#4");\r
+                       Assert.IsNotNull (ts[1], "#5");\r
                        Console.WriteLine ("PPP:" + ts[0].GetType());\r
-                       Assertion.AssertEquals ("#6", typeof(string), ts[0]);\r
-                       Assertion.AssertEquals ("#7", typeof(SignatureTest[]), ts[1]);\r
+                       Assert.AreEqual (typeof(string), ts[0], "#6");\r
+                       Assert.AreEqual (typeof(SignatureTest[]), ts[1], "#7");\r
                }\r
 \r
                [Test]\r
@@ -398,14 +398,14 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
                        public void OnDeserialization (StreamingContext context)\r
                        {\r
                                var ci = Thread.CurrentThread.CurrentCulture;\r
-                               Assertion.AssertEquals("#1", "German (Germany)", ci.EnglishName);\r
+                               Assert.AreEqual("German (Germany)", ci.EnglishName, "#1");\r
                        }\r
                        \r
                        [OnSerialized]\r
                        public void OnSerialized (StreamingContext context)\r
                        {\r
                                var ci = Thread.CurrentThread.CurrentCulture;\r
-                               Assertion.AssertEquals("#2", "German (Germany)", ci.EnglishName);\r
+                               Assert.AreEqual("German (Germany)", ci.EnglishName, "#2");\r
                        }\r
                }\r
        }\r
index 5ba3d4cd4bfd790912101cf63f29229b6c60ded4..cb12bd8d9cf41ec44a64328d4f4fdca2239aaba7 100644 (file)
@@ -33,7 +33,9 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+#if !MOBILE_STATIC
 using System.Data;
+#endif
 using System.IO;
 using System.Net;
 using System.Runtime.Serialization;
index 03264c43f51f21f3d7535cad350a672f1393881a..944b7f2eea667f441d53e4c5d0e3d59240941047 100755 (executable)
@@ -37,7 +37,9 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+#if !MOBILE_STATIC
 using System.Data;
+#endif
 using System.IO;
 using System.Linq;
 using System.Net;
@@ -1475,6 +1477,7 @@ namespace MonoTests.System.Runtime.Serialization
                        Assert.AreEqual (parent, parent.Child.Parent, "#2");
                }
 
+#if !MOBILE_STATIC
                [Test]
                public void IXmlSerializableCallConstructor ()
                {
@@ -1525,6 +1528,7 @@ namespace MonoTests.System.Runtime.Serialization
                        
                        var ds = (DataSet) x.ReadObject (r);
                }
+#endif
 
                [Test]
                [ExpectedException (typeof (InvalidDataContractException))] // BaseConstraintType1 is neither DataContract nor Serializable.
index 2e4032b44ddfa5d21c21b30ec9a440c7fffb1125..d2cd4b21f49af1dbbbf31a7ddc9a49dd6cf5aca1 100644 (file)
@@ -1,60 +1,61 @@
-//
-// ProtectedData.cs: Protect (encrypt) data without (user involved) key management
-//
+//\r
+// ProtectedData.cs: Protect (encrypt) data without (user involved) key management\r
+//\r
 // Author:\r
 //     Sebastien Pouliot  <sebastien@ximian.com>\r
-//
+//\r
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)\r
 // Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)\r
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+\r
 \r
 using System.Runtime.InteropServices;\r
-using System.Security.Permissions;
-
-using Mono.Security.Cryptography;
-
-namespace System.Security.Cryptography {
-
-       // References:
-       // a.   Windows Data Protection
-       //      http://msdn.microsoft.com/library/en-us/dnsecure/html/windataprotection-dpapi.asp?frame=true
-
-       public sealed class ProtectedData {
-
-               private ProtectedData ()
-               {
-               }
-
+using System.Security.Permissions;\r
+\r
+using Mono.Security.Cryptography;\r
+\r
+namespace System.Security.Cryptography {\r
+\r
+       // References:\r
+       // a.   Windows Data Protection\r
+       //      http://msdn.microsoft.com/library/en-us/dnsecure/html/windataprotection-dpapi.asp?frame=true\r
+\r
+       public sealed class ProtectedData {\r
+\r
+               private ProtectedData ()\r
+               {\r
+               }\r
+\r
 // FIXME       [DataProtectionPermission (SecurityAction.Demand, ProtectData = true)]\r
-               public static byte[] Protect (byte[] userData, byte[] optionalEntropy, DataProtectionScope scope) 
-               {
-                       if (userData == null)
-                               throw new ArgumentNullException ("userData");
-
+               public static byte[] Protect (byte[] userData, byte[] optionalEntropy, DataProtectionScope scope) \r
+               {\r
+                       if (userData == null)\r
+                               throw new ArgumentNullException ("userData");\r
+\r
                        // on Windows this is supported only under 2000 and later OS\r
                        Check (scope);\r
 \r
                        switch (impl) {\r
+#if !MOBILE\r
                        case DataProtectionImplementation.ManagedProtection:\r
                                try {\r
                                        return ManagedProtection.Protect (userData, optionalEntropy, scope);\r
@@ -71,21 +72,23 @@ namespace System.Security.Cryptography {
                                        string msg = Locale.GetText ("Data protection failed.");\r
                                        throw new CryptographicException (msg, e);\r
                                }\r
+#endif\r
                        default:\r
                                throw new PlatformNotSupportedException ();\r
                        }\r
                }\r
 \r
 // FIXME       [DataProtectionPermission (SecurityAction.Demand, UnprotectData = true)]\r
-               public static byte[] Unprotect (byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope) 
-               {
-                       if (encryptedData == null)
-                               throw new ArgumentNullException ("encryptedData");
-
+               public static byte[] Unprotect (byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope) \r
+               {\r
+                       if (encryptedData == null)\r
+                               throw new ArgumentNullException ("encryptedData");\r
+\r
                        // on Windows this is supported only under 2000 and later OS\r
                        Check (scope);\r
 \r
                        switch (impl) {\r
+#if !MOBILE\r
                        case DataProtectionImplementation.ManagedProtection:\r
                                try {\r
                                        return ManagedProtection.Unprotect (encryptedData, optionalEntropy, scope);\r
@@ -102,11 +105,12 @@ namespace System.Security.Cryptography {
                                        string msg = Locale.GetText ("Data unprotection failed.");\r
                                        throw new CryptographicException (msg, e);\r
                                }\r
+#endif\r
                        default:\r
                                throw new PlatformNotSupportedException ();\r
                        }\r
-               }
-
+               }\r
+\r
                // private stuff\r
 \r
                enum DataProtectionImplementation {\r
@@ -156,6 +160,6 @@ namespace System.Security.Cryptography {
                                throw new PlatformNotSupportedException ();\r
                        }\r
                }\r
-       }
-}
-
+       }\r
+}\r
+\r
diff --git a/mcs/class/System.Security/common_System.Security.dll.sources b/mcs/class/System.Security/common_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..5a34119
--- /dev/null
@@ -0,0 +1,34 @@
+Assembly/AssemblyInfo.cs
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+System.Security.Cryptography/CryptographicAttribute.cs
+System.Security.Cryptography/CryptographicAttributeCollection.cs
+System.Security.Cryptography/CryptographicAttributeEnumerator.cs
+System.Security.Cryptography/DataProtectionScope.cs
+System.Security.Cryptography/ProtectedData.cs
+System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
+System.Security.Cryptography.Pkcs/CmsRecipient.cs
+System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs
+System.Security.Cryptography.Pkcs/CmsRecipientEnumerator.cs
+System.Security.Cryptography.Pkcs/ContentInfo.cs
+System.Security.Cryptography.Pkcs/EnvelopedCms.cs
+System.Security.Cryptography.Pkcs/KeyAgreeRecipientInfo.cs
+System.Security.Cryptography.Pkcs/KeyTransRecipientInfo.cs
+System.Security.Cryptography.Pkcs/Pkcs9Attribute.cs
+System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
+System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
+System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
+System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
+System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
+System.Security.Cryptography.Pkcs/PublicKeyInfo.cs
+System.Security.Cryptography.Pkcs/RecipientInfo.cs
+System.Security.Cryptography.Pkcs/RecipientInfoCollection.cs
+System.Security.Cryptography.Pkcs/RecipientInfoEnumerator.cs
+System.Security.Cryptography.Pkcs/RecipientInfoType.cs
+System.Security.Cryptography.Pkcs/SubjectIdentifier.cs
+System.Security.Cryptography.Pkcs/SubjectIdentifierOrKey.cs
+System.Security.Cryptography.Pkcs/SubjectIdentifierOrKeyType.cs
+System.Security.Cryptography.Pkcs/SubjectIdentifierType.cs
+System.Security.Cryptography.Xml/X509IssuerSerial.cs
+
diff --git a/mcs/class/System.Security/mobile_static_System.Security.dll.sources b/mcs/class/System.Security/mobile_static_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monodroid_System.Security.dll.sources b/mcs/class/System.Security/monodroid_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_System.Security.dll.sources b/mcs/class/System.Security/monotouch_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_runtime_System.Security.dll.sources b/mcs/class/System.Security/monotouch_runtime_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_tv_System.Security.dll.sources b/mcs/class/System.Security/monotouch_tv_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_tv_runtime_System.Security.dll.sources b/mcs/class/System.Security/monotouch_tv_runtime_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_watch_System.Security.dll.sources b/mcs/class/System.Security/monotouch_watch_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_watch_runtime_System.Security.dll.sources b/mcs/class/System.Security/monotouch_watch_runtime_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/xammac_System.Security.dll.sources b/mcs/class/System.Security/xammac_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
index 4a22c093813b6bed844487fc386ae53b40257042..4fc4f14eee454fa3302758c4ce0b172c7cfd61e3 100644 (file)
@@ -33,7 +33,9 @@ using System.Net;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.Xml;
+#if !MOBILE && !XAMMAC_4_5
 using WS = System.Web.Services.Description;
+#endif
 
 namespace System.ServiceModel.Channels
 {
@@ -119,6 +121,7 @@ namespace System.ServiceModel.Channels
                        return false;
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public override bool CanBuildChannelListener<TChannel> (
                        BindingContext context)
                {
@@ -132,6 +135,7 @@ namespace System.ServiceModel.Channels
                        }
                        return false;
                }
+#endif
 
                public override T GetProperty<T> (BindingContext context)
                {
@@ -141,6 +145,7 @@ namespace System.ServiceModel.Channels
                        return base.GetProperty<T> (context);
                }
 
+#if !MOBILE && !XAMMAC_4_5
                void IWsdlExportExtension.ExportContract (WsdlExporter exporter,
                                                          WsdlContractConversionContext context)
                {
@@ -192,5 +197,6 @@ namespace System.ServiceModel.Channels
                                transfer_mode == TransferMode.StreamedResponse)
                                assertions.Add (doc.CreateElement ("msf", "Streamed", "http://schemas.microsoft.com/ws/2006/05/framing/policy"));
                }
+#endif
        }
 }
index 3201ef86eb664118064f372eb0298e88d5d9b6d9..12be181d6d7d1a2a264a7bdbaa1d8c22414da6f5 100644 (file)
@@ -43,16 +43,21 @@ namespace System.ServiceModel.Channels
        {
                public SslStreamSecurityBindingElement ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        verifier = IdentityVerifier.CreateDefault ();
+#endif
                }
 
+#if !MOBILE && !XAMMAC_4_5
                IdentityVerifier verifier;
-               bool require_client_certificate;
 
                public IdentityVerifier IdentityVerifier {
                        get { return verifier; }
                        set { verifier = value; }
                }
+#endif
+
+               bool require_client_certificate;
 
                public bool RequireClientCertificate {
                        get { return require_client_certificate; }
@@ -63,10 +68,13 @@ namespace System.ServiceModel.Channels
                        SslStreamSecurityBindingElement other)
                        : base (other)
                {
+#if !MOBILE && !XAMMAC_4_5
                        verifier = other.verifier;
+#endif
                        require_client_certificate = other.require_client_certificate;
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                public StreamUpgradeProvider BuildClientStreamUpgradeProvider (BindingContext context)
                {
@@ -87,6 +95,7 @@ namespace System.ServiceModel.Channels
                                "msf", "SslTransportSecurity", PolicyImportHelper.FramingPolicyNS);
                        return element;
                }
+#endif
 
                [MonoTODO]
                public override IChannelFactory<TChannel>
@@ -96,6 +105,7 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                public override IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
@@ -103,6 +113,7 @@ namespace System.ServiceModel.Channels
                {
                        throw new NotImplementedException ();
                }
+#endif
 
                [MonoTODO]
                public override bool CanBuildChannelFactory<TChannel> (
@@ -111,12 +122,14 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                public override bool CanBuildChannelListener<TChannel> (
                        BindingContext context)
                {
                        throw new NotImplementedException ();
                }
+#endif
 
                public override BindingElement Clone ()
                {
@@ -129,6 +142,7 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                #region explicit interface implementations
                [MonoTODO]
                void IPolicyExportExtension.ExportPolicy (
@@ -140,5 +154,6 @@ namespace System.ServiceModel.Channels
                        context.GetBindingAssertions ().Add (transportBinding);
                }
                #endregion
+#endif
        }
 }
index 64c3b38a249d89c6383ee8b0e6edc8573ba934e7..ae823e534ebd876c8672cf0708f3f2e2891886d6 100644 (file)
@@ -31,7 +31,9 @@ using System;
 using System.Collections.Generic;
 using System.Net;
 using System.ServiceModel.Channels;
+#if !MOBILE && !XAMMAC_4_5
 using System.ServiceModel.Channels.NetTcp;
+#endif
 using System.ServiceModel.Description;
 
 namespace System.ServiceModel.Channels
@@ -88,9 +90,15 @@ namespace System.ServiceModel.Channels
                {
                        if (!CanBuildChannelFactory<TChannel> (context))
                                throw new InvalidOperationException (String.Format ("Not supported channel factory type '{0}'", typeof (TChannel)));
+
+#if !MOBILE && !XAMMAC_4_5
                        return new TcpChannelFactory<TChannel> (this, context);
+#else
+                       throw new NotImplementedException ();
+#endif
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public override IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
                        BindingContext context)
@@ -99,6 +107,7 @@ namespace System.ServiceModel.Channels
                                throw new InvalidOperationException (String.Format ("Not supported channel listener type '{0}'", typeof (TChannel)));
                        return new TcpChannelListener<TChannel> (this, context);
                }
+#endif
 
                public override BindingElement Clone ()
                {
index 4f1a5fde8f20298e778c7af08a98c5138b246aee..bab577c5bae65551901ae3f14e54e84dc1b61a06 100644 (file)
@@ -56,7 +56,7 @@ namespace System.ServiceModel.Channels
                        max_recv_message_size = other.max_recv_message_size;
                }
 
-               public bool ManualAddressing {
+               public virtual bool ManualAddressing {
                        get { return manual_addressing; }
                        set { manual_addressing = value; }
                }
index e57cfde91e3b4e386d382a1607373eb66b5adf14..2d8e461f7356a070b857afaefe9d0fb0ec2a041f 100644 (file)
@@ -61,12 +61,14 @@ namespace System.ServiceModel.Channels
                        return context.BuildInnerChannelFactory<TChannel> ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public override IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
                        BindingContext context)
                {
                        return context.BuildInnerChannelListener<TChannel> ();
                }
+#endif
 
                public override bool CanBuildChannelFactory<TChannel> (
                        BindingContext context)
@@ -74,11 +76,13 @@ namespace System.ServiceModel.Channels
                        return context.CanBuildInnerChannelFactory<TChannel> ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public override bool CanBuildChannelListener<TChannel> (
                        BindingContext context)
                {
                        return context.CanBuildInnerChannelListener<TChannel> ();
                }
+#endif
 
                public override BindingElement Clone ()
                {
@@ -89,8 +93,10 @@ namespace System.ServiceModel.Channels
                {
                        if (typeof (T) == typeof (ISecurityCapabilities))
                                return (T) (object) this;
+#if !MOBILE && !XAMMAC_4_5
                        if (typeof (T) == typeof (IdentityVerifier))
                                return (T) (object) IdentityVerifier.CreateDefault ();
+#endif
                        return null;
                }
 
@@ -120,6 +126,7 @@ namespace System.ServiceModel.Channels
                        get { throw new NotImplementedException (); }
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                void IPolicyExportExtension.ExportPolicy (
                        MetadataExporter exporter,
@@ -141,6 +148,7 @@ namespace System.ServiceModel.Channels
                        element.AppendChild (protectionLevel);
                        return element;
                }
+#endif
                #endregion
        }
 }
index 41c6658f9cfd6e75559032e18ea1f3355d6aed46..3d8e71035a0f6c3a1bff8dd34dc527866e2b3131 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+#endif
 using System.ServiceModel.Channels;
 using System.ServiceModel.Security;
 
+#if !MOBILE && !XAMMAC_4_5
 using ReqType = System.ServiceModel.Security.Tokens.ServiceModelSecurityTokenRequirement;
+#endif
 
 namespace System.ServiceModel.Security.Tokens
 {
        public class SecureConversationSecurityTokenParameters : SecurityTokenParameters
        {
+#if !MOBILE && !XAMMAC_4_5
                static readonly ChannelProtectionRequirements default_channel_protection_requirements;
+#endif
                static readonly BindingContext dummy_context;
 
                static SecureConversationSecurityTokenParameters ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        ChannelProtectionRequirements r =
                                new ChannelProtectionRequirements ();
                        r.IncomingSignatureParts.ChannelParts.IsBodyIncluded = true;
@@ -49,6 +56,7 @@ namespace System.ServiceModel.Security.Tokens
                        r.OutgoingEncryptionParts.ChannelParts.IsBodyIncluded = true;
                        r.MakeReadOnly ();
                        default_channel_protection_requirements = r;
+#endif
 
                        dummy_context = new BindingContext (
                                new CustomBinding (),
@@ -56,7 +64,9 @@ namespace System.ServiceModel.Security.Tokens
                }
 
                SecurityBindingElement element;
+#if !MOBILE && !XAMMAC_4_5
                ChannelProtectionRequirements requirements;
+#endif
                bool cancellable;
 
                public SecureConversationSecurityTokenParameters ()
@@ -77,6 +87,7 @@ namespace System.ServiceModel.Security.Tokens
                {
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public SecureConversationSecurityTokenParameters (
                        SecurityBindingElement element,
                        bool requireCancellation,
@@ -89,13 +100,25 @@ namespace System.ServiceModel.Security.Tokens
                        else
                                this.requirements = new ChannelProtectionRequirements (requirements);
                }
+#else
+               internal SecureConversationSecurityTokenParameters (
+                       SecurityBindingElement element,
+                       bool requireCancellation,
+                       object dummy)
+               {
+                       this.element = element;
+                       this.cancellable = requireCancellation;
+               }
+#endif
 
                protected SecureConversationSecurityTokenParameters (SecureConversationSecurityTokenParameters source)
                        : base (source)
                {
                        this.element = (SecurityBindingElement) source.element.Clone ();
                        this.cancellable = source.cancellable;
+#if !MOBILE && !XAMMAC_4_5
                        this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
+#endif
                }
 
                public bool RequireCancellation {
@@ -108,9 +131,11 @@ namespace System.ServiceModel.Security.Tokens
                        set { element = value; }
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public ChannelProtectionRequirements BootstrapProtectionRequirements {
                        get { return requirements; }
                }
+#endif
 
                // SecurityTokenParameters
 
@@ -135,13 +160,13 @@ namespace System.ServiceModel.Security.Tokens
                        return new SecureConversationSecurityTokenParameters (this);
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause (
                        SecurityToken token, SecurityTokenReferenceStyle referenceStyle)
                {
                        throw new NotImplementedException ();
                }
-
                [MonoTODO]
                protected internal override void InitializeSecurityTokenRequirement (SecurityTokenRequirement requirement)
                {
@@ -154,6 +179,7 @@ namespace System.ServiceModel.Security.Tokens
                        requirement.Properties [ReqType.IssuedSecurityTokenParametersProperty] = this.Clone ();
                        requirement.KeyType = SecurityKeyType.SymmetricKey;
                }
+#endif
 
                public override string ToString ()
                {
index f4c3f3ceff5a6800cacb46b187c7478b8743f97f..c5ff1439e0c7f37719ecdad155965abd4ee76832 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+#endif
 using System.ServiceModel.Channels;
 using System.ServiceModel.Security;
 using System.Text;
@@ -114,6 +117,7 @@ namespace System.ServiceModel.Security.Tokens
 
                protected abstract SecurityTokenParameters CloneCore ();
 
+#if !MOBILE && !XAMMAC_4_5
                protected abstract SecurityKeyIdentifierClause CreateKeyIdentifierClause (
                        SecurityToken token, SecurityTokenReferenceStyle referenceStyle);
 
@@ -125,11 +129,13 @@ namespace System.ServiceModel.Security.Tokens
                }
 
                protected internal abstract void InitializeSecurityTokenRequirement (SecurityTokenRequirement requirement);
+#endif
 
                internal BindingContext IssuerBindingContext {
                        set { issuer_binding_context = value; }
                }
 
+#if !MOBILE && !XAMMAC_4_5
                internal void CallInitializeSecurityTokenRequirement (SecurityTokenRequirement requirement)
                {
                        if (issuer_binding_context != null)
@@ -145,5 +151,6 @@ namespace System.ServiceModel.Security.Tokens
                {
                        throw new NotImplementedException ();
                }
+#endif
        }
 }
index 8a40a61c0cd2b8accfac5bbdcaa5202c44d33355..46f14360654c6e604d775af18b399764511d0e95 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+#endif
 using System.ServiceModel.Security;
 
 namespace System.ServiceModel.Security.Tokens
@@ -64,6 +66,7 @@ namespace System.ServiceModel.Security.Tokens
                        return new UserNameSecurityTokenParameters (this);
                }
 
+#if !MOBILE && !XAMMAC_4_5
                protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause (
                        SecurityToken token, SecurityTokenReferenceStyle referenceStyle)
                {
@@ -81,5 +84,6 @@ namespace System.ServiceModel.Security.Tokens
                        requirement.TokenType = SecurityTokenTypes.UserName;
                        requirement.RequireCryptographicToken = true;
                }
+#endif
        }
 }
index 20a6a2cbf7a52679a036e6fe605796aeb812ad6d..8e54cb5c622cfbb4f2f7f328292feb1605ee3d24 100644 (file)
@@ -1004,6 +1004,7 @@ System.ServiceModel/BasicHttpBinding_4_5.cs
 System.ServiceModel/BasicHttpsBinding.cs
 System.ServiceModel/BasicHttpsSecurity.cs
 System.ServiceModel/NetHttpBinding.cs
+System.ServiceModel/NetHttpsBinding.cs
 System.ServiceModel/NetHttpMessageEncoding.cs
 System.ServiceModel.Channels/CompressionFormat.cs
 System.ServiceModel.Channels/WebSocketTransportSettings.cs
index e6a96dac52a1aa8de552250e70c59d34746a3f66..21e66a4f65b462670d2c38ea5b0ee018943b6617 100644 (file)
@@ -79,6 +79,7 @@ namespace System.ServiceModel
 
                public BasicHttpsSecurity Security {
                        get { return security; }
+                       set { security = value; }
                }
 
                public override BindingElementCollection
index c5c870c0f33bab17acdd90c7abb679154715d5ea..de946ceb4438a36f6b46123621d978905dbef2eb 100644 (file)
@@ -64,6 +64,7 @@ namespace System.ServiceModel
 
                public HttpTransportSecurity Transport {
                        get { return transport; }
+                       set { transport = value; }
                }
        }
 }
index f392be8d37a35301c25f086c22b6fadd764a0838..5a5ca874df89227a7a85248491c5e48d55c64dab 100644 (file)
@@ -29,7 +29,9 @@ using System;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+#if !MOBILE && !XAMMAC_4_5
 using System.Transactions;
+#endif
 
 namespace System.ServiceModel
 {
@@ -45,7 +47,9 @@ namespace System.ServiceModel
                        MaxItemsInObjectGraph = 0x10000;
                        UseSynchronizationContext = true;
                        ValidateMustUnderstand = true;
+#if !MOBILE && !XAMMAC_4_5
                        TransactionIsolationLevel = IsolationLevel.Unspecified;
+#endif
                }
 
                [MonoTODO]
@@ -63,8 +67,10 @@ namespace System.ServiceModel
                [MonoTODO]
                public int MaxItemsInObjectGraph { get; set; }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                public IsolationLevel TransactionIsolationLevel { get; set; }
+#endif
 
                [MonoTODO]
                public string TransactionTimeout { get; set; }
index b5ac514b0dae3d7f843a5f3420c58c615c997bbe..9c9b76aec61ac33aae7400c40f01df1c6004c1b3 100644 (file)
@@ -27,7 +27,9 @@
 //
 using System;
 using System.Collections.Generic;
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Claims;
+#endif
 using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
 using System.Xml;
@@ -37,6 +39,7 @@ namespace System.ServiceModel
 {
        public class DnsEndpointIdentity : EndpointIdentity
        {
+#if !MOBILE && !XAMMAC_4_5
                public DnsEndpointIdentity (Claim identity)
                {
                        Initialize (identity);
@@ -46,5 +49,11 @@ namespace System.ServiceModel
                        : this (Claim.CreateDnsClaim (dns))
                {
                }
+#else
+               public DnsEndpointIdentity (string dns)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
        }
 }
index e72ab9b8d2b73ad82948de307b075a957cb9b518..01336d803a50be8a40a7d2015c5358837439d86f 100644 (file)
@@ -217,8 +217,11 @@ namespace System.ServiceModel
                        // no special magic), we have to use different approach
                        // that should work either.
                        object proxy = Activator.CreateInstance (type, new object [] {Endpoint, this, address, via});
-#else
+#elif !MOBILE && !XAMMAC_4_5
                        object proxy = new ClientRealProxy (typeof (TChannel), new DuplexClientRuntimeChannel (Endpoint, this, address, via), true).GetTransparentProxy ();
+#else
+                       object proxy;
+                       throw new NotImplementedException ();
 #endif
 
                        ((IDuplexContextChannel) proxy).CallbackInstance = callbackInstance;
index 4fa56e12a78a964bba565818d308429d40ba09e6..db6647c76f5188f5277d129baca9bb48dc5f225e 100644 (file)
@@ -192,10 +192,6 @@ namespace System.ServiceModel.MonoInternal
                        } catch (Exception ex) {
                                // FIXME: log it.
                                Console.WriteLine (ex);
-                       } finally {
-                               // unless it is closed by session/call manager, move it back to the loop to receive the next message.
-                               if (loop && input.State != CommunicationState.Closed)
-                                       ProcessRequestOrInput (input);
                        }
                }
 
index 4ed2088711e1760886a1207a414ddbc40083b940..8852d3d12789695b217a7059173e5754e1e6dbae 100644 (file)
@@ -110,7 +110,7 @@ namespace System.ServiceModel
                        set { reader_quotas = value; }
                }
 
-               public override abstract string Scheme {
+               public override string Scheme {
                        get;
                }
 
index c7852cd1ffd101b441baf7913e28ae1a5b599d5f..6e9a794ee410eac05f81e9e169c62677090b9800 100644 (file)
@@ -31,22 +31,28 @@ namespace System.ServiceModel
 {
        public sealed class MessageSecurityOverTcp
        {
+#if !MOBILE && !XAMMAC_4_5
                SecurityAlgorithmSuite alg_suite;
+#endif
                MessageCredentialType client_credential_type;
 
                internal MessageSecurityOverTcp ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        alg_suite = SecurityAlgorithmSuite.Default;
+#endif
                        // This default value is *silly* but anyways
                        // such code that does not change this ClientCredentialType 
                        // won't work on Mono.
                        client_credential_type = MessageCredentialType.Windows;
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public SecurityAlgorithmSuite AlgorithmSuite {
                        get { return alg_suite; }
                        set { alg_suite = value; }
                }
+#endif
 
                public MessageCredentialType ClientCredentialType {
                        get { return client_credential_type; }
index 2f53bc57b670acb2a596e194a713f628c10352f1..d6a5e19d2866f530af0ba4e4775e1518dfae89a6 100644 (file)
 //
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+#endif
 using System.ServiceModel.Description;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Security;
@@ -38,6 +40,7 @@ namespace System.ServiceModel
 {
        public abstract class MessageSecurityVersion
        {
+#if !MOBILE && !XAMMAC_4_5
                // Types
                class MessageSecurityTokenVersion : SecurityTokenVersion
                {
@@ -112,6 +115,7 @@ namespace System.ServiceModel
                                        SecureConversationVersion = SecureConversationVersion.WSSecureConversationFeb2005;
                                        TrustVersion = TrustVersion.WSTrustFeb2005;
                                }
+                               this.SecurityVersion = wss11 ? SecurityVersion.WSSecurity11 : SecurityVersion.WSSecurity10;
                        }
 
                        public override BasicSecurityProfileVersion BasicSecurityProfileVersion {
@@ -122,14 +126,11 @@ namespace System.ServiceModel
                                get { return MessageSecurityTokenVersion.GetVersion (wss11, basic_profile); }
                        }
 
-                       public override SecurityVersion SecurityVersion {
-                               get { return wss11 ? SecurityVersion.WSSecurity11 : SecurityVersion.WSSecurity10; }
-                       }
-
                        public override SecurityPolicyVersion SecurityPolicyVersion {
                                get { return use2007 ? SecurityPolicyVersion.WSSecurityPolicy12 : SecurityPolicyVersion.WSSecurityPolicy11; }
                        }
                }
+#endif
 
                // Static members
 
@@ -137,12 +138,16 @@ namespace System.ServiceModel
 
                static MessageSecurityVersion ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        wss10_basic = new MessageSecurityVersionImpl (false, true, false);
                        wss11 = new MessageSecurityVersionImpl (true, false, false);
                        wss11_basic = new MessageSecurityVersionImpl (true, true, false);
                        wss10_2007_basic = new MessageSecurityVersionImpl (false, true, true);
                        wss11_2007_basic = new MessageSecurityVersionImpl (true, true, true);
                        wss11_2007 = new MessageSecurityVersionImpl (true, false, true);
+#else
+                       throw new NotImplementedException ();
+#endif
                }
 
                public static MessageSecurityVersion Default {
@@ -183,9 +188,11 @@ namespace System.ServiceModel
 
                public abstract BasicSecurityProfileVersion BasicSecurityProfileVersion { get; }
 
+#if !MOBILE && !XAMMAC_4_5
                public abstract SecurityTokenVersion SecurityTokenVersion { get; }
+#endif
 
-               public abstract SecurityVersion SecurityVersion { get; }
+               public SecurityVersion SecurityVersion { get; internal set; }
 
                public SecureConversationVersion SecureConversationVersion { get; internal set; }
 
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/NetHttpsBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/NetHttpsBinding.cs
new file mode 100644 (file)
index 0000000..703de22
--- /dev/null
@@ -0,0 +1,83 @@
+// Authors:
+//      Martin Baulig (martin.baulig@xamarin.com)
+//
+// Copyright 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.ServiceModel.Channels;
+
+namespace System.ServiceModel {
+       [MonoTODO]
+       public class NetHttpsBinding : HttpBindingBase {
+               public NetHttpsBinding ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public NetHttpsBinding (BasicHttpsSecurityMode securityMode)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public NetHttpsBinding (string configurationName)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public NetHttpsBinding (
+                       BasicHttpsSecurityMode securityMode, bool reliableSessionEnabled)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public NetHttpMessageEncoding MessageEncoding { get; set; }
+               public OptionalReliableSession ReliableSession { get; set; }
+               public BasicHttpsSecurity Security { get; set; }
+
+               public WebSocketTransportSettings WebSocketSettings {
+                       get { throw new NotImplementedException (); }
+               }
+               
+               public override string Scheme {
+                       get { throw new NotImplementedException (); }
+               }
+               
+               public override BindingElementCollection CreateBindingElements ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public bool ShouldSerializeReliableSession ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public bool ShouldSerializeSecurity ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               
+               
+       }
+}
\ No newline at end of file
index 794445155d8eefa93a107137ba23439db5470f6f..51a8c3cfb2e1a370984e7885dcbe52a4e76e6acb 100644 (file)
@@ -46,7 +46,9 @@ namespace System.ServiceModel
                XmlDictionaryReaderQuotas reader_quotas
                        = new XmlDictionaryReaderQuotas ();
                bool transaction_flow;
+#if !MOBILE && !XAMMAC_4_5
                TransactionProtocol transaction_protocol;
+#endif
                TcpTransportBindingElement transport;
 
                public NetTcpBinding ()
@@ -69,9 +71,13 @@ namespace System.ServiceModel
                public NetTcpBinding (string configurationName)
                        : this ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        var bindingsSection = ConfigUtil.BindingsSection;
                        var el = bindingsSection.NetTcpBinding.Bindings [configurationName];
                        el.ApplyConfiguration (this);
+#else
+                       throw new NotImplementedException ();
+#endif
                }
 
                internal NetTcpBinding (TcpTransportBindingElement transport,
@@ -147,10 +153,12 @@ namespace System.ServiceModel
                        set { transaction_flow = value; }
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public TransactionProtocol TransactionProtocol {
                        get { return transaction_protocol; }
                        set { transaction_protocol = value; }
                }
+#endif
 
                // overrides
 
@@ -160,18 +168,22 @@ namespace System.ServiceModel
 
                public override BindingElementCollection CreateBindingElements ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        BindingElement tx = new TransactionFlowBindingElement (TransactionProtocol.WSAtomicTransactionOctober2004);
                        SecurityBindingElement sec = CreateMessageSecurity ();
+#endif
                        var msg = new BinaryMessageEncodingBindingElement ();
                        if (ReaderQuotas != null)
                                ReaderQuotas.CopyTo (msg.ReaderQuotas);
                        var trsec = CreateTransportSecurity ();
                        BindingElement tr = GetTransport ();
                        List<BindingElement> list = new List<BindingElement> ();
+#if !MOBILE && !XAMMAC_4_5
                        if (tx != null)
                                list.Add (tx);
                        if (sec != null)
                                list.Add (sec);
+#endif
                        list.Add (msg);
                        if (trsec != null)
                                list.Add (trsec);
@@ -184,6 +196,7 @@ namespace System.ServiceModel
                        return transport.Clone ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                // It is problematic, but there is no option to disable establishing security context in this binding unlike WSHttpBinding...
                SecurityBindingElement CreateMessageSecurity ()
                {
@@ -239,6 +252,7 @@ namespace System.ServiceModel
                                // FIXME: requireCancellation
                                element, true, reqs);
                }
+#endif
 
                BindingElement CreateTransportSecurity ()
                {
index d93be038818e9fd64c2b59b5163c26a0b5cd0dd1..396579fd2555c54aab9803f9eb3b90604c0dd641 100644 (file)
@@ -27,7 +27,9 @@
 //
 using System;
 using System.Collections.Generic;
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Claims;
+#endif
 using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
 using System.Xml;
@@ -37,6 +39,7 @@ namespace System.ServiceModel
 {
        public class SpnEndpointIdentity : EndpointIdentity
        {
+#if !MOBILE && !XAMMAC_4_5
                public SpnEndpointIdentity (Claim identity)
                {
                        Initialize (identity);
@@ -46,6 +49,12 @@ namespace System.ServiceModel
                        : this (Claim.CreateSpnClaim (spn))
                {
                }
+#else
+               public SpnEndpointIdentity (string spn)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
 
                [MonoTODO]
                public static TimeSpan SpnLookupTime {
index a866e93e4cba737f0cf73f35f9057650ca72e204..e53d72009a66a6c7591354242e2b7d8a20997dfb 100644 (file)
@@ -27,7 +27,9 @@
 //
 using System;
 using System.Collections.Generic;
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Claims;
+#endif
 using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
 using System.Xml;
@@ -37,6 +39,7 @@ namespace System.ServiceModel
 {
        public class UpnEndpointIdentity : EndpointIdentity
        {
+#if !MOBILE && !XAMMAC_4_5
                public UpnEndpointIdentity (Claim identity)
                {
                        Initialize (identity);
@@ -46,5 +49,11 @@ namespace System.ServiceModel
                        : this (Claim.CreateUpnClaim (upn))
                {
                }
+#else
+               public UpnEndpointIdentity (string upn)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
        }
 }
index 1b83c9e468e3dcf353b7c59bab5da5ee28079337..6666c86e4845d1fa077bba9db397905c2ad291fc 100644 (file)
@@ -187,6 +187,7 @@ System.ServiceModel/BasicHttpSecurity.cs
 System.ServiceModel/BasicHttpMessageSecurity.cs
 System.ServiceModel/BasicHttpsBinding.cs
 System.ServiceModel/BasicHttpsSecurity.cs
+System.ServiceModel/CallbackBehaviorAttribute.cs
 System.ServiceModel/ChannelFactory.cs
 System.ServiceModel/ChannelFactory_1.cs
 System.ServiceModel/ClientBase.cs
@@ -200,6 +201,8 @@ System.ServiceModel/Constants.cs
 System.ServiceModel/DataContractFormatAttribute.cs
 System.ServiceModel/DefaultCommunicationTimeouts.cs
 System.ServiceModel/Dummy.cs
+System.ServiceModel/DuplexClientBase.cs
+System.ServiceModel/DuplexChannelFactory.cs
 System.ServiceModel/EndpointAddress.cs
 System.ServiceModel/EndpointAddress10.cs
 System.ServiceModel/EndpointAddressBuilder.cs
@@ -218,6 +221,7 @@ System.ServiceModel/IClientChannel.cs
 System.ServiceModel/ICommunicationObject.cs
 System.ServiceModel/IContextChannel.cs
 System.ServiceModel/IDefaultCommunicationTimeouts.cs
+System.ServiceModel/IDuplexClientChannel.cs
 System.ServiceModel/IExtensibleObject.cs
 System.ServiceModel/IExtension.cs
 System.ServiceModel/IExtensionCollection.cs
@@ -233,6 +237,7 @@ System.ServiceModel/MessageHeader_1.cs
 System.ServiceModel/MessageParameterAttribute.cs
 System.ServiceModel/MessagePropertyAttribute.cs
 System.ServiceModel/NetHttpBinding.cs
+System.ServiceModel/NetHttpsBinding.cs
 System.ServiceModel/NetHttpMessageEncoding.cs
 System.ServiceModel/OperationContext.cs
 System.ServiceModel/OperationContextScope.cs
@@ -255,3 +260,30 @@ Dummy_2_1.cs
 System.ServiceModel/XmlSerializerFormatAttribute.cs
 System.ServiceModel.Description/XmlSerializerOperationBehavior.cs
 System.ServiceModel.Dispatcher/XmlMessagesFormatter.cs
+
+System.ServiceModel.Channels/ConnectionOrientedTransportBindingElement.cs
+System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs
+System.ServiceModel.Channels/TcpConnectionPoolSettings.cs
+System.ServiceModel.Channels/TcpTransportBindingElement.cs
+System.ServiceModel.Channels/WindowsStreamSecurityBindingElement.cs
+
+System.ServiceModel/MessageSecurityOverTcp.cs
+System.ServiceModel/NetTcpBinding.cs
+System.ServiceModel/NetTcpSecurity.cs
+System.ServiceModel/TcpTransportSecurity.cs
+System.ServiceModel/DnsEndpointIdentity.cs
+System.ServiceModel/SpnEndpointIdentity.cs
+System.ServiceModel/UpnEndpointIdentity.cs
+System.ServiceModel/MessageSecurityVersion.cs
+
+System.ServiceModel.Security/BasicSecurityProfileVersion.cs
+System.ServiceModel.Security/SecurityVersion.cs
+System.ServiceModel.Security/TrustVersion.cs
+System.ServiceModel.Security/SecureConversationVersion.cs
+System.ServiceModel.Security/SecurityPolicyVersion.cs
+
+System.ServiceModel.Security.Tokens/SecurityTokenParameters.cs
+System.ServiceModel.Security.Tokens/SecurityTokenReferenceStyle.cs
+System.ServiceModel.Security.Tokens/SecureConversationSecurityTokenParameters.cs
+System.ServiceModel.Security.Tokens/SupportingTokenParameters.cs
+System.ServiceModel.Security.Tokens/UserNameSecurityTokenParameters.cs
diff --git a/mcs/class/System.ServiceModel/mobile_static_System.ServiceModel_test.dll.exclude.sources b/mcs/class/System.ServiceModel/mobile_static_System.ServiceModel_test.dll.exclude.sources
new file mode 100644 (file)
index 0000000..350444a
--- /dev/null
@@ -0,0 +1,151 @@
+FeatureBased/Features.Contracts/AsyncCallTester.cs
+FeatureBased/Features.Contracts/FaultsTester.cs
+FeatureBased/Features.Serialization/AsyncCallTest.cs
+FeatureBased/Features.Serialization/AsyncPatternTester.cs
+FeatureBased/Features.Serialization/DataContractSerializerTest.cs
+FeatureBased/Features.Serialization/DualContractTester.cs
+FeatureBased/Features.Serialization/ExitProcessHelper.cs
+FeatureBased/Features.Serialization/FaultsTest.cs
+FeatureBased/Features.Serialization/KnownTypeTest.cs
+FeatureBased/Features.Serialization/MessageContractTest.cs
+FeatureBased/Features.Serialization/OperationContractTester.cs
+FeatureBased/Features.Serialization/PrimitiveTesterTest.cs
+FeatureBased/Features.Serialization/UntypedMessageTest.cs
+FeatureBased/TestFixtureBase.cs
+MetadataTests/BindingTestAssertions.cs
+MetadataTests/ExportTests.cs
+MetadataTests/ImportTests.cs
+MetadataTests/ImportTests_CreateMetadata.cs
+MetadataTests/ImportTests_LoadMetadata.cs
+MetadataTests/ImportTests_RoundTrip.cs
+MetadataTests/MetadataSamples.cs
+MetadataTests/MiscImportTests.cs
+MetadataTests/TestContext.cs
+System.ServiceModel.Channels/AsymmetricSecurityBindingElementTest.cs
+System.ServiceModel.Channels/BinaryMessageEncodingBindingElementTest.cs
+System.ServiceModel.Channels/BindingElementTest.cs
+System.ServiceModel.Channels/CalcSampleProxy.cs
+System.ServiceModel.Channels/CommunicationObjectTest.cs
+System.ServiceModel.Channels/ConnectionOrientedTransportBindingElementTest.cs
+System.ServiceModel.Channels/CustomBindingTest.cs
+System.ServiceModel.Channels/CustomPolicyConversionContext.cs
+System.ServiceModel.Channels/HandlerTransportBindingElement.cs
+System.ServiceModel.Channels/HttpTransportBindingElementTest.cs
+System.ServiceModel.Channels/HttpsTransportBindingElementTest.cs
+System.ServiceModel.Channels/InterceptorBindingElement.cs
+System.ServiceModel.Channels/LocalClientSecuritySettingsTest.cs
+System.ServiceModel.Channels/MessageBufferTest.cs
+System.ServiceModel.Channels/MessageEncoderTest.cs
+System.ServiceModel.Channels/MsmqBindingElementBaseTest.cs
+System.ServiceModel.Channels/MsmqTransportBindingElementTest.cs
+System.ServiceModel.Channels/NamedPipeTransportBindingElementTest.cs
+System.ServiceModel.Channels/OneWayBindingElementTest.cs
+System.ServiceModel.Channels/PeerTransportBindingElementTest.cs
+System.ServiceModel.Channels/ReplyChannelBase.cs
+System.ServiceModel.Channels/SecurityAssert.cs
+System.ServiceModel.Channels/SecurityBindingElementTest.cs
+System.ServiceModel.Channels/SslStreamSecurityBindingElementTest.cs
+System.ServiceModel.Channels/SymmetricSecurityBindingElementTest.cs
+System.ServiceModel.Channels/TcpTransportBindingElementTest.cs
+System.ServiceModel.Channels/TextMessageEncodingBindingElementTest.cs
+System.ServiceModel.Channels/TransactionFlowBindingElementTest.cs
+System.ServiceModel.Configuration/AddressHeaderCollectionElementTest.cs
+System.ServiceModel.Configuration/BasicHttpBindingElementTest.cs
+System.ServiceModel.Configuration/BehaviorsSectionTest.cs
+System.ServiceModel.Configuration/BindingsSectionTest.cs
+System.ServiceModel.Configuration/ChannelEndpointElementTest.cs
+System.ServiceModel.Configuration/CustomBindingElementTest.cs
+System.ServiceModel.Configuration/EndpointBehaviorElementTest.cs
+System.ServiceModel.Configuration/ExtensionsSectionTest.cs
+System.ServiceModel.Configuration/MetadataElementTest.cs
+System.ServiceModel.Configuration/MexBindingElementTest.cs
+System.ServiceModel.Configuration/NetNamedPipeBindingElementTest.cs
+System.ServiceModel.Configuration/NetPeerTcpBindingElementTest.cs
+System.ServiceModel.Configuration/NetTcpBindingElementTest.cs
+System.ServiceModel.Configuration/ServiceBehaviorElementTest.cs
+System.ServiceModel.Configuration/ServiceElementTest.cs
+System.ServiceModel.Configuration/ServiceModelConfigurationElementCollectionTest.cs
+System.ServiceModel.Configuration/ServiceModelSectionGroupTest.cs
+System.ServiceModel.Configuration/StandardBindingCollectionElementTest.cs
+System.ServiceModel.Configuration/StandardBindingElementCollectionTest.cs
+System.ServiceModel.Configuration/StandardBindingElementTest.cs
+System.ServiceModel.Configuration/StandardEndpointsSectionTest.cs
+System.ServiceModel.Configuration/UserBinding.cs
+System.ServiceModel.Description/ClientCredentialsTest.cs
+System.ServiceModel.Description/ContractDescriptionTest.cs
+System.ServiceModel.Description/MetadataExchangeBindingsTest.cs
+System.ServiceModel.Description/MetadataResolverTest.cs
+System.ServiceModel.Description/MetadataSetTest.cs
+System.ServiceModel.Description/ServiceAuthorizationBehaviorTest.cs
+System.ServiceModel.Description/ServiceContractGeneratorTest.cs
+System.ServiceModel.Description/ServiceCredentialsTest.cs
+System.ServiceModel.Description/ServiceDebugBehaviorTest.cs
+System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs
+System.ServiceModel.Description/ServiceMetadataEndpointTest.cs
+System.ServiceModel.Description/ServiceThrottlingBehaviorTest.cs
+System.ServiceModel.Description/TypedMessageConverterTest.cs
+System.ServiceModel.Description/WsdlExporterTest.cs
+System.ServiceModel.Description/WsdlImporterTest.cs
+System.ServiceModel.Dispatcher/ActionFilterTest.cs
+System.ServiceModel.Dispatcher/Bug32886Test.cs
+System.ServiceModel.Dispatcher/Bug652331Test.cs
+System.ServiceModel.Dispatcher/Bug652331_2Test.cs
+System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs
+System.ServiceModel.Dispatcher/DispatchOperationTest.cs
+System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs
+System.ServiceModel.Dispatcher/EndpointAddressMessageFilterTest.cs
+System.ServiceModel.Dispatcher/EndpointDispatcherTest.cs
+System.ServiceModel.Dispatcher/ExceptionHandlerTest.cs
+System.ServiceModel.Dispatcher/FilterTableTest.cs
+System.ServiceModel.Dispatcher/InvalidBodyAccessExceptionTest.cs
+System.ServiceModel.Dispatcher/PrefixEndpointAddressMessageFilterTest.cs
+System.ServiceModel.Dispatcher/XPathMessageContextTest.cs
+System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
+System.ServiceModel.PeerResolvers/PeerResolverSerializationTest.cs
+System.ServiceModel.Security.Tokens/IssuedSecurityTokenParametersTest.cs
+System.ServiceModel.Security.Tokens/IssuedSecurityTokenProviderTest.cs
+System.ServiceModel.Security.Tokens/RsaSecurityTokenParametersTest.cs
+System.ServiceModel.Security.Tokens/SecureConversationSecurityTokenParametersTest.cs
+System.ServiceModel.Security.Tokens/SecurityContextSecurityTokenTest.cs
+System.ServiceModel.Security.Tokens/SecurityTokenParametersTest.cs
+System.ServiceModel.Security.Tokens/ServiceModelSecurityTokenTypesTest.cs
+System.ServiceModel.Security.Tokens/SslSecurityTokenParametersTest.cs
+System.ServiceModel.Security.Tokens/SspiSecurityTokenParametersTest.cs
+System.ServiceModel.Security.Tokens/UserNameSecurityTokenParametersTest.cs
+System.ServiceModel.Security.Tokens/WrappedKeySecurityTokenTest.cs
+System.ServiceModel.Security.Tokens/X509ListedCertificateValidator.cs
+System.ServiceModel.Security.Tokens/X509SecurityTokenParametersTest.cs
+System.ServiceModel.Security/ChannelProtectionRequirementsTest.cs
+System.ServiceModel.Security/MessagePartSpecificationTest.cs
+System.ServiceModel.Security/ScopedMessagePartSpecificationTest.cs
+System.ServiceModel.Security/SecurityAlgorithmSuiteTest.cs
+System.ServiceModel.Security/SecurityMessagePropertyTest.cs
+System.ServiceModel.Security/SecurityTokenSpeficicationTest.cs
+System.ServiceModel.Security/ServiceCredentialsSecurityTokenManagerTest.cs
+System.ServiceModel.Security/ServiceSecurityContextTest.cs
+System.ServiceModel.Security/SupportingTokenParametersTest.cs
+System.ServiceModel.Security/TransportSecurityBindingElementTest.cs
+System.ServiceModel.Security/WSSecurityTokenSerializerTest.cs
+System.ServiceModel/BasicHttpBindingTest.cs
+System.ServiceModel/CallbackBehaviorAttributeTest.cs
+System.ServiceModel/ChannelFactoryTest.cs
+System.ServiceModel/ChannelFactory_1Test.cs
+System.ServiceModel/ClientBaseTest.cs
+System.ServiceModel/ClientCredentialsSecurityTokenManagerTest.cs
+System.ServiceModel/EndpointAddress10Test.cs
+System.ServiceModel/EndpointAddressBuilderTest.cs
+System.ServiceModel/EndpointAddressTest.cs
+System.ServiceModel/EndpointIdentityTest.cs
+System.ServiceModel/IntegratedConnectionTest.cs
+System.ServiceModel/MessageSecurityVersionTest.cs
+System.ServiceModel/MsmqTransportSecurityTest.cs
+System.ServiceModel/NetMsmqBindingTest.cs
+System.ServiceModel/NetPeerTcpBindingTest.cs
+System.ServiceModel/NetTcpBindingTest.cs
+System.ServiceModel/OperationContextTest.cs
+System.ServiceModel/PeerNodeAddressTest.cs
+System.ServiceModel/ServiceHostBaseTest.cs
+System.ServiceModel/ServiceHostTest.cs
+System.ServiceModel/TransactionProtocolTest.cs
+System.ServiceModel/WSFederationHttpBindingTest.cs
+System.ServiceModel/WSHttpBindingTest.cs
diff --git a/mcs/class/System.ServiceModel/mobile_static_System.ServiceModel_test.dll.sources b/mcs/class/System.ServiceModel/mobile_static_System.ServiceModel_test.dll.sources
new file mode 100644 (file)
index 0000000..275d9f3
--- /dev/null
@@ -0,0 +1 @@
+#include  System.ServiceModel_test.dll.sources
index f13d3b55f884bf14c16825e5d35d4d3678a9852c..f4ff7d466459ccad46a685f80ee619a1e04cfa3a 100644 (file)
@@ -4,17 +4,12 @@ include ../../build/rules.make
 
 LIBRARY = System.Web.Http.SelfHost.dll
 
-System.Web.Http.SelfHost.Properties.CommonWebApiResources.resources: ../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx
-       $(RESGEN) "$<" "$@"
-
-System.Web.Http.SelfHost.Properties.SRResources.resources: ../../../external/aspnetwebstack/src/System.Web.Http.SelfHost/Properties/SRResources.resx
-       $(RESGEN) "$<" "$@"
-
+RESOURCE_DEFS = \
+       System.Web.Http.SelfHost.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx \
+       System.Web.Http.SelfHost.Properties.SRResources,../../../external/aspnetwebstack/src/System.Web.Http.SelfHost/Properties/SRResources.resx
 
 LIB_REFS = System.Core System System.Xml System.Configuration System.Net.Http System.Runtime.Serialization System.ServiceModel System.IdentityModel System.Web.Http System.Net.Http.Formatting
 LIB_MCS_FLAGS = -d:ASPNETMVC -keyfile:../winfx.pub -delaysign
 
 include ../../build/library.make
 
-$(the_lib): System.Web.Http.SelfHost.Properties.CommonWebApiResources.resources \
-       System.Web.Http.SelfHost.Properties.SRResources.resources
index 1260d005c16b064c8c871a8c2b1c6f3e9d7794fe..70ba4af74c2bc27f6ecfa11211b2903d7bd0c446 100644 (file)
   <ItemGroup>\r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx">\r
+      <LogicalName>System.Web.Http.SelfHost.Properties.CommonWebApiResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/System.Web.Http.SelfHost/Properties/SRResources.resx">\r
+      <LogicalName>System.Web.Http.SelfHost.Properties.SRResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
+  </ItemGroup>\r
 </Project>\r
 
index e0606bdbafb8c3fc35d495674cef414ad048a7ee..b022ea314cf6a824a3630e58d2c54957cb5c4cff 100644 (file)
@@ -4,17 +4,13 @@ include ../../build/rules.make
 
 LIBRARY = System.Web.Http.WebHost.dll
 
-System.Web.Http.WebHost.Properties.CommonWebApiResources.resources: ../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx
-       $(RESGEN) "$<" "$@"
-
-System.Web.Http.WebHost.Properties.SRResources.resources: ../../../external/aspnetwebstack/src/System.Web.Http.WebHost/Properties/SRResources.resx
-       $(RESGEN) "$<" "$@"
-
+RESOURCE_DEFS = \
+       System.Web.Http.WebHost.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx \
+       System.Web.Http.WebHost.Properties.SRResources,../../../external/aspnetwebstack/src/System.Web.Http.WebHost/Properties/SRResources.resx
 
 LIB_REFS = System.Core System System.Xml System.Configuration System.Net.Http System.Runtime.Serialization System.ServiceModel System.IdentityModel System.Web.Http System.Net.Http.Formatting System.Web.Routing System.Web Microsoft.Web.Infrastructure
 LIB_MCS_FLAGS = -d:ASPNETMVC -keyfile:../winfx.pub -delaysign
 
 include ../../build/library.make
 
-$(the_lib): System.Web.Http.WebHost.Properties.CommonWebApiResources.resources \
-       System.Web.Http.WebHost.Properties.SRResources.resources
+$(the_lib): 
index 2a4f661c3b7ee29a4ae690b3b5edb69055402873..0d1b62859ab115e15eb8d255bd48d8bc45892522 100644 (file)
   <ItemGroup>\r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx">\r
+      <LogicalName>System.Web.Http.WebHost.Properties.CommonWebApiResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/System.Web.Http.WebHost/Properties/SRResources.resx">\r
+      <LogicalName>System.Web.Http.WebHost.Properties.SRResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
+  </ItemGroup>\r
 </Project>\r
 
index fb50d52d2e98208c8bdc9065d7656ac011cdc3ea..72afa046d2a4cb72959d0a660e53fa8a609fb399 100644 (file)
@@ -4,20 +4,13 @@ include ../../build/rules.make
 
 LIBRARY = System.Web.Http.dll
 
-System.Web.Http.Properties.CommonWebApiResources.resources: ../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx
-       $(RESGEN) "$<" "$@"
-       
-System.Web.Http.Properties.SRResources.resources: ../../../external/aspnetwebstack/src/System.Web.Http/Properties/SRResources.resx
-       $(RESGEN) "$<" "$@"
+RESOURCE_DEFS = \
+       System.Web.Http.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx \
+       System.Web.Http.Properties.SRResources,../../../external/aspnetwebstack/src/System.Web.Http/Properties/SRResources.resx
+
 
 
 LIB_REFS = System.Core System System.Xml System.Net.Http System.ComponentModel.DataAnnotations System.Net.Http.Formatting System.Runtime.Caching System.Runtime.Serialization System.Data.Linq
-LIB_MCS_FLAGS = \
-               -d:ASPNETMVC -keyfile:../winfx.pub -delaysign \
-               -resource:System.Web.Http.Properties.CommonWebApiResources.resources \
-               -resource:System.Web.Http.Properties.SRResources.resources
+LIB_MCS_FLAGS = -d:ASPNETMVC -keyfile:../winfx.pub -delaysign 
 
 include ../../build/library.make
-
-$(the_lib): System.Web.Http.Properties.CommonWebApiResources.resources \
-       System.Web.Http.Properties.SRResources.resources
index dab06f09c1fe4e262fb15e4dcdc4f948c55cbdbf..bb5c8db8c3f130b909c1ec27769405d46a3d5b92 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx $(ProjectDir)/System.Web.Http.Properties.CommonWebApiResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.Http/Properties/SRResources.resx $(ProjectDir)/System.Web.Http.Properties.SRResources.resx
 
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx $(ProjectDir)/System.Web.Http.Properties.CommonWebApiResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.Http/Properties/SRResources.resx $(ProjectDir)/System.Web.Http.Properties.SRResources.resx
 \r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
@@ -389,10 +385,10 @@ cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.Http/Properties
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.Http.Properties.CommonWebApiResources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx">\r
       <LogicalName>System.Web.Http.Properties.CommonWebApiResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.Http.Properties.SRResources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/System.Web.Http/Properties/SRResources.resx">\r
       <LogicalName>System.Web.Http.Properties.SRResources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 024e52e89eaa78c9af59c9fc1db03d0399e0b498..e5418545d960e1e5593af07891b5a2d961caa933 100644 (file)
@@ -5,6 +5,7 @@ include ../../build/rules.make
 LIBRARY = System.Web.Mvc3.dll
 LIBRARY_NAME = System.Web.Mvc.dll
 
+RESOURCE_DEFS = System.Web.Mvc.Resources.MvcResources,Mvc/Resources/MvcResources.resx
 RESX_DIST =  Mvc/Resources/MvcResources.resx
 
 LIB_REFS = Microsoft.Web.Infrastructure System System.Core System.Configuration System.Data System.Xml System.Web System.Web.Abstractions System.Web.Routing System.Web.Extensions System.ComponentModel.DataAnnotations System.Data.Linq System.Runtime.Caching System.Web.Razor System.Web.WebPages.Razor System.Web.WebPages
@@ -12,14 +13,9 @@ LIB_MCS_FLAGS = \
                /warn:1 \
                /keyfile:../winfx.pub \
                /d:MONO \
-               /delaysign \
-               $(foreach r, $(RESOURCES), /resource:$(r),System.Web.Mvc.Resources.$(notdir $(r)))
+               /delaysign
 
 EXTRA_DISTFILES = $(RESX_DIST)
-RESOURCES = $(RESX_DIST:.resx=.resources)
-include ../../build/library.make
 
-$(build_lib): $(RESOURCES)
+include ../../build/library.make
 
-$(RESOURCES): %.resources: %.resx
-       $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
index 542360275c1dd72603d31bbe6b6d8c3b09a8de1f..e4472a96a0c3d4beb9ec6dae32aeb0c9a29237b9 100644 (file)
@@ -5,21 +5,15 @@ include ../../build/rules.make
 LIBRARY = System.Web.Razor.dll
 LIBRARY_NAME = System.Web.Razor.dll
 
-System.Web.Razor.Common.CommonResources.resources: ../../../external/aspnetwebstack/src/CommonResources.resx
-       $(RESGEN) "$<" "$@"
-       
-System.Web.Razor.Resources.RazorResources.resources: ../../../external/aspnetwebstack/src/System.Web.Razor/Resources/RazorResources.resx
-       $(RESGEN) "$<" "$@"
+RESOURCE_DEFS = \
+       System.Web.Razor.Common.CommonResources,../../../external/aspnetwebstack/src/CommonResources.resx \
+       System.Web.Razor.Resources.RazorResources,../../../external/aspnetwebstack/src/System.Web.Razor/Resources/RazorResources.resx
 
 LIB_REFS = System System.Core
 LIB_MCS_FLAGS = \
                /warn:1 \
                /keyfile:../winfx.pub -delaysign \
-               /d:ASPNETWEBPAGES \
-               /resource:System.Web.Razor.Resources.RazorResources.resources \
-               /resource:System.Web.Razor.Common.CommonResources.resources
+               /d:ASPNETWEBPAGES 
 
 include ../../build/library.make
 
-$(build_lib): System.Web.Razor.Resources.RazorResources.resources \
-               System.Web.Razor.Common.CommonResources.resources
index 561a784fa70bb482782f90d771c851aaed438d51..7b693416b897c7b8a85bb37efb2b7daac80698a2 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-resgen $(ProjectDir)\..\..\..\external\aspnetwebstack\src\CommonResources.resx $(ProjectDir)\System.Web.Razor.Common.CommonResources.resx
-resgen $(ProjectDir)\..\..\..\external\aspnetwebstack\src\System.Web.Razor\Resources\RazorResources.resx $(ProjectDir)\System.Web.Razor.Resources.RazorResources.resx
+
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-resgen $(ProjectDir)\..\..\..\external\aspnetwebstack\src\CommonResources.resx $(ProjectDir)\System.Web.Razor.Common.CommonResources.resx
-resgen $(ProjectDir)\..\..\..\external\aspnetwebstack\src\System.Web.Razor\Resources\RazorResources.resx $(ProjectDir)\System.Web.Razor.Resources.RazorResources.resx\r
+\r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 
@@ -245,12 +243,12 @@ resgen $(ProjectDir)\..\..\..\external\aspnetwebstack\src\System.Web.Razor\Resou
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.Razor.Resources.RazorResources.resx">\r
-      <LogicalName>System.Web.Razor.Resources.RazorResources.resources</LogicalName>\r
-    </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.Razor.Common.CommonResources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/CommonResources.resx">\r
       <LogicalName>System.Web.Razor.Common.CommonResources.resources</LogicalName>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/System.Web.Razor/Resources/RazorResources.resx">\r
+      <LogicalName>System.Web.Razor.Resources.RazorResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
   </ItemGroup>\r
 </Project>\r
 
index 0170bcddc5c8f4348d94161cd400df69dd3f0113..0e8dd48092a02ed4dec8aa97c7c34f192ae50502 100644 (file)
@@ -56,10 +56,7 @@ EXTRA_DISTFILES = \
 
 include ../../build/library.make
 
-$(the_libdir_base)$(LIBRARY): $(system_web_deps) $(system_design_deps) t
-
-t:
-       echo $(plaindesign)
+$(the_libdir_base)$(LIBRARY): $(system_web_deps) $(system_design_deps)
 
 $(plainweb):
        (cd ../System.Web; $(MAKE) $@)
index 2585d05360537e00514bc4969b0836d105d15b7f..6171dba1c016299be98bea6dc48695dd04e83386 100644 (file)
@@ -214,6 +214,9 @@ namespace System.Web.Services.Protocols {
                                OutputMembersMapping = soapImporter.ImportMembersMapping (ResponseName, ResponseNamespace, out_members, hasWrappingElem, writeAccessors);
                        }
 
+                       InputMembersMapping.SetKey(RequestName);
+                       OutputMembersMapping.SetKey(ResponseName);
+
                        requestSerializerId = parent.RegisterSerializer (InputMembersMapping);
                        responseSerializerId = parent.RegisterSerializer (OutputMembersMapping);
 
@@ -254,6 +257,8 @@ namespace System.Web.Services.Protocols {
                                else
                                        InputHeaderMembersMapping = soapImporter.ImportMembersMapping ("", RequestNamespace, members, false, false);
                                
+                               InputHeaderMembersMapping.SetKey(RequestName + ":InHeaders");
+                               
                                requestHeadersSerializerId = parent.RegisterSerializer (InputHeaderMembersMapping);
                        }
                        
@@ -265,7 +270,9 @@ namespace System.Web.Services.Protocols {
                                        OutputHeaderMembersMapping = xmlImporter.ImportMembersMapping ("", RequestNamespace, members, false);
                                else
                                        OutputHeaderMembersMapping = soapImporter.ImportMembersMapping ("", RequestNamespace, members, false, false);
-                               
+
+                               OutputHeaderMembersMapping.SetKey(ResponseName + ":OutHeaders");
+
                                responseHeadersSerializerId = parent.RegisterSerializer (OutputHeaderMembersMapping);
                        }
                        
index 0019e05c2788b0eb75309d07322d962e7dbfb84c..cd9dc050fe711beb2559a4254f0b7aff4425f7da 100755 (executable)
@@ -243,5 +243,44 @@ namespace MonoTests.System.Web.Services.Protocols
                                }
                        }
                }
+
+               public class RequestHeader : SoapHeader
+               {
+               }
+
+               public class ResponseHeader : SoapHeader
+               {
+               }
+
+               [WebServiceBindingAttribute(Name = "ServiceWithHeaders", Namespace = "https://example.com")]
+               public class ServiceWithHeaders : SoapHttpClientProtocol
+               {
+                       public RequestHeader RequestHeader { get; set; }
+                       public ResponseHeader ResponseHeader { get; set; }
+
+                       [SoapHeaderAttribute("ResponseHeader", Direction = SoapHeaderDirection.Out)]
+                       [SoapHeaderAttribute("RequestHeader")]
+                       [SoapDocumentMethodAttribute("", RequestNamespace = "https://example.com", ResponseNamespace = "https://example.com", Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
+                       public int method1()
+                       {
+                               return 0;
+                       }
+
+                       [SoapHeaderAttribute("ResponseHeader", Direction = SoapHeaderDirection.Out)]
+                       [SoapHeaderAttribute("RequestHeader")]
+                       [SoapDocumentMethodAttribute("", RequestNamespace = "https://example.com", ResponseNamespace = "https://example.com", Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
+                       public int method2()
+                       {
+                               return 0;
+                       }
+               }
+
+               [Test] // Covers #41564
+               public void ServiceWithHeader () {
+                       var service = new ServiceWithHeaders ();
+                       Assert.IsNotNull (service);
+                       // Should not throw an exception
+                       // XAMMAC specific bug
+               }
        }
 }
index 645326dff9af043b2ad51ed908ad5e1800851957..0dee611d6242a3c795560611d2ad058aa53915c1 100644 (file)
@@ -1,8 +1,8 @@
-System.Web.Services/Test/System.Web.Services.Configuration/DiagnosticsElementTest.cs
-System.Web.Services/Test/System.Web.Services.Configuration/ProtocolElementTest.cs
-System.Web.Services/Test/System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs
-System.Web.Services/Test/System.Web.Services.Configuration/SoapExtensionTypeElementTest.cs
-System.Web.Services/Test/System.Web.Services.Configuration/TypeElementTest.cs
-System.Web.Services/Test/System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs
-System.Web.Services/Test/System.Web.Services.Configuration/WsiProfilesElementTest.cs
-System.Web.Services/Test/System.Web.Services.Configuration/XmlFormatExtensionAttributeTest.cs
+System.Web.Services.Configuration/DiagnosticsElementTest.cs
+System.Web.Services.Configuration/ProtocolElementTest.cs
+System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs
+System.Web.Services.Configuration/SoapExtensionTypeElementTest.cs
+System.Web.Services.Configuration/TypeElementTest.cs
+System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs
+System.Web.Services.Configuration/WsiProfilesElementTest.cs
+System.Web.Services.Configuration/XmlFormatExtensionAttributeTest.cs
index 33d506be70a8b2141db43259a3b53eb6c5ec5ba1..2e704de873419e2038fbadbd36737148590875d1 100644 (file)
@@ -5,21 +5,15 @@ include ../../build/rules.make
 LIBRARY = System.Web.WebPages.Deployment.dll
 LIBRARY_NAME = System.Web.WebPages.Deployment.dll
 
-System.Web.WebPages.Deployment.Common.CommonResources.resources: ../../../external/aspnetwebstack/src/CommonResources.resx
-       $(RESGEN) "$<" "$@"
-       
-System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources: ../../../external/aspnetwebstack/src/System.Web.WebPages.Deployment/Resources/ConfigurationResources.resx
-       $(RESGEN) "$<" "$@"
+RESOURCE_DEFS = \
+       System.Web.WebPages.Deployment.Common.CommonResources,../../../external/aspnetwebstack/src/CommonResources.resx \
+       System.Web.WebPages.Deployment.Resources.ConfigurationResources,../../../external/aspnetwebstack/src/System.Web.WebPages.Deployment/Resources/ConfigurationResources.resx
+
 
 LIB_REFS = System System.Core System.Configuration System.Web Microsoft.Web.Infrastructure
 LIB_MCS_FLAGS = \
                /warn:1 \
                /keyfile:../winfx.pub -delaysign \
-               /d:ASPNETWEBPAGES \
-               /resource:System.Web.WebPages.Deployment.Common.CommonResources.resources \
-               /resource:System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources
+               /d:ASPNETWEBPAGES 
 
 include ../../build/library.make
-
-$(build_lib): System.Web.WebPages.Deployment.Common.CommonResources.resources \
-               System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources
index dc5c47f93869334c3c71d4a4221ba557e3c930bc..6fd9784625d0608769e75495cab00b7179016e0d 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages.Deployment/Resources/ConfigurationResources.resx $(ProjectDir)/System.Web.WebPages.Deployment.Resources.ConfigurationResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/CommonResources.resx $(ProjectDir)/System.Web.WebPages.Deployment.Common.CommonResources.resx
 
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages.Deployment/Resources/ConfigurationResources.resx $(ProjectDir)/System.Web.WebPages.Deployment.Resources.ConfigurationResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/CommonResources.resx $(ProjectDir)/System.Web.WebPages.Deployment.Common.CommonResources.resx
 \r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
@@ -127,10 +123,10 @@ cp $(ProjectDir)/../../../external/aspnetwebstack/src/CommonResources.resx $(Pro
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.WebPages.Deployment.Common.CommonResources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/CommonResources.resx">\r
       <LogicalName>System.Web.WebPages.Deployment.Common.CommonResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.WebPages.Deployment.Resources.ConfigurationResources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/System.Web.WebPages.Deployment/Resources/ConfigurationResources.resx">\r
       <LogicalName>System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index cb0e52dc33b38cb2347e8df99f1dd4e8341dd77d..28b0f3f45c16eb89d54e927c7f40cc855dc674a7 100644 (file)
@@ -5,24 +5,18 @@ include ../../build/rules.make
 LIBRARY = System.Web.WebPages.Razor.dll
 LIBRARY_NAME = System.Web.WebPages.Razor.dll
 
-System.Web.WebPages.Razor.Common.CommonResources.resources: ../../../external/aspnetwebstack/src/CommonResources.resx
-       $(RESGEN) "$<" "$@"
-       
-System.Web.WebPages.Razor.Resources.RazorWebResources.resources: ../../../external/aspnetwebstack/src/System.Web.WebPages.Razor/Resources/RazorWebResources.resx
-       $(RESGEN) "$<" "$@"
+RESOURCE_DEFS = \
+       System.Web.WebPages.Razor.Common.CommonResources,../../../external/aspnetwebstack/src/CommonResources.resx \
+       System.Web.WebPages.Razor.Resources.RazorWebResources,../../../external/aspnetwebstack/src/System.Web.WebPages.Razor/Resources/RazorWebResources.resx
 
 LIB_REFS = System System.Core System.Configuration System.Web System.Web.WebPages System.Web.Razor
 LIB_MCS_FLAGS = \
                /warn:1 \
                /keyfile:../winfx.pub \
                /delaysign \
-               /d:ASPNETWEBPAGES \
-               /resource:System.Web.WebPages.Razor.Resources.RazorWebResources.resources \
-               /resource:System.Web.WebPages.Razor.Common.CommonResources.resources
+               /d:ASPNETWEBPAGES
 
 include ../../build/library.make
 
-$(build_lib): System.Web.WebPages.Razor.Resources.RazorWebResources.resources \
-               System.Web.WebPages.Razor.Common.CommonResources.resources
 
 
index 17d5bf27475358433f572ad70a510f43b1b3fb66..9e427e5ed1a72fd8078481143287c386ab12e38a 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/CommonResources.resx $(ProjectDir)/System.Web.WebPages.Razor.Common.CommonResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages.Razor/Resources/RazorWebResources.resx $(ProjectDir)/System.Web.WebPages.Razor.Resources.RazorWebResources.resx
+
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/CommonResources.resx $(ProjectDir)/System.Web.WebPages.Razor.Common.CommonResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages.Razor/Resources/RazorWebResources.resx $(ProjectDir)/System.Web.WebPages.Razor.Resources.RazorWebResources.resx\r
+\r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 
@@ -132,12 +130,12 @@ cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages.Razor/
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.WebPages.Razor.Resources.RazorWebResources.resx">\r
-      <LogicalName>System.Web.WebPages.Razor.Resources.RazorWebResources.resources</LogicalName>\r
-    </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.WebPages.Razor.Common.CommonResources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/CommonResources.resx">\r
       <LogicalName>System.Web.WebPages.Razor.Common.CommonResources.resources</LogicalName>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/System.Web.WebPages.Razor/Resources/RazorWebResources.resx">\r
+      <LogicalName>System.Web.WebPages.Razor.Resources.RazorWebResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
   </ItemGroup>\r
 </Project>\r
 
index 394f2043a118ec709a4e2643da2488c245ff7eb1..3e9641f079cfbbcdba3b85c7664794bac1331e48 100644 (file)
@@ -5,24 +5,18 @@ include ../../build/rules.make
 LIBRARY = System.Web.WebPages.dll
 LIBRARY_NAME = System.Web.WebPages.dll
 
-System.Web.WebPages.Common.CommonResources.resources: ../../../external/aspnetwebstack/src/CommonResources.resx
-       $(RESGEN) "$<" "$@"
-       
-System.Web.WebPages.Resources.WebPageResources.resources: ../../../external/aspnetwebstack/src/System.Web.WebPages/Resources/WebPageResources.resx
-       $(RESGEN) "$<" "$@"
+RESOURCE_DEFS = \
+       System.Web.WebPages.Common.CommonResources,../../../external/aspnetwebstack/src/CommonResources.resx \
+       System.Web.WebPages.Resources.WebPageResources,../../../external/aspnetwebstack/src/System.Web.WebPages/Resources/WebPageResources.resx
 
 LIB_REFS = Microsoft.CSharp Microsoft.Web.Infrastructure System System.ComponentModel.DataAnnotations System.Configuration System.Core System.Data.Linq System.Web System.Web.WebPages.Deployment System.Web.Razor System.Xml System.Xml.Linq
+
 LIB_MCS_FLAGS = \
                /warn:1 \
                /keyfile:../winfx.pub \
                /delaysign \
-               /d:ASPNETWEBPAGES \
-               /resource:System.Web.WebPages.Resources.WebPageResources.resources \
-               /resource:System.Web.WebPages.Common.CommonResources.resources
+               /d:ASPNETWEBPAGES 
 
 EXTRA_DISTFILES = $(RESX_DIST)
 
 include ../../build/library.make
-
-$(build_lib): System.Web.WebPages.Resources.WebPageResources.resources \
-               System.Web.WebPages.Common.CommonResources.resources
index 2d7a70d2aa8802fe452930c29bfd4e54c1e54e6c..28ca085172c7cc7f4344a6487b358146e755cdc0 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/CommonResources.resx $(ProjectDir)/System.Web.WebPages.Common.CommonResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages/Resources/WebPageResources.resx $(ProjectDir)/System.Web.WebPages.Resources.WebPageResources.resx
+
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/CommonResources.resx $(ProjectDir)/System.Web.WebPages.Common.CommonResources.resx
-cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages/Resources/WebPageResources.resx $(ProjectDir)/System.Web.WebPages.Resources.WebPageResources.resx\r
+\r
     </PreBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 
@@ -280,12 +278,12 @@ cp $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages/Resour
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.WebPages.Resources.WebPageResources.resx">\r
-      <LogicalName>System.Web.WebPages.Resources.WebPageResources.resources</LogicalName>\r
-    </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.WebPages.Common.CommonResources.resx">\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/CommonResources.resx">\r
       <LogicalName>System.Web.WebPages.Common.CommonResources.resources</LogicalName>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="../../../external/aspnetwebstack/src/System.Web.WebPages/Resources/WebPageResources.resx">\r
+      <LogicalName>System.Web.WebPages.Resources.WebPageResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
   </ItemGroup>\r
 </Project>\r
 
index 6098d30328ca956a1ce60a8e42de908d74f88d35..61ab3d54af625acd06b3dd3ecd35ddd18b211324 100644 (file)
@@ -225,8 +225,8 @@ TEST_RESOURCE_FILES = \
        Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx.cs \
        Test/mainsoft/NunitWebResources/HtmlTitleCodeRender_Bug662918.aspx
 
-RESX_DIST =  resources/TranslationResources.resx
-RESX_RES = $(RESX_DIST:.resx=.resources)
+RESOURCE_DEFS = \
+       TranslationResources,resources/TranslationResources.resx
 
 NUNIT_RESOURCE_FILES = $(TEST_RESOURCE_FILES)
 NUNIT_APP_CODE_FILES = $(TEST_APP_CODE_FILES)
@@ -254,7 +254,7 @@ ifneq (plainweb/,$(intermediate))
 LIB_REFS += System.Web.Services plaindesign/System.Design
 LIB_MCS_FLAGS += -define:WEBSERVICES_DEP
 
-all-local: System.Web/UplevelHelper.cs resources/TranslationResources.resources 
+all-local: System.Web/UplevelHelper.cs 
 
 endif
 
@@ -272,7 +272,6 @@ EXTRA_DISTFILES = \
        $(TEST_APP_CODE_FILES) \
        $(TEST_APP_GLOBALRESOURCES_FILES) \
        UplevelHelperDefinitions.xml \
-       $(RESX_DIST) \
        SQLiteProviders_DatabaseSchema.sql \
        $(shell find Test/standalone-runner-support/ -name "*.cs" -type f -printf "'%p' ") \
        $(shell find Test/standalone-tests/ -name "*.cs" -type f -printf "'%p' " -o -name "*.cs.in" -type f -printf "'%p' ") \
index 7da63c4dda88584987031787a5ac37ccb098cfb4..0b1699b80a47715877f7cebe3453c131b7eecf9d 100644 (file)
@@ -1564,9 +1564,6 @@ mono $(ProjectDir)\..\lib\net_4_x\culevel.exe -o $(ProjectDir)\System.Web\Upleve
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="resources/TranslationResources.resx">\r
-      <LogicalName>TranslationResources.resources</LogicalName>\r
-    </EmbeddedResource>\r
     <EmbeddedResource Include="resources/WebUIValidation.js">\r
       <LogicalName>WebUIValidation.js</LogicalName>\r
     </EmbeddedResource>\r
@@ -1729,6 +1726,9 @@ mono $(ProjectDir)\..\lib\net_4_x\culevel.exe -o $(ProjectDir)\System.Web\Upleve
     <EmbeddedResource Include="System.Web.UI.WebControls/MenuModern.js">\r
       <LogicalName>MenuModern.js</LogicalName>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="resources/TranslationResources.resx">\r
+      <LogicalName>TranslationResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
   </ItemGroup>\r
 </Project>\r
 
index 5308adce43f96e8cf9765d69d18c48e1312b5196..9d2976f9148216411ff9d3a779ca5170c6bc5562 100644 (file)
@@ -1556,9 +1556,6 @@ mono $(ProjectDir)\..\lib\net_4_x\culevel.exe -o $(ProjectDir)\System.Web\Upleve
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="resources/TranslationResources.resx">\r
-      <LogicalName>TranslationResources.resources</LogicalName>\r
-    </EmbeddedResource>\r
     <EmbeddedResource Include="resources/WebUIValidation.js">\r
       <LogicalName>WebUIValidation.js</LogicalName>\r
     </EmbeddedResource>\r
@@ -1721,6 +1718,9 @@ mono $(ProjectDir)\..\lib\net_4_x\culevel.exe -o $(ProjectDir)\System.Web\Upleve
     <EmbeddedResource Include="System.Web.UI.WebControls/MenuModern.js">\r
       <LogicalName>MenuModern.js</LogicalName>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="resources/TranslationResources.resx">\r
+      <LogicalName>TranslationResources.resources</LogicalName>\r
+    </EmbeddedResource>\r
   </ItemGroup>\r
 </Project>\r
 
index 491d74f6c4d49884b7a72f0fe70695f6c068871e..651d8bf4c8567faeb4c5f292958a398caaac8ae5 100644 (file)
@@ -212,21 +212,18 @@ namespace System.Web.Security
                                strCookiePath = cookiePath;
 
                        DateTime now = DateTime.Now;
-                       DateTime then;
-                       if (createPersistentCookie)
-                               then = now.AddMinutes(timeout);
-                       else
-                               then = DateTime.MinValue;
+                       DateTime ticketExpiry = now.AddMinutes(timeout);
+                       DateTime cookieExpiry = createPersistentCookie ? ticketExpiry : DateTime.MinValue;
 
                        FormsAuthenticationTicket ticket = new FormsAuthenticationTicket (1,
                                                                                          userName,
                                                                                          now,
-                                              createPersistentCookie?then:now.AddYears (50),
+                                                                                         ticketExpiry,
                                                                                          createPersistentCookie,
                                                                                          String.Empty,
                                                                                          cookiePath);
 
-                       HttpCookie cookie = new HttpCookie (cookieName, Encrypt (ticket), strCookiePath, then);
+                       HttpCookie cookie = new HttpCookie (cookieName, Encrypt (ticket), strCookiePath, cookieExpiry);
                        if (requireSSL)
                                cookie.Secure = true;
                        if (!String.IsNullOrEmpty (cookie_domain))
index 4536dedf18a95a2e03479b6b71debbe4364d4b9d..c0e9516a945486b61ca3afdb3d3bb5ba713cb260 100644 (file)
@@ -284,7 +284,7 @@ namespace System.Web.UI.WebControls {
                }
 
                [Browsable (true)]
-               public virtual new string SkinID
+               public override string SkinID
                {
                        get { return base.SkinID; }
                        set { base.SkinID = value; }
index 7969f402f8f14a42963882a9c5d0e8db5ae657ca..8f2de60a83892664ac61f5cb90d72dc37813427d 100644 (file)
@@ -51,17 +51,17 @@ namespace MonoTests.System.Xml
                public void CreateEvidenceForUrl_Basic ()
                {
                        Evidence e = XmlSecureResolver.CreateEvidenceForUrl (null);
-#if DISABLE_CAS_USE
-                       Assert.IsNull (e);
-#else
+#if FEATURE_MONO_CAS
                        Assert.AreEqual (0, e.Count, "null");
+#else
+                       Assert.IsNull (e);
 #endif
 
                        e = XmlSecureResolver.CreateEvidenceForUrl (String.Empty);
-#if DISABLE_CAS_USE
-                       Assert.IsNull (e);
-#else
+#if FEATURE_MONO_CAS
                        Assert.AreEqual (0, e.Count, "String.Empty");
+#else
+                       Assert.IsNull (e);
 #endif
                }
 
diff --git a/mcs/class/System.Xml.XPath.XmlDocument/Assembly/AssemblyInfo.cs b/mcs/class/System.Xml.XPath.XmlDocument/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..a34208a
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Xml.XPath.XmlDocument.dll")]
+[assembly: AssemblyDescription ("System.Xml.XPath.XmlDocument.dll")]
+[assembly: AssemblyDefaultAlias ("System.Xml.XPath.XmlDocument.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Xml.XPath.XmlDocument/Makefile b/mcs/class/System.Xml.XPath.XmlDocument/Makefile
new file mode 100644 (file)
index 0000000..504b374
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Xml.XPath.XmlDocument
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Xml.XPath.XmlDocument.dll
+LIB_REFS = System System.Xml
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.dll.sources b/mcs/class/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.dll.sources
new file mode 100644 (file)
index 0000000..c5813ec
--- /dev/null
@@ -0,0 +1,5 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Xml/XmlDocumentXPathExtensions.cs
diff --git a/mcs/class/System.Xml.XPath.XmlDocument/System.Xml/XmlDocumentXPathExtensions.cs b/mcs/class/System.Xml.XPath.XmlDocument/System.Xml/XmlDocumentXPathExtensions.cs
new file mode 100644 (file)
index 0000000..ee4968b
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// XmlDocumentXPathExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Xml
+{
+       public static class XmlDocumentXPathExtensions
+       {
+               [MonoTODO]
+               public static XmlNodeList SelectNodes (this XmlNode node, string xpath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XmlNodeList SelectNodes (this XmlNode node, string xpath, XmlNamespaceManager nsmgr)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XmlNode SelectSingleNode (this XmlNode node, string xpath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XmlNode SelectSingleNode (this XmlNode node, string xpath, XmlNamespaceManager nsmgr)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XPath.XPathNavigator CreateNavigator (this XmlNode node)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XPath.IXPathNavigable ToXPathNavigable (this XmlNode node)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XPath.XPathNavigator CreateNavigator (this XmlDocument document)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XPath.XPathNavigator CreateNavigator (this XmlDocument document, XmlNode node)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
index b5fb6bb927c52ea13578e019c868e4039664ec34..fe01d7e4317c78eaa7a368f31ccd41952da83cb4 100644 (file)
@@ -19,7 +19,11 @@ TEST_RESOURCES = \
        Test/System/test-uri-props-manual.txt \
        Test/System/test-uri-relative-props.txt
 
+ifndef MOBILE_PROFILE
 TEST_LIB_REFS = System.Drawing Mono.Security System.Data System.Xml System.Core System.Configuration
+else
+TEST_LIB_REFS = Mono.Security System.Data System.Xml System.Core
+endif
 
 TEST_MCS_FLAGS = -nowarn:618,672,219,67,169,612 \
        $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
index a4de75e853a54719fc8293f8852e83e2e32092be..00424bd70f370d8cc10be4b2e2ddeec4ead96442 100644 (file)
@@ -215,6 +215,10 @@ namespace Mono.CSharp
                        mcs.StartInfo.RedirectStandardOutput=true;
                        mcs.StartInfo.RedirectStandardError=true;
                        mcs.ErrorDataReceived += new DataReceivedEventHandler (McsStderrDataReceived);
+
+                       // Use same text decoder as mcs and not user set values in Console
+                       mcs.StartInfo.StandardOutputEncoding =
+                       mcs.StartInfo.StandardErrorEncoding = Encoding.UTF8;
                        
                        try {
                                mcs.Start();
diff --git a/mcs/class/System/Microsoft.Win32.SafeHandles/SafeX509ChainHandle.cs b/mcs/class/System/Microsoft.Win32.SafeHandles/SafeX509ChainHandle.cs
new file mode 100644 (file)
index 0000000..f3091aa
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// SafeX509ChainHandle.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if SECURITY_DEP
+
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public sealed class SafeX509ChainHandle : SafeHandle
+       {
+               [MonoTODO]
+               public override bool IsInvalid
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               internal SafeX509ChainHandle() : base ((IntPtr)0, false)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected override bool ReleaseHandle()
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
index 776751537bdae8df69c5134c20ade5c097c65eb5..f8a83bb6f3b45132e5066093813545f62f9055bb 100644 (file)
@@ -222,7 +222,7 @@ namespace Mono.Net.Security.Private
                }
 
                public int KeyExchangeStrength {
-                       get { return KeyExchangeStrength; }
+                       get { return Impl.KeyExchangeStrength; }
                }
 
                public bool CanRead {
index 5c38fccfe1c6a064c2014a0f47677537a5a1c6dd..efed94f85503853ebcb46d07f6d5655dda3ffd95 100644 (file)
@@ -35,7 +35,7 @@ using System.IO;
 using System.Runtime.InteropServices;
 using System.Runtime.Remoting.Messaging;
 
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
 using MonoTouch;
 #endif
 
@@ -383,7 +383,7 @@ namespace System.IO.Compression
                        CheckResult (res, "WriteInternal");
                }
 
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
                [MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
 #endif
                static int UnmanagedRead (IntPtr buffer, int length, IntPtr data)
@@ -408,7 +408,7 @@ namespace System.IO.Compression
                        return n;
                }
 
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
                [MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
 #endif
                static int UnmanagedWrite (IntPtr buffer, int length, IntPtr data)
diff --git a/mcs/class/System/System.IO/FileSystemWatcher_mobile.cs b/mcs/class/System/System.IO/FileSystemWatcher_mobile.cs
new file mode 100644 (file)
index 0000000..aa13ac5
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// FileSystemWatcher.cs
+//
+// Authors:
+//  Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.IO
+{
+    public class FileSystemWatcher
+    {
+        public FileSystemWatcher () { throw new NotImplementedException (); }
+        public FileSystemWatcher (string path) { throw new NotImplementedException (); }
+        public FileSystemWatcher (string path, string filter) { throw new NotImplementedException (); }
+        public bool EnableRaisingEvents { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
+        public string Filter { get { throw new NotImplementedException (); } set { } }
+        public bool IncludeSubdirectories { get { throw new NotImplementedException (); } set { } }
+        public int InternalBufferSize { get { throw new NotImplementedException (); } set { } }
+        public NotifyFilters NotifyFilter { get { throw new NotImplementedException (); } set { } }
+        public string Path { get { throw new NotImplementedException (); } set { } }
+        public event FileSystemEventHandler Changed;
+        public event FileSystemEventHandler Created;
+        public event FileSystemEventHandler Deleted;
+        public event ErrorEventHandler Error;
+        public event RenamedEventHandler Renamed;
+        protected void OnChanged (FileSystemEventArgs e) { throw new NotImplementedException (); }
+        protected void OnCreated (FileSystemEventArgs e) { throw new NotImplementedException (); }
+        protected void OnDeleted (System.IO.FileSystemEventArgs e) { throw new NotImplementedException (); }
+        protected void OnError (ErrorEventArgs e) { throw new NotImplementedException (); }
+        protected void OnRenamed (RenamedEventArgs e) { throw new NotImplementedException (); }
+        public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType) { throw new NotImplementedException (); }
+        public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType, int timeout) { throw new NotImplementedException (); }
+    }
+}
\ No newline at end of file
index 4ffe6c81f15fe320ce4815fa176c1f7e0744b0a0..9a8560a92b58275149f51640218549c4c1a15652 100644 (file)
@@ -416,7 +416,7 @@ namespace System.Net.NetworkInformation {
                        Win32_IP_ADAPTER_UNICAST_ADDRESS a;
                        for (IntPtr p = ptr; p != IntPtr.Zero; p = a.Next) {
                                a = (Win32_IP_ADAPTER_UNICAST_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_UNICAST_ADDRESS));
-                               c.Add (new Win32UnicastIPAddressInformation (ifIndex, a));
+                               c.InternalAdd (new Win32UnicastIPAddressInformation (ifIndex, a));
                        }
                        return c;
                }
index 50e9009741a2f5d028818a16e4aa7ddc0354d6a8..861d710f77cfd80fa9b535d272fa9e838f3f43b6 100644 (file)
@@ -299,7 +299,7 @@ namespace System.Net.NetworkInformation {
                        }
                }
 
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
                [MonoTouch.MonoPInvokeCallback (typeof (SCNetworkReachabilityCallback))]
 #endif
                static void HandleCallback (IntPtr reachability, NetworkReachabilityFlags flags, IntPtr info)
index c7576897189c0e6c30b155b2380569a1867cc119..07896d201380eea623b23d5a0ecfd9365798af18 100644 (file)
@@ -1328,7 +1328,7 @@ namespace System.Net.Sockets
                        if (e.RemoteEndPoint == null)
                                throw new ArgumentNullException ("remoteEP");
 
-                       InitSocketAsyncEventArgs (e, ConnectAsyncCallback, e, SocketOperation.Connect);
+                       InitSocketAsyncEventArgs (e, null, e, SocketOperation.Connect);
 
                        try {
                                IPAddress [] addresses;
index c89f2de39a2d6a61c6e72ba6eac4e51819477a7a..d6621207cecd34e1278c86df276e0d3572bf0bc9 100644 (file)
@@ -38,12 +38,12 @@ namespace System.Net.WebSockets
                EndpointUnavailable = 1001,
                ProtocolError = 1002,
                InvalidMessageType = 1003,
-               Empty,
+               Empty = 1005,
                InvalidPayloadData = 1007,
                PolicyViolation = 1008,
-               MessageTooBig = 1004,
+               MessageTooBig = 1009,
                MandatoryExtension = 1010,
-               InternalServerError
+               InternalServerError = 1011
        }
 }
 
index ef22ed44c2b20935947099b7dcab2425614eaf3b..108de70ffb3282873158d25fac7044fffd43a99b 100644 (file)
@@ -42,7 +42,7 @@ namespace System.Net
 {
        public class ServicePoint
        {
-               Uri uri;
+               readonly Uri uri;
                int connectionLimit;
                int maxIdleTime;
                int currentConnections;
@@ -345,15 +345,31 @@ namespace System.Net
                                lock (hostE) {
                                        string uriHost = uri.Host;
 
-                                       if (host == null || HasTimedOut) {
-                                               lastDnsResolve = DateTime.UtcNow;
+                                       if (host == null) {
+                                               // Cannot do DNS resolution on literal IP addresses
+                                               if (uri.HostNameType == UriHostNameType.IPv6 || uri.HostNameType == UriHostNameType.IPv4) {
 
-                                               try {
-                                                       host = Dns.GetHostEntry (uriHost);
-                                               }
-                                               catch (Exception) {
-                                                       return null;
+                                                       if (uri.HostNameType == UriHostNameType.IPv6) {
+                                                               // Remove square brackets
+                                                               uriHost = uriHost.Substring (1, uriHost.Length - 2);
+                                                       }
+
+                                                       // Creates IPHostEntry
+                                                       host = new IPHostEntry();
+                                                       host.AddressList = new IPAddress[] { IPAddress.Parse (uriHost) };
+                                                       return host;
                                                }
+                                       } else {
+                                               if (!HasTimedOut)
+                                                       return host;
+                                       }
+
+                                       lastDnsResolve = DateTime.UtcNow;
+
+                                       try {
+                                               host = Dns.GetHostEntry (uriHost);
+                                       } catch {
+                                               return null;
                                        }
                                }
 
index 28d89a6065cd04a62b2827062409bd9fe057de06..5178569f3c253e058238876545bddbc2d00b75dc 100644 (file)
@@ -896,6 +896,8 @@ namespace System.Net
                {
                        Stream s = null;
                        lock (this) {
+                               if (request.Aborted)
+                                       throw new WebException ("Request aborted", WebExceptionStatus.RequestCanceled);
                                if (Data.request != request)
                                        throw new ObjectDisposedException (typeof (NetworkStream).FullName);
                                if (nstream == null)
index ec341ea85e244436a9725551e3f4007f87ec962c..8aecd6542a6c56734efd9f48dd4c8f9bfd359d37 100644 (file)
@@ -32,8 +32,8 @@ namespace System.Security.Authentication.ExtendedProtection
 {
        public enum ChannelBindingKind
        {
-               Unknown,
-               Unique,
-               Endpoint
+               Unknown = 0,
+               Unique = 25,
+               Endpoint = 26
        }
 }
index 4ff3508c5c29ba9310c481ada3d4f8459b2b1f06..4d802b3108d00c4d4ee4596a5adf7608ec0ccd29 100644 (file)
@@ -26,6 +26,8 @@ Microsoft.Win32/UserPreferenceChangedEventArgs.cs
 Microsoft.Win32/UserPreferenceChangedEventHandler.cs
 Microsoft.Win32/UserPreferenceChangingEventArgs.cs
 Microsoft.Win32/UserPreferenceChangingEventHandler.cs
+Microsoft.Win32.SafeHandles/SafeX509ChainHandle.cs
+
 Mono.Http/NtlmClient.cs
 System.CodeDom.Compiler/CodeCompiler.cs
 System.CodeDom.Compiler/CodeDomConfigurationHandler.cs
index a5899fd28f3ab544f83a1e863f669a3ca5ef3091..2e9ef60993db000f2d431ec64db0d2c088b73bb0 100644 (file)
@@ -16,6 +16,8 @@ using System.IO;
 using System.Reflection;
 using Microsoft.CSharp;
 using NUnit.Framework;
+using System.Text;
+using System.Linq;
 
 namespace MonoTests.Microsoft.CSharp
 {
@@ -566,6 +568,39 @@ namespace MonoTests.Microsoft.CSharp
                        AssertCompileResults (results, true);
                }
 
+               [Test]
+               public void EncodingMismatch ()
+               {
+                       var source = @"
+                               #warning Trigger Some Warning
+                               public class MyClass {
+                                       public static string MyMethod () { return ""data""; }
+                               }";
+
+                       var p = new CompilerParameters () {
+                               GenerateInMemory = false,
+                               GenerateExecutable = false,
+                               IncludeDebugInformation = true,
+                               TreatWarningsAsErrors = false,
+                               TempFiles = new TempFileCollection (_tempDir, true),
+                       };
+
+                       var prov = new CSharpCodeProvider ();
+                       CompilerResults results;
+
+                       var prev = Console.OutputEncoding;
+                       try {
+                               Console.OutputEncoding = Encoding.Unicode;
+
+                               results = prov.CompileAssemblyFromSource (p, source);
+                       } finally {
+                               Console.OutputEncoding = prev;
+                       }
+
+                       Assert.IsNotNull (results.Errors);
+                       Assert.IsTrue (results.Output.Cast<string>().ToArray ()[1].Contains ("Trigger Some Warning"));
+               }
+
                private static string CreateTempDirectory ()
                {
                        // create a uniquely named zero-byte file
index dbc4110cb20c65a6822e4568331fc90b36091cd7..ec9d6b1bb0a4acadf905e1c9e8135ce34aa5f8ed 100644 (file)
@@ -190,7 +190,7 @@ namespace MonoTests.System.ComponentModel.Design.Serialization {
                {
 #if MOBILE
                        // ensure the property is not linked out of the application since it make the test fails
-                       Assert.NotNull (Thread.CurrentPrincipal, "pre-test");
+                       Assert.IsNotNull (Thread.CurrentPrincipal, "pre-test");
 #endif
                        PropertyInfo pi = typeof (Thread).GetProperty ("CurrentPrincipal");
 
@@ -213,7 +213,7 @@ namespace MonoTests.System.ComponentModel.Design.Serialization {
                {
 #if MOBILE
                        // ensure the property is not linked out of the application since it make the test fails
-                       Assert.NotNull (Thread.CurrentPrincipal, "pre-test");
+                       Assert.IsNotNull (Thread.CurrentPrincipal, "pre-test");
 #endif
                        PropertyInfo pi = typeof (Thread).GetProperty ("CurrentPrincipal");
 
index 668e863b5cc055feed1a132c8bc42e8fb00e586f..b747e0dd0164e0fc6e98da731bc02b49911c94ef 100644 (file)
@@ -108,7 +108,7 @@ namespace MonoTests.System.Diagnostics
                        Assert.IsNull (fvi.SpecialBuild, "#27");
                }
 
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
                [Test]
                public void GetVersionInfo_NoNativeResources ()
                {
index 6e83c3090ec0038d44a7c54e04cc73e5ed99c56a..2cbdb6838ca70d001a1c3478acd40a7d2871a302 100644 (file)
@@ -7,9 +7,11 @@ using System.Threading;
 namespace MonoTests.System.Net.NetworkInformation
 {
        [TestFixture]
-       public class PingTest
+       public partial class PingTest
        {
-               [Test] 
+               partial void AndroidShouldPingWork (ref bool shouldWork);
+
+               [Test]
                public void PingFail()
                {
 #if MONOTOUCH
@@ -26,8 +28,13 @@ namespace MonoTests.System.Net.NetworkInformation
 #if MONOTOUCH
                        Assert.Ignore ("Ping implementation is broken on MT (requires sudo access)");
 #else
-                       var p = new Ping ().Send ("127.0.0.1");
-                       Assert.AreEqual(IPStatus.Success, p.Status);
+                       bool shouldWork = true;
+                       AndroidShouldPingWork (ref shouldWork);
+                       if (shouldWork) {
+                               var p = new Ping ().Send ("127.0.0.1");
+                               Assert.AreEqual(IPStatus.Success, p.Status);
+                       } else
+                               Assert.Ignore ("Ping will not work on this Android device");
 #endif
                }               
 
index 2b12d7019bffad7b8ebc05bd816b8e773a684871..f4586a253f8ce09c2b2178d6f5e08ad53b55445a 100755 (executable)
@@ -15,6 +15,7 @@ using System.Collections;
 using System.Threading;
 using System.Reflection;
 using System.Text.RegularExpressions;
+using System.Threading.Tasks;
 using System.Net;
 using System.Net.Sockets;
 using NUnit.Framework;
@@ -4345,6 +4346,23 @@ namespace MonoTests.System.Net.Sockets
                                socket.SetSocketOption (SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 19);
                        }
                }
+
+               [Test] // Covers 41616
+               public void ConnectAsyncUnhandledEx ()
+               {
+                       var mre = new ManualResetEvent (false);
+
+                       var endPoint = new IPEndPoint(0,0);
+                       var socket = new Socket(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Unspecified);
+
+                       var socketArgs = new SocketAsyncEventArgs();
+                       socketArgs.RemoteEndPoint = endPoint;
+                       socketArgs.Completed += (sender, e) => mre.Set ();
+
+                       socket.ConnectAsync (socketArgs);
+
+                       Assert.IsTrue (mre.WaitOne (1000), "ConnectedAsync timeout");
+               }
        }
 }
 
index 77fb73e3f00ed1404dbe81fe1a68294f5d7068a2..3afff1226ae85d5d8207c551ca5a2dac459f6cec 100644 (file)
@@ -154,7 +154,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "GET / HTTP/1.1\r\n\r\n"); // No host
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 400", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 400"));
                }
 
                [Test]
@@ -166,7 +166,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); // no prefix
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 400", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 400"));
                }
 
                [Test]
@@ -204,7 +204,7 @@ namespace MonoTests.System.Net {
                                string response = Receive (ns, 512);
                                ns.Close ();
                                listener.Close ();
-                               StringAssert.StartsWith ("HTTP/1.1 400", response, String.Format ("Failed on {0}", (int) b));
+                               Assert.IsTrue(response.StartsWith ("HTTP/1.1 400"), String.Format ("Failed on {0}", (int) b));
                        }
                }
 
@@ -217,7 +217,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "POST /test4/ HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); // length required
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 411", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 411"));
                }
 
                [Test]
@@ -229,7 +229,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nTransfer-Encoding: pepe\r\n\r\n"); // not implemented
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 501", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 501"));
                }
 
                [Test]
@@ -242,7 +242,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "POST /test6/ HTTP/1.1\r\nHost: 127.0.0.1\r\nTransfer-Encoding: identity\r\n\r\n");
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 501", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 501"));
                }
 
                [Test]
@@ -257,8 +257,8 @@ namespace MonoTests.System.Net {
                        ctx.Response.Close ();
                        string response = Receive (ns, 1024);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 200", response);
-                       StringAssert.Contains ("Transfer-Encoding: chunked", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 200"));
+                       Assert.IsTrue(response.Contains ("Transfer-Encoding: chunked"));
                }
 
                [Test]
@@ -274,7 +274,7 @@ namespace MonoTests.System.Net {
                        ctx.Response.Close ();
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 200", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 200"));
                        Assert.IsTrue (-1 == response.IndexOf ("Transfer-Encoding: chunked"));
                }
 
@@ -290,7 +290,7 @@ namespace MonoTests.System.Net {
                        string response = ReceiveWithTimeout (ns, 512, 1000, out timeout);
                        ns.Close ();
                        Assert.IsFalse (timeout);
-                       StringAssert.StartsWith ("HTTP/1.1 411", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 411"));
                }
 
                [Test]
@@ -306,7 +306,7 @@ namespace MonoTests.System.Net {
                        string response = ReceiveWithTimeout (ns, 512, 1000, out timeout);
                        ns.Close ();
                        Assert.IsFalse (timeout);
-                       StringAssert.StartsWith ("HTTP/1.1 411", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 411"));
                }
 
                [Test]
@@ -320,7 +320,7 @@ namespace MonoTests.System.Net {
                        ns.GetSocket ().Shutdown (SocketShutdown.Send);
                        string input = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 400", input);
+                       Assert.IsTrue(input.StartsWith ("HTTP/1.1 400"));
                }
 
                [Test]
@@ -334,7 +334,7 @@ namespace MonoTests.System.Net {
                        ns.GetSocket ().Shutdown (SocketShutdown.Send);
                        string input = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 400", input);
+                       Assert.IsTrue(input.StartsWith ("HTTP/1.1 400"));
                }
 
                [Test]
@@ -348,7 +348,7 @@ namespace MonoTests.System.Net {
                        ns.GetSocket ().Shutdown (SocketShutdown.Send);
                        string input = Receive (ns, 512);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 400", input);
+                       Assert.IsTrue(input.StartsWith ("HTTP/1.1 400"));
                }
 
                HttpListenerRequest test14_request;
@@ -448,8 +448,8 @@ namespace MonoTests.System.Net {
                        ctx.Response.Close ();
                        string response = Receive (ns, 1024);
                        ns.Close ();
-                       StringAssert.StartsWith ("HTTP/1.1 200", response);
-                       StringAssert.Contains ("Transfer-Encoding: chunked", response);
+                       Assert.IsTrue(response.StartsWith ("HTTP/1.1 200"));
+                       Assert.IsTrue(response.Contains ("Transfer-Encoding: chunked"));
                }
 
                [Test]
index c088e4e14e2ddeb71509bbda356c4d7761d12c66..6ff1b33260ed2ab7e82883d4f600a12e89136888 100644 (file)
@@ -30,6 +30,7 @@
 using System;
 using System.IO;
 using System.Net;
+using System.Net.NetworkInformation;
 using System.Net.Sockets;
 using System.Text;
 using System.Collections.Generic;
@@ -194,15 +195,22 @@ namespace MonoTests.System.Net
                [Test]
                public void HttpRequestIsLocal ()
                {
-                       var ips = new List<IPAddress> (Dns.GetHostAddresses (Dns.GetHostName ()));
+                       var port = NetworkHelpers.FindFreePort ();
+                       var ips = new List<IPAddress> ();
                        ips.Add (IPAddress.Loopback);
+                       foreach (var adapter in NetworkInterface.GetAllNetworkInterfaces ()) {
+                               foreach (var ip in adapter.GetIPProperties ().UnicastAddresses) {
+                                       ips.Add (ip.Address);
+                               }
+                       }
+
                        foreach (var ip in ips) {
                                if (ip.AddressFamily != AddressFamily.InterNetwork)
                                        continue;
 
                                HttpListener listener = HttpListener2Test.CreateAndStartListener (
-                                       "http://" + ip + ":9000/HttpRequestIsLocal/");
-                               NetworkStream ns = HttpListener2Test.CreateNS (ip, 9000);
+                                       "http://" + ip + ":" + port + "/HttpRequestIsLocal/");
+                               NetworkStream ns = HttpListener2Test.CreateNS (ip, port);
                                HttpListener2Test.Send (ns, "GET /HttpRequestIsLocal/ HTTP/1.0\r\n\r\n");
                                HttpListenerContext ctx = listener.GetContext ();
                                HttpListenerRequest request = ctx.Request;
index 63a6b3e52b3e2ffd2c27acab0f8c8e547e035ddc..346f35bdeacd358202f49bad9a130cef91bd0066 100644 (file)
@@ -219,7 +219,7 @@ public class ServicePointTest
 
                ServicePointManager.DnsRefreshTimeout = dnsRefreshTimeout;
 
-               uri = new Uri ("http://www.google.com/");
+               uri = new Uri ("http://localhost/");
                sp = ServicePointManager.FindServicePoint (uri);
 
                hostEntryProperty = typeof (ServicePoint).GetProperty ("HostEntry", BindingFlags.NonPublic | BindingFlags.Instance);
index 908dadb35c2cac90143898e69a39dc5440019d7b..a3ddb3af8438429c7edd7c0809135dd4a0ba0402 100644 (file)
 //\r
 \r
 using NUnit.Framework;\r
+using MonoTests.Helpers;
 using System;\r
 using System.Net;\r
+using System.Threading;
 using System.Collections;\r
 using System.Runtime.Serialization;\r
 using Socks = System.Net.Sockets;\r
@@ -410,6 +412,52 @@ namespace MonoTests.System.Net {
        {\r
                internal TestWebRequest3 () { }\r
        }\r
+
+       [Test] // Covers #41477
+       public void TestReceiveCancelation ()
+       {
+               var uri = "http://localhost:" + NetworkHelpers.FindFreePort () + "/";
+
+               HttpListener listener = new HttpListener ();
+               listener.Prefixes.Add (uri);
+               listener.Start ();
+
+               try {
+                       for (var i = 0; i < 10; i++) {
+                               var request = WebRequest.CreateHttp (uri);
+                               request.Method = "GET";
+
+                               var tokenSource = new CancellationTokenSource ();
+                               tokenSource.Token.Register(() => request.Abort ());
+
+                               var responseTask = request.GetResponseAsync ();
+
+                               var context = listener.GetContext ();
+                               byte[] outBuffer = new byte[8 * 1024];
+                               context.Response.OutputStream.WriteAsync (outBuffer, 0, outBuffer.Length);
+
+                               Assert.IsTrue (responseTask.Wait (1000), "Timeout #1");
+
+                               WebResponse response = responseTask.Result;
+                               var stream = response.GetResponseStream ();
+
+                               byte[] buffer = new byte[8 * 1024];
+                               var taskRead = stream.ReadAsync (buffer, 0, buffer.Length, tokenSource.Token);
+
+                               tokenSource.Cancel ();
+
+                               Assert.IsTrue (taskRead.Wait (1000), "Timeout #2");
+
+                               var byteRead = taskRead.Result;
+                       }
+               } catch (AggregateException ex) {
+                       var webEx = ex.InnerException as WebException;
+                       Assert.IsNotNull(webEx, "Inner exception is not a WebException");
+                       Assert.AreEqual (webEx.Status, WebExceptionStatus.RequestCanceled);
+               }
+
+               listener.Close ();
+       }
 }\r
 \r
 }\r
index 3dd8cf239af06c93b0219b6d7aacabf5b0cef022..94f3552b6f577fb0e216b02bc67a1175e85d8e7e 100644 (file)
@@ -303,7 +303,7 @@ namespace MonoTests.System.Timers
                        };
                        timer.Start ();
 
-                       Assert.IsTrue (mre.Wait (500), "#1 re-enabling timer in Elapsed didn't work");
+                       Assert.IsTrue (mre.Wait (1000), "#1 re-enabling timer in Elapsed didn't work");
                        Assert.AreEqual (2, elapsedCount, "#2 wrong elapsedCount");
                        timer.Stop ();
                }
@@ -323,7 +323,7 @@ namespace MonoTests.System.Timers
                        };
                        timer.Start ();
 
-                       Assert.IsFalse (mre.Wait (500), "#1 AutoResetEvent=false didn't stop firing Elapsed, elapsedCount=" + elapsedCount);
+                       Assert.IsFalse (mre.Wait (1000), "#1 AutoReset=false didn't stop firing Elapsed, elapsedCount=" + elapsedCount);
                        Assert.AreEqual (1, elapsedCount, "#2 wrong elapsedCount");
                        timer.Stop ();
                }
index efc9027e19c0f7cefd75374bf765809f990b3b06..9f5b848af0cb21d9e4af05662fceaa4c10b85a08 100644 (file)
@@ -2064,5 +2064,13 @@ namespace MonoTests.System
 
                        Assert.AreEqual ("http://localhost/foo", res.ToString ());
                }
+
+               [Test]
+               public void ImplicitUnixFileWithUnicode ()
+               {
+                       string value = "/Library/Frameworks/System.Runtim…ee";
+                       Uri uri;
+                       Assert.IsTrue (Uri.TryCreate (value, UriKind.Absolute, out uri));
+               }
        }
 }
index 821cf273ff89dc941b1c065ca58d2e85863c8b90..4bba90982fe0c99561ba941382dd329f38592230 100644 (file)
@@ -28,6 +28,16 @@ System.IO.Compression/DeflateStream.cs
 System.IO.Compression/GZipStream.cs
 System.IO/InternalBufferOverflowException.cs
 System.IO/InvalidDataException.cs
+System.IO/ErrorEventArgs.cs
+System.IO/ErrorEventHandler.cs
+System.IO/FileSystemEventArgs.cs
+System.IO/FileSystemEventHandler.cs
+System.IO/FileSystemWatcher_mobile.cs
+System.IO/NotifyFilters.cs
+System.IO/RenamedEventArgs.cs
+System.IO/RenamedEventHandler.cs
+System.IO/WaitForChangedResult.cs
+System.IO/WatcherChangeTypes.cs
 System.Net.Mail/AlternateView.cs
 System.Net.Mail/AlternateViewCollection.cs
 System.Net.Mail/Attachment.cs
@@ -272,6 +282,7 @@ System/Platform.cs
 System/SRDescriptionAttribute.cs
 System/UriTypeConverter.cs
 System.Windows.Input/ICommand.cs
+Microsoft.Win32.SafeHandles/SafeX509ChainHandle.cs
 
 Mono.Net.Security/CallbackHelpers.cs
 Mono.Net.Security/ChainValidationHelper.cs
@@ -927,3 +938,15 @@ ReferenceSources/Win32Exception.cs
 ../Mono.Security/Mono.Security.Interface/TlsException.cs
 ../Mono.Security/Mono.Security.Interface/TlsProtocolCode.cs
 ../Mono.Security/Mono.Security.Interface/TlsProtocols.cs
+
+System.Runtime.InteropServices.ComTypes/ADVF.cs
+System.Runtime.InteropServices.ComTypes/DATADIR.cs
+System.Runtime.InteropServices.ComTypes/DVASPECT.cs
+System.Runtime.InteropServices.ComTypes/FORMATETC.cs
+System.Runtime.InteropServices.ComTypes/IAdviseSink.cs
+System.Runtime.InteropServices.ComTypes/IDataObject.cs
+System.Runtime.InteropServices.ComTypes/IEnumFORMATETC.cs
+System.Runtime.InteropServices.ComTypes/IEnumSTATDATA.cs
+System.Runtime.InteropServices.ComTypes/STATDATA.cs
+System.Runtime.InteropServices.ComTypes/STGMEDIUM.cs
+System.Runtime.InteropServices.ComTypes/TYMED.cs
index 8f84347cde9dadf77cd0211d0cabe72fc6b270c7..9a453e68f8c3e381bf02e8fb4d8fcccead7dd30c 100644 (file)
@@ -1,3 +1,6 @@
+
+Microsoft.CSharp/CSharpCodeProviderCas.cs
+Microsoft.CSharp/CSharpCodeProviderTest.cs
 Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs
 Microsoft.CSharp/CodeGeneratorFromExpressionTest.cs
 Microsoft.CSharp/CodeGeneratorFromNamespaceTest.cs
@@ -6,8 +9,6 @@ Microsoft.CSharp/CodeGeneratorFromTypeTest.cs
 Microsoft.CSharp/CodeGeneratorIdentifierTest.cs
 Microsoft.CSharp/CodeGeneratorTestBase.cs
 Microsoft.CSharp/CodeGeneratorTypeOutputTest.cs
-Microsoft.CSharp/CSharpCodeProviderCas.cs
-Microsoft.CSharp/CSharpCodeProviderTest.cs
 Microsoft.VisualBasic/CodeGeneratorFromBinaryOperatorTest.cs
 Microsoft.VisualBasic/CodeGeneratorFromCompileUnitTest.cs
 Microsoft.VisualBasic/CodeGeneratorFromExpressionTest.cs
@@ -17,6 +18,40 @@ Microsoft.VisualBasic/CodeGeneratorFromTypeTest.cs
 Microsoft.VisualBasic/CodeGeneratorTestBase.cs
 Microsoft.VisualBasic/VBCodeProviderCas.cs
 Microsoft.VisualBasic/VBCodeProviderTest.cs
+Microsoft.Win32/IntranetZoneCredentialPolicyCas.cs
+Microsoft.Win32/IntranetZoneCredentialPolicyTest.cs
+Microsoft.Win32/PowerModeChangedEventArgsCas.cs
+Microsoft.Win32/SessionEndedEventArgsCas.cs
+Microsoft.Win32/SessionEndingEventArgsCas.cs
+Microsoft.Win32/SessionSwitchEventArgsCas.cs
+Microsoft.Win32/SessionSwitchEventArgsTest.cs
+Microsoft.Win32/SystemEventsCas.cs
+Microsoft.Win32/TimerElapsedEventArgsCas.cs
+Microsoft.Win32/UserPreferenceChangedEventArgsCas.cs
+Microsoft.Win32/UserPreferenceChangingEventArgsCas.cs
+System.CodeDom.Compiler/CodeCompilerCas.cs
+System.CodeDom.Compiler/CodeDomProviderCas.cs
+System.CodeDom.Compiler/CodeGeneratorCas.cs
+System.CodeDom.Compiler/CodeGeneratorFromTypeTestBase.cs
+System.CodeDom.Compiler/CodeGeneratorGenerateFromCompileUnitTest.cs
+System.CodeDom.Compiler/CodeGeneratorOptionsCas.cs
+System.CodeDom.Compiler/CodeGeneratorOptionsTest.cs
+System.CodeDom.Compiler/CodeGeneratorTest.cs
+System.CodeDom.Compiler/CodeGeneratorTestBase.cs
+System.CodeDom.Compiler/CodeParserCas.cs
+System.CodeDom.Compiler/CompilerErrorCas.cs
+System.CodeDom.Compiler/CompilerErrorCollectionCas.cs
+System.CodeDom.Compiler/CompilerInfoCas.cs
+System.CodeDom.Compiler/CompilerParametersCas.cs
+System.CodeDom.Compiler/CompilerResultsCas.cs
+System.CodeDom.Compiler/ExecutorCas.cs
+System.CodeDom.Compiler/ExecutorTest.cs
+System.CodeDom.Compiler/GeneratedCodeAttributeCas.cs
+System.CodeDom.Compiler/GeneratedCodeAttributeTest.cs
+System.CodeDom.Compiler/IndentedTextWriterCas.cs
+System.CodeDom.Compiler/IndentedTextWriterTest.cs
+System.CodeDom.Compiler/TempFileCollectionCas.cs
+System.CodeDom.Compiler/TempFileCollectionTest.cs
 System.CodeDom/CodeArgumentReferenceExpressionCas.cs
 System.CodeDom/CodeArgumentReferenceExpressionTest.cs
 System.CodeDom/CodeArrayCreateExpressionCas.cs
@@ -148,32 +183,11 @@ System.CodeDom/CodeVariableDeclarationStatementCas.cs
 System.CodeDom/CodeVariableDeclarationStatementTest.cs
 System.CodeDom/CodeVariableReferenceExpressionCas.cs
 System.CodeDom/CodeVariableReferenceExpressionTest.cs
-System.CodeDom.Compiler/CodeCompilerCas.cs
-System.CodeDom.Compiler/CodeDomProviderCas.cs
-System.CodeDom.Compiler/CodeGeneratorCas.cs
-System.CodeDom.Compiler/CodeGeneratorFromTypeTestBase.cs
-System.CodeDom.Compiler/CodeGeneratorGenerateFromCompileUnitTest.cs
-System.CodeDom.Compiler/CodeGeneratorOptionsCas.cs
-System.CodeDom.Compiler/CodeGeneratorOptionsTest.cs
-System.CodeDom.Compiler/CodeGeneratorTest.cs
-System.CodeDom.Compiler/CodeGeneratorTestBase.cs
-System.CodeDom.Compiler/CodeParserCas.cs
-System.CodeDom.Compiler/CompilerErrorCas.cs
-System.CodeDom.Compiler/CompilerErrorCollectionCas.cs
-System.CodeDom.Compiler/CompilerInfoCas.cs
-System.CodeDom.Compiler/CompilerParametersCas.cs
-System.CodeDom.Compiler/CompilerResultsCas.cs
-System.CodeDom.Compiler/ExecutorCas.cs
-System.CodeDom.Compiler/ExecutorTest.cs
-System.CodeDom.Compiler/GeneratedCodeAttributeCas.cs
-System.CodeDom.Compiler/GeneratedCodeAttributeTest.cs
-System.CodeDom.Compiler/IndentedTextWriterCas.cs
-System.CodeDom.Compiler/IndentedTextWriterTest.cs
-System.CodeDom.Compiler/TempFileCollectionCas.cs
-System.CodeDom.Compiler/TempFileCollectionTest.cs
+System.Configuration.Provider
+System.Configuration.Provider/ProviderBaseTest.cs
 System.Configuration/ApplicationSettingsBaseTest.cs
-System.Configuration/ConfigurationExceptionTest.cs
 System.Configuration/ConfigXmlDocumentTest.cs
+System.Configuration/ConfigurationExceptionTest.cs
 System.Configuration/LocalFileSettingsProviderTest.cs
 System.Configuration/SettingElementTest.cs
 System.Configuration/SettingsBaseTest.cs
@@ -181,9 +195,15 @@ System.Configuration/SettingsPropertyCollectionTest.cs
 System.Configuration/SettingsPropertyTest.cs
 System.Configuration/SettingsPropertyValueCollectionTest.cs
 System.Configuration/SettingsPropertyValueTest.cs
-System.Configuration.Provider
-System.Configuration.Provider/ProviderBaseTest.cs
 System.IO.Ports/SerialPortTest.cs
+System.Security.Permissions/ResourcePermissionBaseCas.cs
+System.Security.Permissions/ResourcePermissionBaseEntryCas.cs
+System.Security.Permissions/ResourcePermissionBaseEntryTest.cs
+System.Security.Permissions/ResourcePermissionBaseTest.cs
+System.Security.Permissions/StorePermissionAttributeCas.cs
+System.Security.Permissions/StorePermissionAttributeTest.cs
+System.Security.Permissions/StorePermissionCas.cs
+System.Security.Permissions/StorePermissionTest.cs
 System.Web/AspNetHostingPermissionAttributeCas.cs
 System.Web/AspNetHostingPermissionAttributeTest.cs
 System.Web/AspNetHostingPermissionCas.cs
index 778ccf34afc34668fe8feb487db0e33da659fc74..343e818ace85c71ec45c8bb4126d5a96222bc71d 100644 (file)
@@ -29,8 +29,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System;
 using System.Runtime.InteropServices;
 
@@ -137,5 +135,3 @@ namespace Microsoft.Win32
        }
 }
 
-#endif // NET_2_1
-
index aa5e9d99276de0264ee927a2aa964fc146d85b92..922e78009efdc4da3e5d5ea0e6d6232bac3dbe5e 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System;
 using System.Runtime.InteropServices;
 
@@ -51,5 +49,3 @@ namespace Microsoft.Win32
 
 }
 
-#endif // NET_2_1
-
index 623efdf77bb6b309704afbe6c72bfbe7b91df5b1..a0f30146c82b61f35df9fa048c0f5f31cfadf689 100644 (file)
@@ -29,8 +29,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System;
 using System.IO;
 using System.Collections;
@@ -44,6 +42,50 @@ using Microsoft.Win32.SafeHandles;
 
 namespace Microsoft.Win32
 {
+
+#if MOBILE
+       public sealed class RegistryKey : IDisposable
+       {
+               internal RegistryKey (RegistryHive hiveId)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void Dispose ()
+               {
+               }
+
+               public RegistryKey CreateSubKey (string subkey)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public object GetValue (string name, object defaultValue)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static object GetValue (string keyName, string valueName, object defaultValue)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public RegistryKey OpenSubKey (string name, bool writable)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetValue (string name, object value)
+               {
+               }
+
+               public void SetValue (string name, object value, RegistryValueKind valueKind)
+               {
+               }
+
+               // TODO: Finish full contract API
+       }
+#else
        /// <summary>
        ///     Wrapper class for Windows Registry Entry.
        /// </summary>
@@ -693,7 +735,6 @@ namespace Microsoft.Win32
                }
 
        }
+#endif
 }
 
-#endif // NET_2_1
-
index 38f5c23026eb8f89d7d01d5c13e499727ed6ed07..8db4a861b56761f0163f81df7042064bbc332218 100644 (file)
@@ -25,8 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System.Runtime.InteropServices;
 
 namespace Microsoft.Win32
@@ -44,5 +42,3 @@ namespace Microsoft.Win32
        }
 }
 
-#endif // NET_2_1
-
index 98d4f3ec325c9a08d042822a4733fe6a369820d8..54f16378f3072e43e1510b0b5ad358fd74ba7f80 100644 (file)
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System;
 
 namespace Microsoft.Win32
@@ -39,5 +37,3 @@ namespace Microsoft.Win32
        }
 }
 
-#endif // NET_2_1
-
diff --git a/mcs/class/corlib/Mono/RuntimeHandles.cs b/mcs/class/corlib/Mono/RuntimeHandles.cs
new file mode 100644 (file)
index 0000000..88eeeee
--- /dev/null
@@ -0,0 +1,274 @@
+//
+// Wrapper handles for Mono Runtime internal structs
+//
+// Authors:
+//   Aleksey Kliger <aleksey@xamarin.com>
+//   Rodrigo Kumpera <kumpera@xamarin.com>
+//
+// Copyright 2016 Dot net foundation.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+namespace Mono {
+
+       internal struct RuntimeClassHandle {
+               unsafe RuntimeStructs.MonoClass* value;
+
+               internal unsafe RuntimeClassHandle (RuntimeStructs.MonoClass* value) {
+                       this.value = value;
+               }
+
+               internal unsafe RuntimeClassHandle (IntPtr ptr) {
+                       this.value = (RuntimeStructs.MonoClass*) ptr;
+               }
+
+               internal unsafe RuntimeStructs.MonoClass* Value {
+                       get { return value; }
+               }
+
+               public override bool Equals (object obj)
+               {
+                       if (obj == null || GetType () != obj.GetType ())
+                               return false;
+
+                       unsafe { return value == ((RuntimeClassHandle)obj).Value; }
+               }
+
+               public override int GetHashCode ()
+               {
+                       unsafe { return ((IntPtr)value).GetHashCode (); }
+               }
+
+               public bool Equals (RuntimeClassHandle handle)
+               {
+                       unsafe { return value == handle.Value; }
+               }
+
+               public static bool operator == (RuntimeClassHandle left, Object right)
+               {
+                       return (right != null) && (right is RuntimeClassHandle) && left.Equals ((RuntimeClassHandle)right);
+               }
+
+               public static bool operator != (RuntimeClassHandle left, Object right)
+               {
+                       return (right == null) || !(right is RuntimeClassHandle) || !left.Equals ((RuntimeClassHandle)right);
+               }
+
+               public static bool operator == (Object left, RuntimeClassHandle right)
+               {
+                       return (left != null) && (left is RuntimeClassHandle) && ((RuntimeClassHandle)left).Equals (right);
+               }
+
+               public static bool operator != (Object left, RuntimeClassHandle right)
+               {
+                       return (left == null) || !(left is RuntimeClassHandle) || !((RuntimeClassHandle)left).Equals (right);
+               }
+
+               [MethodImpl(MethodImplOptions.InternalCall)]
+               internal unsafe extern static IntPtr GetTypeFromClass (RuntimeStructs.MonoClass *klass);
+
+               internal RuntimeTypeHandle GetTypeHandle ()
+               {
+                       unsafe { return new RuntimeTypeHandle (GetTypeFromClass (value)); }
+               }
+       }
+
+       internal struct RuntimeRemoteClassHandle {
+               unsafe RuntimeStructs.RemoteClass* value;
+
+               internal unsafe RuntimeRemoteClassHandle (RuntimeStructs.RemoteClass* value)
+               {
+                       this.value = value;
+               }
+
+               internal RuntimeClassHandle ProxyClass {
+                       get {
+                               unsafe {
+                                       return new RuntimeClassHandle (value->proxy_class);
+                               }
+                       }
+               }
+       }
+
+       internal struct RuntimeGenericParamInfoHandle {
+               unsafe RuntimeStructs.GenericParamInfo* value;
+
+               internal unsafe RuntimeGenericParamInfoHandle (RuntimeStructs.GenericParamInfo* value)
+               {
+                       this.value = value;
+               }
+
+               internal unsafe RuntimeGenericParamInfoHandle (IntPtr ptr)
+               {
+                       this.value = (RuntimeStructs.GenericParamInfo*) ptr;
+               }
+
+
+               internal Type[] Constraints { get { return GetConstraints (); } }
+
+               internal GenericParameterAttributes Attributes {
+                       get {
+                               unsafe {
+                                       return (GenericParameterAttributes) value->flags;
+                               }
+                       }
+               }
+
+               Type[] GetConstraints () {
+                       int n = GetConstraintsCount ();
+                       var a = new Type[n];
+                       for (int i = 0; i < n; i++) {
+                               unsafe {
+                                       RuntimeClassHandle c = new RuntimeClassHandle (value->constraints[i]);
+                                       a[i] = Type.GetTypeFromHandle (c.GetTypeHandle ());
+                               }
+                       }
+                       return a;
+               }
+
+               int GetConstraintsCount () {
+                       int i = 0;
+                       unsafe {
+                               RuntimeStructs.MonoClass** p = value->constraints;
+                               while (p != null && *p != null)  {
+                                       p++; i++;
+                               }
+                       }
+                       return i;
+               }
+       }
+
+       internal struct RuntimeEventHandle {
+               IntPtr value;
+
+               internal RuntimeEventHandle (IntPtr v)
+               {
+                       value = v;
+               }
+
+               public IntPtr Value {
+                       get {
+                               return value;
+                       }
+               }
+
+               public override bool Equals (object obj)
+               {
+                       if (obj == null || GetType () != obj.GetType ())
+                               return false;
+
+                       return value == ((RuntimeEventHandle)obj).Value;
+               }
+
+               public bool Equals (RuntimeEventHandle handle)
+               {
+                       return value == handle.Value;
+               }
+
+               public override int GetHashCode ()
+               {
+                       return value.GetHashCode ();
+               }
+
+               public static bool operator == (RuntimeEventHandle left, RuntimeEventHandle right)
+               {
+                       return left.Equals (right);
+               }
+
+               public static bool operator != (RuntimeEventHandle left, RuntimeEventHandle right)
+               {
+                       return !left.Equals (right);
+               }
+       }
+
+       internal struct RuntimePropertyHandle {
+               IntPtr value;
+
+               internal RuntimePropertyHandle (IntPtr v)
+               {
+                       value = v;
+               }
+
+               public IntPtr Value {
+                       get {
+                               return value;
+                       }
+               }
+
+               public override bool Equals (object obj)
+               {
+                       if (obj == null || GetType () != obj.GetType ())
+                               return false;
+
+                       return value == ((RuntimePropertyHandle)obj).Value;
+               }
+
+               public bool Equals (RuntimePropertyHandle handle)
+               {
+                       return value == handle.Value;
+               }
+
+               public override int GetHashCode ()
+               {
+                       return value.GetHashCode ();
+               }
+
+               public static bool operator == (RuntimePropertyHandle left, RuntimePropertyHandle right)
+               {
+                       return left.Equals (right);
+               }
+
+               public static bool operator != (RuntimePropertyHandle left, RuntimePropertyHandle right)
+               {
+                       return !left.Equals (right);
+               }
+       }
+
+       internal struct RuntimeGPtrArrayHandle {
+               unsafe RuntimeStructs.GPtrArray* value;
+
+               internal unsafe RuntimeGPtrArrayHandle (RuntimeStructs.GPtrArray* value)
+               {
+                       this.value = value;
+               }
+
+               internal unsafe RuntimeGPtrArrayHandle (IntPtr ptr)
+               {
+                       this.value = (RuntimeStructs.GPtrArray*) ptr;
+               }
+
+               internal int Length {
+                       get {
+                               unsafe {
+                                       return value->len;
+                               }
+                       }
+               }
+
+               internal IntPtr this[int i] => Lookup (i);
+
+               internal IntPtr Lookup (int i)
+               {
+                       if (i >= 0 && i < Length) {
+                               unsafe {
+                                       return value->data[i];
+                               }
+                       } else
+                               throw new IndexOutOfRangeException ();
+               }
+
+               [MethodImpl(MethodImplOptions.InternalCall)]
+               unsafe extern static void GPtrArrayFree (RuntimeStructs.GPtrArray* value, bool freeSeg);
+
+               internal static void DestroyAndFree (ref RuntimeGPtrArrayHandle h, bool freeSeg) {
+                       unsafe {
+                               GPtrArrayFree (h.value, freeSeg);
+                               h.value = null;
+                       }
+               }
+       }
+}
diff --git a/mcs/class/corlib/Mono/RuntimeStructs.cs b/mcs/class/corlib/Mono/RuntimeStructs.cs
new file mode 100644 (file)
index 0000000..20cd93f
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Mono runtime native structs surfaced to managed code.
+//
+// Authors:
+//   Aleksey Kliger <aleksey@xamarin.com>
+//   Rodrigo Kumpera <kumpera@xamarin.com>
+//
+// Copyright 2016 Dot net foundation.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace Mono {
+       internal class RuntimeStructs {
+               // class-internals.h MonoRemoteClass
+               [StructLayout(LayoutKind.Sequential)]
+               internal unsafe struct RemoteClass {
+                       internal IntPtr default_vtable;
+                       internal IntPtr xdomain_vtable;
+                       internal MonoClass* proxy_class;
+                       internal IntPtr proxy_class_name;
+                       internal uint interface_count;
+                       // FIXME: How to represent variable-length array struct member?
+                       // MonoClass* interfaces [];
+               }
+
+               internal struct MonoClass {
+               }
+
+               // class-internals.h MonoGenericParamInfo
+               internal unsafe struct GenericParamInfo {
+                       internal MonoClass* pklass;
+                       internal IntPtr name;
+                       internal ushort flags;
+                       internal uint token;
+                       internal MonoClass** constraints; /* NULL terminated */
+               }
+
+               // glib.h GPtrArray
+               internal unsafe struct GPtrArray {
+                       internal IntPtr* data;
+                       internal int len;
+               }
+       }
+
+}
+       
diff --git a/mcs/class/corlib/Mono/SafeGPtrArrayHandle.cs b/mcs/class/corlib/Mono/SafeGPtrArrayHandle.cs
new file mode 100644 (file)
index 0000000..6332259
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Safe handle class for Mono.RuntimeGPtrArrayHandle
+//
+// Authors:
+//   Aleksey Kliger <aleksey@xamarin.com>
+//   Rodrigo Kumpera <kumpera@xamarin.com>
+//
+// Copyright 2016 Dot net foundation.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Mono {
+       internal sealed class SafeGPtrArrayHandle : IDisposable {
+               RuntimeGPtrArrayHandle handle;
+               bool freeSeg;
+
+               internal SafeGPtrArrayHandle (IntPtr ptr, bool freeSeg)
+               {
+                       handle = new RuntimeGPtrArrayHandle (ptr);
+                       this.freeSeg = freeSeg;
+               }
+
+               ~SafeGPtrArrayHandle ()
+               {
+                       Dispose (false);
+               }
+
+               void Dispose (bool disposing)
+               {
+                       RuntimeGPtrArrayHandle.DestroyAndFree (ref handle, freeSeg);
+               }
+
+               public void Dispose () {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               internal int Length {
+                       get {
+                               return handle.Length;
+                       }
+               }
+
+               internal IntPtr this[int i] => handle[i];
+       }
+
+
+}
index 2fb847a6ef9638ec4aae614a2358d7ef59c8d913..8cd000563288e73fec2c2cce006fe964df4a6f7a 100644 (file)
@@ -46,7 +46,12 @@ namespace System.Reflection
 
                internal static MethodBase GetMethodFromHandleNoGenericCheck (RuntimeMethodHandle handle)
                {
-                       return GetMethodFromHandleInternalType (handle.Value, IntPtr.Zero);
+                       return GetMethodFromHandleInternalType_native (handle.Value, IntPtr.Zero, false);
+               }
+
+               internal static MethodBase GetMethodFromHandleNoGenericCheck (RuntimeMethodHandle handle, RuntimeTypeHandle reflectedType)
+               {
+                       return GetMethodFromHandleInternalType_native (handle.Value, reflectedType.Value, false);
                }
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
@@ -57,7 +62,12 @@ namespace System.Reflection
                        return GetMethodBodyInternal (handle);
                }
 
+               static MethodBase GetMethodFromHandleInternalType (IntPtr method_handle, IntPtr type_handle) {
+                       return GetMethodFromHandleInternalType_native (method_handle, type_handle, true);
+               }
+
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               extern static MethodBase GetMethodFromHandleInternalType (IntPtr method_handle, IntPtr type_handle);            
+               internal extern static MethodBase GetMethodFromHandleInternalType_native (IntPtr method_handle, IntPtr type_handle, bool genericCheck);
+
        }
-}
\ No newline at end of file
+}
index f577efcd5ca871464b7ed8ca65b028a35086fd98..08159216f565de940787de6b3441daf5875ce092 100644 (file)
@@ -452,7 +452,8 @@ namespace System
                                throw new InvalidOperationException(Environment.GetResourceString("Arg_NotGenericParameter"));
                        Contract.EndContractBlock();
 
-                       Type[] constraints = GetGenericParameterConstraints_impl ();
+                       var paramInfo = new Mono.RuntimeGenericParamInfoHandle (RuntimeTypeHandle.GetGenericParameterInfo (this));
+                       Type[] constraints = paramInfo.Constraints;
 
                        if (constraints == null)
                                constraints = EmptyArray<Type>.Value;
@@ -471,13 +472,55 @@ namespace System
                static extern Type MakeGenericType (Type gt, Type [] types);
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               internal extern RuntimeMethodInfo[] GetMethodsByName (string name, BindingFlags bindingAttr, bool ignoreCase, Type reflected_type);
+               internal extern IntPtr GetMethodsByName_native (string name, BindingFlags bindingAttr, bool ignoreCase);
+
+               internal RuntimeMethodInfo[] GetMethodsByName (string name, BindingFlags bindingAttr, bool ignoreCase, RuntimeType reflectedType)
+               {
+                       var refh = new RuntimeTypeHandle (reflectedType);
+                       using (var h = new Mono.SafeGPtrArrayHandle (GetMethodsByName_native (name, bindingAttr, ignoreCase), false)) {
+                               var n = h.Length;
+                               var a = new RuntimeMethodInfo [n];
+                               for (int i = 0; i < n; i++) {
+                                       var mh = new RuntimeMethodHandle (h[i]);
+                                       a[i] = (RuntimeMethodInfo) MethodBase.GetMethodFromHandleNoGenericCheck (mh, refh);
+                               }
+                               return a;
+                       }
+               }
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern RuntimePropertyInfo[] GetPropertiesByName (string name, BindingFlags bindingAttr, bool icase, Type reflected_type);              
+               extern IntPtr GetPropertiesByName_native (string name, BindingFlags bindingAttr, bool icase);           
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern RuntimeConstructorInfo[] GetConstructors_internal (BindingFlags bindingAttr, Type reflected_type);
+               extern IntPtr GetConstructors_native (BindingFlags bindingAttr);
+
+               RuntimeConstructorInfo[] GetConstructors_internal (BindingFlags bindingAttr, RuntimeType reflectedType)
+               {
+                       var refh = new RuntimeTypeHandle (reflectedType);
+                       using (var h = new Mono.SafeGPtrArrayHandle (GetConstructors_native (bindingAttr), false)) {
+                               var n = h.Length;
+                               var a = new RuntimeConstructorInfo [n];
+                               for (int i = 0; i < n; i++) {
+                                       var mh = new RuntimeMethodHandle (h[i]);
+                                       a[i] = (RuntimeConstructorInfo) MethodBase.GetMethodFromHandleNoGenericCheck (mh, refh);
+                               }
+                               return a;
+                       }
+               }
+
+               RuntimePropertyInfo[] GetPropertiesByName (string name, BindingFlags bindingAttr, bool icase, RuntimeType reflectedType)
+               {
+                       var refh = new RuntimeTypeHandle (reflectedType);
+                       using (var h = new Mono.SafeGPtrArrayHandle (GetPropertiesByName_native (name, bindingAttr, icase), false)) {
+                               var n = h.Length;
+                               var a = new RuntimePropertyInfo [n];
+                               for (int i = 0; i < n; i++) {
+                                       var ph = new Mono.RuntimePropertyHandle (h[i]);
+                                       a[i] = (RuntimePropertyInfo) PropertyInfo.GetPropertyFromHandle (ph, refh);
+                               }
+                               return a;
+                       }
+               }
 
                public override InterfaceMapping GetInterfaceMap (Type ifaceType)
                {
@@ -618,20 +661,46 @@ namespace System
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                extern Type[] GetGenericArgumentsInternal (bool runtimeArray);
 
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern GenericParameterAttributes GetGenericParameterAttributes ();
-
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern Type[] GetGenericParameterConstraints_impl ();
+               GenericParameterAttributes GetGenericParameterAttributes () {
+                       return (new Mono.RuntimeGenericParamInfoHandle (RuntimeTypeHandle.GetGenericParameterInfo (this))).Attributes;
+               }
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                extern int GetGenericParameterPosition ();
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern RuntimeEventInfo[] GetEvents_internal (string name, BindingFlags bindingAttr, Type reflected_type);
+               extern IntPtr GetEvents_native (string name, BindingFlags bindingAttr);
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern RuntimeFieldInfo[] GetFields_internal (string name, BindingFlags bindingAttr, Type reflected_type);
+               extern IntPtr GetFields_native (string name, BindingFlags bindingAttr);
+
+               RuntimeFieldInfo[] GetFields_internal (string name, BindingFlags bindingAttr, RuntimeType reflectedType)
+               {
+                       var refh = new RuntimeTypeHandle (reflectedType);
+                       using (var h = new Mono.SafeGPtrArrayHandle (GetFields_native (name, bindingAttr), false)) {
+                               int n = h.Length;
+                               var a = new RuntimeFieldInfo[n];
+                               for (int i = 0; i < n; i++) {
+                                       var fh = new RuntimeFieldHandle (h[i]);
+                                       a[i] = (RuntimeFieldInfo) FieldInfo.GetFieldFromHandle (fh, refh);
+                               }
+                               return a;
+                       }
+               }
+
+               RuntimeEventInfo[] GetEvents_internal (string name, BindingFlags bindingAttr, RuntimeType reflectedType)
+               {
+                       var refh = new RuntimeTypeHandle (reflectedType);
+                       using (var h = new Mono.SafeGPtrArrayHandle (GetEvents_native (name, bindingAttr), false)) {
+                               int n = h.Length;
+                               var a = new RuntimeEventInfo[n];
+                               for (int i = 0; i < n; i++) {
+                                       var eh = new Mono.RuntimeEventHandle (h[i]);
+                                       a[i] = (RuntimeEventInfo) EventInfo.GetEventFromHandle (eh, refh);
+                               }
+                               return a;
+                       }
+               }
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern override Type[] GetInterfaces();
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventDataAttribute.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventDataAttribute.cs
new file mode 100644 (file)
index 0000000..9a3d0cd
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// EventDataAttribute.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Diagnostics.Tracing
+{
+       [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
+       public class EventDataAttribute : Attribute
+       {
+               [MonoTODO]
+               public string Name
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventFieldAttribute.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventFieldAttribute.cs
new file mode 100644 (file)
index 0000000..4691746
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// EventFieldAttribute.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Diagnostics.Tracing
+{
+       [AttributeUsage(AttributeTargets.Property)]
+       public class EventFieldAttribute : Attribute
+       {
+               [MonoTODO]
+               public EventFieldFormat Format
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public EventFieldTags Tags
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+                       set
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventFieldFormat.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventFieldFormat.cs
new file mode 100644 (file)
index 0000000..045cf65
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// EventFieldFormat.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Diagnostics.Tracing
+{
+       public enum EventFieldFormat
+       {
+               Boolean = 3,
+               Default = 0,
+               Hexadecimal = 4,
+               HResult = 15,
+               Json = 12,
+               String = 2,
+               Xml = 11
+       }
+}
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventFieldTags.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventFieldTags.cs
new file mode 100644 (file)
index 0000000..5f8cb37
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// EventFieldTags.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Diagnostics.Tracing
+{
+       [Flags]
+       public enum EventFieldTags
+       {
+               None = 0
+       }
+}
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventIgnoreAttribute.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventIgnoreAttribute.cs
new file mode 100644 (file)
index 0000000..8a276b3
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// EventIgnoreAttribute.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Diagnostics.Tracing
+{
+       [AttributeUsage(AttributeTargets.Property)]
+       public class EventIgnoreAttribute : Attribute
+       {
+       }
+}
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventManifestOptions.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventManifestOptions.cs
new file mode 100644 (file)
index 0000000..ed5ff2a
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// EventManifestOptions.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Diagnostics.Tracing
+{
+       [Flags]
+       public enum EventManifestOptions
+       {
+               AllCultures = 2,
+               AllowEventSourceOverride = 8,
+               None = 0,
+               OnlyIfNeededForRegistration = 4,
+               Strict = 1
+       }
+}
index 405d346a5275f4ca9ca6dc19a826f22452a10924..0872f01977ad44dbd72aad695444439c989a2e57 100644 (file)
@@ -33,6 +33,12 @@ namespace System.Diagnostics.Tracing
 {
        public class EventSource : IDisposable
        {
+               protected internal struct EventData
+               {
+                       public IntPtr DataPointer { get; set; }
+                       public int Size { get; set; }
+               }
+
                protected EventSource ()
                {
                        this.Name = this.GetType().Name;
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventSourceException.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventSourceException.cs
new file mode 100644 (file)
index 0000000..3602e29
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// EventSourceException.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Diagnostics.Tracing
+{
+       public class EventSourceException : Exception
+       {
+               [MonoTODO]
+               public EventSourceException ()
+               {
+               }
+
+               [MonoTODO]
+               public EventSourceException (string message)
+               {
+               }
+
+               [MonoTODO]
+               public EventSourceException (string message, Exception innerException)
+               {
+               }
+       }
+}
index 702cd540d976d92e34dbce66fc2e116a679f2603..e51e9dbfc2833eecfc922a3e1f117753a5be742b 100644 (file)
@@ -71,22 +71,25 @@ namespace System.Diagnostics {
                                        out nativeOffset, out fileName, out lineNumber,
                                        out columnNumber);                      
                 }
-                
+
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]                
                public StackFrame (bool fNeedFileInfo)
                {
                        get_frame_info (2, fNeedFileInfo, out methodBase, out ilOffset,
                                        out nativeOffset, out fileName, out lineNumber,
                                        out columnNumber);                      
                 }
-                
-                public StackFrame (int skipFrames)
+
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]                
+               public StackFrame (int skipFrames)
                {
                        get_frame_info (skipFrames + 2, false, out methodBase, out ilOffset,
                                        out nativeOffset, out fileName, out lineNumber,
                                        out columnNumber);                      
                 }
                 
-                public StackFrame (int skipFrames, bool fNeedFileInfo) 
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
+               public StackFrame (int skipFrames, bool fNeedFileInfo) 
                {
                        get_frame_info (skipFrames + 2, fNeedFileInfo, out methodBase, out ilOffset,
                                        out nativeOffset, out fileName, out lineNumber,
@@ -95,7 +98,8 @@ namespace System.Diagnostics {
                 
                // LAMESPEC: According to the MSDN docs, this creates a frame with _only_
                // the filename and lineNumber, but MS fills out the frame info as well.
-                public StackFrame (string fileName, int lineNumber)
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
+               public StackFrame (string fileName, int lineNumber)
                {
                        get_frame_info (2, false, out methodBase, out ilOffset,
                                        out nativeOffset, out fileName, out lineNumber,
@@ -107,7 +111,8 @@ namespace System.Diagnostics {
                 
                // LAMESPEC: According to the MSDN docs, this creates a frame with _only_
                // the filename, lineNumber and colNumber, but MS fills out the frame info as well.
-                public StackFrame (string fileName, int lineNumber, int colNumber)
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
+               public StackFrame (string fileName, int lineNumber, int colNumber)
                {
                        get_frame_info (2, false, out methodBase, out ilOffset,
                                        out nativeOffset, out fileName, out lineNumber,
index 65ca59de4f3f17defb8a2b789c20637b33d2d02b..ba77979609fd9f5e84e98d4a5854fcbcb7648d3b 100644 (file)
@@ -37,6 +37,7 @@ using System.Security;
 using System.Security.Permissions;
 using System.Text;
 using System.Threading;
+using System.IO;
 
 namespace System.Diagnostics {
 
@@ -60,26 +61,33 @@ namespace System.Diagnostics {
                readonly StackTrace[] captured_traces;
                private bool debug_info;
 
+               private static Dictionary<string, Func<StackTrace, string>> metadataHandlers;
+
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
                public StackTrace ()
                {
                        init_frames (METHODS_TO_SKIP, false);
                }
 
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
                public StackTrace (bool fNeedFileInfo)
                {
                        init_frames (METHODS_TO_SKIP, fNeedFileInfo);
                }
 
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
                public StackTrace (int skipFrames)
                {
                        init_frames (skipFrames, false);
                }
 
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
                public StackTrace (int skipFrames, bool fNeedFileInfo)
                {
                        init_frames (skipFrames, fNeedFileInfo);
                }
 
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
                void init_frames (int skipFrames, bool fNeedFileInfo)
                {
                        if (skipFrames < 0)
@@ -283,6 +291,8 @@ namespace System.Diagnostics {
                                        if (!t.AddFrames (sb))
                                                continue;
 
+                                       t.AddMetadata (sb);
+
                                        sb.Append (Environment.NewLine);
                                        sb.Append ("--- End of stack trace from previous location where exception was thrown ---");
                                        sb.Append (Environment.NewLine);
@@ -290,13 +300,78 @@ namespace System.Diagnostics {
                        }
 
                        AddFrames (sb);
+                       AddMetadata (sb);
+
                        return sb.ToString ();
                }
 
+               void AddMetadata (StringBuilder sb)
+               {
+                       if (metadataHandlers == null)
+                               InitMetadataHandlers ();
+
+                       foreach (var handler in metadataHandlers) {
+                               var lines = handler.Value (this);
+                               using (var reader = new StringReader (lines)) {
+                                       string line;
+                                       while ((line = reader.ReadLine()) != null) {
+                                               sb.AppendLine ();
+                                               sb.AppendFormat ("[{0}] {1}", handler.Key, line);
+                                       }
+                               }
+                       }
+               }
+
                internal String ToString (TraceFormat traceFormat)
                {
                        // TODO:
                        return ToString ();
                }
+
+               static void InitMetadataHandlers ()
+               {
+                       metadataHandlers = new Dictionary<string, Func<StackTrace, string>> (StringComparer.Ordinal);
+
+                       var aotid = Assembly.GetAotId ();
+                       if (aotid != null)
+                               AddMetadataHandler ("AOTID", st => { return new Guid (aotid).ToString ("N"); });
+
+                       AddMetadataHandler ("MVID", st => {
+                               var mvidLines = new Dictionary<Guid, List<int>> ();
+                               var frames = st.GetFrames ();
+                               for (var lineNumber = 0; lineNumber < frames.Length; lineNumber++) {
+                                       var method = frames[lineNumber].GetMethod ();
+                                       if (method == null)
+                                               continue;
+                                       var mvid = method.Module.ModuleVersionId;
+
+                                       List<int> lines = null;
+                                       if (!mvidLines.TryGetValue (mvid, out lines)) {
+                                               lines = new List<int> ();
+                                               mvidLines.Add (mvid, lines);
+                                       }
+
+                                       lines.Add (lineNumber);
+                               }
+
+                               var mvids = new List<Guid> (mvidLines.Keys);
+                               mvids.Sort ();
+
+                               var sb = new StringBuilder ();
+                               foreach (var mvid in mvids)
+                                       sb.AppendLine (string.Format ("{0} {1}", mvid.ToString ("N"), string.Join (",", mvidLines[mvid])));
+
+                               return sb.ToString ();
+                       });
+               }
+
+               // This method signature should not change, apps can use it with reflection to add custom metadata handlers.
+               private static void AddMetadataHandler (string id, Func<StackTrace, string> handler)
+               {
+                       if (metadataHandlers == null)
+                               InitMetadataHandlers ();
+
+                       metadataHandlers.Add (id, handler);
+               }
        }
 }
index b755b4d5091913e9896dffce497d314bb1419236..8b4a3504d3ad2c16973c0b1c33babe286981b7ba 100644 (file)
@@ -127,12 +127,22 @@ namespace System.Globalization
                        get {
                                return Thread.CurrentThread.CurrentCulture;
                        }
+#if NETSTANDARD
+                       set {
+                               throw new NotImplementedException ();
+                       }
+#endif
                }
 
                public static CultureInfo CurrentUICulture { 
                        get {
                                return Thread.CurrentThread.CurrentUICulture;
                        }
+#if NETSTANDARD
+                       set {
+                               throw new NotImplementedException ();
+                       }
+#endif
                }
 
                internal static CultureInfo ConstructCurrentCulture ()
index fc62a4db6e3bff42240dfdca7c37c83252c7e266..d0512f24695a2a5dbe3111080092742268f8da45 100644 (file)
@@ -320,9 +320,12 @@ namespace System.IO {
 
                internal static string WindowsDriveAdjustment (string path)
                {
-                       // two special cases to consider when a drive is specified
-                       if (path.Length < 2)
+                       // three special cases to consider when a drive is specified
+                       if (path.Length < 2) {
+                               if (path.Length == 1 && (path[0] == '\\' || path[0] == '/'))
+                                       return Path.GetPathRoot(Directory.GetCurrentDirectory());
                                return path;
+                       }
                        if ((path [1] != ':') || !Char.IsLetter (path [0]))
                                return path;
 
index 8a852c139420c3622ba6fac9f39eaf1e6d6d1463..133ff0be6d9424193e985ed48fd265721648970d 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -87,5 +86,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-
-#endif
index e6cdf10b73785b36f1489c055c1de78dbf98cab8..aa3453d20069185d4d7e8abaf1ed258b6aab6f10 100644 (file)
@@ -26,8 +26,6 @@
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
-
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -151,4 +149,3 @@ namespace System.Reflection.Emit {
                }
        }
 } 
-#endif
index 1163869317e9ab7c8d7c75055c6b8dd4a655e18e..67ddad4a581323bc34bab0f11809093484e2224f 100644 (file)
@@ -1,4 +1,3 @@
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 namespace System.Reflection.Emit {
        static class OpCodeNames {
                internal static readonly string [] names = {
@@ -309,4 +308,3 @@ namespace System.Reflection.Emit {
                };
        }
 }
-#endif
index df0cbf0d50a659499d30f18e21268913b6ad4597..c50e574bde82417420d35eeb1f3fe13579459372 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -75,4 +74,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-#endif
index 6e891d538d45ed3dfc59083402a6d1074f450df2..03317d2626f5da094b1f6d8d504192fd19532f52 100644 (file)
@@ -1,4 +1,3 @@
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -929,4 +928,3 @@ namespace System.Reflection.Emit {
                }
        }
 }
-#endif
index 2985b1b57ee0b5679081e19791641a0e738a8e79..4d823d33cbe8a3c154a0d63077d3592aa01bc391 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -112,5 +111,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-
-#endif
index 08052a3386e7344b5e141c5746eaa0c0351f6af9..ad6be1d1d74a4f0dcc22d469046289c0bc5cd826 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -70,6 +69,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-
-
-#endif
index 16a271495926aa4e1fd61c990b76076dc7b89328..524ea8d30598e57bda0c07b0a2b2c21381f3b615 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -153,4 +152,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-#endif
diff --git a/mcs/class/corlib/System.Reflection.Metadata/AssemblyExtensions.cs b/mcs/class/corlib/System.Reflection.Metadata/AssemblyExtensions.cs
new file mode 100644 (file)
index 0000000..19da043
--- /dev/null
@@ -0,0 +1,46 @@
+//
+// AssemblyExtensions.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Reflection.Metadata
+{
+       public static class AssemblyExtensions
+       {
+               //
+               // System.Runtime.Loader netstandard typeforwarders dependency
+               //
+               [CLSCompliant(false)]
+               public unsafe static bool TryGetRawMetadata (this System.Reflection.Assembly assembly, out byte* blob, out int length)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index f75802198eb67a4197a3349dfec49280b206c666..c90059d3a87432239118d0ab5d144e5bcac1a03e 100644 (file)
@@ -138,6 +138,9 @@ namespace System.Reflection {
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern string InternalImageRuntimeVersion ();
 
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               static internal extern string GetAotId ();
+
                // SECURITY: this should be the only caller to icall get_code_base
                private string GetCodeBase (bool escaped)
                {
index 9da34563f241ccf3e575df1e5acc425dfae28f90..42006c3e80f99ce9594cecccc582d21a1b0fc395 100644 (file)
@@ -433,6 +433,11 @@ namespace System.Reflection {
                        get {
                                return (cultureinfo == null)? null : cultureinfo.Name;
                        }
+#if NETSTANDARD
+                       set {
+                               throw new NotImplementedException ();
+                       }
+#endif
                }
 
                [ComVisibleAttribute(false)]
index 040fe38beaecdf099e2f28bdb8b572bdfcba458c..9668f1f56c2b85e6bd47899349e8a2b6323fdb79 100644 (file)
@@ -28,6 +28,7 @@
 //
 
 using System.Diagnostics;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
 namespace System.Reflection {
@@ -277,5 +278,25 @@ namespace System.Reflection {
                public virtual MethodInfo RemoveMethod {
                        get { return GetRemoveMethod (true); }
                }
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               private static extern EventInfo internal_from_handle_type (IntPtr event_handle, IntPtr type_handle);
+
+               internal static EventInfo GetEventFromHandle (Mono.RuntimeEventHandle handle)
+               {
+                       if (handle.Value == IntPtr.Zero)
+                               throw new ArgumentException ("The handle is invalid.");
+                       return internal_from_handle_type (handle.Value, IntPtr.Zero);
+               }
+
+               internal static EventInfo GetEventFromHandle (Mono.RuntimeEventHandle handle, RuntimeTypeHandle reflectedType)
+               {
+                       if (handle.Value == IntPtr.Zero)
+                               throw new ArgumentException ("The handle is invalid.");
+                       EventInfo ei = internal_from_handle_type (handle.Value, reflectedType.Value);
+                       if (ei == null)
+                               throw new ArgumentException ("The event handle and the type handle are incompatible.");
+                       return ei;
+               }
        }
 }
index f52c7b9dbbdb58690a1e6fe33206759d92cb7b38..c433bc93dc8866598b839801f6ccb0effbaea6b3 100644 (file)
@@ -129,7 +129,7 @@ namespace System.Reflection {
 
                 if (!suppressSecurityChecks)
                 {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 #pragma warning disable 618
                     new SecurityPermission(SecurityPermissionFlag.ControlEvidence).Demand();
 #pragma warning restore 618
index 68a62f74a67f5143857c543685a3567be6fa0f7d..9eeb9cc917197b8052062edc222664ba604b87dc 100644 (file)
@@ -196,5 +196,18 @@ namespace System.Reflection {
                        throw new NotImplementedException ();
                }
 #endif
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               private static extern PropertyInfo internal_from_handle_type (IntPtr event_handle, IntPtr type_handle);
+
+               internal static PropertyInfo GetPropertyFromHandle (Mono.RuntimePropertyHandle handle, RuntimeTypeHandle reflectedType)
+               {
+                       if (handle.Value == IntPtr.Zero)
+                               throw new ArgumentException ("The handle is invalid.");
+                       PropertyInfo pi = internal_from_handle_type (handle.Value, reflectedType.Value);
+                       if (pi == null)
+                               throw new ArgumentException ("The property handle and the type handle are incompatible.");
+                       return pi;
+               }
        }
 }
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComAwareEventInfo.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComAwareEventInfo.cs
new file mode 100644 (file)
index 0000000..3e13572
--- /dev/null
@@ -0,0 +1,123 @@
+//
+// ComAwareEventInfo.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+
+namespace System.Runtime.InteropServices
+{
+       public class ComAwareEventInfo : EventInfo
+       {
+               [MonoTODO]
+               public override EventAttributes Attributes
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public override Type DeclaringType
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public override string Name
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ComAwareEventInfo (Type type, string eventName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override void AddEventHandler (object target, Delegate handler)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override void RemoveEventHandler (object target, Delegate handler)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override MethodInfo GetAddMethod (bool nonPublic)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override MethodInfo GetRaiseMethod (bool nonPublic)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override MethodInfo GetRemoveMethod (bool nonPublic)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override object[] GetCustomAttributes (Type attributeType, bool inherit)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override object[] GetCustomAttributes (bool inherit)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override bool IsDefined (Type attributeType, bool inherit)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override Type ReflectedType
+               {
+                       get { throw new NotImplementedException (); }
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComEventsHelper.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComEventsHelper.cs
new file mode 100644 (file)
index 0000000..5ab8020
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ComEventsHelper.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+       public static class ComEventsHelper
+       {
+               [MonoTODO]
+               public static void Combine(object rcw, Guid iid, int dispid, Delegate d)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static Delegate Remove(object rcw, Guid iid, int dispid, Delegate d)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/CustomQueryInterfaceMode.cs b/mcs/class/corlib/System.Runtime.InteropServices/CustomQueryInterfaceMode.cs
new file mode 100644 (file)
index 0000000..1cbf55c
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// CustomQueryInterfaceMode.cs
+//
+// Authors:
+//     Alexander Köplinger <alexander.koeplinger@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+       public enum CustomQueryInterfaceMode
+       {
+               Allow = 1,
+               Ignore = 0
+       }
+}
diff --git a/mcs/class/corlib/System.Runtime.Loader/AssemblyLoadContext.cs b/mcs/class/corlib/System.Runtime.Loader/AssemblyLoadContext.cs
new file mode 100644 (file)
index 0000000..1839144
--- /dev/null
@@ -0,0 +1,108 @@
+//
+// AssemblyLoadContext.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Runtime.Loader
+{
+       //
+       // System.Runtime.Loader netstandard typeforwarders dependency
+       //
+       public abstract class AssemblyLoadContext
+       {
+               protected AssemblyLoadContext ()
+               {
+               }
+               
+               public static System.Runtime.Loader.AssemblyLoadContext Default { 
+                       get { 
+                               throw new NotImplementedException ();
+                       }
+               }
+               
+               public static System.Reflection.AssemblyName GetAssemblyName (string assemblyPath)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public static AssemblyLoadContext GetLoadContext (System.Reflection.Assembly assembly) 
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected abstract System.Reflection.Assembly Load (System.Reflection.AssemblyName assemblyName);
+               
+               public System.Reflection.Assembly LoadFromAssemblyName(System.Reflection.AssemblyName assemblyName) 
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public System.Reflection.Assembly LoadFromAssemblyPath (string assemblyPath)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public System.Reflection.Assembly LoadFromNativeImagePath (string nativeImagePath, string assemblyPath)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public System.Reflection.Assembly LoadFromStream (System.IO.Stream assembly)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public System.Reflection.Assembly LoadFromStream (System.IO.Stream assembly, System.IO.Stream assemblySymbols) 
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected IntPtr LoadUnmanagedDllFromPath (string unmanagedDllPath)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected virtual IntPtr LoadUnmanagedDll (string unmanagedDllName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public void SetProfileOptimizationRoot (string directoryPath)
+               {
+               }
+
+               public void StartProfileOptimization (string profile)
+               {               
+               }
+
+               public event Func<AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly> Resolving;
+               public event Action<AssemblyLoadContext> Unloading;
+       }
+}
+
+#endif
\ No newline at end of file
index 7ef860da45f1725dd95121b1d8a8473e9bdc6cc7..49628abb3446aa8cfedf988fde671a7fbea85738 100644 (file)
@@ -46,8 +46,6 @@ namespace System.Runtime.Remoting.Contexts
                bool _bReEntrant;
                int _flavor;
 
-               [NonSerialized]
-               bool _locked;
                [NonSerialized]
                int _lockCount;
                
@@ -90,32 +88,26 @@ namespace System.Runtime.Remoting.Contexts
                {
                        get 
                        { 
-                               return _locked
+                               return _lockCount > 0
                        }
                        
                        set 
                        {
                                if (value)
                                {
-                                       _mutex.WaitOne ();
+                                       AcquireLock ();
                                        lock (this)
                                        {
-                                               _lockCount++;
                                                if (_lockCount > 1)
                                                        ReleaseLock (); // Thread already had the lock
-                                                       
-                                               _ownerThread = Thread.CurrentThread;
                                        }
                                }
                                else
                                {
                                        lock (this)
                                        {
-                                               while (_lockCount > 0 && _ownerThread == Thread.CurrentThread)
-                                               {
-                                                       _lockCount--;
-                                                       _mutex.ReleaseMutex ();
-                                                       _ownerThread = null;
+                                               while (_lockCount > 0 && _ownerThread == Thread.CurrentThread) {
+                                                       ReleaseLock ();
                                                }
                                        }
                                }
@@ -140,7 +132,9 @@ namespace System.Runtime.Remoting.Contexts
                                if (_lockCount > 0 && _ownerThread == Thread.CurrentThread) {
                                        _lockCount--;
                                        _mutex.ReleaseMutex ();
-                                       _ownerThread = null;
+                                       if (_lockCount == 0) {
+                                               _ownerThread = null;
+                                       }
                                }
                        }
                }
index 3b324d1eab7076389642e0a1776b0343f9366ada..3640f7285910223220cfcb5e256bf3684937a416 100644 (file)
@@ -68,8 +68,38 @@ namespace System.Runtime.Remoting.Messaging {
                internal static String CallContextKey = "__CallContext";
                internal static String UriKey           = "__Uri";
 
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               internal extern void InitMessage (MonoMethod method, object [] out_args);
+               internal void InitMessage (MonoMethod method, object [] out_args)
+               {
+                       this.method = method;
+                       ParameterInfo[] paramInfo = method.GetParametersInternal ();
+                       int param_count = paramInfo.Length;
+                       args = new object[param_count];
+                       arg_types = new byte[param_count];
+                       asyncResult = null;
+                       call_type = CallType.Sync;
+                       names = new string[param_count];
+                       for (int i = 0; i < param_count; i++) {
+                               names[i] = paramInfo[i].Name;
+                       }
+                       bool hasOutArgs = out_args != null;
+                       int j = 0;
+                       for (int i = 0; i < param_count; i++) {
+                               byte arg_type;
+                               bool isOut = paramInfo[i].IsOut;
+                               if (paramInfo[i].ParameterType.IsByRef) {
+                                       if (hasOutArgs)
+                                               args[i] = out_args[j++];
+                                       arg_type = 2; // OUT
+                                       if (!isOut)
+                                               arg_type |= 1; // INOUT
+                               } else {
+                                       arg_type = 1; // IN
+                                       if (isOut)
+                                               arg_type |= 4; // IN, COPY OUT
+                               }
+                               arg_types[i] = arg_type;
+                       }
+               }
 
                public MonoMethodMessage (MethodBase method, object [] out_args)
                {
@@ -79,19 +109,30 @@ namespace System.Runtime.Remoting.Messaging {
                                args = null;
                }
 
-               public MonoMethodMessage (Type type, string method_name, object [] in_args)
+               internal MonoMethodMessage (MethodInfo minfo, object [] in_args, object [] out_args)
                {
-                       // fixme: consider arg types
-                       MethodInfo minfo = type.GetMethod (method_name);
-                       
-                       InitMessage ((MonoMethod)minfo, null);
+                       InitMessage ((MonoMethod)minfo, out_args);
 
                        int len = in_args.Length;
                        for (int i = 0; i < len; i++) {
                                args [i] = in_args [i];
                        }
                }
+
+               private static MethodInfo GetMethodInfo (Type type, string methodName)
+               {
+                       // fixme: consider arg types
+                       MethodInfo minfo = type.GetMethod(methodName);
+                       if (minfo == null)
+                               throw new ArgumentException (String.Format("Could not find '{0}' in {1}", methodName, type), "methodName");
+                       return minfo;
+               }
                
+               public MonoMethodMessage (Type type, string methodName, object [] in_args)
+                       : this (GetMethodInfo (type, methodName), in_args, null)
+               {
+               }
+
                public IDictionary Properties {
                        get {
                                if (properties == null) properties = new MCMDictionary (this);
index de4b921cff8671dd29568107d49ca017960ae6a6..74bc4764adcc0f09bae453359ac832b31b46f715 100644 (file)
@@ -49,8 +49,52 @@ namespace System.Runtime.Remoting.Proxies
        [StructLayout (LayoutKind.Sequential)]
        internal class TransparentProxy {
                public RealProxy _rp;
-               IntPtr _class;
+               Mono.RuntimeRemoteClassHandle _class;
                bool _custom_type_info;
+
+               unsafe internal RuntimeType GetProxyType () {
+                       RuntimeTypeHandle h = _class.ProxyClass.GetTypeHandle ();
+                       return (RuntimeType)Type.GetTypeFromHandle (h);
+               }
+
+               bool IsContextBoundObject {
+                       get { return GetProxyType ().IsContextful; }
+               }
+
+               Context TargetContext {
+                       get { return _rp._targetContext; }
+               }
+
+               bool InCurrentContext () {
+                       return IsContextBoundObject && Object.ReferenceEquals (TargetContext, Thread.CurrentContext);
+               }
+
+               internal object LoadRemoteFieldNew (IntPtr classPtr, IntPtr fieldPtr) {
+                       Mono.RuntimeClassHandle classHandle = new Mono.RuntimeClassHandle (classPtr);
+                       RuntimeFieldHandle fieldHandle = new RuntimeFieldHandle (fieldPtr);
+                       RuntimeTypeHandle typeHandle = classHandle.GetTypeHandle ();
+
+                       FieldInfo field = FieldInfo.GetFieldFromHandle (fieldHandle);
+
+                       if (InCurrentContext ()) {
+                               object o = _rp._server;
+                               return field.GetValue(o);
+                       }
+
+                       object[] inArgs = new object[] { Type.GetTypeFromHandle(typeHandle).FullName,
+                                                         field.Name };
+                       object[] outArgsMsg = new object[1];
+                       MethodInfo minfo = typeof(object).GetMethod("FieldGetter", BindingFlags.NonPublic | BindingFlags.Instance);
+                       if (minfo == null)
+                               throw new MissingMethodException ("System.Object", "FieldGetter");
+                       MonoMethodMessage msg = new MonoMethodMessage (minfo, inArgs, outArgsMsg);
+                       object[] outArgs;
+                       Exception exc;
+                       RealProxy.PrivateInvoke (_rp, msg, out exc, out outArgs);
+                       if (exc != null)
+                               throw exc;
+                       return outArgs[0];
+               }
        }
 #pragma warning restore 169, 649
        
@@ -66,7 +110,7 @@ namespace System.Runtime.Remoting.Proxies
                #region Sync with object-internals.h
                Type class_to_proxy;
                internal Context _targetContext;
-               MarshalByRefObject _server;
+               internal MarshalByRefObject _server;
                int _targetDomainId = -1;
                internal string _targetUri;
                internal Identity _objectIdentity;
index 9a9a6aaa34e842c3fd6318319c64e4093e2d0200..34285b39e3a76f00b3659f3148b8467ee6e4ca1e 100644 (file)
@@ -52,8 +52,8 @@ namespace System.Security {
                {
                }
 
-#if MOBILE && DISABLE_CAS_USE
-               [Obsolete ("CAS support is removed by linker", true)]
+#if MOBILE
+               [Conditional ("FEATURE_MONO_CAS")]
 #else
                [MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
 #endif
@@ -64,8 +64,8 @@ namespace System.Security {
 
                public abstract IPermission Copy ();
 
-#if MOBILE && DISABLE_CAS_USE
-               [Obsolete ("CAS support is removed by linker", true)]
+#if MOBILE
+               [Conditional ("FEATURE_MONO_CAS")]
 #endif
                public void Demand ()
                {
@@ -77,8 +77,8 @@ namespace System.Security {
                        new PermissionSet (this).CasOnlyDemand (3);
                }
 
-#if MOBILE && DISABLE_CAS_USE
-               [Obsolete ("CAS support is removed by linker", true)]
+#if MOBILE
+               [Conditional ("FEATURE_MONO_CAS")]
 #else
                [MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
 #endif
@@ -125,8 +125,8 @@ namespace System.Security {
                        return null;
                }
 
-#if MOBILE && DISABLE_CAS_USE
-               [Obsolete ("CAS support is removed by linker", true)]
+#if MOBILE
+               [Conditional ("FEATURE_MONO_CAS")]
 #else
                [MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
 #endif
@@ -135,8 +135,8 @@ namespace System.Security {
                        new PermissionSet (this).PermitOnly ();
                }
 
-#if MOBILE && DISABLE_CAS_USE
-               [Obsolete ("CAS support is removed by linker", true)]
+#if MOBILE
+               [Conditional ("FEATURE_MONO_CAS")]
 #else
                [MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
 #endif
@@ -147,8 +147,8 @@ namespace System.Security {
                        throw new NotImplementedException ();
                }
 
-#if MOBILE && DISABLE_CAS_USE
-               [Obsolete ("CAS support is removed by linker", true)]
+#if MOBILE
+               [Conditional ("FEATURE_MONO_CAS")]
 #else
                [MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
 #endif
@@ -159,8 +159,8 @@ namespace System.Security {
                        throw new NotImplementedException ();
                }
 
-#if MOBILE && DISABLE_CAS_USE
-               [Obsolete ("CAS support is removed by linker", true)]
+#if MOBILE
+               [Conditional ("FEATURE_MONO_CAS")]
 #else
                [MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
 #endif
@@ -171,8 +171,8 @@ namespace System.Security {
                        throw new NotImplementedException ();
                }
 
-#if MOBILE && DISABLE_CAS_USE
-               [Obsolete ("CAS support is removed by linker", true)]
+#if MOBILE
+               [Conditional ("FEATURE_MONO_CAS")]
 #else
                [MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
 #endif
@@ -264,5 +264,28 @@ namespace System.Security {
                        msg = String.Format (msg, target.GetType (), expected);
                        throw new ArgumentException (msg, "target");
                }
+
+#if MOBILE
+               // Workaround for CS0629
+               void IStackWalk.Assert ()
+               {
+               }
+
+               void IStackWalk.Deny ()
+               {
+               }
+
+               void IStackWalk.PermitOnly ()
+               {
+               }
+
+               void IStackWalk.Demand ()
+               {
+               }
+
+               void IPermission.Demand ()
+               {
+               }
+#endif
        }
 }
index 605d4dad1a9e31c4d0fd9947c10aa4372502a4b0..54cc0c1b3607e186cd7fa80511c13b32f6fb082f 100644 (file)
@@ -625,9 +625,7 @@ namespace System.Security {
                // FIXME what's it doing here? There's probably a reason this was added here.
                static public void RevertAssert ()
                {
-#if !DISABLE_CAS_USE
                        CodeAccessPermission.RevertAssert ();
-#endif
                }
 
                // internal
diff --git a/mcs/class/corlib/System.Security/SafeAccessTokenHandle.cs b/mcs/class/corlib/System.Security/SafeAccessTokenHandle.cs
deleted file mode 100644 (file)
index d7682bf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Runtime.InteropServices;
-
-namespace Microsoft.Win32.SafeHandles
-{
-       public sealed class SafeAccessTokenHandle : SafeHandle
-       {
-               public override bool IsInvalid {
-                       get {
-                               return handle == IntPtr.Zero;
-                       }
-               }
-
-               public SafeAccessTokenHandle ()
-                       : base (IntPtr.Zero, true)
-               {
-                       
-               }
-
-               protected override bool ReleaseHandle()
-               {
-                       return true;
-               }
-       }
-}
index e10918121dd93fd162bf6452e72d8589d7d35908..de7889e827d74afd5861cbad1522b865d41fa8fb 100644 (file)
@@ -116,6 +116,7 @@ namespace System.Threading {
                private InternalThread internal_thread;
                object m_ThreadStartArg;
                object pending_exception;
+               int priority;
                #endregion
 #pragma warning restore 414
 
index dcfe35c85fc8899c4bf94d62686b272cfce0e50c..2b031f332871e671df0acdb1e5972283ddc965b7 100644 (file)
@@ -57,7 +57,7 @@ namespace System {
                 * of icalls, do not require an increment.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 150;
+               private const int mono_corlib_version = 151;
 #pragma warning restore 169
 
                [ComVisible (true)]
index eb6c42f097648ff77d290c66f24e2a600768da87..cd51c87a2a87a63a70d98b04df3233279ef5a170 100644 (file)
@@ -243,5 +243,9 @@ namespace System
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                internal extern static bool IsGenericTypeDefinition (RuntimeType type);
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               internal extern static IntPtr GetGenericParameterInfo (RuntimeType type);
+
        }
 }
index 466678053574bb701b9ca5cc44b4b37b0eb4d7b1..ff76486877cfb2427ccf2b5f9069985552b4c3d2 100644 (file)
@@ -873,7 +873,7 @@ namespace System
                                return true;
 
                        // We might be in the dateTime previous year's DST period
-                       return IsInDSTForYear (rule, dateTime, dateTime.Year - 1);
+                       return dateTime.Year > 1 && IsInDSTForYear (rule, dateTime, dateTime.Year - 1);
                }
 
                bool IsInDSTForYear (AdjustmentRule rule, DateTime dateTime, int year)
@@ -912,7 +912,7 @@ namespace System
 
                public bool IsDaylightSavingTime (DateTimeOffset dateTimeOffset)
                {
-                       throw new NotImplementedException ();
+                       return IsDaylightSavingTime (dateTimeOffset.DateTime);
                }
 
                internal DaylightTime GetDaylightChanges (int year)
@@ -1221,8 +1221,10 @@ namespace System
 
                        try {
                                return ParseTZBuffer (id, buffer, length);
+                       } catch (InvalidTimeZoneException) {
+                               throw;
                        } catch (Exception e) {
-                               throw new InvalidTimeZoneException (e.Message);
+                               throw new InvalidTimeZoneException ("Time zone information file contains invalid data", e);
                        }
                }
 
@@ -1279,7 +1281,7 @@ namespace System
                        if (time_types.Count == 0)
                                throw new InvalidTimeZoneException ();
 
-                       if (time_types.Count == 1 && ((TimeType)time_types[0]).IsDst)
+                       if (time_types.Count == 1 && time_types[0].IsDst)
                                throw new InvalidTimeZoneException ();
 
                        TimeSpan baseUtcOffset = new TimeSpan (0);
@@ -1360,8 +1362,8 @@ namespace System
 
                        TimeZoneInfo tz;
                        if (adjustmentRules.Count == 0 && !storeTransition) {
-                               TimeType t = (TimeType)time_types [0];
                                if (standardDisplayName == null) {
+                                       var t = time_types [0];
                                        standardDisplayName = t.Name;
                                        baseUtcOffset = new TimeSpan (0, 0, t.Offset);
                                }
@@ -1405,6 +1407,20 @@ namespace System
                        var types = new Dictionary<int, TimeType> (count);
                        for (int i = 0; i < count; i++) {
                                int offset = ReadBigEndianInt32 (buffer, index + 6 * i);
+
+                               //
+                               // The official tz database contains timezone with GMT offsets
+                               // not only in whole hours/minutes but in seconds. This happens for years
+                               // before 1901. For example
+                               //
+                               // NAME                 GMTOFF   RULES  FORMAT  UNTIL
+                               // Europe/Madrid        -0:14:44 -      LMT     1901 Jan  1  0:00s
+                               //
+                               // .NET as of 4.6.2 cannot handle that and uses hours/minutes only, so
+                               // we remove seconds to not crash later
+                               //
+                               offset = (offset / 60) * 60;
+
                                byte is_dst = buffer [index + 6 * i + 4];
                                byte abbrev = buffer [index + 6 * i + 5];
                                types.Add (i, new TimeType (offset, (is_dst != 0), abbreviations [(int)abbrev]));
@@ -1460,7 +1476,7 @@ namespace System
 #endregion
        }
 
-       struct TimeType {
+       class TimeType {
                public readonly int Offset;
                public readonly bool IsDst;
                public string Name;
index 94ff296ced511a8752575675a1f99ad0b4eed515..007c0a44d9d314420699358453e1537b89c61e9c 100644 (file)
@@ -179,48 +179,48 @@ namespace MonoTests.Mono.Math.Arithmetic.Big {
                [Test]
                public void AgtB () 
                {
-                       Assertion.Assert(A > B);
+                       Assert.IsTrue(A > B);
                }
                
                [Test]
                public void ANotLtB () 
                {
-                       Assertion.Assert(!(A < B));
+                       Assert.IsTrue(!(A < B));
                }
                
                [Test]
                public void BNotGtA () 
                {
-                       Assertion.Assert(!(B > A));
+                       Assert.IsTrue(!(B > A));
                }
                
                [Test]
                public void AltB () 
                {
-                       Assertion.Assert(B < A);
+                       Assert.IsTrue(B < A);
                }
                
                [Test]
                public void AeqA () 
                {
-                       Assertion.Assert(A == A);
+                       Assert.IsTrue(A == A);
                }
                [Test]
                public void BeqB () 
                {
-                       Assertion.Assert(B == B);
+                       Assert.IsTrue(B == B);
                }
                
                [Test]
                public void AneqB () 
                {
-                       Assertion.Assert(A != B);
+                       Assert.IsTrue(A != B);
                }
                
                [Test]
                public void BneqA () 
                {
-                       Assertion.Assert(B != A);
+                       Assert.IsTrue(B != A);
                }
 
                #endregion
index e6ddb0fc36ea2431ba66db0be801552f2dc38893..b1ba0d26e6eccdaad8a3a6bb71161dd321269d37 100644 (file)
@@ -81,12 +81,12 @@ namespace MonoTests.Mono.Math {
 
                private void ExpectComposite (BigInteger bi)
                {
-                       Assertion.AssertEquals (false, bi.isProbablePrime ());
+                       Assert.AreEqual (false, bi.isProbablePrime ());
                }
 
                private void ExpectPrime (BigInteger bi)
                {
-                       Assertion.AssertEquals (true, bi.isProbablePrime ());
+                       Assert.AreEqual (true, bi.isProbablePrime ());
                }
        }
 
index 4b4b3b3a805435ed9d707ba690ad2a6f0df0137a..ce4f22174b18ed9442e60785e48be5e91b72d01a 100644 (file)
@@ -770,7 +770,7 @@ namespace MonoTests.System.Collections
                        for (int i = 0; i < 20; i++)
                                sl1.RemoveAt (9);
 
-                       Assert.AreEqual (30, sl1.Count, 30, "#C1");
+                       Assert.AreEqual (30, (double) sl1.Count, 30, "#C1");
                        for (int i = 0; i < 9; i++)
                                Assert.AreEqual (i, sl1 ["kala " + string.Format ("{0:D2}", i)], "#C2:" + i);
                        for (int i = 9; i < 29; i++)
index 897342eba7f20d6483be863287879c2b469029e1..c3ab9935350c9b1f3071960bda46d06d97b74d81 100644 (file)
@@ -688,6 +688,11 @@ namespace MonoTests.System.IO
                                                i, root + test [i, 0], ex.GetType ()));
                                }
                        }
+
+                       // These cases require that we don't pass a root to GetFullPath - it should return the proper drive root.
+                       string root4 = Path.GetPathRoot(Directory.GetCurrentDirectory());
+                       Assert.AreEqual(root4, Path.GetFullPath(@"\"));
+                       Assert.AreEqual(root4, Path.GetFullPath("/"));
                }
 
                [Test]
index c9a00481185d6374280d065700948e97c184f999..df214d97b2028468e05e25a7798d0c46df9e808f 100644 (file)
@@ -14,6 +14,7 @@ using System.Runtime.InteropServices;
 using System.Text;
 using System.Diagnostics;
 using System.Runtime.ExceptionServices;
+using System.Linq;
 
 using NUnit.Framework;
 
@@ -517,7 +518,10 @@ namespace MonoTests.System.Reflection.Emit
                        invoke (456324);
 
                        Assert.IsNotNull (ExceptionHandling_Test_Support.Caught, "#1");
-                       Assert.AreEqual (2, ExceptionHandling_Test_Support.CaughtStackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.None).Length, "#2");
+
+                       var lines = ExceptionHandling_Test_Support.CaughtStackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.None);
+                       lines = lines.Where (l => !l.StartsWith ("[")).ToArray ();
+                       Assert.AreEqual (2, lines.Length, "#2");
 
                        var st = new StackTrace (ExceptionHandling_Test_Support.Caught, 0, true);
 
@@ -552,9 +556,12 @@ namespace MonoTests.System.Reflection.Emit
 
                        public static void Handler (Exception e)
                        {
-                               var split = e.StackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
-                               Assert.AreEqual (5, split.Length, "#1");
-                               Assert.IsTrue (split [1].Contains ("---"), "#2");
+                               var lines = e.StackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
+                               // Ignore Metadata
+                               lines = lines.Where (l => !l.StartsWith ("[")).ToArray ();
+
+                               Assert.AreEqual (5, lines.Length, "#1");
+                               Assert.IsTrue (lines [1].Contains ("---"), "#2");
                        }
                }
 
index b43d9fd08954b011f170b3629bf0fe147a876a91..bc3416441cfad03b93e428301df40573aaff264e 100644 (file)
@@ -182,7 +182,10 @@ namespace MonoTests.System.Reflection
                        // note: only available in default appdomain
                        // http://weblogs.asp.net/asanto/archive/2003/09/08/26710.aspx
                        // Not sure we should emulate this behavior.
-#if !MONODROID
+#if __WATCHOS__
+                       Assert.IsNull (Assembly.GetEntryAssembly (), "GetEntryAssembly");
+                       Assert.IsTrue (AppDomain.CurrentDomain.IsDefaultAppDomain (), "!default appdomain");
+#elif !MONODROID
                        string fname = AppDomain.CurrentDomain.FriendlyName;
                        if (fname.EndsWith (".dll")) { // nunit-console
                                Assert.IsNull (Assembly.GetEntryAssembly (), "GetEntryAssembly");
@@ -249,7 +252,7 @@ namespace MonoTests.System.Reflection
                public void Corlib_test ()
                {
                        Assembly corlib_test = Assembly.GetExecutingAssembly ();
-#if MONODROID || MOBILE_STATIC
+#if MONODROID || MOBILE_STATIC || __WATCHOS__
                        Assert.IsNull (corlib_test.EntryPoint, "EntryPoint");
                        Assert.IsNull (corlib_test.Evidence, "Evidence");
 #elif MOBILE
index 900ffec6e7c4e570d6954ebb45176ad648e7912a..51ffc73db4d0535faa8c38608c05cff9732d862d 100644 (file)
@@ -31,6 +31,7 @@ using NUnit.Framework;
 using System.Runtime.ExceptionServices;
 using System.Threading.Tasks;
 using System.Diagnostics;
+using System.Linq;
 
 namespace MonoTests.System.Runtime.ExceptionServices
 {
@@ -38,6 +39,14 @@ namespace MonoTests.System.Runtime.ExceptionServices
        [Category ("BitcodeNotWorking")]
        public class ExceptionDispatchInfoTest
        {
+               static string[] GetLines (string str)
+               {
+                       var lines = str.Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
+
+                       // Ignore Metadata
+                       return lines.Where (l => !l.StartsWith ("[")).ToArray ();
+               }
+
                [Test]
                public void Capture_InvalidArguments ()
                {
@@ -75,7 +84,7 @@ namespace MonoTests.System.Runtime.ExceptionServices
                                ed.Throw ();
                                Assert.Fail ("#0");
                        } catch (Exception e) {
-                               var s = e.StackTrace.Split ('\n');
+                               var s = GetLines (e.StackTrace);
                                Assert.AreEqual (4, s.Length, "#1");
                                Assert.AreEqual (orig, e, "#2");
                                Assert.AreNotEqual (orig_stack, e.StackTrace, "#3");
@@ -90,8 +99,9 @@ namespace MonoTests.System.Runtime.ExceptionServices
                                edi.Throw ();
                                Assert.Fail ("#0");
                        } catch (OperationCanceledException e) {
-                               Assert.IsFalse (e.StackTrace.Contains ("---"));
-                               Assert.AreEqual (2, e.StackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).Length);
+                               Assert.IsTrue (!e.StackTrace.Contains("---"));
+                               var lines = GetLines (e.StackTrace);
+                               Assert.AreEqual (2, lines.Length, "#1");
                        }
                }
 
@@ -120,9 +130,9 @@ namespace MonoTests.System.Runtime.ExceptionServices
                        try {
                                edi.Throw ();
                        } catch (Exception ex) {
-                               var split = ex.StackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
-                               Assert.AreEqual (4, split.Length, "#1");
-                               Assert.IsTrue (split [1].Contains ("---"), "#2");
+                               var lines = GetLines (ex.StackTrace);
+                               Assert.AreEqual (4, lines.Length, "#1");
+                               Assert.IsTrue (lines [1].Contains ("---"), "#2");
                        }
                }
 
@@ -147,10 +157,10 @@ namespace MonoTests.System.Runtime.ExceptionServices
                        try {
                                edi.Throw ();
                        } catch (Exception ex) {
-                               var split = ex.StackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
-                               Assert.AreEqual (7, split.Length, "#1");
-                               Assert.IsTrue (split [1].Contains ("---"), "#2");
-                               Assert.IsTrue (split [4].Contains ("---"), "#3");
+                               var lines = GetLines (ex.StackTrace);
+                               Assert.AreEqual (7, lines.Length, "#1");
+                               Assert.IsTrue (lines [1].Contains ("---"), "#2");
+                               Assert.IsTrue (lines [4].Contains ("---"), "#3");
                        }
                }
 
@@ -166,9 +176,9 @@ namespace MonoTests.System.Runtime.ExceptionServices
                                }
                        } catch (Exception ex) {
                                var st = new StackTrace (ex, true);
-                               var split = st.ToString ().Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
-                               Assert.AreEqual (4, split.Length, "#1");
-                               Assert.IsTrue (split [1].Contains ("---"), "#2");
+                               var lines = GetLines (st.ToString ());
+                               Assert.AreEqual (4, lines.Length, "#1");
+                               Assert.IsTrue (lines [1].Contains ("---"), "#2");
                        }
                }
        }
index ba69ed0503ba2cef85676b6de18327fdc590a987..a217969aefd8fffb6424d2e93ee3bf40a7f73464 100644 (file)
@@ -71,6 +71,23 @@ namespace MonoTests.System.Runtime.Remoting.Contexts {
                        Assert.IsFalse (sa.Locked, "Locked");
                }
 
+               [Test]
+           public void SetLocked()
+               {
+                       SynchronizationAttribute sa = new SynchronizationAttribute(SynchronizationAttribute.REQUIRES_NEW);
+                       sa.Locked = true;
+                       Assert.IsTrue(sa.Locked, "Locked");
+                       sa.Locked = false;
+                       Assert.IsFalse(sa.Locked, "Locked");
+
+                       sa.Locked = true;
+                       Assert.IsTrue(sa.Locked, "Locked");
+                       sa.Locked = true;
+                       Assert.IsTrue(sa.Locked, "Locked");
+                       sa.Locked = false;
+                       Assert.IsFalse(sa.Locked, "Locked");
+               }
+
                [Test]
                public void SerializationRoundtrip ()
                {
index 7596f3fd8bd53e905af9346ae6d622ec6ce9f57d..4005d1ad6c56783437c7dc1339473b5cc4e2e445 100644 (file)
@@ -220,6 +220,7 @@ namespace MonoTests.System.Runtime.Remoting
                public void TestLocked1 ()
                {
                        sincob.Lock (false);
+
                        Thread tr = new Thread (new ThreadStart (FirstSyncThread));
                        tr.Start ();
                        Thread.Sleep (200);
@@ -331,6 +332,21 @@ namespace MonoTests.System.Runtime.Remoting
                        Assert.IsTrue (!otResult, "Concurrency detected in CallbackThread");
                }
 
+               [Test]
+               public void TestSynchronizationReleasedOnMultipleAcquire ()
+               {
+
+                       otResult = notreentrant.TestCallback ();
+                   
+                       Thread tr = new Thread (new ThreadStart (CallbackThread));
+                       tr.Start();
+                       
+                       bool terminated = tr.Join(2000);
+                       Assert.IsTrue(terminated, "Thread didn't get lock of context bound object.");
+                       
+                       Assert.IsTrue (!otResult, "Concurrency detected in CallbackThread");
+               }
+
                void CallbackThread ()
                {
                        otResult = notreentrant.TestCallback ();
index 3fd0d19d994722d588906d74bcf6215acca4c184..c5f63a7b5bfd81712ba2ada72f72649dff5c0bd6 100644 (file)
@@ -7,7 +7,7 @@
 // (C) 2004 Motus Technologies Inc. (http://www.motus.com)
 //
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 
 using NUnit.Framework;
 using System;
index a75d5d6b8a5e16bc202c0511a268e36525f47c53..c58012a3c93442a074be04c68f44db81a2a7c557 100644 (file)
@@ -25,7 +25,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 
 using System;
 using System.Security;
index 2124aa85733b05943c15d6c00f8c006ed856713e..2391dbb65071a4f0a313703b9e3aac16d322de59 100644 (file)
@@ -1876,7 +1876,7 @@ namespace MonoTests.System {
                                iTest++;
                                Assert.AreEqual ((float)0, Convert.ToSingle(tryByte), "#N03");
                                iTest++;
-                               Assert.AreEqual ((float)1234, 234, Convert.ToSingle(tryDec), "#N04");
+                               Assert.AreEqual ((float)1234, (double)234, Convert.ToSingle(tryDec), "#N04");
                                iTest++;
                                Assert.AreEqual ((float)0, Convert.ToSingle(tryDbl), "#N05");
                                iTest++;
@@ -1888,7 +1888,7 @@ namespace MonoTests.System {
                                iTest++;
                                Assert.AreEqual ((float)123, Convert.ToSingle(trySByte), "#N09");
                                iTest++;
-                               Assert.AreEqual ((float)1234, 2345, Convert.ToSingle(tryFloat), "#N10");
+                               Assert.AreEqual ((float)1234, (double)2345, Convert.ToSingle(tryFloat), "#N10");
                                iTest++;
                                Assert.AreEqual ((float)987, Convert.ToSingle("987"), "#N11");
                                iTest++;
index ae5a82908c861894674a758b8ba8496d5027da2a..e1d95dc93f00f563a4a7415708b3714d5a107a4f 100644 (file)
@@ -1251,7 +1251,7 @@ namespace MonoTests.System
                        }
                }
        
-               delegate int IntNoArgs ();
+               public delegate int IntNoArgs ();
 
                [Test]
                public void CreateDelegateWithAbstractMethods ()
index deb0e3314b650593fd20d1b2c71e5f0a84200468..fed370974e584b8d5c33dd49eca0a75dc87de8e6 100644 (file)
@@ -156,9 +156,13 @@ namespace MonoTests.System
                public void GetCommandLineArgs ()
                {
                        string[] args = Environment.GetCommandLineArgs ();
+#if !__WATCHOS__
                        Assert.IsNotNull (args, "not null");
                        Assert.IsTrue (((args.Length > 0) && (args.Length < 256)), "reasonable");
                        Assert.IsNotNull (args [0], "application");
+#else
+                       Assert.AreEqual (0, args.Length, "length");
+#endif
                }
 
 #if !NET_2_1
index d18f8a4efefc646ddad2bf07a71c2817d17b491b..55a6ea2ecfe4c6d11c609802597b1c11d7f5d63b 100644 (file)
@@ -359,6 +359,21 @@ namespace MonoTests.System
                                Assert.IsFalse (tzi.IsDaylightSavingTime (date));
                                Assert.AreEqual (new TimeSpan (2,0,0), tzi.GetUtcOffset (date));
                        }
+
+                       [Test] //Covers #41349
+                       public void TestIsDST_DateTimeOffset ()
+                       {
+                               TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById ("Europe/Athens");
+                               var date = new DateTime (2014, 3, 30 , 2, 0, 0);
+                               var offset = tzi.GetUtcOffset (date);
+                               var dateOffset = new DateTimeOffset (date, offset);
+                               Assert.IsFalse (tzi.IsDaylightSavingTime (dateOffset));
+
+                               date = new DateTime (2014, 3, 30 , 3, 0, 0);
+                               offset = tzi.GetUtcOffset (date);
+                               dateOffset = new DateTimeOffset (date, offset);
+                               Assert.IsTrue (tzi.IsDaylightSavingTime (dateOffset));
+                       }
                }
                
                [TestFixture]
@@ -923,18 +938,18 @@ namespace MonoTests.System
                                        "Canada/Newfoundland",
                                        "Europe/Moscow",
                                        "Europe/Riga",
-                                       "N/A", // testing that the test doesn't fail with inexistent TZs
                                };
                                foreach (var tz in subMinuteDSTs) {
-                                       try {
-                                               TimeZoneInfo.FindSystemTimeZoneById (tz);
-                                       } catch (TimeZoneNotFoundException) {
-                                               // ok;
-                                       } catch (Exception ex) {
-                                               Assert.Fail (string.Format ("Failed to load TZ {0}: {1}", tz, ex.ToString ()));
-                                       }
+                                       TimeZoneInfo.FindSystemTimeZoneById (tz);
                                }
                        }
+
+                       [Test]
+                       [ExpectedException (typeof (TimeZoneNotFoundException))]
+                       public void InvalidName ()
+                       {
+                               TimeZoneInfo.FindSystemTimeZoneById ("N/A");
+                       }
                }
                
                [TestFixture]
@@ -1158,6 +1173,22 @@ namespace MonoTests.System
                          Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset(offset), "dst2End_with_dstOffset+baseUtcOffset#exact");
                          Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset(offset.Add(new TimeSpan(0, 0, 0, 1))), "dst2End_with_dstOffset+baseUtcOffset#after");
                  }
+
+                       [Test]
+                       public void DTS_WithMinimalDate ()
+                       {
+                               TimeZoneInfo.TransitionTime startTransition, endTransition;
+                               startTransition = TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 4, 0, 0),
+                                                                                                                                                                 10, 2, DayOfWeek.Sunday);
+                               endTransition = TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 3, 0, 0),
+                                                                                                                                                               3, 2, DayOfWeek.Sunday);
+
+                               var ctz = TimeZoneInfo.CreateCustomTimeZone ("test", TimeSpan.FromHours (-5), "display", "sdisplay", "dst", new [] {
+                                       TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (DateTime.MinValue, DateTime.MaxValue.Date, TimeSpan.FromHours (-1), startTransition, endTransition) });
+
+                               var offset = ctz.GetUtcOffset (DateTime.MinValue);
+                               Assert.AreEqual (TimeSpan.FromHours (-5), offset); // TODO: Wrong it should be -6
+                       }
     }
 
                [TestFixture]
index 358298f91e56559e6efbf388bf6228ac13fb0221..409e62066b5f4a5a9cbd133ddff09a8a535fe598 100644 (file)
@@ -326,6 +326,16 @@ public class TimeZoneTest {
                        Assert.IsTrue (tzi.SupportsDaylightSavingTime, "SupportsDaylightSavingTime");
                }
 
+               [Test]
+               public void OldEraToLocalTime ()
+               {
+                       TimeSpan offset = TimeSpan.Zero;
+                       var dto = new DateTimeOffset (new DateTime (1900, 1, 1).Ticks, offset);
+
+                       // Should never throw
+                       dto.ToLocalTime ();
+               }
+
 #if MOBILE
                // On device we cannot read the OS file system to look for /etc/localtime
                // and /usr/share/zoneinfo - so we must initialize the BCL TimeZoneInfo
index cbf44c17f358df1b94a0c1977772271af40ac3e4..1e38f069af2b809045fa4e4cb2b686d035553a3f 100644 (file)
@@ -456,6 +456,65 @@ namespace MonoTests.System
 
                }
 
+               class GetProperties_Overrides_Input
+               {
+                       public class TestClass : BaseClass<object>
+                       {
+                               public override object TestProperty { get; set; }
+                       }
+
+                       public abstract class BaseClass<T>
+                       {
+                               public virtual T TestProperty { get; set; }
+                       }
+
+                       public class TestClass_Indexer : BaseClass_Indexer<object>
+                       {
+                               public override object this[int arg] { set { } }
+                       }
+
+                       public abstract class BaseClass_Indexer<T>
+                       {
+                               public virtual T this[int arg] { set { } }
+                       }
+
+                       public interface IB : IA<object>
+                       {
+                               new object TestProperty { get; set; }
+                       }
+
+                       public interface IA<T>
+                       {
+                               T TestProperty { get; set; }
+                       }
+
+                       public class TestClass_HiddenProperty : BaseClass_HiddenProperty
+                       {
+                               public new virtual string Prop { set { } }
+                       }
+
+                       public class BaseClass_HiddenProperty
+                       {
+                               public virtual string Prop { set  { } }
+                       }
+               }
+
+               [Test]
+               public void GetProperties_Overrides ()
+               {
+                       Assert.AreEqual (1, typeof (GetProperties_Overrides_Input.IB).GetProperties().Length);
+
+                       var prop = typeof (GetProperties_Overrides_Input.TestClass).GetProperty ("TestProperty");
+                       Assert.AreEqual (typeof (GetProperties_Overrides_Input.TestClass), prop.DeclaringType);
+
+                       var prop_2 = typeof (GetProperties_Overrides_Input.TestClass_HiddenProperty).GetProperty ("Prop");
+                       Assert.AreEqual (typeof (GetProperties_Overrides_Input.TestClass_HiddenProperty), prop_2.DeclaringType);
+
+                       Assert.AreEqual (1, typeof (GetProperties_Overrides_Input.TestClass).GetProperties().Length);
+                       Assert.AreEqual (1, typeof (GetProperties_Overrides_Input.TestClass_Indexer).GetProperties().Length);
+                       Assert.AreEqual (1, typeof (GetProperties_Overrides_Input.TestClass_HiddenProperty).GetProperties().Length);
+           }
+
                [Test] // GetProperties (BindingFlags)
                public void GetProperties_Flags ()
                {
index a3a002f7cb0cd43effe25a5dd82308730850de6d..b36d3d446bc4cea25a3674a2ca7ffe6724df5484 100644 (file)
@@ -23,6 +23,9 @@ Mono.Globalization.Unicode/SortKeyBuffer.cs
 Mono.Globalization.Unicode/Normalization.cs
 Mono.Globalization.Unicode/NormalizationTableUtil.cs
 Mono/Runtime.cs
+Mono/RuntimeStructs.cs
+Mono/RuntimeHandles.cs
+Mono/SafeGPtrArrayHandle.cs
 Mono/DataConverter.cs
 Mono.Interop/ComInteropProxy.cs
 Mono.Interop/IDispatch.cs
@@ -169,6 +172,13 @@ System.Diagnostics.Tracing/EventCommandEventArgs.cs
 System.Diagnostics.Tracing/EventListener.cs
 System.Diagnostics.Tracing/EventWrittenEventArgs.cs
 System.Diagnostics.Tracing/NonEventAttribute.cs
+System.Diagnostics.Tracing/EventDataAttribute.cs
+System.Diagnostics.Tracing/EventFieldAttribute.cs
+System.Diagnostics.Tracing/EventFieldFormat.cs
+System.Diagnostics.Tracing/EventFieldTags.cs
+System.Diagnostics.Tracing/EventIgnoreAttribute.cs
+System.Diagnostics.Tracing/EventManifestOptions.cs
+System.Diagnostics.Tracing/EventSourceException.cs
 System.Diagnostics.SymbolStore/ISymbolBinder.cs
 System.Diagnostics.SymbolStore/ISymbolBinder1.cs
 System.Diagnostics.SymbolStore/ISymbolDocument.cs
@@ -298,6 +308,7 @@ System.Reflection.Emit/StringToken.cs
 System.Reflection.Emit/TypeBuilder.cs
 System.Reflection.Emit/TypeToken.cs
 System.Reflection.Emit/UnmanagedMarshal.cs
+System.Reflection.Metadata/AssemblyExtensions.cs
 System.Resources/Win32Resources.cs
 System.Runtime/GCLargeObjectHeapCompactionMode.cs
 System.Runtime/GCLatencyMode.cs
@@ -400,6 +411,9 @@ System.Runtime.InteropServices/UCOMITypeInfo.cs
 System.Runtime.InteropServices/UCOMITypeLib.cs
 System.Runtime.InteropServices/VARDESC.cs
 System.Runtime.InteropServices/VARFLAGS.cs
+System.Runtime.InteropServices/CustomQueryInterfaceMode.cs
+System.Runtime.InteropServices/ComAwareEventInfo.cs
+System.Runtime.InteropServices/ComEventsHelper.cs
 
 System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
 System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
@@ -589,6 +603,7 @@ System.Runtime.Remoting.Proxies/ProxyAttribute.cs
 System.Runtime.Remoting.Services/EnterpriseServicesHelper.cs
 System.Runtime.Remoting.Services/ITrackingHandler.cs
 System.Runtime.Remoting.Services/TrackingServices.cs
+System.Runtime.Loader/AssemblyLoadContext.cs
 System.Runtime.Versioning/CompatibilitySwitch.cs
 System.Security/CodeAccessPermission.cs
 System.Security/HostProtectionException.cs
@@ -603,7 +618,6 @@ System.Security/NamedPermissionSet.cs
 System.Security/PermissionBuilder.cs
 System.Security/PermissionSet.cs
 System.Security/PolicyLevelType.cs
-System.Security/SafeAccessTokenHandle.cs
 System.Security/SecureString.cs
 System.Security/SecurityElement.cs
 System.Security/SecurityFrame.cs
@@ -1381,6 +1395,7 @@ ReferenceSources/SecurityContext.cs
 ../referencesource/mscorlib/system/security/attributes.cs
 ../referencesource/mscorlib/system/security/securitycontext.cs
 ../referencesource/mscorlib/system/security/securitydocument.cs
+../referencesource/mscorlib/system/security/safesecurityhandles.cs
 
 ../referencesource/mscorlib/system/security/claims/Claim.cs
 ../referencesource/mscorlib/system/security/claims/ClaimsIdentity.cs
index 5b7b87f5d95487016e1885af15c16d7c934f9c2c..191d5dd7ac888e8b87e994f98ba0242c999923d8 100644 (file)
@@ -45,45 +45,45 @@ build and the tests will be run along with all the others.
 
 * Tips
 
--- Provide an unique error message for Assertion.Assert ()
+-- Provide an unique error message for Assert.IsTrue ()
 
-Include an unique message for each Assertion.Assert () so that when the assert
+Include an unique message for each Assert.IsTrue () so that when the assert
 fails, it is trivial to locate the failing one. Otherwise, it may be
 difficult to determine which part of the test is failing. A good way
 to ensure unique messages is to use something like #A01, #A02 etc.
 
     Bad:
 
-       Assertion.AssertEquals ("array match", compare[0], i1[0]);
-       Assertion.AssertEquals ("array match", compare[1], i1[1]);
-       Assertion.AssertEquals ("array match", compare[2], i1[2]);
-       Assertion.AssertEquals ("array match", compare[3], i1[3]);
+       Assert.AreEqual (compare[0], i1[0], "array match");
+       Assert.AreEqual (compare[1], i1[1], "array match");
+       Assert.AreEqual (compare[2], i1[2], "array match");
+       Assert.AreEqual (compare[3], i1[3], "array match");
 
     Good:
 
-       Assertion.AssertEquals ("#A01", compare[0], i1[0]);
-       Assertion.AssertEquals ("#A02", compare[1], i1[1]);
-       Assertion.AssertEquals ("#A03", compare[2], i1[2]);
-       Assertion.AssertEquals ("#A04", compare[3], i1[3]);
+       Assert.AreEqual (compare[0], i1[0], "#A01");
+       Assert.AreEqual (compare[1], i1[1], "#A02");
+       Assert.AreEqual (compare[2], i1[2], "#A03");
+       Assert.AreEqual (compare[3], i1[3], "#A04");
 
-Once you used such a number in an Assertion.Assert (), don't change it later on -
+Once you used such a number in an Assert.IsTrue (), don't change it later on -
 people might use it it identify the test in bug reports or in mailing
 lists.
 
--- Use Assertion.AssertEquals () to compare things, not Assertion.Assert ().
+-- Use Assert.AreEqual () to compare things, not Assert.IsTrue ().
 
-Never compare two values with Assertion.Assert () - if the test fails, people
-have no idea what went wrong while Assertion.AssertEquals () reports the failed
+Never compare two values with Assert.IsTrue () - if the test fails, people
+have no idea what went wrong while Assert.AreEqual () reports the failed
 value. Also, make sure the second paramter is the expected value, and the third
 parameter is the actual value.
 
     Bad:
 
-        Assertion.Assert ("A01", myTicks[0] == t1.Ticks);
+        Assert.IsTrue (myTicks[0] == t1.Ticks, "A01");
 
     Good:
 
-        Assertion.AssertEquals ("A01", myTicks[0], t1.Ticks);
+        Assert.AreEqual (myTicks[0], t1.Ticks, "A01");
 
 -- Namespace
 
index 48a8467961fc1469cf2dc4f686f29c934b992b07..b0586886a1bde8a8283666ad4e2b02ca40036163 100644 (file)
@@ -59,7 +59,7 @@ namespace System.Security.Cryptography {
             public const string Sha512 = "SHA512";              // BCRYPT_SHA512_ALGORITHM
             internal const string Rsa = "RSA";                  // BCRYPT_RSA_ALGORITHM
         }
-
+#if !MONO
         /// <summary>
         ///     Well known key blob tyes
         /// </summary>
@@ -454,5 +454,6 @@ namespace System.Security.Cryptography {
             }
             return keyBlob;
         }
+#endif
     }
 }
index 13ea41c2fb2d1139c2a85ba87ff23820744baf10..46870878014e49cf142570cd30922c6cac788540 100644 (file)
@@ -31,6 +31,10 @@ namespace System.Security.Cryptography {
     /// </summary>
     [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
     public sealed class CngKey : IDisposable {
+#if MONO
+        public void Dispose() {
+        }
+#else
         private SafeNCryptKeyHandle m_keyHandle;
         private SafeNCryptProviderHandle m_kspHandle;
 
@@ -816,5 +820,6 @@ namespace System.Security.Cryptography {
             Contract.Assert(m_keyHandle != null);
             NCryptNative.SetProperty(m_keyHandle, property.Name, property.Value, property.Options);
         }
+#endif
     }
 }
index 40505e30ddbe9c6773aa447b759e3854ea195df4..c1f169ead6a2b4e72053c146499efc852c9e4f9e 100644 (file)
@@ -18,6 +18,15 @@ namespace System.Security.Cryptography {
     /// </summary>
     [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
     public sealed class ECDsaCng : ECDsa {
+#if MONO
+        public override byte[] SignHash(byte[] hash) {
+            throw new NotImplementedException();
+        }
+
+        public override bool VerifyHash(byte[] hash, byte[] signature) {
+            throw new NotImplementedException();
+        }
+#else
         private static KeySizes[] s_legalKeySizes = new KeySizes[] { new KeySizes(256, 384, 128), new KeySizes(521, 521, 0) };
 
         private CngKey m_key;
@@ -407,5 +416,6 @@ namespace System.Security.Cryptography {
                 return hasher.HashFinal();
             }
         }
+    #endif
     }
 }
index cf56209111a9c171735eacd0a6f0e074366cdfb8..8807a434240c1c3509fef6b7d2de5bf2aceb7a1b 100644 (file)
@@ -8,7 +8,9 @@ using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Diagnostics.CodeAnalysis;
+#if !MONO
 using System.Numerics;
+#endif
 using System.Runtime.CompilerServices;
 using System.Runtime.ConstrainedExecution;
 using System.Runtime.InteropServices;
@@ -100,7 +102,7 @@ namespace System.Security.Cryptography {
         ProtectKey = 0x00000001,                        // NCRYPT_UI_PROTECT_KEY_FLAG    
         ForceHighProtection = 0x00000002                // NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG
     }
-
+#if !MONO
     /// <summary>
     ///     Native interop with CNG's NCrypt layer. Native definitions are in ncrypt.h
     /// </summary>
@@ -1741,4 +1743,5 @@ namespace System.Security.Cryptography {
             return error == ErrorCode.Success;
         }
     }
+#endif
 }
index 3085b90e249ff54818d0129dc44c4a6548f73da6..842c40428e97dcde94e29ad0fcdc05a741aa0c0d 100644 (file)
@@ -10,6 +10,18 @@ namespace System.Security.Cryptography
 {
     public sealed class RSACng : RSA
     {
+#if MONO
+        public override RSAParameters ExportParameters(bool includePrivateParameters)
+        {
+            throw new NotImplementedException();
+        }
+
+        public override void ImportParameters(RSAParameters parameters)
+        {
+            throw new NotImplementedException();
+        }
+#else
+
         // See https://msdn.microsoft.com/en-us/library/windows/desktop/bb931354(v=vs.85).aspx
         private static KeySizes[] s_legalKeySizes = new KeySizes[] { new KeySizes(512, 16384, 64) };
 
@@ -504,5 +516,6 @@ namespace System.Security.Cryptography
                  throw new CryptographicException(SR.GetString(SR.Cryptography_UnsupportedPaddingMode));
             }
         }
+#endif
     }
 }
index 66211b4ac05d18e3d97b497ff2a9e09df3aa2e23..9da4616a8d872bd567b631fd7f04c92831c147df 100644 (file)
@@ -37,7 +37,7 @@ namespace System.Windows.Forms
     /// </devdoc>
     internal static class SecurityUtils {
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         private static volatile ReflectionPermission memberAccessPermission = null;
         private static volatile ReflectionPermission restrictedMemberAccessPermission = null;
 
@@ -62,7 +62,7 @@ namespace System.Windows.Forms
 #endif
 
         private static void DemandReflectionAccess(Type type) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             try {
                 MemberAccessPermission.Demand();
             }
@@ -74,7 +74,7 @@ namespace System.Windows.Forms
 
         [SecuritySafeCritical]
         private static void DemandGrantSet(Assembly assembly) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             PermissionSet targetGrantSet = assembly.PermissionSet;
             targetGrantSet.AddPermission(RestrictedMemberAccessPermission);
             targetGrantSet.Demand();
@@ -82,7 +82,7 @@ namespace System.Windows.Forms
         }
 
         private static bool HasReflectionPermission(Type type) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             try {
                 DemandReflectionAccess(type);
                 return true;
index f13e16ea9a2f8ddb8a96bf5d82fbf588e55029b7..055962a32528532d2313118ec98c8eb92b8667c0 100644 (file)
@@ -164,7 +164,7 @@ namespace System.Xml.Xsl.XsltOld {
         // The World of Compile
         //
         internal void Compile(NavigatorInput input, XmlResolver xmlResolver, Evidence evidence) {
-#if DISABLE_CAS_USE
+#if !FEATURE_MONO_CAS
             evidence = null;
 #endif
             Debug.Assert(input != null);
index 8103f0fce6e26a6c2e6ce8987157ed229da0a861..662c1c9130d8b675f4109598e703ac7e2a22bf93 100644 (file)
@@ -2125,7 +2125,7 @@ namespace System.Data.Common {
         [ResourceExposure(ResourceScope.Machine)]
         [ResourceConsumption(ResourceScope.Machine)]
         static internal Stream GetFileStream(string filename) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             (new FileIOPermission(FileIOPermissionAccess.Read, filename)).Assert();
             try {
                 return new FileStream(filename,FileMode.Open,FileAccess.Read,FileShare.Read);
@@ -2141,7 +2141,7 @@ namespace System.Data.Common {
         [ResourceExposure(ResourceScope.Machine)]
         [ResourceConsumption(ResourceScope.Machine)]
         static internal FileVersionInfo GetVersionInfo(string filename) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             (new FileIOPermission(FileIOPermissionAccess.Read, filename)).Assert(); // MDAC 62038
             try {
                 return FileVersionInfo.GetVersionInfo(filename); // MDAC 60411
index f23239bdfdf250cbe95d8abf2d0315beb8455873..6020f65eabe156245bed7a79e0b8470ba59bb710 100644 (file)
@@ -22,7 +22,7 @@ namespace System.Data {
     internal class XMLSchema {
 
         internal static TypeConverter GetConverter(Type type) { 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             HostProtectionAttribute protAttrib = new HostProtectionAttribute();
             protAttrib.SharedState = true;
             CodeAccessPermission permission = (CodeAccessPermission)protAttrib.CreatePermission();
@@ -32,7 +32,7 @@ namespace System.Data {
                 return TypeDescriptor.GetConverter(type);
             }
             finally {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 CodeAccessPermission.RevertAssert(); 
 #endif
             }
index 9ea613ebc3ab9ef3cf2cb047969af8a306b3ba90..b2448b52d74ab340e21a439f50e8dd232a44bab6 100644 (file)
@@ -580,9 +580,7 @@ namespace System.Runtime.Serialization
         internal bool RequiresMemberAccessForWrite(SecurityException securityException)
         {
 
-#if DISABLE_CAS_USE
-            return true;
-#else
+#if FEATURE_MONO_CAS
             EnsureMethodsImported();
 
             if (!IsTypeVisible(UnderlyingType))
@@ -662,6 +660,8 @@ namespace System.Runtime.Serialization
             }
 
             return false;
+#else
+            return true;
 #endif
         }
 #endif
index f18da31004bd1ed5d7460c0754a28d30cf974b62..b32d295f45b3f491af7bf8bff36b973db635a847 100644 (file)
@@ -1105,7 +1105,7 @@ namespace System.Runtime.Serialization
             }
         }
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         [Fx.Tag.SecurityNote(Critical = "Holds instance of SecurityPermission that we will Demand for SerializationFormatter."
             + " Should not be modified to something else.")]
         [SecurityCritical]
index 6a71d9a194ce720d30924b411a8c31f90d1eb739..b30c82bf34e72a61b9f8f10ed84d1dd2a4925e74 100644 (file)
@@ -89,7 +89,7 @@ namespace System.Runtime.Serialization
         [SecuritySafeCritical]
         public void DemandSerializationFormatterPermission()
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             if (!demandedSerializationFormatterPermission)
             {
                 Globals.SerializationFormatterPermission.Demand();
@@ -103,7 +103,7 @@ namespace System.Runtime.Serialization
         [SecuritySafeCritical]
         public void DemandMemberAccessPermission()
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             if (!demandedMemberAccessPermission)
             {
                 Globals.MemberAccessPermission.Demand();
index 3d953393b4bd0819310efdef8c111cee09cdebe6..a61836fc14025f8b41574bdfbb12c977188054c9 100644 (file)
@@ -494,7 +494,7 @@ namespace System.Runtime.Serialization
         [MethodImpl(MethodImplOptions.NoInlining)]
         internal void GetObjectData(ISerializable obj, SerializationInfo serInfo, StreamingContext context)
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             // Demand the serialization formatter permission every time
             Globals.SerializationFormatterPermission.Demand();
 #endif
index c243af4a06dcb4af0b5b0fa097574f049daaf08f..260c7c4265c9a7db00b9b2edb90ad97f7ee7d339 100644 (file)
@@ -36,9 +36,7 @@ namespace System.Runtime
         [SecurityCritical]
         internal static bool IsInFullTrust()
         {
-#if DISABLE_CAS_USE
-            return true;
-#else
+#if FEATURE_MONO_CAS
             if (!SecurityManager.CurrentThreadRequiresSecurityContextCapture())
             {
                 return true;
@@ -53,6 +51,8 @@ namespace System.Runtime
             {
                 return false;
             }
+#else
+            return true;
 #endif
         }
 #if FEATURE_COMPRESSEDSTACK
@@ -114,11 +114,11 @@ namespace System.Runtime
         [SecurityCritical]
         internal static bool CheckAppDomainPermissions(PermissionSet permissions)
         {
-#if DISABLE_CAS_USE
-            return true;
-#else
+#if FEATURE_MONO_CAS
             return AppDomain.CurrentDomain.IsHomogenous &&
                    permissions.IsSubsetOf(AppDomain.CurrentDomain.PermissionSet);
+#else
+            return true;
 #endif
         }
 
@@ -126,12 +126,12 @@ namespace System.Runtime
         [SecurityCritical]
         internal static bool HasEtwPermissions()
         {
-#if DISABLE_CAS_USE
-            return true;
-#else
+#if FEATURE_MONO_CAS
             //Currently unrestricted permissions are required to create Etw provider. 
             PermissionSet permissions = new PermissionSet(PermissionState.Unrestricted);
             return CheckAppDomainPermissions(permissions);
+#else
+            return true;
 #endif
         }
 
@@ -142,9 +142,7 @@ namespace System.Runtime
             [SecuritySafeCritical]
             get
             {
-#if DISABLE_CAS_USE
-                return true;
-#else
+#if FEATURE_MONO_CAS
                 if (!checkedForFullTrust)
                 {
                     inFullTrust = AppDomain.CurrentDomain.IsFullyTrusted;
@@ -152,6 +150,8 @@ namespace System.Runtime
                 }
 
                 return inFullTrust;
+#else
+                return true;
 #endif
             }
         }
index 6cd15034393a5f9f8f1655afccb97114d312148b..21727844bd5d8988b9596a6aa3153be14c157762 100644 (file)
@@ -15,23 +15,23 @@ namespace System.Xml {
     [PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
     public partial class XmlSecureResolver : XmlResolver {
         XmlResolver resolver;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         PermissionSet permissionSet;
 #endif
 
-#if DISABLE_CAS_USE
-        public XmlSecureResolver(XmlResolver resolver, string securityUrl) : this(resolver, (PermissionSet) null) {}
-
-        public XmlSecureResolver(XmlResolver resolver, Evidence evidence) : this(resolver, (PermissionSet) null) {}
-#else
+#if FEATURE_MONO_CAS
         public XmlSecureResolver(XmlResolver resolver, string securityUrl) : this(resolver, CreateEvidenceForUrl(securityUrl)) {}
 
         public XmlSecureResolver(XmlResolver resolver, Evidence evidence) : this(resolver, SecurityManager.GetStandardSandbox(evidence)) {}
+#else
+        public XmlSecureResolver(XmlResolver resolver, string securityUrl) : this(resolver, (PermissionSet) null) {}
+
+        public XmlSecureResolver(XmlResolver resolver, Evidence evidence) : this(resolver, (PermissionSet) null) {}
 #endif
 
         public XmlSecureResolver(XmlResolver resolver, PermissionSet permissionSet) {
             this.resolver = resolver;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             this.permissionSet = permissionSet;
 #endif
         }
@@ -41,7 +41,7 @@ namespace System.Xml {
         }
 
         public override object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             permissionSet.PermitOnly();
 #endif
             return resolver.GetEntity(absoluteUri, role, ofObjectToReturn);
@@ -54,7 +54,7 @@ namespace System.Xml {
         }
 
         public static Evidence CreateEvidenceForUrl(string securityUrl) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             Evidence evidence = new Evidence();
             if (securityUrl != null && securityUrl.Length > 0) {
                 evidence.AddHostEvidence(new Url(securityUrl));
@@ -79,7 +79,7 @@ namespace System.Xml {
 #endif
         }
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         [Serializable]
         private class UncDirectory : EvidenceBase, IIdentityPermissionFactory {
             private string uncDir;
index 4e8b9fe96837bb4eb1afcfb9a81901d6f26c6d0f..17b3a199ca5f249c1979788b8503df2fe30cca9a 100644 (file)
@@ -7,7 +7,7 @@ namespace System.Xml {
     [PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
     public partial class XmlSecureResolver : XmlResolver {
         public override Task<object> GetEntityAsync(Uri absoluteUri, string role, Type ofObjectToReturn) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             permissionSet.PermitOnly();
 #endif
             return resolver.GetEntityAsync(absoluteUri, role, ofObjectToReturn);
index 5a3acdfce2c2ee1a8b6b0449da740e6f3a6b8bdd..d81a2745e94b560cfcf783c9b1b3683aad0949d5 100644 (file)
@@ -116,7 +116,7 @@ namespace System.Xml.Xsl {
             if (stylesheet == null) {
                 throw new ArgumentNullException("stylesheet");
             }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             if (evidence == null) {
                 evidence = new Evidence();
             }
index bc1fc0b40de2522e2343e0fc431331cda84dc7e2..e1e0420b28cec01f6646ebc62fddfd7dd8441333 100644 (file)
@@ -380,7 +380,7 @@ namespace System.ComponentModel {
                     else {
                         args = new Type[] {receiverType};
                     }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     IntSecurity.FullReflection.Assert();
 #endif
                     try {
@@ -456,7 +456,7 @@ namespace System.ComponentModel {
                     else {
                         args = new Type[] {receiverType};
                     }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     IntSecurity.FullReflection.Assert();
 #endif
                     try {
index f752570b56b0344fb14501e2ef45a8b5949b1528..ad04d77a51370aba0e61ef13802c5ec1bef78583 100644 (file)
@@ -1163,7 +1163,7 @@ namespace System.ComponentModel {
             ///      a single object to be re-used for more than one type. 
             /// </devdoc> 
             private object CreateInstance(Type type) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 if ((!(type.IsPublic || type.IsNestedPublic)) && (type.Assembly == typeof(DebugTypeDescriptor).Assembly)) {
                     IntSecurity.FullReflection.Demand();
                 }
index 6a5fd3a672db01211e0b86655c58da30974b7f70..ac39527d8eb958e6e4a8f965e0e3122803f0fa7e 100644 (file)
@@ -11,15 +11,13 @@ namespace System.ComponentModel {
 
     [HostProtection(SharedState = true)]
     internal static class IntSecurity {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         public static readonly CodeAccessPermission UnmanagedCode = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
         public static readonly CodeAccessPermission FullReflection = new ReflectionPermission(PermissionState.Unrestricted);
 #endif
 
         public static string UnsafeGetFullPath(string fileName) {
-#if DISABLE_CAS_USE
-                       return System.IO.Path.GetFullPath(fileName);
-#else
+#if FEATURE_MONO_CAS
             string full = fileName;
 
             FileIOPermission fiop = new FileIOPermission(PermissionState.None);
@@ -32,6 +30,8 @@ namespace System.ComponentModel {
                 CodeAccessPermission.RevertAssert();
             }
             return full;
+#else
+            return System.IO.Path.GetFullPath(fileName);
 #endif
         }
     }
index c79517fc5771249bd49581ab0f084f57e5fa44a6..401c21e4d6697f3c41556dd58df794435d5c3d73 100644 (file)
@@ -417,12 +417,12 @@ namespace System.ComponentModel {
                     else {
                         args = new Type[] {receiverType};
                     }
-#if !DISABLE_CAS_USE                    
+#if FEATURE_MONO_CAS
                     IntSecurity.FullReflection.Assert();
                     try {
 #endif
                         resetMethod = FindMethod(componentClass, "Reset" + Name, args, typeof(void), /* publicOnly= */ false);
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     }
                     finally {
                         CodeAccessPermission.RevertAssert();
@@ -524,13 +524,13 @@ namespace System.ComponentModel {
                         args = new Type[] {receiverType};
                     }
                     
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     IntSecurity.FullReflection.Assert();
                     try {
 #endif
                         shouldSerializeMethod = FindMethod(componentClass, "ShouldSerialize" + Name,
                                                          args, typeof(Boolean), /* publicOnly= */ false);
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     }
                     finally {
                         CodeAccessPermission.RevertAssert();
index 3eb2cd79aa41fa533530893ec7574006f0cc42f7..4061a644a7bef80834c072fc011c87952a28c679 100644 (file)
@@ -1635,12 +1635,12 @@ namespace System.ComponentModel {
                         Type converterType = GetTypeFromName(instanceAttr.ConverterTypeName);
                         if (converterType != null && typeof(TypeConverter).IsAssignableFrom(converterType)) 
                         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                             try {
                                 IntSecurity.FullReflection.Assert();
 #endif
                                 return (TypeConverter)ReflectTypeDescriptionProvider.CreateInstance(converterType, _type);
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                             } finally {
                                 CodeAccessPermission.RevertAssert();
                             }
@@ -1665,12 +1665,12 @@ namespace System.ComponentModel {
                         Type converterType = GetTypeFromName(typeAttr.ConverterTypeName);
                         if (converterType != null && typeof(TypeConverter).IsAssignableFrom(converterType)) 
                         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                             try {
                                 IntSecurity.FullReflection.Assert();
 #endif
                                 _converter = (TypeConverter)ReflectTypeDescriptionProvider.CreateInstance(converterType, _type);
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                             } finally {
                                 CodeAccessPermission.RevertAssert();
                             }
index c1e1c43b23199a3ba9b9cfc98f580dd81d3699bc..cf77c9972b2967219bba6e0992252ca86961ca7c 100644 (file)
@@ -365,7 +365,7 @@ namespace System.ComponentModel
             {
                 throw new ArgumentNullException("type");
             }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             PermissionSet typeDescriptorPermission = new PermissionSet(PermissionState.None);
             typeDescriptorPermission.AddPermission(new TypeDescriptorPermission(TypeDescriptorPermissionFlags.RestrictedRegistrationAccess));
 
@@ -401,7 +401,7 @@ namespace System.ComponentModel
             {
                 throw new ArgumentNullException("instance");
             }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             Type type = instance.GetType();
 
             PermissionSet typeDescriptorPermission = new PermissionSet(PermissionState.None);
@@ -475,12 +475,12 @@ namespace System.ComponentModel
                     // sense that they provide a public API while not necessarily being public themselves. As such,
                     // we need to allow instantiation of internal TypeDescriptionProviders. See the thread attached
                     // to VSWhidbey #500522 for a more detailed discussion.
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     IntSecurity.FullReflection.Assert();
                     try {
 #endif
                         prov = (TypeDescriptionProvider)Activator.CreateInstance(providerType);
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     }
                     finally {
                         CodeAccessPermission.RevertAssert();
@@ -3244,7 +3244,7 @@ namespace System.ComponentModel
             {
                 throw new ArgumentNullException("type");
             }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             PermissionSet typeDescriptorPermission = new PermissionSet(PermissionState.None);
             typeDescriptorPermission.AddPermission(new TypeDescriptorPermission(TypeDescriptorPermissionFlags.RestrictedRegistrationAccess));
 
@@ -3279,7 +3279,7 @@ namespace System.ComponentModel
             {
                 throw new ArgumentNullException("instance");
             }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             Type type = instance.GetType();
 
             PermissionSet typeDescriptorPermission = new PermissionSet(PermissionState.None);
index b69dd65ff8d6f3bc08e3dddab86864259b78c09c..aa7a3d002a7b02ce1e52d78b6bec29ad979be2b2 100644 (file)
@@ -75,7 +75,7 @@ namespace System.ComponentModel {
         }
 
         protected Win32Exception(SerializationInfo info, StreamingContext context) : base (info, context) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             IntSecurity.UnmanagedCode.Demand();
 #endif
             nativeErrorCode = info.GetInt32("NativeErrorCode");
index 8aaea747afdf79cf6b6d60efdfdd31ea8408f805..aff4d8f9fd1b30dcbf9bcf88b0feb2ab64e44ad8 100644 (file)
@@ -93,7 +93,7 @@ namespace System.ComponentModel.Design {
                     Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"rawfile: " + rawFile);
                     string codeBase;
                     
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     // FileIOPermission is required for ApplicationBase in URL-hosted domains
                     FileIOPermission perm = new FileIOPermission(PermissionState.Unrestricted);
                     perm.Assert();
@@ -133,7 +133,7 @@ namespace System.ComponentModel.Design {
                             // file://fullpath/foo.exe
                             //
                             string fileName;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                             FileIOPermission perm = new FileIOPermission(PermissionState.Unrestricted);
                             perm.Assert();
                             try
@@ -166,7 +166,7 @@ namespace System.ComponentModel.Design {
                     else if(!resourceAssembly.IsDynamic) { // EscapedCodeBase won't be supported by emitted assemblies anyway
                         Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"resourceAssembly is not null");
                         string fileName;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                         FileIOPermission perm = new FileIOPermission(PermissionState.Unrestricted);
                         perm.Assert();
 #endif
@@ -176,7 +176,7 @@ namespace System.ComponentModel.Design {
                         }
                         finally
                         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                             CodeAccessPermission.RevertAssert();
 #endif
                         }
@@ -258,7 +258,7 @@ namespace System.ComponentModel.Design {
 
         static Stream OpenRead(Uri resourceUri) {
             Stream result = null;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             PermissionSet perms = new PermissionSet(PermissionState.Unrestricted);
 
             perms.Assert();
@@ -271,7 +271,7 @@ namespace System.ComponentModel.Design {
             catch (Exception e) {
                 Debug.Fail(e.ToString());
             }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             finally {
                 CodeAccessPermission.RevertAssert();
             }
index 2f9df3f456471c22dc435a3cf5a2d82561034d11..879c5040a6e7f3763994c1c19cc863cc03148908 100644 (file)
@@ -30,7 +30,7 @@ namespace System.Diagnostics {
         public static TraceListenerCollection Listeners {
             [HostProtection(SharedState=true)]
             get {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 // Do a full damand
                 new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
 #endif
@@ -113,7 +113,7 @@ namespace System.Diagnostics {
         /// </devdoc>
         [System.Diagnostics.Conditional("TRACE")]
         public static void Close() {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             // Do a full damand
             new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
  #endif
index eee1e05c12539e977e6903810feac7eaf6ac9b7c..dfa24dcd135d7523487ffde091fbbdf318f250a3 100644 (file)
@@ -30,7 +30,7 @@ namespace System.Diagnostics {
             get {
                 if (stackTrace == null)
                     stackTrace = Environment.StackTrace;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 else
                     new EnvironmentPermission(PermissionState.Unrestricted).Demand();
 #endif
@@ -77,7 +77,7 @@ namespace System.Diagnostics {
         [ResourceExposure(ResourceScope.None)]
         [ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)]
         private static void InitProcessInfo() {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             // Demand unmanaged code permission
             new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
 #endif
index 42bbb8a75c0849dfb6c45f493295a3748e0fd5bf..c400a3e411cdb36b18b7ec5dae2ca8191195b43c 100644 (file)
@@ -62,7 +62,7 @@ namespace System.Diagnostics {
         internal static string AppName {
             get {
                 if (appName == null) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     new EnvironmentPermission(EnvironmentPermissionAccess.Read, "Path").Assert();
 #endif
                     appName = Path.GetFileName(Environment.GetCommandLineArgs()[0]);
index d4d39cae5dd8b959fca20698c2b8d2f9f58b33f4..5b622d1768efcbefce73a73be479b673e0e007d9 100644 (file)
@@ -60,7 +60,7 @@ namespace System.Windows.Forms
         }
 
         private static void DemandReflectionAccess(Type type) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             try {
                 MemberAccessPermission.Demand();
             }
@@ -72,7 +72,7 @@ namespace System.Windows.Forms
 
         [SecuritySafeCritical]
         private static void DemandGrantSet(Assembly assembly) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             PermissionSet targetGrantSet = assembly.PermissionSet;
             targetGrantSet.AddPermission(RestrictedMemberAccessPermission);
             targetGrantSet.Demand();
index 4b6cf7714a5c8cc7c1cbfa67332b5d95174b78f1..4413414603e4d79aad5b6b23df3fab29685d79e2 100644 (file)
@@ -139,7 +139,7 @@ namespace System.Net {
 
             set 
             {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.ControlPolicyPermission.Demand();
 #endif
                 Instance.CredentialPolicy = value;
@@ -205,7 +205,7 @@ namespace System.Net {
         /// </devdoc>
         public static void Register(IAuthenticationModule authenticationModule) 
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.UnmanagedPermission.Demand();
 #endif
             Instance.Register(authenticationModule);
@@ -216,7 +216,7 @@ namespace System.Net {
         /// </devdoc>
         public static void Unregister(IAuthenticationModule authenticationModule) 
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.UnmanagedPermission.Demand();
 #endif
             Instance.Unregister(authenticationModule);
@@ -227,7 +227,7 @@ namespace System.Net {
         /// </devdoc>
         public static void Unregister(string authenticationScheme) 
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.UnmanagedPermission.Demand();
 #endif
             Instance.Unregister(authenticationScheme);
index d405ca3f657cead1e92f6d19d15248f07e0edd43..9f8eda80a01ebaf1d2b3f1f133a2ca0b8dd486ed 100644 (file)
@@ -302,7 +302,7 @@ namespace System.Net {
             get {
                 //This check will not allow to use local user credentials at will.
                 //Hence the username will not be exposed to the network
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 new EnvironmentPermission(EnvironmentPermissionAccess.Read, "USERNAME").Demand();
 #endif
                 return SystemNetworkCredential.defaultCredential;
@@ -313,7 +313,7 @@ namespace System.Net {
             get {
                 //This check will not allow to use local user credentials at will.
                 //Hence the username will not be exposed to the network
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 new EnvironmentPermission(EnvironmentPermissionAccess.Read, "USERNAME").Demand();
 #endif
                 return SystemNetworkCredential.defaultCredential;
index 99e10caeaa1084dc04139ada3160e32697f25ead..d04932e503f93d4c7f85e75d50d3d4f9e90c20b7 100644 (file)
@@ -143,7 +143,7 @@ namespace System.Net {
 
         private static void DemandCallback(object state)
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ((CodeAccessPermission) state).Demand();
 #endif
         }
@@ -966,7 +966,7 @@ namespace System.Net {
 
     internal static class ExceptionHelper
     {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         internal static readonly KeyContainerPermission KeyContainerPermissionOpen = new KeyContainerPermission(KeyContainerPermissionFlags.Open);
         internal static readonly WebPermission WebPermissionUnrestricted = new WebPermission(NetworkAccess.Connect);
         internal static readonly SecurityPermission UnmanagedPermission = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
index 9fbc8b428b32bfe951fbf2d1f89cb839eb924374..828f60745a6642e77fb4804f5668888d8465309a 100644 (file)
@@ -8,7 +8,7 @@ namespace System.Net.NetworkInformation
     {
         /// Returns objects that describe the network interfaces on the local computer.
         public static NetworkInterface[] GetAllNetworkInterfaces(){
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             (new NetworkInformationPermission(NetworkInformationAccess.Read)).Demand();
 #endif
             return SystemNetworkInterface.GetNetworkInterfaces();
index bc5f6484d5d149999c471b31faa6597629d56dac..2995de9113dc4350739007fb9516470a035d46e0 100644 (file)
@@ -93,7 +93,7 @@ namespace System.Net {
                 return m_BindIPEndPointDelegate;
             }
             set {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.InfrastructurePermission.Demand();
 #endif
                 m_BindIPEndPointDelegate = value;
@@ -460,7 +460,7 @@ namespace System.Net {
                     throw new NotSupportedException(SR.GetString(SR.net_servicePointAddressNotSupportedInHostMode));
                 }
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 // Don't let low-trust apps discover the proxy information.
                 if (m_ProxyServicePoint)
                 {
index 9257cf5734640ca940c548f2982d702fa6b02311..42743232cf72ab204be6f1ea18589b80d6eb29e1 100644 (file)
@@ -249,7 +249,9 @@ namespace System.Net {
 #if MONO
         internal bool AllowMultiValues (string name)
         {
-            return HInfo[name].AllowMultiValues;
+            var hinfo = HInfo[name];
+            // Is common header which supports multi value or it's unknown header
+            return hinfo.AllowMultiValues || hinfo.HeaderName == "";
         }
 #endif
 
index 8567a6861f23536a6ae894576ebfb6a071ceb293..a9be75be0a64be172631a8208a3654087be8cb87 100644 (file)
@@ -365,7 +365,7 @@ namespace System.Net {
                 throw new ArgumentNullException("creator");
             }
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
 
@@ -622,7 +622,7 @@ namespace System.Net {
                 return RequestCacheManager.GetBinding(string.Empty).Policy;
             }
             set {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 // This is a replacement of RequestCachePermission demand since we are not including the latest in the product.
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
@@ -1108,7 +1108,7 @@ namespace System.Net {
         {
             get
             {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 return InternalDefaultWebProxy;
@@ -1116,7 +1116,7 @@ namespace System.Net {
 
             set
             {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 InternalDefaultWebProxy = value;
@@ -1128,7 +1128,7 @@ namespace System.Net {
         //
         public static IWebProxy GetSystemWebProxy()
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
             return InternalGetSystemWebProxy();
index 86644c661ac1a7966babdedf55a7dd3d15afb25f..9f04a33e0b7d529739ef11c801bfd54f017b75bc 100644 (file)
@@ -381,7 +381,7 @@ namespace System.Net.Security {
                 // demand the same permissions, then we should remove our
                 // demand here.
                 //
-                #if !DISABLE_CAS_USE
+                #if FEATURE_MONO_CAS
                 ExceptionHelper.KeyContainerPermissionOpen.Demand(); 
                 #endif
                 
@@ -437,7 +437,7 @@ namespace System.Net.Security {
                             // For v 1.1 compat We want to ensure the store is opened under the **process** acount.
                             //
                             try {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                                 using (WindowsIdentity.Impersonate(IntPtr.Zero))
 #endif
                                 {
@@ -583,7 +583,7 @@ namespace System.Net.Security {
         //          Note: We call a user certificate selection delegate under permission
         //          assert but the signature of the delegate is unique so it's safe
         //
-        #if !DISABLE_CAS_USE
+        #if FEATURE_MONO_CAS
         [StorePermission(SecurityAction.Assert, Unrestricted=true)]
         #endif
         private bool AcquireClientCredentials(ref byte[] thumbPrint)
@@ -826,7 +826,7 @@ namespace System.Net.Security {
         //          Note: We call a user certificate selection delegate under permission
         //          assert but the signature of the delegate is unique so it's safe
         //
-        #if !DISABLE_CAS_USE
+        #if FEATURE_MONO_CAS
         [StorePermission(SecurityAction.Assert, Unrestricted=true)]
         #endif
         private bool AcquireServerCredentials(ref byte[] thumbPrint)
@@ -906,7 +906,7 @@ namespace System.Net.Security {
                 //
                 // For v 1.1 compat We want to ensure the credential are accessed under >>process<< acount.
                 //
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 using (WindowsIdentity.Impersonate(IntPtr.Zero))
 #endif
                 {
@@ -1285,7 +1285,7 @@ namespace System.Net.Security {
         //SECURITY: The scenario is allowed in semitrust StorePermission is asserted for Chain.Build
         //          A user callback has unique signature so it is safe to call it under permisison assert.
         //
-        #if !DISABLE_CAS_USE
+        #if FEATURE_MONO_CAS
         [StorePermission(SecurityAction.Assert, Unrestricted=true)]
         #endif
         internal bool VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback)
index 46378a6eed3931eb540a6703c51f438a552a396f..e941002364158843181ef58cbfb341bec1bd16b8 100644 (file)
@@ -43,7 +43,7 @@ namespace System.Net {
         //
         public override int Count {
             get {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 return m_SyncTable.Count;
@@ -108,7 +108,7 @@ namespace System.Net {
         //
         public override ICollection Keys {
             get {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 return m_SyncTable.Keys;
@@ -118,7 +118,7 @@ namespace System.Net {
         public override object SyncRoot {
             [HostProtection(Synchronization=true)]
             get {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 return m_SyncTable;
@@ -127,7 +127,7 @@ namespace System.Net {
         //
         public override ICollection Values {
             get {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 if (m_ValuesWrapper == null)
@@ -144,7 +144,7 @@ namespace System.Net {
         }
         //
         public override void Clear() {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
             m_SyncTable.Clear();
@@ -156,7 +156,7 @@ namespace System.Net {
         }
         //
         public override bool ContainsValue(string value) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
             foreach (SpnToken spnToken in m_SyncTable.Values)
@@ -169,7 +169,7 @@ namespace System.Net {
 
         // We have to unwrap the SpnKey and just expose the Spn
         public override void CopyTo(Array array, int index) {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
             CheckCopyToArguments(array, index, Count);
@@ -183,7 +183,7 @@ namespace System.Net {
         }
         //
         public override IEnumerator GetEnumerator() {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
 
@@ -211,7 +211,7 @@ namespace System.Net {
             try {
                 Uri uri = new Uri(key);
                 key = uri.GetParts(UriComponents.Scheme | UriComponents.Host | UriComponents.Port | UriComponents.Path, UriFormat.SafeUnescaped);
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 new WebPermission(NetworkAccess.Connect, new Uri(key)).Demand();
 #endif
             }
index 62ca59ada63ad08dddb09c6ce3503c4a1e0cfce1..80acb75ad34e7d3d5b2b24817a568c07b451b34f 100644 (file)
@@ -238,7 +238,7 @@ namespace System.Net {
         /// </devdoc>
         public IWebProxy Proxy {
             get {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 if (!m_ProxySet) {
@@ -248,7 +248,7 @@ namespace System.Net {
                 }
             }
             set {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 m_Proxy = value;
index dc7fdb26301b4cf69be900eb6bfd5857bb92cb6c..fe5858875faa8c20236f15eb604adbe491b20c26 100644 (file)
@@ -414,7 +414,7 @@ namespace System.Net {
         /// </devdoc>
         [Obsolete("This method has been deprecated. Please use the proxy selected for you by default. http://go.microsoft.com/fwlink/?linkid=14202")]
         public static WebProxy GetDefaultProxy() {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
             return new WebProxy(true);
@@ -437,7 +437,7 @@ namespace System.Net {
             if (useRegistry) {
                 // just make the proxy advanced, don't populate with any settings
                 // note - this will happen in the context of the user performing the deserialization (their proxy settings get read)
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 UnsafeUpdateFromRegistry();
index 4de592e9ddfcc9aa299af55da5b79386726e6aad..8a69ca2fae89fc321d3019b5ab1a74177f28d8e7 100644 (file)
@@ -3968,6 +3968,14 @@ namespace System {
 
                 if (hasUnicode && iriParsing && hostNotUnicodeNormalized){
                     flags |= Flags.HostUnicodeNormalized;// no host
+
+#if MONO
+                    // I am not certain this is the best fix but for Unix implicit paths with
+                    // unicode characters the host must be valid (null or non-empty) as
+                    // CreateUriInfo assumes. This should happen only for paths like /foo/path-with-unicode
+                    if (newHost.Length == 0 && (flags & Flags.BasicHostType) != 0)
+                        newHost = null;
+#endif
                 }
 
                  return idx;
index 9ec5432bd9f14b919c371fe3342d6aade3cffc31..009eef5770247e369262cd46c3c9363edf6577ea 100644 (file)
@@ -166,7 +166,7 @@ namespace System {
         //
         public static void Register(UriParser uriParser, string schemeName, int defaultPort)
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.InfrastructurePermission.Demand();
 #endif
             if (uriParser == null)
index 8256cb7a4173c51eb316c17db828fbc612348ec8..1a2adb1cfdb3d06fb2e66ebf99838a0a122abb67 100644 (file)
@@ -405,7 +405,7 @@ namespace System.Text.RegularExpressions {
         * This method is internal virtual so the jit does not inline it.
         */
         [
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             HostProtection(MayLeakOnAbort=true),
 #endif
             MethodImplAttribute(MethodImplOptions.NoInlining)
@@ -1195,7 +1195,7 @@ namespace System.Text.RegularExpressions {
 #if !(SILVERLIGHT || FULL_AOT_RUNTIME)
         /// <devdoc>
         /// </devdoc>
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         [HostProtection(MayLeakOnAbort=true)]
 #endif
         [ResourceExposure(ResourceScope.Machine)] // The AssemblyName is interesting.
@@ -1208,7 +1208,7 @@ namespace System.Text.RegularExpressions {
 
         /// <devdoc>
         /// </devdoc>
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         [HostProtection(MayLeakOnAbort=true)]
 #endif
         [ResourceExposure(ResourceScope.Machine)] // The AssemblyName is interesting.
@@ -1218,7 +1218,7 @@ namespace System.Text.RegularExpressions {
             CompileToAssemblyInternal(regexinfos, assemblyname, attributes, null);
         }
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         [HostProtection(MayLeakOnAbort=true)]
 #endif
         [ResourceExposure(ResourceScope.Machine)]
index df2d72e1f830bd7cc0a9e1dabf166261c089e47d..6f191129671672f5a0d3c58901385525b798814c 100644 (file)
@@ -131,7 +131,7 @@ namespace System.Text.RegularExpressions {
             // <SECREVIEW> Regex only generates string manipulation, so this is ok.
             // </SECREVIEW>      
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             new ReflectionPermission(PermissionState.Unrestricted).Assert();
 #endif
             try {
@@ -172,7 +172,7 @@ namespace System.Text.RegularExpressions {
 #endif
             }
             finally {
-#if !DISABLE_CAS_USE 
+#if FEATURE_MONO_CAS 
                 CodeAccessPermission.RevertAssert();
 #endif
             }
@@ -197,14 +197,14 @@ namespace System.Text.RegularExpressions {
 
             // <SECREVIEW> Regex only generates string manipulation, so this is ok.
             // </SECREVIEW>         
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             new ReflectionPermission(PermissionState.Unrestricted).Assert();
 #endif
             try {
                 factory = c.FactoryInstanceFromCode(code, options);
             }
             finally {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 CodeAccessPermission.RevertAssert();
 #endif
             }
@@ -239,7 +239,7 @@ namespace System.Text.RegularExpressions {
         
                 Type factory;
         
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 new ReflectionPermission(PermissionState.Unrestricted).Assert();
 #endif
                 try {
@@ -247,7 +247,7 @@ namespace System.Text.RegularExpressions {
                     c.GenerateRegexType(pattern, options, fullname, regexes[i].IsPublic, code, tree, factory, mTimeout);
                 }
                 finally {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                     CodeAccessPermission.RevertAssert();
 #endif
                 }
@@ -3049,7 +3049,7 @@ namespace System.Text.RegularExpressions {
             // SECREVIEW : Regex only generates string manipulation, so this is
             //           : ok.
             //
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             new ReflectionPermission(PermissionState.Unrestricted).Assert();
 #endif
             try {
@@ -3061,7 +3061,7 @@ namespace System.Text.RegularExpressions {
                 CustomAttributeBuilder transparencyAttribute = new CustomAttributeBuilder(transparencyCtor, new object[0]);
                 assemblyAttributes.Add(transparencyAttribute);
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ConstructorInfo securityRulesCtor = typeof(SecurityRulesAttribute).GetConstructor(new Type[] { typeof(SecurityRuleSet) });
                 CustomAttributeBuilder securityRulesAttribute =
                     new CustomAttributeBuilder(securityRulesCtor, new object[] { SecurityRuleSet.Level2 });
@@ -3087,7 +3087,7 @@ namespace System.Text.RegularExpressions {
                 }
             }
             finally {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 CodeAccessPermission.RevertAssert();
 #endif
             }
index 97f33d958530c1218c21a0de68e5c610aeba16f6..037486b36d83e7f5a92136a7291699bacc0e1512 100644 (file)
@@ -77,7 +77,7 @@ namespace System.Text.RegularExpressions {
         ///       multiple threads.</para>
         /// </devdoc>
 #if !SILVERLIGHT
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         [HostProtection(Synchronization=true)]
 #endif
         static public Group Synchronized(Group inner) {
index 6c0ff3850a410dfdd38f0df3425b975520db41f6..f6c8d5cce125fffcbf1c91e5a1b34f4adc45b722 100644 (file)
@@ -201,7 +201,7 @@ namespace System.Text.RegularExpressions {
         /// </devdoc>
 
 #if !SILVERLIGHT
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         [HostProtection(Synchronization=true)]
 #endif
         static public Match Synchronized(Match inner) {
index 640758a4461a1e6ab52d039a3db54e118752d76b..46131cf7ab9b8621a704ff5ad0a007b980165097 100644 (file)
@@ -28,7 +28,7 @@ namespace System.Text.RegularExpressions {
         protected internal override RegexRunner CreateInstance() {
             CompiledRegexRunner runner = new CompiledRegexRunner();
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             new ReflectionPermission(PermissionState.Unrestricted).Assert();
 #endif
             runner.SetDelegates((NoParamDelegate)       goMethod.CreateDelegate(typeof(NoParamDelegate)),
index bc6669c501f4028c78efc6602b62b86c5dc5d182..1f0d34927aff21908e1404cf8b4d0c8dd01d8510 100644 (file)
@@ -52,7 +52,7 @@ namespace System.Collections.Concurrent
     [ComVisible(false)]
     [DebuggerTypeProxy(typeof(SystemThreadingCollection_IProducerConsumerCollectionDebugView<>))]
     [DebuggerDisplay("Count = {Count}")]
-#if !(FEATURE_NETCORE || DISABLE_CAS_USE)
+#if !FEATURE_NETCORE
     [HostProtection(Synchronization = true, ExternalThreading = true)]
 #endif
     public class ConcurrentBag<T> : IProducerConsumerCollection<T>, IReadOnlyCollection<T>
index 652cfa72a04cadefbbf14285de257f92e096a2fc..8bab3650892309e5ae293c4c8d84906c39ac867a 100644 (file)
@@ -989,7 +989,7 @@ namespace System {
         [System.Security.SecurityCritical]  // auto-generated
         internal virtual String InternalToString()
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             try 
             {
 #pragma warning disable 618
index aa7a29985e94cf77fe4767857c5be7dec6214025..e318533937add8f2b4d6daf84e59f23d4888e72e 100644 (file)
@@ -96,9 +96,7 @@ namespace System.IO {
             if (!isFullyQualified && !isInvalidPath)
                 return path;
 
-#if DISABLE_CAS_USE
-            bool safeToReturn = !isInvalidPath;
-#else
+#if FEATURE_MONO_CAS
             bool safeToReturn = false;
             try {
                 if (!isInvalidPath) {
@@ -119,7 +117,9 @@ namespace System.IO {
                 // from Security.Util.StringExpressionSet.CanonicalizePath when ':' is found in the path
                 // beyond string index position 1.  
             }
-#endif // DISABLE_CAS_USE
+#else
+            bool safeToReturn = !isInvalidPath;
+#endif // FEATURE_MONO_CAS
             if (!safeToReturn) {
                 if (Path.IsDirectorySeparator(path[path.Length - 1]))
                     path = Environment.GetResourceString("IO.IO_NoPermissionToDirectoryName");
index 7b1b1c15e2548b8d8ad04a910cf7fa127b029051..f3da2cbd41494aebb6df942f558eec330533cadb 100644 (file)
@@ -130,7 +130,7 @@ namespace System.IO {
         [System.Security.SecurityCritical]  // auto-generated
         private FileInfo(SerializationInfo info, StreamingContext context) : base(info, context)
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 #if !FEATURE_CORECLR
             new FileIOPermission(FileIOPermissionAccess.Read, new String[] { FullPath }, false, false).Demand();
 #endif
@@ -187,7 +187,7 @@ namespace System.IO {
                 String directoryName = Path.GetDirectoryName(FullPath);
                 if (directoryName != null)
                 {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 #if FEATURE_CORECLR
                     FileSecurityState state = new FileSecurityState(FileSecurityStateAccess.Read, DisplayPath, FullPath);
                     state.EnsureState();
@@ -338,7 +338,7 @@ namespace System.IO {
         [ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)]
         public override void Delete()
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 #if FEATURE_CORECLR
             FileSecurityState state = new FileSecurityState(FileSecurityStateAccess.Write, DisplayPath, FullPath);
             state.EnsureState();
index 23abfb231d44ebf910e6b72ec86c4a37ae089cb1..c551e66159a62169796f281e8db3d27737838e1c 100644 (file)
@@ -18,7 +18,7 @@
 using System;
 using System.Collections;
 using System.Security;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 using System.Security.Permissions;
 #endif
 using Microsoft.Win32;
@@ -30,7 +30,7 @@ using System.Diagnostics.Contracts;
 
 namespace System.IO {
     [Serializable]
-#if !FEATURE_CORECLR && !DISABLE_CAS_USE
+#if !FEATURE_CORECLR && FEATURE_MONO_CAS
     [FileIOPermissionAttribute(SecurityAction.InheritanceDemand,Unrestricted=true)]
 #endif
     [ComVisible(true)]
@@ -102,7 +102,7 @@ namespace System.IO {
                     demandDir = Directory.GetDemandDir(FullPath, true);
                 else
                     demandDir = FullPath;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 #if FEATURE_CORECLR
                 FileSecurityState sourceState = new FileSecurityState(FileSecurityStateAccess.PathDiscovery, String.Empty, demandDir);
                 sourceState.EnsureState();
@@ -124,7 +124,7 @@ namespace System.IO {
                     demandDir = Directory.GetDemandDir(FullPath, true);
                 else
                     demandDir = FullPath;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 #if !FEATURE_CORECLR
                 new FileIOPermission(FileIOPermissionAccess.PathDiscovery, demandDir).Demand();
 #endif
@@ -351,7 +351,7 @@ namespace System.IO {
             [System.Security.SecuritySafeCritical]
             #endif
             set {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 #if !FEATURE_CORECLR
                 new FileIOPermission(FileIOPermissionAccess.Write, FullPath).Demand();
 #endif
@@ -384,7 +384,7 @@ namespace System.IO {
         [ComVisible(false)]
         public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
         {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
 #if !FEATURE_CORECLR
             new FileIOPermission(FileIOPermissionAccess.PathDiscovery, FullPath).Demand();
 #endif
index 2960876b8291317fe8e0bad79c5e7f8449f3ac8b..786e7af959af6bc003727a128acac5ceef177560 100644 (file)
@@ -163,7 +163,7 @@ namespace System.IO {
             if (_isOpen) {
                 throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CalledTwice"));
             }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             if (!skipSecurityCheck) {
 #pragma warning disable 618
                 new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
@@ -244,7 +244,7 @@ namespace System.IO {
             if (_isOpen)
                 throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CalledTwice"));
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             if (!skipSecurityCheck)
 #pragma warning disable 618
                 new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
index c2931dc9e6cf5f6b90c570128bed5ead0ce31e2c..350cb47cb47458a91cebb912d49cfcdae81bf40f 100644 (file)
@@ -51,7 +51,7 @@ namespace System.Resources {
             // Don't use Assembly manifest, but grovel on disk for a file.
             try
             {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 new System.Security.Permissions.FileIOPermission(System.Security.Permissions.PermissionState.Unrestricted).Assert();
 #endif
 
@@ -79,7 +79,7 @@ namespace System.Resources {
             }
             finally
             {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 System.Security.CodeAccessPermission.RevertAssert();
 #endif
             }
index bd3177842e76eb1fa9840e22f970ae5271765046..e63dd0d3c5708dee82b64d6fe0586750250a1843 100644 (file)
@@ -350,13 +350,13 @@ namespace System.Resources {
             // write to the temp directory (enforced via a Windows ACL).  Fall back to a MemoryStream.
             Stream dataSection = null;  // Either a FileStream or a MemoryStream
             String tempFile = null;
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             PermissionSet permSet = new PermissionSet(PermissionState.None);
             permSet.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted));
             permSet.AddPermission(new FileIOPermission(PermissionState.Unrestricted));
 #endif
             try {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 permSet.Assert();
 #endif
                 tempFile = Path.GetTempFileName();
@@ -375,7 +375,7 @@ namespace System.Resources {
                 dataSection = new MemoryStream();
             }
             finally {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 PermissionSet.RevertAssert();
 #endif
             }
index 5e3d732b8e237f2a3852d83b798ff2b15eb6bea3..b1b8e3e48f4f9b142298c47a377a88da38130a6c 100644 (file)
@@ -5328,7 +5328,7 @@ namespace System
                             throw new MissingMethodException(Environment.GetResourceString("MissingConstructor_Name", FullName));
                         }
 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                         // If we're creating a delegate, we're about to call a
                         // constructor taking an integer to represent a target
                         // method. Since this is very difficult (and expensive)
@@ -5359,7 +5359,7 @@ namespace System
                             new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
 #endif // FEATURE_CORECLR
                         }
-#endif // !DISABLE_CAS_USE
+#endif // FEATURE_MONO_CAS
                         if (invokeMethod.GetParametersNoCopy().Length == 0)
                         {
                             if (args.Length != 0)
index 0740184423ba49a4ce7d543b41f4d76835b91bd9..b74e4d606b57f0e28c77d31cb059015706e0da26 100644 (file)
@@ -110,7 +110,7 @@ namespace System.Runtime.InteropServices {
                 return null;
 #endif
             String dir = GetRuntimeDirectoryImpl();
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             new FileIOPermission(FileIOPermissionAccess.PathDiscovery, dir).Demand();
 #endif
             return dir;
@@ -143,7 +143,7 @@ namespace System.Runtime.InteropServices {
                 String path = sb.ToString();
 #endif
                 
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 // Do security check
                 new FileIOPermission(FileIOPermissionAccess.PathDiscovery, path).Demand();
 #endif
index 87782cd343c7e19a2d458c90e72ec8b595ba2889..fd5131e8e061f7980638fe85c32d454853210bfb 100644 (file)
@@ -71,7 +71,7 @@ namespace System.Runtime.Serialization.Formatters.Binary {
         private BinaryMethodReturn binaryMethodReturn;
         private bool bIsCrossAppDomain;
 #endif        
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
         private static FileIOPermission sfileIOPermission = new FileIOPermission(PermissionState.Unrestricted);
 #endif        
         private SerStack ValueFixupStack
@@ -1362,7 +1362,7 @@ namespace System.Runtime.Serialization.Formatters.Binary {
                 if (bSimpleAssembly)
                 {
                     try {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                           sfileIOPermission.Assert();
 #endif
                           try {
@@ -1373,7 +1373,7 @@ namespace System.Runtime.Serialization.Formatters.Binary {
 #endif // FEATURE_FUSION
                           }
                           finally {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                               CodeAccessPermission.RevertAssert();
 #endif
                           }
@@ -1390,14 +1390,14 @@ namespace System.Runtime.Serialization.Formatters.Binary {
                 else {
                     try
                     {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                           sfileIOPermission.Assert();
 #endif
                           try {
                               assm = Assembly.Load(assemblyName);
                           }
                           finally {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                               CodeAccessPermission.RevertAssert();
 #endif
                           }
@@ -1512,7 +1512,7 @@ namespace System.Runtime.Serialization.Formatters.Binary {
             if ( !FormatterServices.UnsafeTypeForwardersIsEnabled() && sourceAssembly != destAssembly )
             {
                 // we have a type forward to attribute !
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 // we can try to see if the dest assembly has less permissionSet
                 if (!destAssembly.PermissionSet.IsSubsetOf(sourceAssembly.PermissionSet))
 #endif
@@ -1530,7 +1530,7 @@ namespace System.Runtime.Serialization.Formatters.Binary {
                             typeFowardedFromAssembly = Assembly.Load(typeInfo.AssemblyString);
                         }
                         catch { }
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                         if (typeFowardedFromAssembly != sourceAssembly)
                         {
                             // throw security exception
@@ -1540,7 +1540,7 @@ namespace System.Runtime.Serialization.Formatters.Binary {
                     }
                     else
                     {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                         // throw security exception
                         throw new SecurityException() { Demanded = sourceAssembly.PermissionSet };
 #endif
index 49adc58c26a185a2e34918a5fc2083620178c8a8..8161a3be2a0d9a94b8952f9f2becd7dc8c84b4d6 100644 (file)
@@ -38,7 +38,11 @@ namespace Microsoft.Win32.SafeHandles {
         [SecurityCritical]
         protected override bool ReleaseHandle()
         {
+#if MONO
+            return true;
+#else
             return Win32Native.CloseHandle(handle);
+#endif
         }
     }
 
index 793e47c8a2aeb8ea25919ae770aafa6bf61a66f9..74200cddf49e06d741e1bfdce3d04f019c0bb672 100644 (file)
@@ -348,8 +348,10 @@ namespace Mono.ILASM {
 
                                 if (IsValueType (parent.PeapiClass.nameSpace, parent.PeapiClass.name))
                                         is_value_class = true;
-                                else if (IsEnumType (parent.PeapiClass.nameSpace, parent.PeapiClass.name))
+                                else if (IsEnumType (parent.PeapiClass.nameSpace, parent.PeapiClass.name)) {
                                         is_enum_class = true;
+                                        is_value_class = false;
+                                }
 
                                 if (!IsValueType (name_space, name) && !IsEnumType (name_space, name) &&
                                         is_value_class && (attr & PEAPI.TypeAttr.Sealed) == 0) {
index 7e97652e028ef36699422e3275556faae09eae73..3d6f8c0d4f0591f8baf6c06661ef245cd63f40e2 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{5D485D32-3B9F-4287-AB24-C8DA5B89F537}</ProjectGuid>\r
     <RootNamespace>jay</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>MultiByte</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>MultiByte</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
       <PreprocessorDefinitions>SKEL_DIRECTORY=".";%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
@@ -69,7 +69,6 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <PreprocessorDefinitions>SKEL_DIRECTORY=".";%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
index d69feb3de5b15bd0bd0c08a986db9865c0098104..004d29f8bd25dec87cc69901bd57b869d37cf9b5 100644 (file)
@@ -909,7 +909,7 @@ namespace Mono.CSharp
                                        Builder.Save (module.Builder.ScopeName, pekind, machine);
                                }
                        } catch (ArgumentOutOfRangeException) {
-                               Report.Error (16, "Output file `{0}' exceeds the 4GB limit");
+                               Report.Error (16, "Output file `{0}' exceeds the 4GB limit", name);
                        } catch (Exception e) {
                                Report.Error (16, "Could not write to file `{0}'. {1}", name, e.Message);
                        }
@@ -1196,7 +1196,7 @@ namespace Mono.CSharp
                        paths.AddRange (compiler.Settings.ReferencesLookupPaths);
                }
 
-               public abstract bool HasObjectType (T assembly);
+               public abstract T HasObjectType (T assembly);
                protected abstract string[] GetDefaultReferences ();
                public abstract T LoadAssemblyFile (string fileName, bool isImplicitReference);
                public abstract void LoadReferences (ModuleContainer module);
@@ -1263,8 +1263,13 @@ namespace Mono.CSharp
                                        //
                                        // corlib assembly is the first referenced assembly which contains System.Object
                                        //
-                                       if (HasObjectType (assembly.Item2)) {
-                                               corlib_assembly = assembly.Item2;
+                                       corlib_assembly = HasObjectType (assembly.Item2);
+                                       if (corlib_assembly != null) {
+                                               if (corlib_assembly != assembly.Item2) {
+                                                       var ca = corlib_assembly;
+                                                       i = loaded.FindIndex (l => l.Item2 == ca);
+                                               }
+
                                                loaded.RemoveAt (i);
                                                break;
                                        }
index 95f9897c081a7dfbe9bde7d9faef9a60baae01dd..36c5626bcc32dd190a10ff102953fb65f56ea8e3 100644 (file)
@@ -715,6 +715,12 @@ namespace Mono.CSharp {
                                return false;
                        }
 
+                       var interpolated_string = expr as InterpolatedString;
+                       if (interpolated_string != null) {
+                               if (target_type == rc.Module.PredefinedTypes.IFormattable.TypeSpec || target_type == rc.Module.PredefinedTypes.FormattableString.TypeSpec)
+                                       return true;
+                       }
+
                        return ImplicitStandardConversionExists (expr, target_type);
                }
 
index efc5927303ac94674dbba013c3f969c5ef8653d5..f15d1a8d12dc03e3cc09b5eceec98220851233cb 100644 (file)
@@ -4594,13 +4594,14 @@ namespace Mono.CSharp {
 
                        if (p.IsNullableType) {
                                p = Nullable.NullableInfo.GetUnderlyingType (p);
-                               if (!BuiltinTypeSpec.IsPrimitiveType (p))
+                               if (!BuiltinTypeSpec.IsPrimitiveTypeOrDecimal (p))
                                        return 0;
 
                                //
                                // Spec expects implicit conversion check between p and q, q and p
-                               // to be done before nullable unwrapping but that's expensive operation
-                               // Hence manual tweak is needed because BetterTypeConversion works on
+                               // to be done before nullable unwrapping but that's expensive operation.
+                               // 
+                               // Extra manual tweak is needed because BetterTypeConversion works on
                                // unwrapped types
                                //
                                if (p == q)
@@ -4609,7 +4610,7 @@ namespace Mono.CSharp {
 
                        if (q.IsNullableType) {
                                q = Nullable.NullableInfo.GetUnderlyingType (q);
-                               if (!BuiltinTypeSpec.IsPrimitiveType (q))
+                               if (!BuiltinTypeSpec.IsPrimitiveTypeOrDecimal (q))
                                        return 0;
 
                                if (q == p)
index 1190d549eb4fb10ef015db52f72d52f68fd2c1c6..75a02034f9cf9cda8bef266f139325a055c15546 100644 (file)
@@ -239,6 +239,7 @@ namespace Mono.CSharp
                readonly List<Tuple<AssemblyName, string, Assembly>> loaded_names;
                static readonly Dictionary<string, string[]> sdk_directory;
                Dictionary<AssemblyName, List<string[]>> resolved_version_mismatches;
+               static readonly TypeName objectTypeName = new TypeName ("System", "Object");
 
                static StaticLoader ()
                {
@@ -442,10 +443,15 @@ namespace Mono.CSharp
                        return list;
                }
 
-               public override bool HasObjectType (Assembly assembly)
+               public override Assembly HasObjectType (Assembly assembly)
                {
                        try {
-                               return assembly.GetType (compiler.BuiltinTypes.Object.FullName) != null;
+                               // System.Object can be forwarded and ikvm
+                               // transparently finds it in target assembly therefore
+                               // need to return actual obj assembly becauase in such
+                               // case it's different to assembly parameter
+                               var obj = assembly.FindType (objectTypeName);
+                               return obj == null ? null : obj.Assembly;
                        } catch (Exception e) {
                                throw new InternalErrorException (e, "Failed to load assembly `{0}'", assembly.FullName);
                        }
index 78bd541791319165ebb9c0b9279148874a74bdcd..d302724c386d84cf5998ceaec7fd542b43e47b2e 100644 (file)
@@ -676,20 +676,16 @@ namespace Mono.CSharp
                        if (!param.IsEmpty) {
                                if (is_valid_property) {
                                        var index_name = declaringType.MemberDefinition.GetAttributeDefaultMember ();
-                                       if (index_name == null) {
+                                       if (index_name == null || index_name != pi.Name) {
                                                is_valid_property = false;
                                        } else {
                                                if (get != null) {
                                                        if (get.IsStatic)
                                                                is_valid_property = false;
-                                                       if (get.Name.IndexOf (index_name, StringComparison.Ordinal) != 4)
-                                                               is_valid_property = false;
                                                }
                                                if (set != null) {
                                                        if (set.IsStatic)
                                                                is_valid_property = false;
-                                                       if (set.Name.IndexOf (index_name, StringComparison.Ordinal) != 4)
-                                                               is_valid_property = false;
                                                }
                                        }
 
index dc5f24016eb3b865b3bf120ba2a9c491661469c8..74a217c4eb22d0c0491626502091d0b053a243f5 100644 (file)
@@ -22,6 +22,7 @@
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
     <UseVSHostingProcess>false</UseVSHostingProcess>\r
+    <Commandlineparameters></Commandlineparameters>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
     <DebugType>pdbonly</DebugType>\r
index b233b9439cbfd397d52a28c70953d10d3ab8564e..1210ae4221a40a47fb53c67390239a86931dc280 100644 (file)
@@ -440,9 +440,9 @@ namespace Mono.CSharp
                        return Path.GetDirectoryName (typeof (object).Assembly.Location);
                }
 
-               public override bool HasObjectType (Assembly assembly)
+               public override Assembly HasObjectType (Assembly assembly)
                {
-                       return assembly.GetType (compiler.BuiltinTypes.Object.FullName) != null;
+                       return assembly.GetType (compiler.BuiltinTypes.Object.FullName) == null ? null : assembly;
                }
 
                public override Assembly LoadAssemblyFile (string assembly, bool isImplicitReference)
index 405b7225a52ec1854c6d78901ce589ab1a308682..6afe80eb0d024cfe07e01528e7d4c586509e5699 100644 (file)
@@ -17,6 +17,7 @@ public static class Program
                Complex (null);
                MM (1);
                MM ((byte) 1);
+               DecimalRule (() => (byte) 1);
                return 0;
        }
 
@@ -82,4 +83,13 @@ public static class Program
        {
                throw new ApplicationException ("wrong overload");
        }
+
+    static void DecimalRule (Func<int> i)
+    {
+    }
+
+    static void DecimalRule (Func<decimal?> i)
+    {
+        throw new ApplicationException ("wrong overload");
+    }
 }
\ No newline at end of file
diff --git a/mcs/tests/test-936-lib.il b/mcs/tests/test-936-lib.il
new file mode 100644 (file)
index 0000000..3f84f10
--- /dev/null
@@ -0,0 +1,45 @@
+.assembly extern mscorlib
+{
+}
+
+.assembly 'test-936-lib'
+{
+}
+
+.class public auto ansi sealed beforefieldinit TypeWithIndexer
+       extends [mscorlib]System.Object
+{
+  .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 )                      // ...Item..
+
+  .method public hidebysig specialname rtspecialname
+          instance void  .ctor() cil managed
+  {
+    IL_0000:  ldarg.0
+    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
+    IL_0006:  ret
+  }
+
+  .field private uint8[] a
+  .field private int32 b
+  .method public hidebysig specialname instance uint8 
+          get_B(int32 index) cil managed
+  {
+    IL_0000:  ldc.i4.0
+    IL_0001:  conv.u1
+    IL_0002:  ret
+  }
+
+  .method public hidebysig specialname 
+          instance void  set_O(int32 index,
+                           uint8 A_1) cil managed
+  {
+    IL_0000:  ret
+  }
+
+  .property instance uint8 Item(int32)
+  {
+    .get instance uint8 TypeWithIndexer::get_B(int32)
+    .set instance void TypeWithIndexer::set_O(int32,
+                                          uint8)
+  }
+}
diff --git a/mcs/tests/test-936.cs b/mcs/tests/test-936.cs
new file mode 100644 (file)
index 0000000..ae5af06
--- /dev/null
@@ -0,0 +1,11 @@
+// Compiler options: -r:test-936-lib.dll
+
+class X
+{
+       public static void Main ()
+       {
+               TypeWithIndexer a = new TypeWithIndexer ();
+               var x = a[0];
+               a[0] = x;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-937.cs b/mcs/tests/test-937.cs
new file mode 100644 (file)
index 0000000..b577d34
--- /dev/null
@@ -0,0 +1,15 @@
+// Compiler options: /noconfig /nostdlib -r:../class/lib/net_4_x/Facades/System.Runtime.dll -r:../class/lib/net_4_x/mscorlib.dll
+
+using System;
+
+class TypeForwarderOfSystemObject
+{
+       void TestAttributeReadDoesNotCrash ()
+       {
+               System.Runtime.InteropServices.Marshal.ReadByte (IntPtr.Zero, 0);               
+       }
+
+       static void Main ()
+       {
+       }
+}
diff --git a/mcs/tests/test-interpolation-10.cs b/mcs/tests/test-interpolation-10.cs
new file mode 100644 (file)
index 0000000..15f5e21
--- /dev/null
@@ -0,0 +1,25 @@
+using System;
+
+class Program
+{
+       static int counter;
+
+       static int Main ()
+       {
+               FormatPrint ($"Case {1}");
+               if (counter != 1)
+                       return 1;
+
+               FormatPrint ($"Case {3}");
+               if (counter != 2)
+                       return 2;
+
+               return 0;
+       }
+
+       static void FormatPrint (FormattableString message)
+       {
+               Console.WriteLine(message);
+               ++counter;
+       }
+}
index 79fc14d77a9089ffffa2fa431a6acb78cc25fffd..2496afc80a80fee6f31a0ed8768921facdb7e772 100644 (file)
   <test name="test-935.cs">
     <type name="Program">
       <method name="Int32 Main()" attrs="150">
-        <size>101</size>
+        <size>135</size>
       </method>
       <method name="Void TT(System.Threading.Tasks.Task`1[System.String])" attrs="145">
         <size>2</size>
       <method name="Void MM(System.Nullable`1[System.Double])" attrs="145">
         <size>12</size>
       </method>
+      <method name="Void DecimalRule(System.Func`1[System.Int32])" attrs="145">
+        <size>2</size>
+      </method>
+      <method name="Void DecimalRule(System.Func`1[System.Nullable`1[System.Decimal]])" attrs="145">
+        <size>12</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0()" attrs="145">
+        <size>9</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-936.cs">
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-937.cs">
+    <type name="TypeForwarderOfSystemObject">
+      <method name="Void TestAttributeReadDoesNotCrash()" attrs="129">
+        <size>14</size>
+      </method>
+      <method name="Void Main()" attrs="145">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
     </type>
   </test>
   <test name="test-94.cs">
       </method>
     </type>
   </test>
+  <test name="test-interpolation-10.cs">
+    <type name="Program">
+      <method name="Int32 Main()" attrs="145">
+        <size>106</size>
+      </method>
+      <method name="Void FormatPrint(System.FormattableString)" attrs="145">
+        <size>20</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-iter-01.cs">
     <type name="X">
       <method name="Int32 Main()" attrs="150">
index 6e07617be3ed6e8fcc86a9bfb68cb99571db7292..bc8fddc327d675bd2ce58402e644d0ee8cbde774 100644 (file)
                <type fullname="System.Runtime.Remoting.Messaging.CallContext">
                        <method name="SetCurrentCallContext" />
                </type>
-               <type fullname="System.Runtime.Remoting.Messaging.MonoMethodMessage" preserve="fields" />
+               <type fullname="System.Runtime.Remoting.Messaging.MonoMethodMessage" preserve="fields">
+                       <method name="InitMessage" />
+               </type>
                <type fullname="System.Runtime.Remoting.Proxies.RealProxy" preserve="fields">
                        <method name="PrivateInvoke" />
                        <method name="GetAppDomainTarget" />
                </type>
-               <type fullname="System.Runtime.Remoting.Proxies.TransparentProxy" preserve="fields" />
+               <type fullname="System.Runtime.Remoting.Proxies.TransparentProxy" preserve="fields">
+                       <method name="LoadRemoteFieldNew" />
+               </type>
                <type fullname="System.Runtime.Remoting.RemotingServices">
                        <method name="SerializeCallData" />
                        <method name="DeserializeCallData" />
index 9f75c85749a37752bcad3cd58875435b4db876a1..2382d37d43d3d04657bb2bcc31759a12bbca39c4 100755 (executable)
@@ -292,7 +292,16 @@ class MakeBundle {
                        if (cross_target == "default")
                                runtime = null;
                        else {
-                               var truntime = Path.Combine (targets_dir, cross_target, "mono");
+                               string truntime;
+                               if (runtime != null)
+                                       truntime = runtime;
+                               else {
+                                       if (cross_target == null){
+                                               Console.Error.WriteLine ("you should specify either a --runtime or a --cross compilation target");
+                                               Environment.Exit (1);
+                                       }
+                                       truntime = Path.Combine (targets_dir, cross_target, "mono");
+                               }
                                if (!File.Exists (truntime)){
                                        Console.Error.WriteLine ($"The runtime for the {cross_target} does not exist, use --fetch-target {cross_target} to download first");
                                        return 1;
index 8fe2784485220399c0646210de60a119268d78bc..0f4cd7c2d9586858916282c108fd1890ae2fb3a0 100644 (file)
@@ -78,10 +78,11 @@ namespace Xamarin.ApiDiff {
                public  static  bool    IgnoreVirtualChanges        { get; set; }
                public  static  bool    IgnoreAddedPropertySetters  { get; set; }
 
+               public static bool IgnoreNonbreaking { get; set; }
+
                public static bool Lax;
                public static bool Colorize = true;
        }
-
        class Program {
 
                public static int Main (string[] args)
@@ -120,7 +121,8 @@ namespace Xamarin.ApiDiff {
                                        v => State.IgnoreVirtualChanges = v != null
                                },
                                { "c|colorize:", "Colorize HTML output", v => State.Colorize = string.IsNullOrEmpty (v) ? true : bool.Parse (v) },
-                               { "x|lax", "Ignore duplicate XML entries", v => State.Lax = true }
+                               { "x|lax", "Ignore duplicate XML entries", v => State.Lax = true },
+                               { "ignore-nonbreaking", "Ignore all nonbreaking changes", v => State.IgnoreNonbreaking = true }
                        };
 
                        try {
@@ -130,6 +132,13 @@ namespace Xamarin.ApiDiff {
                                showHelp = true;
                        }
 
+                       if (State.IgnoreNonbreaking) {
+                               State.IgnoreAddedPropertySetters = true;
+                               State.IgnoreVirtualChanges = true;
+                               State.IgnoreNew.Add (new Regex (".*"));
+                               State.IgnoreAdded.Add (new Regex (".*"));
+                       }
+
                        if (showHelp || extra == null || extra.Count < 2 || extra.Count > 3) {
                                Console.WriteLine (@"Usage: mono-api-html [options] <reference.xml> <assembly.xml> [diff.html]");
                                Console.WriteLine ();
@@ -253,9 +262,11 @@ namespace Xamarin.ApiDiff {
                                                        } else {
                                                                file.WriteLine ("<h1>{0}.dll vs {1}.dll</h1>", ac.SourceAssembly, ac.TargetAssembly);
                                                        }
-                                                       file.WriteLine ("<a href='javascript: hideNonBreakingChanges (); ' class='hide-nonbreaking'>Hide non-breaking changes</a>");
-                                                       file.WriteLine ("<a href='javascript: showNonBreakingChanges (); ' class='restore-nonbreaking' style='display: none;'>Show non-breaking changes</a>");
-                                                       file.WriteLine ("<br/>");
+                                                       if (!State.IgnoreNonbreaking) {
+                                                               file.WriteLine ("<a href='javascript: hideNonBreakingChanges (); ' class='hide-nonbreaking'>Hide non-breaking changes</a>");
+                                                               file.WriteLine ("<a href='javascript: showNonBreakingChanges (); ' class='restore-nonbreaking' style='display: none;'>Show non-breaking changes</a>");
+                                                               file.WriteLine ("<br/>");
+                                                       }
                                                        file.WriteLine ("<div data-is-topmost>");
                                                        file.Write (diffHtml);
                                                        file.WriteLine ("</div> <!-- end topmost div -->");
index a3399fbef04e5b731cfeb8277176f2a0705752e5..f6cf940c9e41c63eeb8ad5f6cb9f0fae6a16c52d 100644 (file)
@@ -198,6 +198,20 @@ namespace Xamarin.ApiDiff {
                        Indent ().WriteLine ("}");
                }
 
+               //HACK: we don't have hierarchy information here so just check some basic heuristics for now
+               bool IsBaseChangeCompatible (string source, string target)
+               {
+                       if (source == "System.Object")
+                               return true;
+                       if (source == "System.Exception" && target.EndsWith ("Exception", StringComparison.Ordinal))
+                               return true;
+                       if (source == "System.EventArgs" && target.EndsWith ("EventArgs", StringComparison.Ordinal))
+                               return true;
+                       if (source == "System.Runtime.InteropServices.SafeHandle" && target.StartsWith ("Microsoft.Win32.SafeHandles.SafeHandle", StringComparison.Ordinal))
+                               return true;
+                       return false;
+               }
+
                public override void Modified (XElement source, XElement target, ApiChanges diff)
                {
                        // hack - there could be changes that we're not monitoring (e.g. attributes properties)
@@ -206,7 +220,7 @@ namespace Xamarin.ApiDiff {
 
                        var sb = source.GetAttribute ("base");
                        var tb = target.GetAttribute ("base");
-                       if (sb != tb) {
+                       if (sb != tb && !(State.IgnoreNonbreaking && IsBaseChangeCompatible (sb, tb))) {
                                Output.Write ("Modified base type: ");
                                Output.WriteLine (new ApiChange ().AppendModified (sb, tb, true).Member.ToString ());
                        }
index a2b0225b4480856d2c1497bcb761c67b1abb2a33..f292eee22ddadfdbb051439c9e11c5a205ddd5f2 100644 (file)
@@ -45,14 +45,16 @@ namespace Xamarin.ApiDiff {
 
                void RenderFieldAttributes (FieldAttributes source, FieldAttributes target, ApiChange change)
                {
-                       var srcNotSerialized = (source & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
-                       var tgtNotSerialized = (target & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
-                       if (srcNotSerialized != tgtNotSerialized) {
-                               // this is not a breaking change, so only render it if it changed.
-                               if (srcNotSerialized) {
-                                       change.AppendRemoved ("[NonSerialized]\n");
-                               } else {
-                                       change.AppendAdded ("[NonSerialized]\n");
+                       if (!State.IgnoreNonbreaking) {
+                               var srcNotSerialized = (source & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
+                               var tgtNotSerialized = (target & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
+                               if (srcNotSerialized != tgtNotSerialized) {
+                                       // this is not a breaking change, so only render it if it changed.
+                                       if (srcNotSerialized) {
+                                               change.AppendRemoved ("[NonSerialized]\n");
+                                       } else {
+                                               change.AppendAdded ("[NonSerialized]\n");
+                                       }
                                }
                        }
 
index d12d86625c2ea7a0af1b5d4bbb8067bd32ed04e1..9da6edc106d5e91eedaef5e5c4c59e295d8ef8cc 100644 (file)
@@ -138,9 +138,13 @@ namespace Xamarin.ApiDiff {
                void Modify (ApiChanges modified)
                {
                        foreach (var changes in modified) {
+                               if (State.IgnoreNonbreaking && changes.Value.All (c => !c.Breaking))
+                                       continue;
                                Output.WriteLine ("<p>{0}:</p>", changes.Key);
                                Output.WriteLine ("<pre>");
                                foreach (var element in changes.Value) {
+                                       if (State.IgnoreNonbreaking && !element.Breaking)
+                                               continue;
                                        Output.Write ("<div {0}>", element.Breaking ? "data-is-breaking" : "data-is-non-breaking");
                                        foreach (var line in element.Member.ToString ().Split ('\n'))
                                                Output.WriteLine ("\t{0}", line);
@@ -158,6 +162,8 @@ namespace Xamarin.ApiDiff {
                                if (State.IgnoreRemoved.Any (re => re.IsMatch (GetDescription (item))))
                                        continue;
                                SetContext (item);
+                               if (State.IgnoreNonbreaking && !IsBreakingRemoval (item))
+                                       continue;
                                if (!r) {
                                        BeforeRemoving (elements);
                                        r = true;
index 01a7ceb97d9d7b328ad92007b57df1ac93bd3b80..3e9d8837138e8cb8d1930f9f53f8b58e32f00333 100644 (file)
@@ -7,218 +7,152 @@ using Mono.Cecil;
 using Mono.Cecil.Cil;
 using Mono.Collections.Generic;
 
-namespace Symbolicate
+namespace Mono
 {
-       class LocationProvider {
-               class AssemblyLocationProvider {
-                       AssemblyDefinition assembly;
-                       string seqPointDataPath;
-
-                       public AssemblyLocationProvider (AssemblyDefinition assembly, string seqPointDataPath)
-                       {
-                               this.assembly = assembly;
-                               this.seqPointDataPath = seqPointDataPath;
-                       }
+       class AssemblyLocationProvider
+       {
+               AssemblyDefinition assembly;
 
-                       public SequencePoint TryGetLocation (string typeFullName, string methodSignature, int offset, bool isOffsetIL, uint methodIndex)
-                       {
-                               if (!assembly.MainModule.HasSymbols)
-                                       return null;
+               public AssemblyLocationProvider (string assemblyPath)
+               {
+                       assemblyPath = Path.GetFullPath (assemblyPath);
 
-                               TypeDefinition type = null;
-                               var nested = typeFullName.Split ('+');
-                               var types = assembly.MainModule.Types;
-                               foreach (var ntype in nested) {
-                                       type = types.FirstOrDefault (t => t.Name == ntype);
-                                       if (type == null)
-                                               return null;
+                       if (!File.Exists (assemblyPath))
+                               throw new ArgumentException ("assemblyPath does not exist: "+ assemblyPath);
 
-                                       types = type.NestedTypes;
-                               }
+                       var readerParameters = new ReaderParameters { ReadSymbols = true };
+                       assembly = AssemblyDefinition.ReadAssembly (assemblyPath, readerParameters);
+               }
 
-                               var parensStart = methodSignature.IndexOf ('(');
-                               var methodName = methodSignature.Substring (0, parensStart).TrimEnd ();
-                               var methodParameters = methodSignature.Substring (parensStart);
-                               var method = type.Methods.FirstOrDefault (m => CompareName (m, methodName) && CompareParameters (m.Parameters, methodParameters));
-                               if (method == null)
-                                       return null;
-
-                               int ilOffset = isOffsetIL ? offset : GetILOffsetFromFile (method.MetadataToken.ToInt32 (), methodIndex, offset);
-                               if (ilOffset < 0)
-                                       return null;
-
-                               SequencePoint sp = null;
-                               foreach (var instr in method.Body.Instructions) {
-                                       if (instr.SequencePoint != null)
-                                               sp = instr.SequencePoint;
-                                       
-                                       if (instr.Offset >= ilOffset) {
-                                               return sp;
-                                       }
-                               }
+               public bool TryResolveLocation (StackFrameData sfData, SeqPointInfo seqPointInfo)
+               {
+                       if (!assembly.MainModule.HasSymbols)
+                               return false;
+
+                       TypeDefinition type = null;
+                       var nested = sfData.TypeFullName.Split ('+');
+                       var types = assembly.MainModule.Types;
+                       foreach (var ntype in nested) {
+                               type = types.FirstOrDefault (t => t.Name == ntype);
+                               if (type == null)
+                                       return false;
 
-                               return null;
+                               types = type.NestedTypes;
                        }
 
-                       SeqPointInfo seqPointInfo;
-                       private int GetILOffsetFromFile (int methodToken, uint methodIndex, int nativeOffset)
-                       {
+                       var parensStart = sfData.MethodSignature.IndexOf ('(');
+                       var methodName = sfData.MethodSignature.Substring (0, parensStart).TrimEnd ();
+                       var methodParameters = sfData.MethodSignature.Substring (parensStart);
+                       var method = type.Methods.FirstOrDefault (m => CompareName (m, methodName) && CompareParameters (m.Parameters, methodParameters));
+                       if (method == null)
+                               return false;
+
+                       int ilOffset;
+                       if (sfData.IsILOffset) {
+                               ilOffset = sfData.Offset;
+                       } else {
                                if (seqPointInfo == null)
-                                       seqPointInfo = SeqPointInfo.Read (seqPointDataPath);
+                                       return false;
 
-                               return seqPointInfo.GetILOffset (methodToken, methodIndex, nativeOffset);
+                               ilOffset = seqPointInfo.GetILOffset (method.MetadataToken.ToInt32 (), sfData.MethodIndex, sfData.Offset);
                        }
 
-                       static bool CompareName (MethodDefinition candidate, string expected)
-                       {
-                               if (candidate.Name == expected)
-                                       return true;
+                       if (ilOffset < 0)
+                               return false;
 
-                               if (!candidate.HasGenericParameters)
-                                       return false;
+                       SequencePoint sp = null;
+                       foreach (var instr in method.Body.Instructions) {
+                               if (instr.SequencePoint != null)
+                                       sp = instr.SequencePoint;
                                
-                               var genStart = expected.IndexOf ('[');
-                               if (genStart < 0)
-                                       return false;
-
-                               if (candidate.Name != expected.Substring (0, genStart))
-                                       return false;
-
-                               int arity = 1;
-                               for (int pos = genStart; pos < expected.Length; ++pos) {
-                                       if (expected [pos] == ',')
-                                               ++arity;
+                               if (instr.Offset >= ilOffset) {
+                                       sfData.SetLocation (sp.Document.Url, sp.StartLine);
+                                       return true;
                                }
-
-                               return candidate.GenericParameters.Count == arity;
                        }
 
-                       static bool CompareParameters (Collection<ParameterDefinition> candidate, string expected)
-                       {
-                               var builder = new StringBuilder ();
-                               builder.Append ("(");
-
-                               for (int i = 0; i < candidate.Count; i++) {
-                                       var parameter = candidate [i];
-                                       if (i > 0)
-                                               builder.Append (", ");
-
-                                       if (parameter.ParameterType.IsSentinel)
-                                               builder.Append ("...,");
-
-                                       var pt = parameter.ParameterType;
-                                       if (!string.IsNullOrEmpty (pt.Namespace)) {
-                                               builder.Append (pt.Namespace);
-                                               builder.Append (".");
-                                       }
-
-                                       FormatElementType (pt, builder);
-
-                                       builder.Append (" ");
-                                       builder.Append (parameter.Name);
-                               }
-
-                               builder.Append (")");
+                       return false;
+               }
 
-                               return builder.ToString () == expected;
+               static bool CompareName (MethodDefinition candidate, string expected)
+               {
+                       if (candidate.Name == expected)
+                               return true;
+
+                       if (!candidate.HasGenericParameters)
+                               return false;
+                       
+                       var genStart = expected.IndexOf ('[');
+                       if (genStart < 0)
+                               return false;
+
+                       if (candidate.Name != expected.Substring (0, genStart))
+                               return false;
+
+                       int arity = 1;
+                       for (int pos = genStart; pos < expected.Length; ++pos) {
+                               if (expected [pos] == ',')
+                                       ++arity;
                        }
 
-                       static void FormatElementType (TypeReference tr, StringBuilder builder)
-                       {
-                               var ts = tr as TypeSpecification;
-                               if (ts != null) {
-                                       if (ts.IsByReference) {
-                                               FormatElementType (ts.ElementType, builder);
-                                               builder.Append ("&");
-                                               return;
-                                       }
+                       return candidate.GenericParameters.Count == arity;
+               }
 
-                                       var array = ts as ArrayType;
-                                       if (array != null) {
-                                               FormatElementType (ts.ElementType, builder);
-                                               builder.Append ("[");
+               static bool CompareParameters (Collection<ParameterDefinition> candidate, string expected)
+               {
+                       var builder = new StringBuilder ();
+                       builder.Append ("(");
 
-                                               for (int ii = 0; ii < array.Rank - 1; ++ii) {
-                                                       builder.Append (",");
-                                               }
+                       for (int i = 0; i < candidate.Count; i++) {
+                               var parameter = candidate [i];
+                               if (i > 0)
+                                       builder.Append (", ");
 
-                                               builder.Append ("]");
-                                               return;
-                                       }
+                               if (parameter.ParameterType.IsSentinel)
+                                       builder.Append ("...,");
+
+                               var pt = parameter.ParameterType;
+                               if (!string.IsNullOrEmpty (pt.Namespace)) {
+                                       builder.Append (pt.Namespace);
+                                       builder.Append (".");
                                }
 
-                               builder.Append (tr.Name);
+                               FormatElementType (pt, builder);
+
+                               builder.Append (" ");
+                               builder.Append (parameter.Name);
                        }
-               }
 
-               Dictionary<string, AssemblyLocationProvider> assemblies;
-               HashSet<string> directories;
+                       builder.Append (")");
 
-               public LocationProvider () {
-                       assemblies = new Dictionary<string, AssemblyLocationProvider> ();
-                       directories = new HashSet<string> ();
+                       return builder.ToString () == expected;
                }
 
-               public void AddAssembly (string assemblyPath)
+               static void FormatElementType (TypeReference tr, StringBuilder builder)
                {
-                       assemblyPath = Path.GetFullPath (assemblyPath);
-                       if (assemblies.ContainsKey (assemblyPath))
-                               return;
-
-                       if (!File.Exists (assemblyPath))
-                               throw new ArgumentException ("assemblyPath does not exist: "+ assemblyPath);
-
-                       var readerParameters = new ReaderParameters { ReadSymbols = true };
-                       var assembly = AssemblyDefinition.ReadAssembly (assemblyPath, readerParameters);
-
-                       var seqPointDataPath = assemblyPath + ".msym";
-                       if (!File.Exists (seqPointDataPath))
-                               seqPointDataPath = null;
-
-                       assemblies.Add (assemblyPath, new AssemblyLocationProvider (assembly, seqPointDataPath));
-
-                       // TODO: Should use AssemblyName with .net unification rules
-                       directories.Add (Path.GetDirectoryName (assemblyPath));
-
-                       foreach (var assemblyRef in assembly.MainModule.AssemblyReferences) {
-                               string refPath = null;
-                               foreach (var dir in directories) {
-                                       refPath = Path.Combine (dir, assemblyRef.Name);
-                                       if (File.Exists (refPath))
-                                               break;
-                                       refPath = Path.Combine (dir, assemblyRef.Name + ".dll");
-                                       if (File.Exists (refPath))
-                                               break;
-                                       refPath = Path.Combine (dir, assemblyRef.Name + ".exe");
-                                       if (File.Exists (refPath))
-                                               break;
-                                       refPath = null;
+                       var ts = tr as TypeSpecification;
+                       if (ts != null) {
+                               if (ts.IsByReference) {
+                                       FormatElementType (ts.ElementType, builder);
+                                       builder.Append ("&");
+                                       return;
                                }
-                               if (refPath != null)
-                                       AddAssembly (refPath);
-                       }
-               }
 
-               public void AddDirectory (string directory)
-               {
-                       directory = Path.GetFullPath (directory);
-                       if (!Directory.Exists (directory)) {
-                               Console.Error.WriteLine ("Directory " + directory + " does not exist.");
-                               return;
-                       }
+                               var array = ts as ArrayType;
+                               if (array != null) {
+                                       FormatElementType (ts.ElementType, builder);
+                                       builder.Append ("[");
 
-                       directories.Add (directory);
-               }
+                                       for (int ii = 0; ii < array.Rank - 1; ++ii) {
+                                               builder.Append (",");
+                                       }
 
-               public SequencePoint TryGetLocation (string typeFullName, string methodSignature, int offset, bool isOffsetIL, uint methodIndex)
-               {
-                       foreach (var assembly in assemblies.Values) {
-                               var loc = assembly.TryGetLocation (typeFullName, methodSignature, offset, isOffsetIL, methodIndex);
-                               if (loc != null)
-                                       return loc;
+                                       builder.Append ("]");
+                                       return;
+                               }
                        }
 
-                       return null;
+                       builder.Append (tr.Name);
                }
        }
 }
index 3c30921a61e18e2b3d239d3356eefda34260099f..62dd73f7f226821297ce0dcbe22708d28a2f9570 100644 (file)
@@ -15,44 +15,65 @@ LIB_PATH = $(topdir)/class/lib/$(PROFILE)
 
 MONO = MONO_PATH="$(LIB_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) -O=-inline
 
-OUT_DIR = Test/out
+MSYM_DIR = $(OUT_DIR)/msymdir
 TEST_CS = Test/StackTraceDumper.cs
 TEST_EXE = $(OUT_DIR)/StackTraceDumper.exe
-RELEASE_FILE = $(OUT_DIR)/release.out
-SYMBOLICATE_FILE = $(OUT_DIR)/symbolicate.out
+STACKTRACE_FILE = $(OUT_DIR)/stacktrace.out
+SYMBOLICATE_RAW_FILE = $(OUT_DIR)/symbolicate_raw.out
+SYMBOLICATE_RESULT_FILE = $(OUT_DIR)/symbolicate.result
 SYMBOLICATE_EXPECTED_FILE = Test/symbolicate.expected
 
 CHECK_DIFF = @\
-       MONO_DEBUG=gen-compact-seq-points $(MONO) $(TEST_EXE) > $(RELEASE_FILE); \
-       $(MONO) $(LIB_PATH)/$(PROGRAM) $(TEST_EXE) $(RELEASE_FILE) | sed "s/).*Test\//) in /" > $(SYMBOLICATE_FILE); \
-       DIFF=$$(diff $(SYMBOLICATE_FILE) $(SYMBOLICATE_EXPECTED_FILE)); \
+       $(MONO) $(TEST_EXE) > $(STACKTRACE_FILE); \
+       $(MONO) $(LIB_PATH)/$(PROGRAM) $(MSYM_DIR) $(STACKTRACE_FILE) > $(SYMBOLICATE_RAW_FILE); \
+       sed "s/).*Test\//) in /" $(SYMBOLICATE_RAW_FILE) | sed '/\[MVID\]/d' | sed '/\[AOTID\]/d' > $(SYMBOLICATE_RESULT_FILE); \
+       DIFF=$$(diff $(SYMBOLICATE_RESULT_FILE) $(SYMBOLICATE_EXPECTED_FILE)); \
        if [ ! -z "$$DIFF" ]; then \
                echo "Symbolicate tests failed."; \
-               echo "If $(SYMBOLICATE_FILE) is correct copy it to $(SYMBOLICATE_EXPECTED_FILE)."; \
+               echo "If $(SYMBOLICATE_RESULT_FILE) is correct copy it to $(SYMBOLICATE_EXPECTED_FILE)."; \
                echo "Otherwise runtime sequence points need to be fixed."; \
                echo "$$DIFF"; \
                exit 1; \
        fi
 
-BUILD_TEST_EXE = \
+PREPARE_OUTDIR = @\
        rm -rf $(OUT_DIR); \
        mkdir -p $(OUT_DIR); \
-       $(CSCOMPILE) $(TEST_CS) -out:$(TEST_EXE)
+       mkdir -p $(MSYM_DIR);
+
+COMPILE = \
+       $(CSCOMPILE) $(TEST_CS) -out:$(TEST_EXE); \
+       $(MONO) $(LIB_PATH)/$(PROGRAM) store-symbols $(MSYM_DIR) $(OUT_DIR)
 
 check: test-local
 
 AOT_SUPPORTED = $(shell $(MONO) --aot 2>&1 | grep -q "AOT compilation is not supported" && echo 0 || echo 1)
 
-test-local: all
-       $(BUILD_TEST_EXE)
-       @echo "Checking $(TEST_EXE) without AOT"
+test-local: test-without-aot test-with-aot test-with-aot-msym
+
+test-without-aot: OUT_DIR = Test/without_aot
+test-without-aot: all
+       @echo "Checking $(TEST_EXE) without AOT in $(OUT_DIR)"
+       $(PREPARE_OUTDIR)
+       $(COMPILE)
        $(CHECK_DIFF)
+
+test-with-aot: OUT_DIR = Test/with_aot
+test-with-aot: all
 ifeq ($(AOT_SUPPORTED), 1)
-       @echo "Checking $(TEST_EXE) with AOT"
-       @MONO_DEBUG=gen-compact-seq-points $(MONO) --aot $(TEST_EXE) > /dev/null
+       @echo "Checking $(TEST_EXE) with AOT in $(OUT_DIR)"
+       $(PREPARE_OUTDIR)
+       $(COMPILE)
+       @$(MONO) --aot $(TEST_EXE) > /dev/null
        $(CHECK_DIFF)
-       @echo "Checking $(TEST_EXE) with AOT (using .msym)"
-       $(BUILD_TEST_EXE)
-       @MONO_DEBUG=gen-compact-seq-points $(MONO) --aot=gen-seq-points-file $(TEST_EXE) > /dev/null
+endif
+
+test-with-aot-msym: OUT_DIR = Test/with_aot_msym
+test-with-aot-msym: all
+ifeq ($(AOT_SUPPORTED), 1)
+       @echo "Checking $(TEST_EXE) with AOT (using .msym) in $(OUT_DIR)"
+       $(PREPARE_OUTDIR)
+       $(COMPILE)
+       @$(MONO) --aot=msym-dir=$(MSYM_DIR) $(TEST_EXE) > /dev/null
        $(CHECK_DIFF)
 endif
index 606e4fb3f171c7eb6d4626008f24320ad9131ee1..22a3dae62fb043c49e03530147bd8a8d0846789c 100644 (file)
@@ -2,7 +2,7 @@ using System;
 using System.IO;
 using System.Collections.Generic;
 
-namespace Symbolicate
+namespace Mono
 {
        static class BinaryReaderExtensions
        {
diff --git a/mcs/tools/mono-symbolicate/StackFrameData.cs b/mcs/tools/mono-symbolicate/StackFrameData.cs
new file mode 100644 (file)
index 0000000..cc9b44c
--- /dev/null
@@ -0,0 +1,99 @@
+using System.Text.RegularExpressions;
+using System.Globalization;
+
+namespace Mono
+{
+       class StackFrameData
+       {
+               static Regex regex = new Regex (@"\w*at (?<Method>.+) *(\[0x(?<IL>.+)\]|<0x.+ \+ 0x(?<NativeOffset>.+)>( (?<MethodIndex>\d+)|)) in <filename unknown>:0");
+
+               public readonly string TypeFullName;
+               public readonly string MethodSignature;
+               public readonly int Offset;
+               public readonly bool IsILOffset;
+               public readonly uint MethodIndex;
+               public readonly string Line;
+
+               public string File { get; private set; }
+               public int LineNumber { get; private set; }
+
+               private StackFrameData (string line, string typeFullName, string methodSig, int offset, bool isILOffset, uint methodIndex)
+               {
+                       LineNumber = -1;
+
+                       Line = line;
+                       TypeFullName = typeFullName;
+                       MethodSignature = methodSig;
+                       Offset = offset;
+                       IsILOffset = isILOffset;
+                       MethodIndex = methodIndex;
+               }
+
+               public static bool TryParse (string line, out StackFrameData stackFrame)
+               {
+                       stackFrame = null;
+
+                       var match = regex.Match (line);
+                       if (!match.Success)
+                               return false;
+
+                       string typeFullName, methodSignature;
+                       var methodStr = match.Groups ["Method"].Value.Trim ();
+                       if (!ExtractSignatures (methodStr, out typeFullName, out methodSignature))
+                               return false;
+
+                       var isILOffset = !string.IsNullOrEmpty (match.Groups ["IL"].Value);
+                       var offsetVarName = (isILOffset)? "IL" : "NativeOffset";
+                       var offset = int.Parse (match.Groups [offsetVarName].Value, NumberStyles.HexNumber, CultureInfo.InvariantCulture);
+
+                       uint methodIndex = 0xffffff;
+                       if (!string.IsNullOrEmpty (match.Groups ["MethodIndex"].Value))
+                               methodIndex = uint.Parse (match.Groups ["MethodIndex"].Value, CultureInfo.InvariantCulture);
+
+                       stackFrame = new StackFrameData (line, typeFullName, methodSignature, offset, isILOffset, methodIndex);
+
+                       return true;
+               }
+
+               static bool ExtractSignatures (string str, out string typeFullName, out string methodSignature)
+               {
+                       var methodNameEnd = str.IndexOf ('(');
+                       if (methodNameEnd == -1) {
+                               typeFullName = methodSignature = null;
+                               return false;
+                       }
+
+                       var typeNameEnd = str.LastIndexOf ('.', methodNameEnd);
+                       if (typeNameEnd == -1) {
+                               typeFullName = methodSignature = null;
+                               return false;
+                       }
+
+                       // Adjustment for Type..ctor ()
+                       if (typeNameEnd > 0 && str [typeNameEnd - 1] == '.') {
+                               --typeNameEnd;
+                       }
+
+                       typeFullName = str.Substring (0, typeNameEnd);
+                       // Remove generic parameters
+                       typeFullName = Regex.Replace (typeFullName, @"\[[^\[\]]*\]", "");
+
+                       methodSignature = str.Substring (typeNameEnd + 1);
+
+                       return true;
+               }
+
+               internal void SetLocation (string file, int lineNumber)
+               {
+                       File = file;
+                       LineNumber = lineNumber;
+               }
+
+               public override string ToString () {
+                       if (Line.Contains ("<filename unknown>:0") && LineNumber != -1)
+                               return Line.Replace ("<filename unknown>:0", string.Format ("{0}:{1}", File, LineNumber));
+
+                       return Line;
+               }
+       }
+}
diff --git a/mcs/tools/mono-symbolicate/StackTraceMetadata.cs b/mcs/tools/mono-symbolicate/StackTraceMetadata.cs
new file mode 100644 (file)
index 0000000..4aa4753
--- /dev/null
@@ -0,0 +1,36 @@
+using System.Text.RegularExpressions;
+
+namespace Mono
+{
+       class StackTraceMetadata
+       {
+               static Regex regex = new Regex (@"\[(?<Id>.+)\] (?<Value>.+)");
+
+               public readonly string Id;
+               public readonly string Value;
+               public readonly string Line;
+
+               private StackTraceMetadata (string line, string id, string val)
+               {
+                       Line = line;
+                       Id = id;
+                       Value = val;
+               }
+       
+               public static bool TryParse (string line, out StackTraceMetadata metadata)
+               {
+                       metadata = null;
+
+                       var match = regex.Match (line);
+                       if (!match.Success)
+                               return false;
+
+                       string id = match.Groups ["Id"].Value;
+                       string val = match.Groups ["Value"].Value;
+
+                       metadata = new StackTraceMetadata (line, id, val);
+
+                       return true;
+               }
+       }
+}
diff --git a/mcs/tools/mono-symbolicate/SymbolManager.cs b/mcs/tools/mono-symbolicate/SymbolManager.cs
new file mode 100644 (file)
index 0000000..466f18d
--- /dev/null
@@ -0,0 +1,111 @@
+using System;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Collections.Generic;
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+using Mono.Collections.Generic;
+
+namespace Mono
+{
+       public class SymbolManager
+       {
+               string msymDir;
+
+               public SymbolManager (string msymDir) {
+                       this.msymDir = msymDir;
+               }
+
+               internal bool TryResolveLocation (StackFrameData sfData, string mvid, string aotid)
+               {
+                       var assemblyLocProvider = GetOrCreateAssemblyLocationProvider (mvid);
+
+                       SeqPointInfo seqPointInfo = null;
+                       if (!sfData.IsILOffset && aotid != null)
+                               seqPointInfo = GetOrCreateSeqPointInfo (aotid);
+
+                       return assemblyLocProvider.TryResolveLocation (sfData, seqPointInfo);
+               }
+
+               Dictionary<string, AssemblyLocationProvider> assemblies = new Dictionary<string, AssemblyLocationProvider> ();
+
+               private AssemblyLocationProvider GetOrCreateAssemblyLocationProvider (string mvid)
+               {
+                       if (assemblies.ContainsKey (mvid))
+                               return assemblies[mvid];
+
+                       var mvidDir = Path.Combine (msymDir, mvid);
+                       if (!Directory.Exists (mvidDir))
+                               throw new Exception (string.Format("MVID directory does not exist: {0}", mvidDir));
+
+                       string assemblyPath = null;
+                       var exeFiles = Directory.GetFiles (mvidDir, "*.exe");
+                       var dllFiles = Directory.GetFiles (mvidDir, "*.dll");
+
+                       if (exeFiles.Length + dllFiles.Length != 1)
+                               throw new Exception (string.Format ("MVID directory should include one assembly: {0}", mvidDir));
+
+                       assemblyPath = (exeFiles.Length > 0)? exeFiles[0] : dllFiles[0];
+
+                       var locProvider = new AssemblyLocationProvider (assemblyPath);
+
+                       assemblies.Add (mvid, locProvider);
+
+                       return locProvider;
+               }
+
+               Dictionary<string, SeqPointInfo> seqPointInfos = new Dictionary<string, SeqPointInfo> ();
+
+               private SeqPointInfo GetOrCreateSeqPointInfo (string aotid)
+               {
+                       if (seqPointInfos.ContainsKey (aotid))
+                               return seqPointInfos[aotid];
+
+                       var aotidDir = Path.Combine (msymDir, aotid);
+                       if (!Directory.Exists (aotidDir))
+                               throw new Exception (string.Format("AOTID directory does not exist: {0}", aotidDir));
+
+                       string msymFile = null;
+                       var msymFiles = Directory.GetFiles(aotidDir, "*.msym");
+                       msymFile = msymFiles[0];
+
+                       var seqPointInfo = SeqPointInfo.Read (msymFile);
+
+                       seqPointInfos.Add (aotid, seqPointInfo);
+
+                       return seqPointInfo;
+               }
+
+               public void StoreSymbols (params string[] lookupDirs)
+               {
+                       foreach (var dir in lookupDirs) {
+                               var exeFiles = Directory.GetFiles (dir, "*.exe");
+                               var dllFiles = Directory.GetFiles (dir, "*.dll");
+                               var assemblies = exeFiles.Concat (dllFiles);
+                               foreach (var assemblyPath in assemblies) {
+                                       var mdbPath = assemblyPath + ".mdb";
+                                       if (!File.Exists (mdbPath)) {
+                                               // assemblies without mdb files are useless
+                                               continue;
+                                       }
+
+                                       var assembly = AssemblyDefinition.ReadAssembly (assemblyPath);
+
+                                       var mvid = assembly.MainModule.Mvid.ToString ("N");
+                                       var mvidDir = Path.Combine (msymDir, mvid);
+
+                                       Directory.CreateDirectory (mvidDir);
+
+                                       var mvidAssemblyPath = Path.Combine (mvidDir, Path.GetFileName (assemblyPath));
+                                       File.Copy (assemblyPath, mvidAssemblyPath);
+
+                                       var mvidMdbPath = Path.Combine (mvidDir, Path.GetFileName (mdbPath));
+                                       File.Copy (mdbPath, mvidMdbPath);
+
+                                       // TODO create MVID dir for non main modules with links to main module MVID
+                               }
+                       }
+               }
+       }
+}
index 5c4437ba56945b09750b3dbe362a8b1441ccd1bc..b6f80e99aceec3c0d00a110dc0e07c8945041c66 100644 (file)
@@ -1,3 +1,7 @@
 symbolicate.cs
 LocationProvider.cs
 SeqPointInfo.cs
+StackFrameData.cs
+StackTraceMetadata.cs
+SymbolManager.cs
+../../class/Mono.Options/Mono.Options/Options.cs
index cb7aa9a46cd38ffc30d16ba877d0c7a10d20f3c7..6479a48b8637c4fd6f8835c320ca27c168343b88 100644 (file)
 using System;
 using System.IO;
+using System.Text;
+using System.Linq;
+using System.Collections.Generic;
 using System.Globalization;
-using System.Text.RegularExpressions;
+using Mono.Options;
 
-namespace Symbolicate
+namespace Mono
 {
-       public class Program
+       public class Symbolicate
        {
-               static Regex regex = new Regex (@"\w*at (?<Method>.+) *(\[0x(?<IL>.+)\]|<0x.+ \+ 0x(?<NativeOffset>.+)>( (?<MethodIndex>\d+)|)) in <filename unknown>:0");
+               class Command {
+                       public readonly int MinArgCount;
+                       public readonly int MaxArgCount;
+                       public readonly Action<List<string>> Action;
+
+                       public Command (Action<List<string>> action, int minArgCount = 0, int maxArgCount = int.MaxValue)
+                       {
+                               Action = action;
+                               MinArgCount = minArgCount;
+                               MaxArgCount = maxArgCount;
+                       }
+               }
 
                public static int Main (String[] args)
                {
-                       if (args.Length < 2) {
-                               Console.Error.WriteLine ("Usage: symbolicate <assembly path> <input file> [lookup directories]");
-                               return 1;
-                       }
+                       var showHelp = false;
+                       List<string> extra = null;
 
-                       var assemblyPath = args [0];
-                       var inputFile = args [1];
+                       Command cmd = null;
 
-                       var locProvider = new LocationProvider ();
+                       if (args[0] == "store-symbols")
+                               cmd = new Command (StoreSymbolsAction, 2);
 
-                       for (var i = 2; i < args.Length; i++)
-                               locProvider.AddDirectory (args [i]);
+                       if (cmd != null) {
+                               args = args.Skip (1).ToArray ();
+                       } else {
+                               cmd = new Command (SymbolicateAction, 2, 2);
+                       }
 
-                       locProvider.AddAssembly (assemblyPath);
+                       var options = new OptionSet {
+                               { "h|help", "Show this help", v => showHelp = true },
+                       };
 
-                       using (StreamReader r = new StreamReader (inputFile)) {
-                           for (var line = r.ReadLine (); line != null; line = r.ReadLine ()) {
-                                       line = SymbolicateLine (line, locProvider);
-                                       Console.WriteLine (line);
-                           }
+                       try {
+                               extra = options.Parse (args);
+                       } catch (OptionException e) {
+                               Console.WriteLine ("Option error: {0}", e.Message);
+                               showHelp = true;
                        }
 
+                       if (showHelp || extra == null || extra.Count < cmd.MinArgCount || extra.Count > cmd.MaxArgCount) {
+                               Console.Error.WriteLine ("Usage: symbolicate <msym dir> <input file>");
+                               Console.Error.WriteLine ("       symbolicate store-symbols <msym dir> [<dir>]+");
+                               Console.WriteLine ();
+                               Console.WriteLine ("Available options:");
+                               options.WriteOptionDescriptions (Console.Out);
+                               return 1;
+                       }
+
+                       cmd.Action (extra);
+
                        return 0;
                }
 
-               static string SymbolicateLine (string line, LocationProvider locProvider)
+               private static void SymbolicateAction (List<string> args)
                {
-                       var match = regex.Match (line);
-                       if (!match.Success)
-                               return line;
+                       var msymDir = args [0];
+                       var inputFile = args [1];
 
-                       string typeFullName, methodSignature;
-                       var methodStr = match.Groups ["Method"].Value.Trim ();
-                       if (!ExtractSignatures (methodStr, out typeFullName, out methodSignature))
-                               return line;
+                       var symbolManager = new SymbolManager (msymDir);
 
-                       var isOffsetIL = !string.IsNullOrEmpty (match.Groups ["IL"].Value);
-                       var offsetVarName = (isOffsetIL)? "IL" : "NativeOffset";
-                       var offset = int.Parse (match.Groups [offsetVarName].Value, NumberStyles.HexNumber, CultureInfo.InvariantCulture);
+                       using (StreamReader r = new StreamReader (inputFile)) {
+                               var sb = Process (r, symbolManager);
+                               Console.Write (sb.ToString ());
+                       }
+               }
 
-                       uint methodIndex = 0xffffff;
-                       if (!string.IsNullOrEmpty (match.Groups ["MethodIndex"].Value))
-                               methodIndex = uint.Parse (match.Groups ["MethodIndex"].Value, CultureInfo.InvariantCulture);
+               private static void StoreSymbolsAction (List<string> args)
+               {
+                       var msymDir = args[0];
+                       var lookupDirs = args.Skip (1).ToArray ();
 
-                       var loc = locProvider.TryGetLocation (typeFullName, methodSignature, offset, isOffsetIL, methodIndex);
-                       if (loc == null)
-                               return line;
+                       var symbolManager = new SymbolManager (msymDir);
 
-                       return line.Replace ("<filename unknown>:0", string.Format ("{0}:{1}", loc.Document.Url, loc.StartLine));
+                       symbolManager.StoreSymbols (lookupDirs);
                }
 
-               static bool ExtractSignatures (string str, out string typeFullName, out string methodSignature)
+               public static StringBuilder Process (StreamReader reader, SymbolManager symbolManager)
                {
-                       var methodNameEnd = str.IndexOf ('(');
-                       if (methodNameEnd == -1) {
-                               typeFullName = methodSignature = null;
-                               return false;
+                       List<StackFrameData> stackFrames = new List<StackFrameData>();
+                       List<StackTraceMetadata> metadata = new List<StackTraceMetadata>();
+                       StringBuilder sb = new StringBuilder ();
+                       bool linesEnded = false;
+
+                       for (var line = reader.ReadLine (); line != null; line = reader.ReadLine ()) {
+                               StackFrameData sfData;
+                               if (!linesEnded && StackFrameData.TryParse (line, out sfData)) {
+                                       stackFrames.Add (sfData);
+                                       continue;
+                               }
+
+                               if (stackFrames.Count > 0) {
+                                       linesEnded = true;
+
+                                       StackTraceMetadata stMetadata;
+                                       if (StackTraceMetadata.TryParse (line, out stMetadata)) {
+                                               metadata.Add (stMetadata);
+                                               continue;
+                                       }
+
+                                       DumpStackTrace (symbolManager, sb, stackFrames, metadata);
+               
+                                       // Clear lists for next stack trace
+                                       stackFrames.Clear ();
+                                       metadata.Clear ();
+                               }
+
+                               linesEnded = false;
+
+                               // Append last line
+                               sb.AppendLine (line);
                        }
 
-                       var typeNameEnd = str.LastIndexOf ('.', methodNameEnd);
-                       if (typeNameEnd == -1) {
-                               typeFullName = methodSignature = null;
-                               return false;
-                       }
+                       if (stackFrames.Count > 0)
+                               DumpStackTrace (symbolManager, sb, stackFrames, metadata);
+
+                       return sb;
+               }
+
+               private static void DumpStackTrace (SymbolManager symbolManager, StringBuilder sb, List<StackFrameData> stackFrames, List<StackTraceMetadata> metadata)
+               {
+                       string aotid = null;
+                       var aotidMetadata = metadata.FirstOrDefault ( m => m.Id == "AOTID" );
+                       if (aotidMetadata != null)
+                               aotid = aotidMetadata.Value;
 
-                       // Adjustment for Type..ctor ()
-                       if (typeNameEnd > 0 && str [typeNameEnd - 1] == '.') {
-                               --typeNameEnd;
+                       var linesMvid = ProcessLinesMVID (metadata);
+                       var lineNumber = 0;
+                       foreach (var sfData in stackFrames) {
+                               string mvid = null;
+                               if (linesMvid.ContainsKey (lineNumber))
+                                       mvid = linesMvid [lineNumber++];
+
+                               symbolManager.TryResolveLocation (sfData, mvid, aotid);
+
+                               sb.AppendLine (sfData.ToString ());
                        }
 
-                       typeFullName = str.Substring (0, typeNameEnd);
-                       // Remove generic parameters
-                       typeFullName = Regex.Replace (typeFullName, @"\[[^\[\]]*\]", "");
+                       foreach (var m in metadata)
+                               sb.AppendLine (m.Line);
+               }
+
+               private static Dictionary<int, string> ProcessLinesMVID (List<StackTraceMetadata> metadata)
+               {
+                       var linesMvid = new Dictionary<int, string> ();
+                       var mvidData = metadata.Where ( m => m.Id == "MVID" ).Select ( m => m.Value );
+                       foreach (var m in mvidData) {
+                               var s1 = m.Split (new char[] {' '}, 2);
+                               var mvid = s1 [0];
+                               var lines = s1 [1].Split (',');
+                               foreach (var line in lines)
+                                       linesMvid.Add (int.Parse (line), mvid);
+                       }
 
-                       methodSignature = str.Substring (typeNameEnd + 1);
-                       return true;
+                       return linesMvid;
                }
        }
-}
\ No newline at end of file
+}
index 442ee9e0f530ba877d96e514c0e9ca0a6a6faee9..3e87dc84baba4750065db35eed9199ebb6f40c94 100644 (file)
@@ -44,7 +44,8 @@ namespace Mono.Tools {
 
        class MozRoots {
 
-               private const string defaultUrl = "http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1";
+               // this URL is recommended by https://bugzilla.mozilla.org/show_bug.cgi?id=1279952#c8 and is also used as basis for curl's https://curl.haxx.se/ca/cacert.pem bundle
+               private const string defaultUrl = "https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt";
 
                static string url;
                static string inputFile;
@@ -125,6 +126,14 @@ namespace Mono.Tools {
 
                static int Process ()
                {
+                       ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => {
+                               if (sslPolicyErrors != System.Net.Security.SslPolicyErrors.None)
+                                       Console.WriteLine ("WARNING: Downloading the trusted certificate list couldn't be done securely (error: {0}), continuing anyway. If you're using mozroots to bootstrap Mono's trust store on a clean system this might be OK, otherwise it could indicate a network intrusion. Please ensure you're using a trusted network or move to cert-sync.", sslPolicyErrors);
+
+                               // this is very bad, but on a clean system without an existing trust store we don't really have a better option
+                               return true;
+                       };
+
                        X509CertificateCollection roots = DecodeCollection ();
                        if (roots == null) {
                                return 1;
@@ -280,6 +289,8 @@ namespace Mono.Tools {
                static void Header ()
                {
                        Console.WriteLine (new AssemblyInfo ().ToString ());
+                       Console.WriteLine ("WARNING: mozroots is deprecated, please move to cert-sync instead.");
+                       Console.WriteLine ();
                }
 
                static void Help ()
index 70457756436001b8c749fe9c846bd6e0a218c05c..ada65c60500f3fd4aae049be6573f7ebecff33c3 100644 (file)
@@ -20,18 +20,35 @@ else
 install-local: install-extras
 endif
 
+PORTABLE_TARGETS_SRC=../../../external/buildtools/src/Portable/Targets
+PCL5_FX_SRC=../../../external/buildtools/src/Portable/Frameworks/v5.0
+
 NETFRAMEWORK_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETFramework
+PCL5_FX_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETPortable/v5.0
 VS_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/VisualStudio
 PORTABLE_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Portable
+NUGET_BUILDTASKS_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/NuGet
+
+ifeq (14.0, $(XBUILD_VERSION))
+install-extras: install-versioned-files install-global-files
+else
+install-extras: install-versioned-files
+endif
 
+#install files into xbuild's versioned locations
+install-versioned-files: install-bin-data install-nuget-imports
 
-install-extras: install-bin-data install-frameworks install-pcl-targets install-web-targets
+#install files that are only installed once across all xbuild versions
+install-global-files: install-frameworks install-web-targets install-pcl-targets install-pcl5-framework install-nuget-targets
 
 install-bin-data:
        $(MKINSTALLDIRS) $(DESTDIR)$(XBUILD_BIN_DIR)/MSBuild
        $(INSTALL_DATA) data/xbuild.rsp $(DESTDIR)$(XBUILD_BIN_DIR)
        $(INSTALL_DATA) data/$(XBUILD_VERSION)/Microsoft.Common.tasks $(DESTDIR)$(XBUILD_BIN_DIR)
        $(INSTALL_DATA) data/$(XBUILD_VERSION)/Microsoft.Common.targets $(DESTDIR)$(XBUILD_BIN_DIR)
+ifeq (14.0, $(XBUILD_VERSION))
+       $(INSTALL_DATA) data/$(XBUILD_VERSION)/Microsoft.Common.props $(DESTDIR)$(XBUILD_BIN_DIR)/../
+endif
        $(INSTALL_DATA) data/$(XBUILD_VERSION)/Microsoft.CSharp.targets $(DESTDIR)$(XBUILD_BIN_DIR)
        $(INSTALL_DATA) data/Microsoft.Build.xsd $(DESTDIR)$(XBUILD_BIN_DIR)
        $(INSTALL_DATA) data/Microsoft.VisualBasic.targets $(DESTDIR)$(XBUILD_BIN_DIR)
@@ -62,20 +79,16 @@ install-frameworks:
        $(INSTALL_DATA) frameworks/net_4.6.1.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.6.1/RedistList/FrameworkList.xml
 
 install-pcl-targets:
-       $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0
-       $(INSTALL_DATA) targets/Microsoft.Portable.Common.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0/Microsoft.Portable.Common.targets
-       $(INSTALL_DATA) targets/Microsoft.Portable.CSharp_4.0.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0/Microsoft.Portable.CSharp.targets
-       $(INSTALL_DATA) targets/Microsoft.Portable.VisualBasic_4.0.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0/Microsoft.Portable.VisualBasic.targets
-       $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5
-       $(INSTALL_DATA) targets/Microsoft.Portable.Common.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5/Microsoft.Portable.Common.targets
-       $(INSTALL_DATA) targets/Microsoft.Portable.CSharp_4.5.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5/Microsoft.Portable.CSharp.targets
-       $(INSTALL_DATA) targets/Microsoft.Portable.VisualBasic_4.5.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5/Microsoft.Portable.VisualBasic.targets
-       $(INSTALL_DATA) targets/Microsoft.Portable.Core.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/Microsoft.Portable.Core.targets
-       $(INSTALL_DATA) targets/Microsoft.Portable.Core.props $(DESTDIR)$(PORTABLE_TARGETS_DIR)/Microsoft.Portable.Core.props
-       $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.6
-       $(INSTALL_DATA) targets/Microsoft.Portable.Common.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.6/Microsoft.Portable.Common.targets
-       $(INSTALL_DATA) targets/Microsoft.Portable.CSharp_4.5.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.6/Microsoft.Portable.CSharp.targets
-       $(INSTALL_DATA) targets/Microsoft.Portable.VisualBasic_4.5.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.6/Microsoft.Portable.VisualBasic.targets
+       $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)
+       $(INSTALL_DATA) $(PORTABLE_TARGETS_SRC)/Microsoft.Portable.Core.props $(DESTDIR)$(PORTABLE_TARGETS_DIR)/Microsoft.Portable.Core.props
+       $(INSTALL_DATA) $(PORTABLE_TARGETS_SRC)/Microsoft.Portable.Core.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/Microsoft.Portable.Core.targets
+
+       for VERSION in v4.0 v4.5 v4.6 v5.0; do \
+               $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/$$VERSION; \
+               $(INSTALL_DATA) $(PORTABLE_TARGETS_SRC)/$$VERSION/Microsoft.Portable.Common.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/$$VERSION/Microsoft.Portable.Common.targets; \
+               $(INSTALL_DATA) $(PORTABLE_TARGETS_SRC)/$$VERSION/Microsoft.Portable.CSharp.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/$$VERSION/Microsoft.Portable.CSharp.targets; \
+               $(INSTALL_DATA) $(PORTABLE_TARGETS_SRC)/$$VERSION/Microsoft.Portable.VisualBasic.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/$$VERSION/Microsoft.Portable.VisualBasic.targets; \
+       done
 
 install-web-targets:
        $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v9.0/WebApplications
@@ -89,6 +102,31 @@ install-web-targets:
        $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v14.0/WebApplications
        $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v14.0/WebApplications
 
+NUGET_BUILDTASKS_REPO_DIR=$(topdir)/../external/nuget-buildtasks
+
+install-nuget-targets:
+       $(MKINSTALLDIRS) $(DESTDIR)$(NUGET_BUILDTASKS_TARGETS_DIR)
+       $(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets $(DESTDIR)$(NUGET_BUILDTASKS_TARGETS_DIR)
+       $(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.props $(DESTDIR)$(NUGET_BUILDTASKS_TARGETS_DIR)
+
+install-nuget-imports:
+ifeq (14.0, $(XBUILD_VERSION))
+       $(MKINSTALLDIRS) $(DESTDIR)$(XBUILD_BIN_DIR)/../Imports/Microsoft.Common.props/ImportBefore
+       $(MKINSTALLDIRS) $(DESTDIR)$(XBUILD_BIN_DIR)/../Microsoft.Common.targets/ImportAfter
+       $(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props $(DESTDIR)$(XBUILD_BIN_DIR)/../Imports/Microsoft.Common.props/ImportBefore
+       $(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets $(DESTDIR)$(XBUILD_BIN_DIR)/../Microsoft.Common.targets/ImportAfter
+endif
+
+# The .NETPortable,Version=v5.0 framework contains no assemblies, and essentially just fills the requirement
+# for a framework moniker. When using it, assemblies are provided by NuGet packages such as .NETStandard.Library
+install-pcl5-framework:
+       $(MKINSTALLDIRS) $(DESTDIR)$(PCL5_FX_DIR)/RedistList
+       $(INSTALL_DATA) $(PCL5_FX_SRC)/FrameworkList.xml $(DESTDIR)$(PCL5_FX_DIR)/RedistList/FrameworkList.xml
+
+       $(MKINSTALLDIRS) $(DESTDIR)$(PCL5_FX_DIR)/SupportedFrameworks
+       $(INSTALL_DATA) "$(PCL5_FX_SRC)/.NET Framework 4.6.xml" "$(DESTDIR)$(PCL5_FX_DIR)/SupportedFrameworks/.NET Framework 4.6.xml"
+       $(INSTALL_DATA) "$(PCL5_FX_SRC)/ASP.NET Core 1.0.xml" "$(DESTDIR)$(PCL5_FX_DIR)/SupportedFrameworks/ASP.NET Core 1.0.xml"
+       $(INSTALL_DATA) "$(PCL5_FX_SRC)/Windows Universal 10.0.xml" "$(DESTDIR)$(PCL5_FX_DIR)/SupportedFrameworks/Windows Universal 10.0.xml"
 
 EXTRA_DISTFILES = \
        data/xbuild.rsp \
@@ -104,6 +142,7 @@ EXTRA_DISTFILES = \
        data/4.0/Microsoft.Common.targets \
        data/12.0/Microsoft.Common.targets \
        data/14.0/Microsoft.Common.targets \
+       data/14.0/Microsoft.Common.props \
        data/2.0/Microsoft.CSharp.targets \
        data/3.5/Microsoft.CSharp.targets \
        data/4.0/Microsoft.CSharp.targets \
@@ -122,13 +161,9 @@ EXTRA_DISTFILES = \
        frameworks/net_4.5.2.xml \
        frameworks/net_4.6.xml \
        frameworks/net_4.6.1.xml \
-       targets/Microsoft.Portable.CSharp_4.0.targets \
-       targets/Microsoft.Portable.CSharp_4.5.targets \
-       targets/Microsoft.Portable.VisualBasic_4.0.targets \
-       targets/Microsoft.Portable.VisualBasic_4.5.targets \
-       targets/Microsoft.Portable.Common.targets \
-       targets/Microsoft.Portable.Core.targets \
-       targets/Microsoft.Portable.Core.props \
-       targets/Microsoft.WebApplication.targets \
+       $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props       \
+       $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets      \
+       $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets \
+       $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.props \
        xbuild.make \
        xbuild_test.make
index fb80dbc9454704e74412435730aa359801d8154b..ffe1f63b83831bf76308f05d066a6bcd62b5828e 100644 (file)
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" InitialTargets="_CheckForInvalidConfigurationAndPlatform" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
        <PropertyGroup>
                <ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
                <ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
                <_OriginalPlatform>$(Platform)</_OriginalPlatform>
                <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
                <PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
+       </PropertyGroup>
 
+       <!-- in MSBuild, these properties are set in a separate file that is only imported for .NETFramework -->
+       <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
                <AddAdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == ''">true</AddAdditionalExplicitAssemblyReferences>
                <AdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == 'true' and '$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0'">System.Core;$(AdditionalExplicitAssemblyReferences)</AdditionalExplicitAssemblyReferences>
        </PropertyGroup>
@@ -90,7 +93,7 @@
                <TargetingClr2Framework Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5')">true</TargetingClr2Framework>
        </PropertyGroup>
 
-       <Target Name="_ValidateEssentialProperties">
+       <Target Name="_CheckForInvalidConfigurationAndPlatform">
                <Error Condition=" '$(OutputPath)' == '' and '$(SkipInvalidConfigurations)' != 'true'"
                        Text="'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: $(_OriginalConfiguration) Platform: $(_OriginalPlatform)."/>
 
diff --git a/mcs/tools/xbuild/data/14.0/Microsoft.Common.props b/mcs/tools/xbuild/data/14.0/Microsoft.Common.props
new file mode 100644 (file)
index 0000000..6c4d33c
--- /dev/null
@@ -0,0 +1,16 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+       <PropertyGroup>
+               <ImportByWildcardBeforeMicrosoftCommonProps Condition="'$(ImportByWildcardBeforeMicrosoftCommonProps)' == ''">true</ImportByWildcardBeforeMicrosoftCommonProps>
+               <ImportByWildcardAfterMicrosoftCommonProps Condition="'$(ImportByWildcardAfterMicrosoftCommonProps)' == ''">true</ImportByWildcardAfterMicrosoftCommonProps>
+       </PropertyGroup>
+
+       <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore\*"
+               Condition="'$(ImportByWildcardBeforeMicrosoftCommonProps)' == 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore')"/>
+
+       <PropertyGroup>
+               <MicrosoftCommonPropsHasBeenImported>true</MicrosoftCommonPropsHasBeenImported>
+       </PropertyGroup>
+
+       <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter\*"
+               Condition="'$(ImportByWildcardAfterMicrosoftCommonProps)' == 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter')"/>
+</Project>
index bea93366ec988a3bffd8a9cc9d7ed18049147b22..433cffe8e69a8bfb86808755e4bfa26911c7d77a 100644 (file)
@@ -1,4 +1,6 @@
-<Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" InitialTargets="_CheckForInvalidConfigurationAndPlatform" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+       <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="'$(MicrosoftCommonPropsHasBeenImported)' != 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+
        <PropertyGroup>
                <ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
                <ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
                <_OriginalPlatform>$(Platform)</_OriginalPlatform>
                <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
                <PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
+       </PropertyGroup>
 
+       <!-- in MSBuild, these properties are set in a separate file that is only imported for .NETFramework -->
+       <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
                <AddAdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == ''">true</AddAdditionalExplicitAssemblyReferences>
                <AdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == 'true' and '$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0'">System.Core;$(AdditionalExplicitAssemblyReferences)</AdditionalExplicitAssemblyReferences>
        </PropertyGroup>
@@ -90,7 +95,7 @@
                <TargetingClr2Framework Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5')">true</TargetingClr2Framework>
        </PropertyGroup>
 
-       <Target Name="_ValidateEssentialProperties">
+       <Target Name="_CheckForInvalidConfigurationAndPlatform">
                <Error Condition=" '$(OutputPath)' == '' and '$(SkipInvalidConfigurations)' != 'true'"
                        Text="'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: $(_OriginalConfiguration) Platform: $(_OriginalPlatform)."/>
 
index e260aa1ac30524b8efc87db8221f95d80fff60dc..152dd2b985e906f5ed3e6ac13142dd6e90198390 100644 (file)
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" InitialTargets="_CheckForInvalidConfigurationAndPlatform" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
        <PropertyGroup>
                <ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
                <ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
                <_OriginalPlatform>$(Platform)</_OriginalPlatform>
                <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
                <PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
+       </PropertyGroup>
 
+       <!-- in MSBuild, these properties are set in a separate file that is only imported for .NETFramework -->
+       <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
                <AddAdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == ''">true</AddAdditionalExplicitAssemblyReferences>
                <AdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == 'true' and '$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0'">System.Core;$(AdditionalExplicitAssemblyReferences)</AdditionalExplicitAssemblyReferences>
        </PropertyGroup>
@@ -90,7 +93,7 @@
                <TargetingClr2Framework Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5')">true</TargetingClr2Framework>
        </PropertyGroup>
 
-       <Target Name="_ValidateEssentialProperties">
+       <Target Name="_CheckForInvalidConfigurationAndPlatform">
                <Error Condition=" '$(OutputPath)' == '' and '$(SkipInvalidConfigurations)' != 'true'"
                        Text="'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: $(_OriginalConfiguration) Platform: $(_OriginalPlatform)."/>
 
diff --git a/mcs/tools/xbuild/targets/Microsoft.Portable.CSharp_4.0.targets b/mcs/tools/xbuild/targets/Microsoft.Portable.CSharp_4.0.targets
deleted file mode 100644 (file)
index 36bc56e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       <Import Project="..\Microsoft.Portable.Core.props" />
-       <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-       <Import Project="..\Microsoft.Portable.Core.targets" />
-</Project>
diff --git a/mcs/tools/xbuild/targets/Microsoft.Portable.CSharp_4.5.targets b/mcs/tools/xbuild/targets/Microsoft.Portable.CSharp_4.5.targets
deleted file mode 100644 (file)
index 36bc56e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       <Import Project="..\Microsoft.Portable.Core.props" />
-       <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-       <Import Project="..\Microsoft.Portable.Core.targets" />
-</Project>
diff --git a/mcs/tools/xbuild/targets/Microsoft.Portable.Common.targets b/mcs/tools/xbuild/targets/Microsoft.Portable.Common.targets
deleted file mode 100644 (file)
index 82bea1e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       <Import Project="..\Microsoft.Portable.Core.props" />
-       <Import Project="..\Microsoft.Portable.Core.targets" />
-</Project>
diff --git a/mcs/tools/xbuild/targets/Microsoft.Portable.Core.props b/mcs/tools/xbuild/targets/Microsoft.Portable.Core.props
deleted file mode 100644 (file)
index 4bf2d9c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       <PropertyGroup>
-               <AvailablePlatforms>Any CPU</AvailablePlatforms>
-
-               <TargetPlatformIdentifier>Portable</TargetPlatformIdentifier>
-               <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
-               <TargetFrameworkMonikerDisplayName>.NET Portable Subset</TargetFrameworkMonikerDisplayName>
-
-               <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
-               <NoStdLib>true</NoStdLib>
-
-               <ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework>
-       </PropertyGroup>
-</Project>
diff --git a/mcs/tools/xbuild/targets/Microsoft.Portable.Core.targets b/mcs/tools/xbuild/targets/Microsoft.Portable.Core.targets
deleted file mode 100644 (file)
index 5ca4483..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       <PropertyGroup>
-               <ResolveReferencesDependsOn>
-                       $(ResolveReferencesDependsOn);
-                       ImplicitlyExpandTargetFramework;
-               </ResolveReferencesDependsOn>
-
-               <ImplicitlyExpandTargetFrameworkDependsOn>
-                       $(ImplicitlyExpandTargetFrameworkDependsOn);
-                       GetReferenceAssemblyPaths
-               </ImplicitlyExpandTargetFrameworkDependsOn>
-       </PropertyGroup>
-
-       <Target Name="ImplicitlyExpandTargetFramework"
-               Condition="'$(ImplicitlyExpandTargetFramework)' == 'true'"
-               DependsOnTargets="$(ImplicitlyExpandTargetFrameworkDependsOn)">
-
-               <ItemGroup>
-                       <ReferenceAssemblyPaths Include="$(_TargetFrameworkDirectories)"/>
-                       <ReferencePath Include="%(ReferenceAssemblyPaths.Identity)\*.dll">
-                               <CopyLocal>false</CopyLocal>
-                               <ResolvedFrom>ImplicitlyExpandTargetFramework</ResolvedFrom>
-                               <IsSystemReference>True</IsSystemReference>
-                       </ReferencePath>
-               </ItemGroup>
-       </Target>
-
-</Project>
diff --git a/mcs/tools/xbuild/targets/Microsoft.Portable.VisualBasic_4.0.targets b/mcs/tools/xbuild/targets/Microsoft.Portable.VisualBasic_4.0.targets
deleted file mode 100644 (file)
index bf58fee..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       <Import Project="..\Microsoft.Portable.Core.props" />
-       <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
-       <Import Project="..\Microsoft.Portable.Core.targets" />
-</Project>
diff --git a/mcs/tools/xbuild/targets/Microsoft.Portable.VisualBasic_4.5.targets b/mcs/tools/xbuild/targets/Microsoft.Portable.VisualBasic_4.5.targets
deleted file mode 100644 (file)
index bf58fee..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       <Import Project="..\Microsoft.Portable.Core.props" />
-       <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
-       <Import Project="..\Microsoft.Portable.Core.targets" />
-</Project>
index 087e3f3008721786750ca531e3487a87aa994907..c8ef14eaeed3dd86d814920839c14dc6ddd56398 100644 (file)
 <opcode name="mono_calli_extra_arg" input="VarPop" output="VarPush" args="InlineSig" o1="0xF0" o2="0x18" flow="call" />
 <opcode name="mono_lddomain" input="Pop0" output="PushI" args="InlineNone" o1="0xF0" o2="0x19" flow="next" />
 <opcode name="mono_atomic_store_i4" input="PopI+PopI" output="Push0" args="InlineI" o1="0xF0" o2="0x1A" flow="next" />
+<opcode name="mono_get_last_error" input="Pop0" output="PushI" args="InlineNone" o1="0xF0" o2="0x1B" flow="next" />
 </opdesc>
index ee69b699ba6797fb7f53a0f2599e650a0983198f..fca2448151a9771b1a91e6fed9d4b130147559b1 100644 (file)
@@ -319,6 +319,7 @@ OPDEF(CEE_MONO_LDPTR_NURSERY_BITS, "mono_ldptr_nursery_bits", Pop0, PushI, Inlin
 OPDEF(CEE_MONO_CALLI_EXTRA_ARG, "mono_calli_extra_arg", VarPop, VarPush, InlineSig, X, 2, 0xF0, 0x18, CALL)
 OPDEF(CEE_MONO_LDDOMAIN, "mono_lddomain", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x19, NEXT)
 OPDEF(CEE_MONO_ATOMIC_STORE_I4, "mono_atomic_store_i4", PopI+PopI, Push0, InlineI, X, 2, 0xF0, 0x1A, NEXT)
+OPDEF(CEE_MONO_GET_LAST_ERROR, "mono_get_last_error", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x1B, NEXT)
 #ifndef OPALIAS
 #define _MONO_CIL_OPALIAS_DEFINED_
 #define OPALIAS(a,s,r)
index d1b85c5509abb7c864ff51ac4b92202f38dc5475..1af061c383ad8b58abc1d42a636c8b4de55d26b1 100644 (file)
@@ -1617,7 +1617,7 @@ struct {
  *
  * Disassembles the @file file.
  */
-static void
+static int
 disassemble_file (const char *file)
 {
        MonoImageOpenStatus status;
@@ -1626,7 +1626,7 @@ disassemble_file (const char *file)
        img = mono_image_open (file, &status);
        if (!img) {
                fprintf (stderr, "Error while trying to process %s\n", file);
-               return;
+               return 1;
        } else {
                /* FIXME: is this call necessary? */
                mono_assembly_load_from_full (img, file, &status, FALSE);
@@ -1659,6 +1659,7 @@ disassemble_file (const char *file)
        }
        
        mono_image_close (img);
+       return 0;
 }
 
 typedef struct {
@@ -2028,12 +2029,14 @@ main (int argc, char *argv [])
 
                mono_install_assembly_preload_hook (monodis_preload, GUINT_TO_POINTER (FALSE));
 
-               disassemble_file (filename);
+               return disassemble_file (filename);
        } else {
                mono_init (argv [0]);
 
+               i = 0;
                for (l = input_files; l; l = l->next)
-                       disassemble_file ((const char *)l->data);
+                       if (disassemble_file ((const char *)l->data) == 1) i = 1;
+               return i;
        }
 
        return 0;
index fd819424978689f7d5fea4e464f58615f461498c..54e2dde02a1847550cdff9d4162ed58ef6e41630 100644 (file)
@@ -15,7 +15,6 @@ OTHER_H = \
        context.h       \
        error.h         \
        events.h        \
-       handles.h       \
        io.h            \
        io-trace.h      \
        io-layer.h      \
@@ -46,9 +45,6 @@ OTHER_SRC = \
        events.c                \
        events.h                \
        event-private.h         \
-       handles.c               \
-       handles.h               \
-       handles-private.h       \
        io.c                    \
        io.h                    \
        io-portability.c        \
@@ -93,6 +89,7 @@ OTHER_SRC = \
        wapi_glob.c             \
        wapi.h                  \
        wapi-private.h          \
+       wapi.c          \
        wthreads.c
 
 
index 6d40dd3b5cc2a7d37bb0f7ef91a40412fd701f1c..db128be5c72a6c3948f3056f915c02284e5461ca 100644 (file)
 #include <errno.h>
 
 #include "mono/io-layer/wapi.h"
+#include "mono/io-layer/wapi-private.h"
 #include "mono/utils/mono-once.h"
 
 static pthread_key_t error_key;
 static mono_once_t error_key_once=MONO_ONCE_INIT;
-extern gboolean _wapi_has_shut_down;
 
 static void error_init(void)
 {
index 25df9111656ffc62227021b5aa8f01884a41935c..07b35e0c2f9b48451227ff2822a5886d3158675c 100644 (file)
 #include <glib.h>
 #include <pthread.h>
 
-extern struct _WapiHandleOps _wapi_event_ops;
-extern struct _WapiHandleOps _wapi_namedevent_ops;
-
-extern void _wapi_event_details (gpointer handle_info);
+#include "wapi-private.h"
 
 struct _WapiHandle_event
 {
@@ -27,9 +24,11 @@ struct _WapiHandle_event
 
 struct _WapiHandle_namedevent
 {
+       struct _WapiHandle_event e;
        WapiSharedNamespace sharedns;
-       gboolean manual;
-       guint32 set_count;
 };
 
+void
+_wapi_event_init (void);
+
 #endif /* _WAPI_EVENT_PRIVATE_H_ */
index 723982cc3934b78400c736ceed5b7ac1aa086c80..8e3fa4a0394e1a69a31b8bbeb6888217aaf56027 100644 (file)
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/event-private.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-once.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
 
 static void event_signal(gpointer handle);
 static gboolean event_own (gpointer handle);
+static void event_details (gpointer data);
+static const gchar* event_typename (void);
+static gsize event_typesize (void);
 
 static void namedevent_signal (gpointer handle);
 static gboolean namedevent_own (gpointer handle);
+static void namedevent_details (gpointer data);
+static const gchar* namedevent_typename (void);
+static gsize namedevent_typesize (void);
 
-struct _WapiHandleOps _wapi_event_ops = {
+static MonoW32HandleOps _wapi_event_ops = {
        NULL,                   /* close */
        event_signal,           /* signal */
        event_own,              /* own */
        NULL,                   /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       NULL,                   /* prewait */
+       event_details,  /* details */
+       event_typename, /* typename */
+       event_typesize, /* typesize */
 };
 
-struct _WapiHandleOps _wapi_namedevent_ops = {
+static MonoW32HandleOps _wapi_namedevent_ops = {
        NULL,                   /* close */
        namedevent_signal,      /* signal */
        namedevent_own,         /* own */
        NULL,                   /* is_owned */
+       NULL,                   /* special_wait */
+       NULL,                   /* prewait */
+       namedevent_details,     /* details */
+       namedevent_typename, /* typename */
+       namedevent_typesize, /* typesize */
 };
 
-static gboolean event_pulse (gpointer handle);
-static gboolean event_reset (gpointer handle);
-static gboolean event_set (gpointer handle);
+void
+_wapi_event_init (void)
+{
+       mono_w32handle_register_ops (MONO_W32HANDLE_EVENT,      &_wapi_event_ops);
+       mono_w32handle_register_ops (MONO_W32HANDLE_NAMEDEVENT, &_wapi_namedevent_ops);
 
-static gboolean namedevent_pulse (gpointer handle);
-static gboolean namedevent_reset (gpointer handle);
-static gboolean namedevent_set (gpointer handle);
+       mono_w32handle_register_capabilities (MONO_W32HANDLE_EVENT,
+               (MonoW32HandleCapability)(MONO_W32HANDLE_CAP_WAIT | MONO_W32HANDLE_CAP_SIGNAL));
+       mono_w32handle_register_capabilities (MONO_W32HANDLE_NAMEDEVENT,
+               (MonoW32HandleCapability)(MONO_W32HANDLE_CAP_WAIT | MONO_W32HANDLE_CAP_SIGNAL));
+}
 
-static struct
+static const char* event_handle_type_to_string (MonoW32HandleType type)
 {
-       gboolean (*pulse)(gpointer handle);
-       gboolean (*reset)(gpointer handle);
-       gboolean (*set)(gpointer handle);
-} event_ops[WAPI_HANDLE_COUNT] = {
-               {NULL},
-               {NULL},
-               {NULL},
-               {NULL},
-               {NULL},
-               {NULL},
-               {event_pulse, event_reset, event_set},
-               {NULL},
-               {NULL},
-               {NULL},
-               {NULL},
-               {NULL},
-               {NULL},
-               {namedevent_pulse, namedevent_reset, namedevent_set},
-};
+       switch (type) {
+       case MONO_W32HANDLE_EVENT: return "event";
+       case MONO_W32HANDLE_NAMEDEVENT: return "named event";
+       default:
+               g_assert_not_reached ();
+       }
+}
 
-void _wapi_event_details (gpointer handle_info)
+static gboolean event_handle_own (gpointer handle, MonoW32HandleType type)
 {
-       struct _WapiHandle_event *event = (struct _WapiHandle_event *)handle_info;
-       
-       g_print ("manual: %s", event->manual?"TRUE":"FALSE");
-}
+       struct _WapiHandle_event *event_handle;
+       gboolean ok;
 
-static mono_once_t event_ops_once=MONO_ONCE_INIT;
+       ok = mono_w32handle_lookup (handle, type, (gpointer *)&event_handle);
+       if (!ok) {
+               g_warning ("%s: error looking up %s handle %p",
+                       __func__, event_handle_type_to_string (type), handle);
+               return FALSE;
+       }
 
-static void event_ops_init (void)
-{
-       _wapi_handle_register_capabilities (WAPI_HANDLE_EVENT,
-               (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SIGNAL));
-       _wapi_handle_register_capabilities (WAPI_HANDLE_NAMEDEVENT,
-               (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SIGNAL));
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p",
+               __func__, event_handle_type_to_string (type), handle);
+
+       if (!event_handle->manual) {
+               g_assert (event_handle->set_count > 0);
+               event_handle->set_count --;
+
+               if (event_handle->set_count == 0)
+                       mono_w32handle_set_signal_state (handle, FALSE, FALSE);
+       }
+
+       return TRUE;
 }
 
 static void event_signal(gpointer handle)
@@ -96,28 +111,7 @@ static void event_signal(gpointer handle)
 
 static gboolean event_own (gpointer handle)
 {
-       struct _WapiHandle_event *event_handle;
-       gboolean ok;
-       
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_EVENT,
-                               (gpointer *)&event_handle);
-       if(ok==FALSE) {
-               g_warning ("%s: error looking up event handle %p", __func__,
-                          handle);
-               return (FALSE);
-       }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning event handle %p", __func__, handle);
-
-       if(event_handle->manual==FALSE) {
-               g_assert (event_handle->set_count > 0);
-               
-               if (--event_handle->set_count == 0) {
-                       _wapi_handle_set_signal_state (handle, FALSE, FALSE);
-               }
-       }
-
-       return(TRUE);
+       return event_handle_own (handle, MONO_W32HANDLE_EVENT);
 }
 
 static void namedevent_signal (gpointer handle)
@@ -128,181 +122,124 @@ static void namedevent_signal (gpointer handle)
 /* NB, always called with the shared handle lock held */
 static gboolean namedevent_own (gpointer handle)
 {
-       struct _WapiHandle_namedevent *namedevent_handle;
-       gboolean ok;
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning named event handle %p", __func__, handle);
+       return event_handle_own (handle, MONO_W32HANDLE_NAMEDEVENT);
+}
 
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDEVENT,
-                                 (gpointer *)&namedevent_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up named event handle %p",
-                          __func__, handle);
-               return(FALSE);
-       }
-       
-       if (namedevent_handle->manual == FALSE) {
-               g_assert (namedevent_handle->set_count > 0);
-               
-               if (--namedevent_handle->set_count == 0) {
-                       _wapi_shared_handle_set_signal_state (handle, FALSE);
-               }
-       }
-       
-       return (TRUE);
+static void event_details (gpointer data)
+{
+       struct _WapiHandle_event *event = (struct _WapiHandle_event *)data;
+       g_print ("manual: %s, set_count: %d",
+               event->manual ? "TRUE" : "FALSE", event->set_count);
 }
-static gpointer event_create (WapiSecurityAttributes *security G_GNUC_UNUSED,
-                             gboolean manual, gboolean initial)
+
+static void namedevent_details (gpointer data)
+{
+       struct _WapiHandle_namedevent *namedevent = (struct _WapiHandle_namedevent *)data;
+       g_print ("manual: %s, set_count: %d, name: \"%s\"",
+               namedevent->e.manual ? "TRUE" : "FALSE", namedevent->e.set_count, namedevent->sharedns.name);
+}
+
+static const gchar* event_typename (void)
+{
+       return "Event";
+}
+
+static gsize event_typesize (void)
+{
+       return sizeof (struct _WapiHandle_event);
+}
+
+static const gchar* namedevent_typename (void)
+{
+       return "N.Event";
+}
+
+static gsize namedevent_typesize (void)
+{
+       return sizeof (struct _WapiHandle_namedevent);
+}
+
+static gpointer event_handle_create (struct _WapiHandle_event *event_handle, MonoW32HandleType type, gboolean manual, gboolean initial)
 {
-       struct _WapiHandle_event event_handle = {0};
        gpointer handle;
        int thr_ret;
-       
-       /* Need to blow away any old errors here, because code tests
-        * for ERROR_ALREADY_EXISTS on success (!) to see if an event
-        * was freshly created
-        */
-       SetLastError (ERROR_SUCCESS);
 
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating unnamed event", __func__);
-       
-       event_handle.manual = manual;
-       event_handle.set_count = 0;
+       event_handle->manual = manual;
+       event_handle->set_count = (initial && !manual) ? 1 : 0;
 
-       if (initial == TRUE) {
-               if (manual == FALSE) {
-                       event_handle.set_count = 1;
-               }
-       }
-       
-       handle = _wapi_handle_new (WAPI_HANDLE_EVENT, &event_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error creating event handle", __func__);
+       handle = mono_w32handle_new (type, event_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
+               g_warning ("%s: error creating %s handle",
+                       __func__, event_handle_type_to_string (type));
                SetLastError (ERROR_GEN_FAILURE);
-               return(NULL);
+               return NULL;
        }
 
-       thr_ret = _wapi_handle_lock_handle (handle);
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
-       
-       if (initial == TRUE) {
-               _wapi_handle_set_signal_state (handle, TRUE, FALSE);
-       }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created new event handle %p", __func__, handle);
 
-       thr_ret = _wapi_handle_unlock_handle (handle);
+       if (initial)
+               mono_w32handle_set_signal_state (handle, TRUE, FALSE);
+
+       thr_ret = mono_w32handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
 
-       return(handle);
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
+               __func__, event_handle_type_to_string (type), handle);
+
+       return handle;
 }
 
-static gpointer namedevent_create (WapiSecurityAttributes *security G_GNUC_UNUSED,
-                                  gboolean manual, gboolean initial,
-                                  const gunichar2 *name G_GNUC_UNUSED)
+static gpointer event_create (gboolean manual, gboolean initial)
+{
+       struct _WapiHandle_event event_handle;
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
+               __func__, event_handle_type_to_string (MONO_W32HANDLE_EVENT));
+       return event_handle_create (&event_handle, MONO_W32HANDLE_EVENT, manual, initial);
+}
+
+static gpointer namedevent_create (gboolean manual, gboolean initial, const gunichar2 *name G_GNUC_UNUSED)
 {
-       struct _WapiHandle_namedevent namedevent_handle = {{{0}}, 0};
        gpointer handle;
        gchar *utf8_name;
        int thr_ret;
-       gpointer ret = NULL;
-       guint32 namelen;
-       gint32 offset;
-       
-       /* w32 seems to guarantee that opening named objects can't
-        * race each other
-        */
+
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
+               __func__, event_handle_type_to_string (MONO_W32HANDLE_NAMEDEVENT));
+
+       /* w32 seems to guarantee that opening named objects can't race each other */
        thr_ret = _wapi_namespace_lock ();
        g_assert (thr_ret == 0);
 
-       /* Need to blow away any old errors here, because code tests
-        * for ERROR_ALREADY_EXISTS on success (!) to see if an event
-        * was freshly created
-        */
-       SetLastError (ERROR_SUCCESS);
-       
        utf8_name = g_utf16_to_utf8 (name, -1, NULL, NULL, NULL);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating named event [%s]", __func__, utf8_name);
-       
-       offset = _wapi_search_handle_namespace (WAPI_HANDLE_NAMEDEVENT,
-                                               utf8_name);
-       if (offset == -1) {
-               /* The name has already been used for a different
-                * object.
-                */
+
+       handle = _wapi_search_handle_namespace (MONO_W32HANDLE_NAMEDEVENT, utf8_name);
+       if (handle == INVALID_HANDLE_VALUE) {
+               /* The name has already been used for a different object. */
+               handle = NULL;
                SetLastError (ERROR_INVALID_HANDLE);
-               goto cleanup;
-       } else if (offset != 0) {
-               /* Not an error, but this is how the caller is
-                * informed that the event wasn't freshly created
-                */
+       } else if (handle) {
+               /* Not an error, but this is how the caller is informed that the event wasn't freshly created */
                SetLastError (ERROR_ALREADY_EXISTS);
-       }
-       /* Fall through to create the event handle. */
 
-       if (offset == 0) {
-               /* A new named event, so create both the private and
-                * shared parts
-                */
-       
-               if (strlen (utf8_name) < MAX_PATH) {
-                       namelen = strlen (utf8_name);
-               } else {
-                       namelen = MAX_PATH;
-               }
-       
-               memcpy (&namedevent_handle.sharedns.name, utf8_name, namelen);
-
-               namedevent_handle.manual = manual;
-               namedevent_handle.set_count = 0;
-               
-               if (initial == TRUE) {
-                       if (manual == FALSE) {
-                               namedevent_handle.set_count = 1;
-                       }
-               }
-               
-               handle = _wapi_handle_new (WAPI_HANDLE_NAMEDEVENT,
-                                          &namedevent_handle);
+               /* this is used as creating a new handle */
+               mono_w32handle_ref (handle);
        } else {
-               /* A new reference to an existing named event, so just
-                * create the private part
-                */
-               handle = _wapi_handle_new_from_offset (WAPI_HANDLE_NAMEDEVENT,
-                                                      offset, TRUE);
-       }
-       
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error creating event handle", __func__);
-               SetLastError (ERROR_GEN_FAILURE);
-               goto cleanup;
-       }
-       ret = handle;
+               /* A new named event */
+               struct _WapiHandle_namedevent namedevent_handle;
 
-       if (offset == 0) {
-               /* Set the initial state, as this is a completely new
-                * handle
-                */
-               thr_ret = _wapi_handle_lock_shared_handles ();
-               g_assert (thr_ret == 0);
-       
-               if (initial == TRUE) {
-                       _wapi_shared_handle_set_signal_state (handle, TRUE);
-               }
+               strncpy (&namedevent_handle.sharedns.name [0], utf8_name, MAX_PATH);
+               namedevent_handle.sharedns.name [MAX_PATH] = '\0';
 
-               _wapi_handle_unlock_shared_handles ();
+               handle = event_handle_create ((struct _WapiHandle_event*) &namedevent_handle, MONO_W32HANDLE_NAMEDEVENT, manual, initial);
        }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: returning event handle %p", __func__, handle);
 
-cleanup:
        g_free (utf8_name);
 
-       _wapi_namespace_unlock (NULL);
-       
-       return(ret);
+       thr_ret = _wapi_namespace_unlock (NULL);
+       g_assert (thr_ret == 0);
 
+       return handle;
 }
 
 
@@ -330,125 +267,13 @@ gpointer CreateEvent(WapiSecurityAttributes *security G_GNUC_UNUSED,
                     gboolean manual, gboolean initial,
                     const gunichar2 *name G_GNUC_UNUSED)
 {
-       mono_once (&event_ops_once, event_ops_init);
-
-       if (name == NULL) {
-               return(event_create (security, manual, initial));
-       } else {
-               return(namedevent_create (security, manual, initial, name));
-       }
-}
-
-static gboolean event_pulse (gpointer handle)
-{
-       struct _WapiHandle_event *event_handle;
-       gboolean ok;
-       int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_EVENT,
-                                 (gpointer *)&event_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up event handle %p", __func__,
-                          handle);
-               return(FALSE);
-       }
-       
-       thr_ret = _wapi_handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Pulsing event handle %p", __func__, handle);
-
-       if (event_handle->manual == TRUE) {
-               _wapi_handle_set_signal_state (handle, TRUE, TRUE);
-       } else {
-               event_handle->set_count = 1;
-               _wapi_handle_set_signal_state (handle, TRUE, FALSE);
-       }
-
-       thr_ret = _wapi_handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
-       
-       if (event_handle->manual == TRUE) {
-               /* For a manual-reset event, we're about to try and
-                * get the handle lock again, so give other threads a
-                * chance
-                */
-               sched_yield ();
-
-               /* Reset the handle signal state */
-               /* I'm not sure whether or not we need a barrier here
-                * to make sure that all threads waiting on the event
-                * have proceeded.  Currently we rely on broadcasting
-                * a condition.
-                */
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Obtained write lock on event handle %p",
-                          __func__, handle);
-
-               thr_ret = _wapi_handle_lock_handle (handle);
-               g_assert (thr_ret == 0);
-               
-               _wapi_handle_set_signal_state (handle, FALSE, FALSE);
-
-               thr_ret = _wapi_handle_unlock_handle (handle);
-               g_assert (thr_ret == 0);
-       }
-
-       return(TRUE);
-}
-
-static gboolean namedevent_pulse (gpointer handle)
-{
-       struct _WapiHandle_namedevent *namedevent_handle;
-       gboolean ok;
-       int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDEVENT,
-                                 (gpointer *)&namedevent_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up named event handle %p",
-                          __func__, handle);
-               return(FALSE);
-       }
-       
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Pulsing named event handle %p", __func__, handle);
-
-       if (namedevent_handle->manual == TRUE) {
-               _wapi_shared_handle_set_signal_state (handle, TRUE);
-       } else {
-               namedevent_handle->set_count = 1;
-               _wapi_shared_handle_set_signal_state (handle, TRUE);
-       }
-
-       _wapi_handle_unlock_shared_handles ();
-       
-       if (namedevent_handle->manual == TRUE) {
-               /* For a manual-reset event, we're about to try and
-                * get the handle lock again, so give other processes
-                * a chance
-                */
-               _wapi_handle_spin (200);
-
-               /* Reset the handle signal state */
-               /* I'm not sure whether or not we need a barrier here
-                * to make sure that all threads waiting on the event
-                * have proceeded.  Currently we rely on waiting for
-                * twice the shared handle poll interval.
-                */
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Obtained write lock on event handle %p",
-                          __func__, handle);
-
-               thr_ret = _wapi_handle_lock_shared_handles ();
-               g_assert (thr_ret == 0);
-               
-               _wapi_shared_handle_set_signal_state (handle, FALSE);
-
-               _wapi_handle_unlock_shared_handles ();
-       }
+       /* Need to blow away any old errors here, because code tests
+        * for ERROR_ALREADY_EXISTS on success (!) to see if an event
+        * was freshly created
+        */
+       SetLastError (ERROR_SUCCESS);
 
-       return(TRUE);
+       return name ? namedevent_create (manual, initial, name) : event_create (manual, initial);
 }
 
 /**
@@ -468,94 +293,65 @@ static gboolean namedevent_pulse (gpointer handle)
  */
 gboolean PulseEvent(gpointer handle)
 {
-       WapiHandleType type;
-       
+       MonoW32HandleType type;
+       struct _WapiHandle_event *event_handle;
+       int thr_ret;
+
        if (handle == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
                return(FALSE);
        }
-       
-       type = _wapi_handle_type (handle);
-       
-       if (event_ops[type].pulse == NULL) {
+
+       switch (type = mono_w32handle_get_type (handle)) {
+       case MONO_W32HANDLE_EVENT:
+       case MONO_W32HANDLE_NAMEDEVENT:
+               break;
+       default:
                SetLastError (ERROR_INVALID_HANDLE);
-               return(FALSE);
+               return FALSE;
        }
-       
-       return(event_ops[type].pulse (handle));
-}
 
-static gboolean event_reset (gpointer handle)
-{
-       struct _WapiHandle_event *event_handle;
-       gboolean ok;
-       int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_EVENT,
-                                 (gpointer *)&event_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up event handle %p",
-                          __func__, handle);
-               return(FALSE);
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&event_handle)) {
+               g_warning ("%s: error looking up %s handle %p",
+                       __func__, event_handle_type_to_string (type), handle);
+               return FALSE;
        }
 
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Resetting event handle %p", __func__, handle);
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: pulsing %s handle %p",
+               __func__, event_handle_type_to_string (type), handle);
 
-       thr_ret = _wapi_handle_lock_handle (handle);
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
-       
-       if (_wapi_handle_issignalled (handle) == FALSE) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: No need to reset event handle %p", __func__,
-                          handle);
+
+       if (!event_handle->manual) {
+               event_handle->set_count = 1;
+               mono_w32handle_set_signal_state (handle, TRUE, FALSE);
        } else {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Obtained write lock on event handle %p",
-                          __func__, handle);
+               mono_w32handle_set_signal_state (handle, TRUE, TRUE);
 
-               _wapi_handle_set_signal_state (handle, FALSE, FALSE);
-       }
-       
-       event_handle->set_count = 0;
-       
-       thr_ret = _wapi_handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
-       
-       return(TRUE);
-}
+               thr_ret = mono_w32handle_unlock_handle (handle);
+               g_assert (thr_ret == 0);
 
-static gboolean namedevent_reset (gpointer handle)
-{
-       struct _WapiHandle_namedevent *namedevent_handle;
-       gboolean ok;
-       int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDEVENT,
-                                 (gpointer *)&namedevent_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up named event handle %p",
-                          __func__, handle);
-               return(FALSE);
-       }
+               /* For a manual-reset event, we're about to try and get the handle
+                * lock again, so give other threads a chance */
+               sched_yield ();
 
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Resetting named event handle %p", __func__, handle);
+               /* Reset the handle signal state */
 
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-       
-       if (_wapi_handle_issignalled (handle) == FALSE) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: No need to reset named event handle %p",
-                          __func__, handle);
-       } else {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Obtained write lock on named event handle %p",
-                          __func__, handle);
+               /* I'm not sure whether or not we need a barrier here to make sure
+                * that all threads waiting on the event have proceeded. Currently
+                * we rely on broadcasting a condition. */
 
-               _wapi_shared_handle_set_signal_state (handle, FALSE);
+               thr_ret = mono_w32handle_lock_handle (handle);
+               g_assert (thr_ret == 0);
+
+               mono_w32handle_set_signal_state (handle, FALSE, FALSE);
        }
-       
-       namedevent_handle->set_count = 0;
-       
-       _wapi_handle_unlock_shared_handles ();
-       
-       return(TRUE);
+
+       thr_ret = mono_w32handle_unlock_handle (handle);
+       g_assert (thr_ret == 0);
+
+       return TRUE;
 }
 
 /**
@@ -569,84 +365,54 @@ static gboolean namedevent_reset (gpointer handle)
  */
 gboolean ResetEvent(gpointer handle)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
+       struct _WapiHandle_event *event_handle;
+       int thr_ret;
+
+       SetLastError (ERROR_SUCCESS);
        
        if (handle == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
                return(FALSE);
        }
        
-       type = _wapi_handle_type (handle);
-       
-       if (event_ops[type].reset == NULL) {
+       switch (type = mono_w32handle_get_type (handle)) {
+       case MONO_W32HANDLE_EVENT:
+       case MONO_W32HANDLE_NAMEDEVENT:
+               break;
+       default:
                SetLastError (ERROR_INVALID_HANDLE);
-               return(FALSE);
-       }
-       
-       return(event_ops[type].reset (handle));
-}
-
-static gboolean event_set (gpointer handle)
-{
-       struct _WapiHandle_event *event_handle;
-       gboolean ok;
-       int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_EVENT,
-                                 (gpointer *)&event_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up event handle %p", __func__,
-                          handle);
-               return(FALSE);
+               return FALSE;
        }
-       
-       thr_ret = _wapi_handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
 
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Setting event handle %p", __func__, handle);
-
-       if (event_handle->manual == TRUE) {
-               _wapi_handle_set_signal_state (handle, TRUE, TRUE);
-       } else {
-               event_handle->set_count = 1;
-               _wapi_handle_set_signal_state (handle, TRUE, FALSE);
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&event_handle)) {
+               g_warning ("%s: error looking up %s handle %p",
+                       __func__, event_handle_type_to_string (type), handle);
+               return FALSE;
        }
 
-       thr_ret = _wapi_handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
-       
-       return(TRUE);
-}
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: resetting %s handle %p",
+               __func__, event_handle_type_to_string (type), handle);
 
-static gboolean namedevent_set (gpointer handle)
-{
-       struct _WapiHandle_namedevent *namedevent_handle;
-       gboolean ok;
-       int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDEVENT,
-                                 (gpointer *)&namedevent_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up named event handle %p",
-                          __func__, handle);
-               return(FALSE);
-       }
-       
-       thr_ret = _wapi_handle_lock_shared_handles ();
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
 
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Setting named event handle %p", __func__, handle);
-
-       if (namedevent_handle->manual == TRUE) {
-               _wapi_shared_handle_set_signal_state (handle, TRUE);
+       if (!mono_w32handle_issignalled (handle)) {
+               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: no need to reset %s handle %p",
+                       __func__, event_handle_type_to_string (type), handle);
        } else {
-               namedevent_handle->set_count = 1;
-               _wapi_shared_handle_set_signal_state (handle, TRUE);
+               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: obtained write lock on %s handle %p",
+                       __func__, event_handle_type_to_string (type), handle);
+
+               mono_w32handle_set_signal_state (handle, FALSE, FALSE);
        }
 
-       _wapi_handle_unlock_shared_handles ();
+       event_handle->set_count = 0;
 
-       return(TRUE);
+       thr_ret = mono_w32handle_unlock_handle (handle);
+       g_assert (thr_ret == 0);
+
+       return TRUE;
 }
 
 /**
@@ -665,21 +431,47 @@ static gboolean namedevent_set (gpointer handle)
  */
 gboolean SetEvent(gpointer handle)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
+       struct _WapiHandle_event *event_handle;
+       int thr_ret;
        
        if (handle == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
                return(FALSE);
        }
        
-       type = _wapi_handle_type (handle);
-       
-       if (event_ops[type].set == NULL) {
+       switch (type = mono_w32handle_get_type (handle)) {
+       case MONO_W32HANDLE_EVENT:
+       case MONO_W32HANDLE_NAMEDEVENT:
+               break;
+       default:
                SetLastError (ERROR_INVALID_HANDLE);
-               return(FALSE);
+               return FALSE;
        }
-       
-       return(event_ops[type].set (handle));
+
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&event_handle)) {
+               g_warning ("%s: error looking up %s handle %p",
+                       __func__, event_handle_type_to_string (type), handle);
+               return FALSE;
+       }
+
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: setting %s handle %p",
+               __func__, event_handle_type_to_string (type), handle);
+
+       thr_ret = mono_w32handle_lock_handle (handle);
+       g_assert (thr_ret == 0);
+
+       if (!event_handle->manual) {
+               event_handle->set_count = 1;
+               mono_w32handle_set_signal_state (handle, TRUE, FALSE);
+       } else {
+               mono_w32handle_set_signal_state (handle, TRUE, TRUE);
+       }
+
+       thr_ret = mono_w32handle_unlock_handle (handle);
+       g_assert (thr_ret == 0);
+
+       return TRUE;
 }
 
 gpointer OpenEvent (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, const gunichar2 *name)
@@ -687,10 +479,6 @@ gpointer OpenEvent (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED
        gpointer handle;
        gchar *utf8_name;
        int thr_ret;
-       gpointer ret = NULL;
-       gint32 offset;
-       
-       mono_once (&event_ops_once, event_ops_init);
 
        /* w32 seems to guarantee that opening named objects can't
         * race each other
@@ -702,33 +490,20 @@ gpointer OpenEvent (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED
        
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Opening named event [%s]", __func__, utf8_name);
        
-       offset = _wapi_search_handle_namespace (WAPI_HANDLE_NAMEDEVENT,
+       handle = _wapi_search_handle_namespace (MONO_W32HANDLE_NAMEDEVENT,
                                                utf8_name);
-       if (offset == -1) {
+       if (handle == INVALID_HANDLE_VALUE) {
                /* The name has already been used for a different
                 * object.
                 */
                SetLastError (ERROR_INVALID_HANDLE);
                goto cleanup;
-       } else if (offset == 0) {
+       } else if (!handle) {
                /* This name doesn't exist */
                SetLastError (ERROR_FILE_NOT_FOUND);    /* yes, really */
                goto cleanup;
        }
 
-       /* A new reference to an existing named event, so just create
-        * the private part
-        */
-       handle = _wapi_handle_new_from_offset (WAPI_HANDLE_NAMEDEVENT, offset,
-                                              TRUE);
-       
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error opening named event handle", __func__);
-               SetLastError (ERROR_GEN_FAILURE);
-               goto cleanup;
-       }
-       ret = handle;
-
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: returning named event handle %p", __func__, handle);
 
 cleanup:
@@ -736,6 +511,6 @@ cleanup:
 
        _wapi_namespace_unlock (NULL);
        
-       return(ret);
+       return handle;
 
 }
diff --git a/mono/io-layer/handles-private.h b/mono/io-layer/handles-private.h
deleted file mode 100644 (file)
index 4f20de0..0000000
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * handles-private.h:  Internal operations on handles
- *
- * Author:
- *     Dick Porter (dick@ximian.com)
- *
- * (C) 2002-2006 Novell, Inc.
- */
-
-#ifndef _WAPI_HANDLES_PRIVATE_H_
-#define _WAPI_HANDLES_PRIVATE_H_
-
-#include <config.h>
-#include <glib.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/shared.h>
-#include <mono/utils/atomic.h>
-
-#define _WAPI_PRIVATE_MAX_SLOTS                (1024 * 16)
-#define _WAPI_PRIVATE_HANDLES(x) (_wapi_private_handles [x / _WAPI_HANDLE_INITIAL_COUNT][x % _WAPI_HANDLE_INITIAL_COUNT])
-#define _WAPI_PRIVATE_HAVE_SLOT(x) ((GPOINTER_TO_UINT (x) / _WAPI_PRIVATE_MAX_SLOTS) < _WAPI_PRIVATE_MAX_SLOTS && \
-                                       _wapi_private_handles [GPOINTER_TO_UINT (x) / _WAPI_HANDLE_INITIAL_COUNT] != NULL)
-#define _WAPI_PRIVATE_VALID_SLOT(x) (((x) / _WAPI_HANDLE_INITIAL_COUNT) < _WAPI_PRIVATE_MAX_SLOTS)
-
-#undef DEBUG
-
-extern struct _WapiHandleUnshared *_wapi_private_handles [];
-extern struct _WapiHandleSharedLayout *_wapi_shared_layout;
-
-extern guint32 _wapi_fd_reserve;
-extern mono_mutex_t *_wapi_global_signal_mutex;
-extern pthread_cond_t *_wapi_global_signal_cond;
-extern int _wapi_sem_id;
-extern gboolean _wapi_has_shut_down;
-
-extern pid_t _wapi_getpid (void);
-extern gpointer _wapi_handle_new (WapiHandleType type,
-                                 gpointer handle_specific);
-extern gpointer _wapi_handle_new_fd (WapiHandleType type, int fd,
-                                    gpointer handle_specific);
-extern gpointer _wapi_handle_new_from_offset (WapiHandleType type,
-                                             guint32 offset,
-                                             gboolean timestamp);
-extern gboolean _wapi_lookup_handle (gpointer handle, WapiHandleType type,
-                                    gpointer *handle_specific);
-extern gpointer _wapi_search_handle (WapiHandleType type,
-                                    gboolean (*check)(gpointer, gpointer),
-                                    gpointer user_data,
-                                    gpointer *handle_specific,
-                                    gboolean search_shared);
-extern gint32 _wapi_search_handle_namespace (WapiHandleType type,
-                                            gchar *utf8_name);
-extern void _wapi_handle_ref (gpointer handle);
-extern void _wapi_handle_unref (gpointer handle);
-extern void _wapi_handle_register_capabilities (WapiHandleType type,
-                                               WapiHandleCapability caps);
-extern gboolean _wapi_handle_test_capabilities (gpointer handle,
-                                               WapiHandleCapability caps);
-extern void _wapi_handle_ops_close (gpointer handle, gpointer data);
-extern void _wapi_handle_ops_signal (gpointer handle);
-extern gboolean _wapi_handle_ops_own (gpointer handle);
-extern gboolean _wapi_handle_ops_isowned (gpointer handle);
-extern guint32 _wapi_handle_ops_special_wait (gpointer handle,
-                                             guint32 timeout,
-                                             gboolean alertable);
-extern void _wapi_handle_ops_prewait (gpointer handle);
-
-extern gboolean _wapi_handle_count_signalled_handles (guint32 numhandles,
-                                                     gpointer *handles,
-                                                     gboolean waitall,
-                                                     guint32 *retcount,
-                                                     guint32 *lowest);
-extern void _wapi_handle_unlock_handles (guint32 numhandles,
-                                        gpointer *handles);
-extern int _wapi_handle_timedwait_signal (guint32 timeout, gboolean poll, gboolean *alerted);
-extern int _wapi_handle_timedwait_signal_handle (gpointer handle, guint32 timeout, gboolean alertable, gboolean poll, gboolean *alerted);
-extern gboolean _wapi_handle_get_or_set_share (guint64 device, guint64 inode,
-                                              guint32 new_sharemode,
-                                              guint32 new_access,
-                                              guint32 *old_sharemode,
-                                              guint32 *old_access,
-                                              struct _WapiFileShare **info);
-extern void _wapi_handle_check_share (struct _WapiFileShare *share_info,
-                                     int fd);
-extern void _wapi_handle_dump (void);
-extern void _wapi_handle_foreach (WapiHandleType type,
-                                       gboolean (*on_each)(gpointer test, gpointer user),
-                                       gpointer user_data);
-void _wapi_free_share_info (_WapiFileShare *share_info);
-
-/* This is OK to use for atomic writes of individual struct members, as they
- * are independent
- */
-#define WAPI_SHARED_HANDLE_DATA(handle) _wapi_shared_layout->handles[_WAPI_PRIVATE_HANDLES(GPOINTER_TO_UINT((handle))).u.shared.offset]
-
-#define WAPI_SHARED_HANDLE_TYPED_DATA(handle, type) _wapi_shared_layout->handles[_WAPI_PRIVATE_HANDLES(GPOINTER_TO_UINT((handle))).u.shared.offset].u.type
-
-static inline WapiHandleType _wapi_handle_type (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx) || !_WAPI_PRIVATE_HAVE_SLOT (idx)) {
-               return(WAPI_HANDLE_UNUSED);     /* An impossible type */
-       }
-       
-       return(_WAPI_PRIVATE_HANDLES(idx).type);
-}
-
-static inline void _wapi_handle_set_signal_state (gpointer handle,
-                                                 gboolean state,
-                                                 gboolean broadcast)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       struct _WapiHandleUnshared *handle_data;
-       int thr_ret;
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return;
-       }
-       
-       g_assert (!_WAPI_SHARED_HANDLE(_wapi_handle_type (handle)));
-       
-       handle_data = &_WAPI_PRIVATE_HANDLES(idx);
-       
-#ifdef DEBUG
-       g_message ("%s: setting state of %p to %s (broadcast %s)", __func__,
-                  handle, state?"TRUE":"FALSE", broadcast?"TRUE":"FALSE");
-#endif
-
-       if (state == TRUE) {
-               /* Tell everyone blocking on a single handle */
-
-               /* The condition the global signal cond is waiting on is the signalling of
-                * _any_ handle. So lock it before setting the signalled state.
-                */
-               thr_ret = mono_os_mutex_lock (_wapi_global_signal_mutex);
-               if (thr_ret != 0)
-                       g_warning ("Bad call to mono_os_mutex_lock result %d for global signal mutex", thr_ret);
-               g_assert (thr_ret == 0);
-
-               /* This function _must_ be called with
-                * handle->signal_mutex locked
-                */
-               handle_data->signalled=state;
-               
-               if (broadcast == TRUE) {
-                       thr_ret = pthread_cond_broadcast (&handle_data->signal_cond);
-                       if (thr_ret != 0)
-                               g_warning ("Bad call to pthread_cond_broadcast result %d for handle %p", thr_ret, handle);
-                       g_assert (thr_ret == 0);
-               } else {
-                       thr_ret = pthread_cond_signal (&handle_data->signal_cond);
-                       if (thr_ret != 0)
-                               g_warning ("Bad call to pthread_cond_signal result %d for handle %p", thr_ret, handle);
-                       g_assert (thr_ret == 0);
-               }
-
-               /* Tell everyone blocking on multiple handles that something
-                * was signalled
-                */                     
-               thr_ret = pthread_cond_broadcast (_wapi_global_signal_cond);
-               if (thr_ret != 0)
-                       g_warning ("Bad call to pthread_cond_broadcast result %d for handle %p", thr_ret, handle);
-               g_assert (thr_ret == 0);
-                       
-               thr_ret = mono_os_mutex_unlock (_wapi_global_signal_mutex);
-               if (thr_ret != 0)
-                       g_warning ("Bad call to mono_os_mutex_unlock result %d for global signal mutex", thr_ret);
-               g_assert (thr_ret == 0);
-       } else {
-               handle_data->signalled=state;
-       }
-}
-
-static inline void _wapi_shared_handle_set_signal_state (gpointer handle,
-                                                        gboolean state)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       struct _WapiHandleUnshared *handle_data;
-       struct _WapiHandle_shared_ref *ref;
-       struct _WapiHandleShared *shared_data;
-       
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return;
-       }
-       
-       g_assert (_WAPI_SHARED_HANDLE(_wapi_handle_type (handle)));
-       
-       handle_data = &_WAPI_PRIVATE_HANDLES(idx);
-       
-       ref = &handle_data->u.shared;
-       shared_data = &_wapi_shared_layout->handles[ref->offset];
-       shared_data->signalled = state;
-
-#ifdef DEBUG
-       g_message ("%s: signalled shared handle offset 0x%x", __func__,
-                  ref->offset);
-#endif
-}
-
-static inline gboolean _wapi_handle_issignalled (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return(FALSE);
-       }
-       
-       if (_WAPI_SHARED_HANDLE(_wapi_handle_type (handle))) {
-               return(WAPI_SHARED_HANDLE_DATA(handle).signalled);
-       } else {
-               return(_WAPI_PRIVATE_HANDLES(idx).signalled);
-       }
-}
-
-static inline int _wapi_handle_lock_signal_mutex (void)
-{
-#ifdef DEBUG
-       g_message ("%s: lock global signal mutex", __func__);
-#endif
-
-       return(mono_os_mutex_lock (_wapi_global_signal_mutex));
-}
-
-/* the parameter makes it easier to call from a pthread cleanup handler */
-static inline int _wapi_handle_unlock_signal_mutex (void *unused)
-{
-#ifdef DEBUG
-       g_message ("%s: unlock global signal mutex", __func__);
-#endif
-
-       return(mono_os_mutex_unlock (_wapi_global_signal_mutex));
-}
-
-static inline int _wapi_handle_lock_handle (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       
-#ifdef DEBUG
-       g_message ("%s: locking handle %p", __func__, handle);
-#endif
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return(0);
-       }
-       
-       _wapi_handle_ref (handle);
-       
-       if (_WAPI_SHARED_HANDLE (_wapi_handle_type (handle))) {
-               return(0);
-       }
-       
-       return(mono_os_mutex_lock (&_WAPI_PRIVATE_HANDLES(idx).signal_mutex));
-}
-
-static inline int _wapi_handle_trylock_handle (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       int ret;
-       
-#ifdef DEBUG
-       g_message ("%s: locking handle %p", __func__, handle);
-#endif
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return(0);
-       }
-       
-       _wapi_handle_ref (handle);
-       
-       if (_WAPI_SHARED_HANDLE (_wapi_handle_type (handle))) {
-               return(0);
-       }
-
-       ret = mono_os_mutex_trylock (&_WAPI_PRIVATE_HANDLES(idx).signal_mutex);
-       if (ret != 0) {
-               _wapi_handle_unref (handle);
-       }
-       
-       return(ret);
-}
-
-static inline int _wapi_handle_unlock_handle (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       int ret;
-       
-#ifdef DEBUG
-       g_message ("%s: unlocking handle %p", __func__, handle);
-#endif
-       
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return(0);
-       }
-       
-       if (_WAPI_SHARED_HANDLE (_wapi_handle_type (handle))) {
-               _wapi_handle_unref (handle);
-               return(0);
-       }
-       
-       ret = mono_os_mutex_unlock (&_WAPI_PRIVATE_HANDLES(idx).signal_mutex);
-
-       _wapi_handle_unref (handle);
-       
-       return(ret);
-}
-
-static inline void _wapi_handle_spin (guint32 ms)
-{
-       struct timespec sleepytime;
-       
-       g_assert (ms < 1000);
-       
-       sleepytime.tv_sec = 0;
-       sleepytime.tv_nsec = ms * 1000000;
-       
-       nanosleep (&sleepytime, NULL);
-}
-
-static inline int _wapi_handle_lock_shared_handles (void)
-{
-       return(_wapi_shm_sem_lock (_WAPI_SHARED_SEM_SHARED_HANDLES));
-}
-
-static inline int _wapi_handle_trylock_shared_handles (void)
-{
-       return(_wapi_shm_sem_trylock (_WAPI_SHARED_SEM_SHARED_HANDLES));
-}
-
-static inline int _wapi_handle_unlock_shared_handles (void)
-{
-       return(_wapi_shm_sem_unlock (_WAPI_SHARED_SEM_SHARED_HANDLES));
-}
-
-static inline int _wapi_namespace_lock (void)
-{
-       return(_wapi_shm_sem_lock (_WAPI_SHARED_SEM_NAMESPACE));
-}
-
-/* This signature makes it easier to use in pthread cleanup handlers */
-static inline int _wapi_namespace_unlock (gpointer data G_GNUC_UNUSED)
-{
-       return(_wapi_shm_sem_unlock (_WAPI_SHARED_SEM_NAMESPACE));
-}
-
-static inline void _wapi_handle_share_release (struct _WapiFileShare *info)
-{
-       int thr_ret;
-
-       g_assert (info->handle_refs > 0);
-       
-       /* Prevent new entries racing with us */
-       thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE);
-       g_assert(thr_ret == 0);
-
-       if (InterlockedDecrement ((gint32 *)&info->handle_refs) == 0) {
-               _wapi_free_share_info (info);
-       }
-
-       thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
-}
-
-#endif /* _WAPI_HANDLES_PRIVATE_H_ */
diff --git a/mono/io-layer/handles.c b/mono/io-layer/handles.c
deleted file mode 100644 (file)
index 814d216..0000000
+++ /dev/null
@@ -1,1840 +0,0 @@
-/*
- * handles.c:  Generic and internal operations on handles
- *
- * Author:
- *     Dick Porter (dick@ximian.com)
- *
- * (C) 2002-2011 Novell, Inc.
- * Copyright 2011 Xamarin Inc
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-#include <config.h>
-#include <glib.h>
-#include <pthread.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#include <string.h>
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#  include <sys/un.h>
-#endif
-#ifdef HAVE_SYS_MMAN_H
-#  include <sys/mman.h>
-#endif
-#ifdef HAVE_DIRENT_H
-#  include <dirent.h>
-#endif
-#include <sys/stat.h>
-#ifdef HAVE_SYS_RESOURCE_H
-#  include <sys/resource.h>
-#endif
-
-#include <mono/io-layer/wapi.h>
-#include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
-#include <mono/io-layer/shared.h>
-#include <mono/io-layer/process-private.h>
-#include <mono/io-layer/io-trace.h>
-
-#include <mono/utils/mono-os-mutex.h>
-#include <mono/utils/mono-proclib.h>
-#include <mono/utils/mono-threads.h>
-#include <mono/utils/mono-once.h>
-#include <mono/utils/mono-logger-internals.h>
-#undef DEBUG_REFS
-
-static void (*_wapi_handle_ops_get_close_func (WapiHandleType type))(gpointer, gpointer);
-
-static WapiHandleCapability handle_caps[WAPI_HANDLE_COUNT] = { (WapiHandleCapability)0 };
-static struct _WapiHandleOps *handle_ops[WAPI_HANDLE_COUNT]={
-       NULL,
-       &_wapi_file_ops,
-       &_wapi_console_ops,
-       &_wapi_thread_ops,
-       &_wapi_sem_ops,
-       &_wapi_mutex_ops,
-       &_wapi_event_ops,
-#ifndef DISABLE_SOCKETS
-       &_wapi_socket_ops,
-#endif
-       &_wapi_find_ops,
-       &_wapi_process_ops,
-       &_wapi_pipe_ops,
-       &_wapi_namedmutex_ops,
-       &_wapi_namedsem_ops,
-       &_wapi_namedevent_ops,
-};
-
-static void _wapi_shared_details (gpointer handle_info);
-
-static void (*handle_details[WAPI_HANDLE_COUNT])(gpointer) = {
-       NULL,
-       _wapi_file_details,
-       _wapi_console_details,
-       _wapi_shared_details,   /* thread */
-       _wapi_sem_details,
-       _wapi_mutex_details,
-       _wapi_event_details,
-       NULL,                   /* Nothing useful to see in a socket handle */
-       NULL,                   /* Nothing useful to see in a find handle */
-       _wapi_shared_details,   /* process */
-       _wapi_pipe_details,
-       _wapi_shared_details,   /* namedmutex */
-       _wapi_shared_details,   /* namedsem */
-       _wapi_shared_details,   /* namedevent */
-};
-
-const char *_wapi_handle_typename[] = {
-       "Unused",
-       "File",
-       "Console",
-       "Thread",
-       "Sem",
-       "Mutex",
-       "Event",
-       "Socket",
-       "Find",
-       "Process",
-       "Pipe",
-       "N.Mutex",
-       "N.Sem",
-       "N.Event",
-       "Error!!"
-};
-
-/*
- * We can hold _WAPI_PRIVATE_MAX_SLOTS * _WAPI_HANDLE_INITIAL_COUNT handles.
- * If 4M handles are not enough... Oh, well... we will crash.
- */
-#define SLOT_INDEX(x)  (x / _WAPI_HANDLE_INITIAL_COUNT)
-#define SLOT_OFFSET(x) (x % _WAPI_HANDLE_INITIAL_COUNT)
-
-struct _WapiHandleUnshared *_wapi_private_handles [_WAPI_PRIVATE_MAX_SLOTS];
-static guint32 _wapi_private_handle_count = 0;
-static guint32 _wapi_private_handle_slot_count = 0;
-
-struct _WapiHandleSharedLayout *_wapi_shared_layout = NULL;
-
-/*
- * If SHM is disabled, this will point to a hash of _WapiFileShare structures, otherwise
- * it will be NULL. We use this instead of _wapi_fileshare_layout to avoid allocating a
- * 4MB array.
- */
-static GHashTable *file_share_hash;
-static mono_mutex_t file_share_hash_mutex;
-
-#define file_share_hash_lock() mono_os_mutex_lock (&file_share_hash_mutex)
-#define file_share_hash_unlock() mono_os_mutex_unlock (&file_share_hash_mutex)
-
-guint32 _wapi_fd_reserve;
-
-/* 
- * This is an internal handle which is used for handling waiting for multiple handles.
- * Threads which wait for multiple handles wait on this one handle, and when a handle
- * is signalled, this handle is signalled too.
- */
-static gpointer _wapi_global_signal_handle;
-
-/* Point to the mutex/cond inside _wapi_global_signal_handle */
-mono_mutex_t *_wapi_global_signal_mutex;
-pthread_cond_t *_wapi_global_signal_cond;
-
-int _wapi_sem_id;
-gboolean _wapi_has_shut_down = FALSE;
-
-/* Use this instead of getpid(), to cope with linuxthreads.  It's a
- * function rather than a variable lookup because we need to get at
- * this before share_init() might have been called.
- */
-static pid_t _wapi_pid;
-static mono_once_t pid_init_once = MONO_ONCE_INIT;
-
-static void _wapi_handle_unref_full (gpointer handle, gboolean ignore_private_busy_handles);
-
-static void pid_init (void)
-{
-       _wapi_pid = getpid ();
-}
-
-pid_t _wapi_getpid (void)
-{
-       mono_once (&pid_init_once, pid_init);
-       
-       return(_wapi_pid);
-}
-
-
-static mono_mutex_t scan_mutex;
-
-static void handle_cleanup (void)
-{
-       int i, j, k;
-       
-       /* Every shared handle we were using ought really to be closed
-        * by now, but to make sure just blow them all away.  The
-        * exiting finalizer thread in particular races us to the
-        * program exit and doesn't always win, so it can be left
-        * cluttering up the shared file.  Anything else left over is
-        * really a bug.
-        */
-       for(i = SLOT_INDEX (0); _wapi_private_handles[i] != NULL; i++) {
-               for(j = SLOT_OFFSET (0); j < _WAPI_HANDLE_INITIAL_COUNT; j++) {
-                       struct _WapiHandleUnshared *handle_data = &_wapi_private_handles[i][j];
-                       gpointer handle = GINT_TO_POINTER (i*_WAPI_HANDLE_INITIAL_COUNT+j);
-
-                       for(k = handle_data->ref; k > 0; k--) {
-                               _wapi_handle_unref_full (handle, TRUE);
-                       }
-               }
-       }
-       
-       _wapi_shm_semaphores_remove ();
-
-       g_free (_wapi_shared_layout);
-
-       if (file_share_hash) {
-               g_hash_table_destroy (file_share_hash);
-               mono_os_mutex_destroy (&file_share_hash_mutex);
-       }
-
-       for (i = 0; i < _WAPI_PRIVATE_MAX_SLOTS; ++i)
-               g_free (_wapi_private_handles [i]);
-}
-
-int
-wapi_getdtablesize (void)
-{
-       return eg_getdtablesize ();
-}
-
-/*
- * wapi_init:
- *
- *   Initialize the io-layer.
- */
-void
-wapi_init (void)
-{
-       g_assert ((sizeof (handle_ops) / sizeof (handle_ops[0]))
-                 == WAPI_HANDLE_COUNT);
-
-       _wapi_fd_reserve = wapi_getdtablesize ();
-
-       /* This is needed by the code in _wapi_handle_new_internal */
-       _wapi_fd_reserve = (_wapi_fd_reserve + (_WAPI_HANDLE_INITIAL_COUNT - 1)) & ~(_WAPI_HANDLE_INITIAL_COUNT - 1);
-
-       do {
-               /* 
-                * The entries in _wapi_private_handles reserved for fds are allocated lazily to 
-                * save memory.
-                */
-               /*
-               _wapi_private_handles [idx++] = g_new0 (struct _WapiHandleUnshared,
-                                                       _WAPI_HANDLE_INITIAL_COUNT);
-               */
-
-               _wapi_private_handle_count += _WAPI_HANDLE_INITIAL_COUNT;
-               _wapi_private_handle_slot_count ++;
-       } while(_wapi_fd_reserve > _wapi_private_handle_count);
-
-       _wapi_shm_semaphores_init ();
-
-       _wapi_shared_layout = (_WapiHandleSharedLayout *)g_malloc0 (sizeof (_WapiHandleSharedLayout));
-       g_assert (_wapi_shared_layout != NULL);
-
-       _wapi_io_init ();
-       mono_os_mutex_init (&scan_mutex);
-
-       _wapi_global_signal_handle = _wapi_handle_new (WAPI_HANDLE_EVENT, NULL);
-
-       _wapi_global_signal_cond = &_WAPI_PRIVATE_HANDLES (GPOINTER_TO_UINT (_wapi_global_signal_handle)).signal_cond;
-       _wapi_global_signal_mutex = &_WAPI_PRIVATE_HANDLES (GPOINTER_TO_UINT (_wapi_global_signal_handle)).signal_mutex;
-
-       wapi_processes_init ();
-}
-
-void
-wapi_cleanup (void)
-{
-       g_assert (_wapi_has_shut_down == FALSE);
-       
-       _wapi_has_shut_down = TRUE;
-
-       _wapi_error_cleanup ();
-       _wapi_thread_cleanup ();
-       wapi_processes_cleanup ();
-       handle_cleanup ();
-}
-
-static void _wapi_handle_init_shared (struct _WapiHandleShared *handle,
-                                     WapiHandleType type,
-                                     gpointer handle_specific)
-{
-       g_assert (_wapi_has_shut_down == FALSE);
-       
-       handle->type = type;
-       handle->timestamp = (guint32)(time (NULL) & 0xFFFFFFFF);
-       handle->signalled = FALSE;
-       handle->handle_refs = 1;
-       
-       if (handle_specific != NULL) {
-               memcpy (&handle->u, handle_specific, sizeof (handle->u));
-       }
-}
-
-static size_t _wapi_handle_struct_size (WapiHandleType type)
-{
-       size_t type_size;
-
-       switch (type) {
-               case WAPI_HANDLE_FILE: case WAPI_HANDLE_CONSOLE: case WAPI_HANDLE_PIPE:
-                       type_size = sizeof (struct _WapiHandle_file);
-                       break;
-               case WAPI_HANDLE_THREAD:
-                       type_size = sizeof (struct _WapiHandle_thread);
-                       break;
-               case WAPI_HANDLE_SEM:
-                       type_size = sizeof (struct _WapiHandle_sem);
-                       break;
-               case WAPI_HANDLE_MUTEX:
-                       type_size = sizeof (struct _WapiHandle_mutex);
-                       break;
-               case WAPI_HANDLE_EVENT:
-                       type_size = sizeof (struct _WapiHandle_event);
-                       break;
-               case WAPI_HANDLE_SOCKET:
-                       type_size = sizeof (struct _WapiHandle_socket);
-                       break;
-               case WAPI_HANDLE_FIND:
-                       type_size = sizeof (struct _WapiHandle_find);
-                       break;
-               case WAPI_HANDLE_PROCESS:
-                       type_size = sizeof (struct _WapiHandle_process);
-                       break;
-               case WAPI_HANDLE_NAMEDMUTEX:
-                       type_size = sizeof (struct _WapiHandle_namedmutex);
-                       break;
-               case WAPI_HANDLE_NAMEDSEM:
-                       type_size = sizeof (struct _WapiHandle_namedsem);
-                       break;
-               case WAPI_HANDLE_NAMEDEVENT:
-                       type_size = sizeof (struct _WapiHandle_namedevent);
-                       break;
-
-               default:
-                       g_error ("Unknown WapiHandleType: %d\n", type);
-       }
-
-       return type_size;
-}
-
-static void _wapi_handle_init (struct _WapiHandleUnshared *handle,
-                              WapiHandleType type, gpointer handle_specific)
-{
-       int thr_ret;
-       int type_size;
-       
-       g_assert (_wapi_has_shut_down == FALSE);
-       
-       handle->type = type;
-       handle->signalled = FALSE;
-       handle->ref = 1;
-       
-       if (!_WAPI_SHARED_HANDLE(type)) {
-               thr_ret = pthread_cond_init (&handle->signal_cond, NULL);
-               g_assert (thr_ret == 0);
-                               
-               thr_ret = mono_os_mutex_init (&handle->signal_mutex);
-               g_assert (thr_ret == 0);
-
-               if (handle_specific != NULL) {
-                       type_size = _wapi_handle_struct_size (type);
-                       memcpy (&handle->u, handle_specific,
-                               type_size);
-               }
-       }
-}
-
-static guint32 _wapi_handle_new_shared (WapiHandleType type,
-                                       gpointer handle_specific)
-{
-       guint32 offset;
-       static guint32 last = 1;
-       int thr_ret;
-       
-       g_assert (_wapi_has_shut_down == FALSE);
-       
-       /* Leave the first slot empty as a guard */
-again:
-       /* FIXME: expandable array */
-       for(offset = last; offset <_WAPI_HANDLE_INITIAL_COUNT; offset++) {
-               struct _WapiHandleShared *handle = &_wapi_shared_layout->handles[offset];
-               
-               if(handle->type == WAPI_HANDLE_UNUSED) {
-                       thr_ret = _wapi_handle_lock_shared_handles ();
-                       g_assert (thr_ret == 0);
-                       
-                       if (InterlockedCompareExchange ((gint32 *)&handle->type, type, WAPI_HANDLE_UNUSED) == WAPI_HANDLE_UNUSED) {
-                               last = offset + 1;
-                       
-                               _wapi_handle_init_shared (handle, type,
-                                                         handle_specific);
-
-                               _wapi_handle_unlock_shared_handles ();
-                               
-                               return(offset);
-                       } else {
-                               /* Someone else beat us to it, just
-                                * continue looking
-                                */
-                       }
-
-                       _wapi_handle_unlock_shared_handles ();
-               }
-       }
-
-       if(last > 1) {
-               /* Try again from the beginning */
-               last = 1;
-               goto again;
-       }
-
-       /* Will need to expand the array.  The caller will sort it out */
-
-       return(0);
-}
-
-/*
- * _wapi_handle_new_internal:
- * @type: Init handle to this type
- *
- * Search for a free handle and initialize it. Return the handle on
- * success and 0 on failure.  This is only called from
- * _wapi_handle_new, and scan_mutex must be held.
- */
-static guint32 _wapi_handle_new_internal (WapiHandleType type,
-                                         gpointer handle_specific)
-{
-       guint32 i, k, count;
-       static guint32 last = 0;
-       gboolean retry = FALSE;
-       
-       g_assert (_wapi_has_shut_down == FALSE);
-       
-       /* A linear scan should be fast enough.  Start from the last
-        * allocation, assuming that handles are allocated more often
-        * than they're freed. Leave the space reserved for file
-        * descriptors
-        */
-       
-       if (last < _wapi_fd_reserve) {
-               last = _wapi_fd_reserve;
-       } else {
-               retry = TRUE;
-       }
-
-again:
-       count = last;
-       for(i = SLOT_INDEX (count); i < _wapi_private_handle_slot_count; i++) {
-               if (_wapi_private_handles [i]) {
-                       for (k = SLOT_OFFSET (count); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
-                               struct _WapiHandleUnshared *handle = &_wapi_private_handles [i][k];
-
-                               if(handle->type == WAPI_HANDLE_UNUSED) {
-                                       last = count + 1;
-                       
-                                       _wapi_handle_init (handle, type, handle_specific);
-                                       return (count);
-                               }
-                               count++;
-                       }
-               }
-       }
-
-       if(retry && last > _wapi_fd_reserve) {
-               /* Try again from the beginning */
-               last = _wapi_fd_reserve;
-               goto again;
-       }
-
-       /* Will need to expand the array.  The caller will sort it out */
-
-       return(0);
-}
-
-gpointer 
-_wapi_handle_new (WapiHandleType type, gpointer handle_specific)
-{
-       guint32 handle_idx = 0;
-       gpointer handle;
-       int thr_ret;
-
-       g_assert (_wapi_has_shut_down == FALSE);
-               
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating new handle of type %s", __func__,
-                  _wapi_handle_typename[type]);
-
-       g_assert(!_WAPI_FD_HANDLE(type));
-       
-       thr_ret = mono_os_mutex_lock (&scan_mutex);
-       g_assert (thr_ret == 0);
-               
-       while ((handle_idx = _wapi_handle_new_internal (type, handle_specific)) == 0) {
-               /* Try and expand the array, and have another go */
-               int idx = SLOT_INDEX (_wapi_private_handle_count);
-               if (idx >= _WAPI_PRIVATE_MAX_SLOTS) {
-                       break;
-               }
-
-               _wapi_private_handles [idx] = g_new0 (struct _WapiHandleUnshared,
-                                               _WAPI_HANDLE_INITIAL_COUNT);
-
-               _wapi_private_handle_count += _WAPI_HANDLE_INITIAL_COUNT;
-               _wapi_private_handle_slot_count ++;
-       }
-       
-       thr_ret = mono_os_mutex_unlock (&scan_mutex);
-       g_assert (thr_ret == 0);
-
-       if (handle_idx == 0) {
-               /* We ran out of slots */
-               handle = _WAPI_HANDLE_INVALID;
-               goto done;
-       }
-               
-       /* Make sure we left the space for fd mappings */
-       g_assert (handle_idx >= _wapi_fd_reserve);
-       
-       handle = GUINT_TO_POINTER (handle_idx);
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Allocated new handle %p", __func__, handle);
-       
-       if (_WAPI_SHARED_HANDLE(type)) {
-               /* Add the shared section too */
-               guint32 ref;
-               
-               ref = _wapi_handle_new_shared (type, handle_specific);
-               if (ref == 0) {
-                       ref = _wapi_handle_new_shared (type, handle_specific);
-                       if (ref == 0) {
-                               /* FIXME: grow the arrays */
-                               handle = _WAPI_HANDLE_INVALID;
-                               goto done;
-                       }
-               }
-               
-               _WAPI_PRIVATE_HANDLES(handle_idx).u.shared.offset = ref;
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: New shared handle at offset 0x%x", __func__,
-                          ref);
-       }
-               
-done:
-       return(handle);
-}
-
-gpointer _wapi_handle_new_from_offset (WapiHandleType type, guint32 offset,
-                                      gboolean timestamp)
-{
-       guint32 handle_idx = 0;
-       gpointer handle = INVALID_HANDLE_VALUE;
-       int thr_ret, i, k;
-       struct _WapiHandleShared *shared;
-       
-       g_assert (_wapi_has_shut_down == FALSE);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating new handle of type %s to offset %d", __func__,
-                  _wapi_handle_typename[type], offset);
-
-       g_assert(!_WAPI_FD_HANDLE(type));
-       g_assert(_WAPI_SHARED_HANDLE(type));
-       g_assert(offset != 0);
-
-       shared = &_wapi_shared_layout->handles[offset];
-       if (timestamp) {
-               guint32 now = (guint32)(time (NULL) & 0xFFFFFFFF);
-               /* Bump up the timestamp for this offset */
-               InterlockedExchange ((gint32 *)&shared->timestamp, now);
-       }
-               
-       thr_ret = mono_os_mutex_lock (&scan_mutex);
-       g_assert (thr_ret == 0);
-
-       for (i = SLOT_INDEX (0); i < _wapi_private_handle_slot_count; i++) {
-               if (_wapi_private_handles [i]) {
-                       for (k = SLOT_OFFSET (0); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
-                               struct _WapiHandleUnshared *handle_data = &_wapi_private_handles [i][k];
-               
-                               if (handle_data->type == type &&
-                                       handle_data->u.shared.offset == offset) {
-                                       handle = GUINT_TO_POINTER (i * _WAPI_HANDLE_INITIAL_COUNT + k);
-                                       goto first_pass_done;
-                               }
-                       }
-               }
-       }
-
-first_pass_done:
-       thr_ret = mono_os_mutex_unlock (&scan_mutex);
-       g_assert (thr_ret == 0);
-
-       if (handle != INVALID_HANDLE_VALUE) {
-               _wapi_handle_ref (handle);
-
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Returning old handle %p referencing 0x%x",
-                          __func__, handle, offset);
-               return (handle);
-       }
-
-       /* Prevent entries expiring under us as we search */
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-       
-       if (shared->type == WAPI_HANDLE_UNUSED) {
-               /* Someone deleted this handle while we were working */
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Handle at 0x%x unused", __func__, offset);
-               goto done;
-       }
-
-       if (shared->type != type) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Wrong type at %d 0x%x! Found %s wanted %s",
-                          __func__, offset, offset,
-                          _wapi_handle_typename[shared->type],
-                          _wapi_handle_typename[type]);
-               goto done;
-       }
-       
-       thr_ret = mono_os_mutex_lock (&scan_mutex);
-       g_assert (thr_ret == 0);
-       
-       while ((handle_idx = _wapi_handle_new_internal (type, NULL)) == 0) {
-               /* Try and expand the array, and have another go */
-               int idx = SLOT_INDEX (_wapi_private_handle_count);
-               _wapi_private_handles [idx] = g_new0 (struct _WapiHandleUnshared,
-                                               _WAPI_HANDLE_INITIAL_COUNT);
-
-               _wapi_private_handle_count += _WAPI_HANDLE_INITIAL_COUNT;
-               _wapi_private_handle_slot_count ++;
-       }
-               
-       thr_ret = mono_os_mutex_unlock (&scan_mutex);
-       g_assert (thr_ret == 0);
-               
-       /* Make sure we left the space for fd mappings */
-       g_assert (handle_idx >= _wapi_fd_reserve);
-       
-       handle = GUINT_TO_POINTER (handle_idx);
-               
-       _WAPI_PRIVATE_HANDLES(handle_idx).u.shared.offset = offset;
-       InterlockedIncrement ((gint32 *)&shared->handle_refs);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Allocated new handle %p referencing 0x%x (shared refs %d)", __func__, handle, offset, shared->handle_refs);
-       
-done:
-       _wapi_handle_unlock_shared_handles ();
-
-       return(handle);
-}
-
-static void
-init_handles_slot (int idx)
-{
-       int thr_ret;
-
-       thr_ret = mono_os_mutex_lock (&scan_mutex);
-       g_assert (thr_ret == 0);
-
-       if (_wapi_private_handles [idx] == NULL) {
-               _wapi_private_handles [idx] = g_new0 (struct _WapiHandleUnshared,
-                                                                                         _WAPI_HANDLE_INITIAL_COUNT);
-               g_assert (_wapi_private_handles [idx]);
-       }
-
-       thr_ret = mono_os_mutex_unlock (&scan_mutex);
-       g_assert (thr_ret == 0);
-}
-
-gpointer _wapi_handle_new_fd (WapiHandleType type, int fd,
-                             gpointer handle_specific)
-{
-       struct _WapiHandleUnshared *handle;
-       int thr_ret;
-       
-       g_assert (_wapi_has_shut_down == FALSE);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating new handle of type %s", __func__,
-                  _wapi_handle_typename[type]);
-       
-       g_assert(_WAPI_FD_HANDLE(type));
-       g_assert(!_WAPI_SHARED_HANDLE(type));
-       
-       if (fd >= _wapi_fd_reserve) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: fd %d is too big", __func__, fd);
-
-               return(GUINT_TO_POINTER (_WAPI_HANDLE_INVALID));
-       }
-
-       /* Initialize the array entries on demand */
-       if (_wapi_private_handles [SLOT_INDEX (fd)] == NULL)
-               init_handles_slot (SLOT_INDEX (fd));
-
-       handle = &_WAPI_PRIVATE_HANDLES(fd);
-       
-       if (handle->type != WAPI_HANDLE_UNUSED) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: fd %d is already in use!", __func__, fd);
-               /* FIXME: clean up this handle?  We can't do anything
-                * with the fd, cos thats the new one
-                */
-       }
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Assigning new fd handle %d", __func__, fd);
-
-       /* Prevent file share entries racing with us, when the file
-        * handle is only half initialised
-        */
-       thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE);
-       g_assert(thr_ret == 0);
-
-       _wapi_handle_init (handle, type, handle_specific);
-
-       thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
-
-       return(GUINT_TO_POINTER(fd));
-}
-
-gboolean _wapi_lookup_handle (gpointer handle, WapiHandleType type,
-                             gpointer *handle_specific)
-{
-       struct _WapiHandleUnshared *handle_data;
-       guint32 handle_idx = GPOINTER_TO_UINT(handle);
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (handle_idx)) {
-               return(FALSE);
-       }
-
-       /* Initialize the array entries on demand */
-       if (_wapi_private_handles [SLOT_INDEX (handle_idx)] == NULL)
-               init_handles_slot (SLOT_INDEX (handle_idx));
-       
-       handle_data = &_WAPI_PRIVATE_HANDLES(handle_idx);
-       
-       if (handle_data->type != type) {
-               return(FALSE);
-       }
-
-       if (handle_specific == NULL) {
-               return(FALSE);
-       }
-       
-       if (_WAPI_SHARED_HANDLE(type)) {
-               struct _WapiHandle_shared_ref *ref;
-               struct _WapiHandleShared *shared_handle_data;
-                       
-               ref = &handle_data->u.shared;
-               shared_handle_data = &_wapi_shared_layout->handles[ref->offset];
-               
-               if (shared_handle_data->type != type) {
-                       /* The handle must have been deleted on us
-                        */
-                       return (FALSE);
-               }
-               
-               *handle_specific = &shared_handle_data->u;
-       } else {
-               *handle_specific = &handle_data->u;
-       }
-       
-       return(TRUE);
-}
-
-void
-_wapi_handle_foreach (WapiHandleType type,
-                       gboolean (*on_each)(gpointer test, gpointer user),
-                       gpointer user_data)
-{
-       struct _WapiHandleUnshared *handle_data = NULL;
-       gpointer ret = NULL;
-       guint32 i, k;
-       int thr_ret;
-
-       thr_ret = mono_os_mutex_lock (&scan_mutex);
-       g_assert (thr_ret == 0);
-
-       for (i = SLOT_INDEX (0); i < _wapi_private_handle_slot_count; i++) {
-               if (_wapi_private_handles [i]) {
-                       for (k = SLOT_OFFSET (0); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
-                               handle_data = &_wapi_private_handles [i][k];
-                       
-                               if (handle_data->type == type) {
-                                       ret = GUINT_TO_POINTER (i * _WAPI_HANDLE_INITIAL_COUNT + k);
-                                       if (on_each (ret, user_data) == TRUE)
-                                               break;
-                               }
-                       }
-               }
-       }
-
-       thr_ret = mono_os_mutex_unlock (&scan_mutex);
-       g_assert (thr_ret == 0);
-}
-
-/* This might list some shared handles twice if they are already
- * opened by this process, and the check function returns FALSE the
- * first time.  Shared handles that are created during the search are
- * unreffed if the check function returns FALSE, so callers must not
- * rely on the handle persisting (unless the check function returns
- * TRUE)
- * The caller owns the returned handle.
- */
-gpointer _wapi_search_handle (WapiHandleType type,
-                             gboolean (*check)(gpointer test, gpointer user),
-                             gpointer user_data,
-                             gpointer *handle_specific,
-                             gboolean search_shared)
-{
-       struct _WapiHandleUnshared *handle_data = NULL;
-       struct _WapiHandleShared *shared = NULL;
-       gpointer ret = NULL;
-       guint32 i, k;
-       gboolean found = FALSE;
-       int thr_ret;
-
-       thr_ret = mono_os_mutex_lock (&scan_mutex);
-       g_assert (thr_ret == 0);
-       
-       for (i = SLOT_INDEX (0); !found && i < _wapi_private_handle_slot_count; i++) {
-               if (_wapi_private_handles [i]) {
-                       for (k = SLOT_OFFSET (0); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
-                               handle_data = &_wapi_private_handles [i][k];
-               
-                               if (handle_data->type == type) {
-                                       ret = GUINT_TO_POINTER (i * _WAPI_HANDLE_INITIAL_COUNT + k);
-                                       if (check (ret, user_data) == TRUE) {
-                                               _wapi_handle_ref (ret);
-                                               found = TRUE;
-
-                                               if (_WAPI_SHARED_HANDLE (type)) {
-                                                       shared = &_wapi_shared_layout->handles[i];
-                                               }
-                                       
-                                               break;
-                                       }
-                               }
-                       }
-               }
-       }
-
-       thr_ret = mono_os_mutex_unlock (&scan_mutex);
-       g_assert (thr_ret == 0);
-
-       if (!found && search_shared && _WAPI_SHARED_HANDLE (type)) {
-               /* Not found yet, so search the shared memory too */
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Looking at other shared handles...", __func__);
-
-               for (i = 0; i < _WAPI_HANDLE_INITIAL_COUNT; i++) {
-                       shared = &_wapi_shared_layout->handles[i];
-                       
-                       if (shared->type == type) {
-                               /* Tell new_from_offset to not
-                                * timestamp this handle, because
-                                * otherwise it will ping every handle
-                                * in the list and they will never
-                                * expire
-                                */
-                               ret = _wapi_handle_new_from_offset (type, i,
-                                                                   FALSE);
-                               if (ret == INVALID_HANDLE_VALUE) {
-                                       /* This handle was deleted
-                                        * while we were looking at it
-                                        */
-                                       continue;
-                               }
-                               
-                               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Opened tmp handle %p (type %s) from offset %d", __func__, ret, _wapi_handle_typename[type], i);
-
-                               /* It's possible that the shared part
-                                * of this handle has now been blown
-                                * away (after new_from_offset
-                                * successfully opened it,) if its
-                                * timestamp is too old.  The check
-                                * function needs to be aware of this,
-                                * and cope if the handle has
-                                * vanished.
-                                */
-                               if (check (ret, user_data) == TRUE) {
-                                       /* Timestamp this handle, but make
-                                        * sure it still exists first
-                                        */
-                                       thr_ret = _wapi_handle_lock_shared_handles ();
-                                       g_assert (thr_ret == 0);
-                                       
-                                       if (shared->type == type) {
-                                               guint32 now = (guint32)(time (NULL) & 0xFFFFFFFF);
-                                               InterlockedExchange ((gint32 *)&shared->timestamp, now);
-
-                                               found = TRUE;
-                                               handle_data = &_WAPI_PRIVATE_HANDLES(GPOINTER_TO_UINT(ret));
-                                       
-                                               _wapi_handle_unlock_shared_handles ();
-                                               break;
-                                       } else {
-                                               /* It's been deleted,
-                                                * so just keep
-                                                * looking
-                                                */
-                                               _wapi_handle_unlock_shared_handles ();
-                                       }
-                               }
-                               
-                               /* This isn't the handle we're looking
-                                * for, so drop the reference we took
-                                * in _wapi_handle_new_from_offset ()
-                                */
-                               _wapi_handle_unref (ret);
-                       }
-               }
-       }
-       
-       if (!found) {
-               ret = NULL;
-               goto done;
-       }
-       
-       if(handle_specific != NULL) {
-               if (_WAPI_SHARED_HANDLE(type)) {
-                       g_assert(shared->type == type);
-                       
-                       *handle_specific = &shared->u;
-               } else {
-                       *handle_specific = &handle_data->u;
-               }
-       }
-
-done:
-       return(ret);
-}
-
-/* Returns the offset of the metadata array, or -1 on error, or 0 for
- * not found (0 is not a valid offset)
- */
-gint32 _wapi_search_handle_namespace (WapiHandleType type,
-                                     gchar *utf8_name)
-{
-       struct _WapiHandleShared *shared_handle_data;
-       guint32 i;
-       gint32 ret = 0;
-       int thr_ret;
-       
-       g_assert(_WAPI_SHARED_HANDLE(type));
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Lookup for handle named [%s] type %s", __func__,
-                  utf8_name, _wapi_handle_typename[type]);
-
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-       
-       for(i = 1; i < _WAPI_HANDLE_INITIAL_COUNT; i++) {
-               WapiSharedNamespace *sharedns;
-               
-               shared_handle_data = &_wapi_shared_layout->handles[i];
-
-               /* Check mutex, event, semaphore, timer, job and
-                * file-mapping object names.  So far only mutex,
-                * semaphore and event are implemented.
-                */
-               if (!_WAPI_SHARED_NAMESPACE (shared_handle_data->type)) {
-                       continue;
-               }
-
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: found a shared namespace handle at 0x%x (type %s)", __func__, i, _wapi_handle_typename[shared_handle_data->type]);
-
-               sharedns=(WapiSharedNamespace *)&shared_handle_data->u;
-                       
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: name is [%s]", __func__, sharedns->name);
-
-               if (strcmp (sharedns->name, utf8_name) == 0) {
-                       if (shared_handle_data->type != type) {
-                               /* Its the wrong type, so fail now */
-                               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle 0x%x matches name but is wrong type: %s", __func__, i, _wapi_handle_typename[shared_handle_data->type]);
-                               ret = -1;
-                               goto done;
-                       } else {
-                               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle 0x%x matches name and type", __func__, i);
-                               ret = i;
-                               goto done;
-                       }
-               }
-       }
-
-done:
-       _wapi_handle_unlock_shared_handles ();
-       
-       return(ret);
-}
-
-void _wapi_handle_ref (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       struct _WapiHandleUnshared *handle_data;
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Attempting to ref invalid private handle %p", __func__, handle);
-               return;
-       }
-       
-       if (_wapi_handle_type (handle) == WAPI_HANDLE_UNUSED) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Attempting to ref unused handle %p", __func__, handle);
-               return;
-       }
-
-       handle_data = &_WAPI_PRIVATE_HANDLES(idx);
-       
-       InterlockedIncrement ((gint32 *)&handle_data->ref);
-
-       /* It's possible for processes to exit before getting around
-        * to updating timestamps in the collection thread, so if a
-        * shared handle is reffed do the timestamp here as well just
-        * to make sure.
-        */
-       if (_WAPI_SHARED_HANDLE(handle_data->type)) {
-               struct _WapiHandleShared *shared_data = &_wapi_shared_layout->handles[handle_data->u.shared.offset];
-               guint32 now = (guint32)(time (NULL) & 0xFFFFFFFF);
-               InterlockedExchange ((gint32 *)&shared_data->timestamp, now);
-       }
-       
-#ifdef DEBUG_REFS
-       g_message ("%s: %s handle %p ref now %d", __func__, 
-                  _wapi_handle_typename[_WAPI_PRIVATE_HANDLES (idx).type],
-                  handle,
-                  _WAPI_PRIVATE_HANDLES(idx).ref);
-#endif
-}
-
-/* The handle must not be locked on entry to this function */
-static void _wapi_handle_unref_full (gpointer handle, gboolean ignore_private_busy_handles)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       gboolean destroy = FALSE, early_exit = FALSE;
-       int thr_ret;
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return;
-       }
-       
-       if (_wapi_handle_type (handle) == WAPI_HANDLE_UNUSED) {
-               g_warning ("%s: Attempting to unref unused handle %p",
-                          __func__, handle);
-               return;
-       }
-
-       /* Possible race condition here if another thread refs the
-        * handle between here and setting the type to UNUSED.  I
-        * could lock a mutex, but I'm not sure that allowing a handle
-        * reference to reach 0 isn't an application bug anyway.
-        */
-       destroy = (InterlockedDecrement ((gint32 *)&_WAPI_PRIVATE_HANDLES(idx).ref) ==0);
-       
-#ifdef DEBUG_REFS
-       g_message ("%s: %s handle %p ref now %d (destroy %s)", __func__,
-                  _wapi_handle_typename[_WAPI_PRIVATE_HANDLES (idx).type],
-                  handle,
-                  _WAPI_PRIVATE_HANDLES(idx).ref, destroy?"TRUE":"FALSE");
-#endif
-       
-       if(destroy==TRUE) {
-               /* Need to copy the handle info, reset the slot in the
-                * array, and _only then_ call the close function to
-                * avoid race conditions (eg file descriptors being
-                * closed, and another file being opened getting the
-                * same fd racing the memset())
-                */
-               struct _WapiHandleUnshared handle_data;
-               struct _WapiHandleShared shared_handle_data;
-               WapiHandleType type = _WAPI_PRIVATE_HANDLES(idx).type;
-               void (*close_func)(gpointer, gpointer) = _wapi_handle_ops_get_close_func (type);
-               gboolean is_shared = _WAPI_SHARED_HANDLE(type);
-
-               if (is_shared) {
-                       /* If this is a shared handle we need to take
-                        * the shared lock outside of the scan_mutex
-                        * lock to avoid deadlocks
-                        */
-                       thr_ret = _wapi_handle_lock_shared_handles ();
-                       g_assert (thr_ret == 0);
-               }
-               
-               thr_ret = mono_os_mutex_lock (&scan_mutex);
-
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Destroying handle %p", __func__, handle);
-               
-               memcpy (&handle_data, &_WAPI_PRIVATE_HANDLES(idx),
-                       sizeof (struct _WapiHandleUnshared));
-
-               memset (&_WAPI_PRIVATE_HANDLES(idx).u, '\0',
-                       sizeof(_WAPI_PRIVATE_HANDLES(idx).u));
-
-               _WAPI_PRIVATE_HANDLES(idx).type = WAPI_HANDLE_UNUSED;
-               
-               if (!is_shared) {
-                       /* Destroy the mutex and cond var.  We hope nobody
-                        * tried to grab them between the handle unlock and
-                        * now, but pthreads doesn't have a
-                        * "unlock_and_destroy" atomic function.
-                        */
-                       thr_ret = mono_os_mutex_destroy (&_WAPI_PRIVATE_HANDLES(idx).signal_mutex);
-                       /*WARNING gross hack to make cleanup not crash when exiting without the whole runtime teardown.*/
-                       if (thr_ret == EBUSY && ignore_private_busy_handles) {
-                               early_exit = TRUE;
-                       } else {
-                               if (thr_ret != 0)
-                                       g_error ("Error destroying handle %p mutex due to %d\n", handle, thr_ret);
-
-                               thr_ret = pthread_cond_destroy (&_WAPI_PRIVATE_HANDLES(idx).signal_cond);
-                               if (thr_ret == EBUSY && ignore_private_busy_handles)
-                                       early_exit = TRUE;
-                               else if (thr_ret != 0)
-                                       g_error ("Error destroying handle %p cond var due to %d\n", handle, thr_ret);
-                       }
-               } else {
-                       struct _WapiHandleShared *shared = &_wapi_shared_layout->handles[handle_data.u.shared.offset];
-
-                       memcpy (&shared_handle_data, shared,
-                               sizeof (struct _WapiHandleShared));
-                       
-                       /* It's possible that this handle is already
-                        * pointing at a deleted shared section
-                        */
-#ifdef DEBUG_REFS
-                       g_message ("%s: %s handle %p shared refs before dec %d", __func__, _wapi_handle_typename[type], handle, shared->handle_refs);
-#endif
-
-                       if (shared->handle_refs > 0) {
-                               shared->handle_refs--;
-                               if (shared->handle_refs == 0) {
-                                       memset (shared, '\0', sizeof (struct _WapiHandleShared));
-                               }
-                       }
-               }
-
-               thr_ret = mono_os_mutex_unlock (&scan_mutex);
-               g_assert (thr_ret == 0);
-
-               if (early_exit)
-                       return;
-               if (is_shared) {
-                       _wapi_handle_unlock_shared_handles ();
-               }
-               
-               if (close_func != NULL) {
-                       if (is_shared) {
-                               close_func (handle, &shared_handle_data.u);
-                       } else {
-                               close_func (handle, &handle_data.u);
-                       }
-               }
-       }
-}
-
-void _wapi_handle_unref (gpointer handle)
-{
-       _wapi_handle_unref_full (handle, FALSE);
-}
-
-void _wapi_handle_register_capabilities (WapiHandleType type,
-                                        WapiHandleCapability caps)
-{
-       handle_caps[type] = caps;
-}
-
-gboolean _wapi_handle_test_capabilities (gpointer handle,
-                                        WapiHandleCapability caps)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       WapiHandleType type;
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return(FALSE);
-       }
-       
-       type = _WAPI_PRIVATE_HANDLES(idx).type;
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: testing 0x%x against 0x%x (%d)", __func__,
-                  handle_caps[type], caps, handle_caps[type] & caps);
-       
-       return((handle_caps[type] & caps) != 0);
-}
-
-static void (*_wapi_handle_ops_get_close_func (WapiHandleType type))(gpointer, gpointer)
-{
-       if (handle_ops[type] != NULL &&
-           handle_ops[type]->close != NULL) {
-               return (handle_ops[type]->close);
-       }
-
-       return (NULL);
-}
-
-void _wapi_handle_ops_close (gpointer handle, gpointer data)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       WapiHandleType type;
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return;
-       }
-       
-       type = _WAPI_PRIVATE_HANDLES(idx).type;
-
-       if (handle_ops[type] != NULL &&
-           handle_ops[type]->close != NULL) {
-               handle_ops[type]->close (handle, data);
-       }
-}
-
-void _wapi_handle_ops_signal (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       WapiHandleType type;
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return;
-       }
-       
-       type = _WAPI_PRIVATE_HANDLES(idx).type;
-
-       if (handle_ops[type] != NULL && handle_ops[type]->signal != NULL) {
-               handle_ops[type]->signal (handle);
-       }
-}
-
-gboolean _wapi_handle_ops_own (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       WapiHandleType type;
-       
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return(FALSE);
-       }
-       
-       type = _WAPI_PRIVATE_HANDLES(idx).type;
-
-       if (handle_ops[type] != NULL && handle_ops[type]->own_handle != NULL) {
-               return(handle_ops[type]->own_handle (handle));
-       } else {
-               return(FALSE);
-       }
-}
-
-gboolean _wapi_handle_ops_isowned (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       WapiHandleType type;
-
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return(FALSE);
-       }
-       
-       type = _WAPI_PRIVATE_HANDLES(idx).type;
-
-       if (handle_ops[type] != NULL && handle_ops[type]->is_owned != NULL) {
-               return(handle_ops[type]->is_owned (handle));
-       } else {
-               return(FALSE);
-       }
-}
-
-guint32 _wapi_handle_ops_special_wait (gpointer handle, guint32 timeout, gboolean alertable)
-{
-       guint32 idx = GPOINTER_TO_UINT(handle);
-       WapiHandleType type;
-       
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return(WAIT_FAILED);
-       }
-       
-       type = _WAPI_PRIVATE_HANDLES(idx).type;
-       
-       if (handle_ops[type] != NULL &&
-           handle_ops[type]->special_wait != NULL) {
-               return(handle_ops[type]->special_wait (handle, timeout, alertable));
-       } else {
-               return(WAIT_FAILED);
-       }
-}
-
-void _wapi_handle_ops_prewait (gpointer handle)
-{
-       guint32 idx = GPOINTER_TO_UINT (handle);
-       WapiHandleType type;
-       
-       if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
-               return;
-       }
-       
-       type = _WAPI_PRIVATE_HANDLES (idx).type;
-       
-       if (handle_ops[type] != NULL &&
-           handle_ops[type]->prewait != NULL) {
-               handle_ops[type]->prewait (handle);
-       }
-}
-
-
-/**
- * CloseHandle:
- * @handle: The handle to release
- *
- * Closes and invalidates @handle, releasing any resources it
- * consumes.  When the last handle to a temporary or non-persistent
- * object is closed, that object can be deleted.  Closing the same
- * handle twice is an error.
- *
- * Return value: %TRUE on success, %FALSE otherwise.
- */
-gboolean CloseHandle(gpointer handle)
-{
-       if (handle == NULL) {
-               /* Problem: because we map file descriptors to the
-                * same-numbered handle we can't tell the difference
-                * between a bogus handle and the handle to stdin.
-                * Assume that it's the console handle if that handle
-                * exists...
-                */
-               if (_WAPI_PRIVATE_HANDLES (0).type != WAPI_HANDLE_CONSOLE) {
-                       SetLastError (ERROR_INVALID_PARAMETER);
-                       return(FALSE);
-               }
-       }
-       if (handle == _WAPI_HANDLE_INVALID){
-               SetLastError (ERROR_INVALID_PARAMETER);
-               return(FALSE);
-       }
-       
-       _wapi_handle_unref (handle);
-       
-       return(TRUE);
-}
-
-/* Lots more to implement here, but this is all we need at the moment */
-gboolean DuplicateHandle (gpointer srcprocess, gpointer src,
-                         gpointer targetprocess, gpointer *target,
-                         guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, guint32 options G_GNUC_UNUSED)
-{
-       if (srcprocess != _WAPI_PROCESS_CURRENT ||
-           targetprocess != _WAPI_PROCESS_CURRENT) {
-               /* Duplicating other process's handles is not supported */
-               SetLastError (ERROR_INVALID_HANDLE);
-               return(FALSE);
-       }
-       
-       if (src == _WAPI_PROCESS_CURRENT) {
-               *target = _wapi_process_duplicate ();
-       } else if (src == _WAPI_THREAD_CURRENT) {
-               g_assert_not_reached ();
-       } else {
-               _wapi_handle_ref (src);
-               *target = src;
-       }
-       
-       return(TRUE);
-}
-
-gboolean _wapi_handle_count_signalled_handles (guint32 numhandles,
-                                              gpointer *handles,
-                                              gboolean waitall,
-                                              guint32 *retcount,
-                                              guint32 *lowest)
-{
-       guint32 count, i, iter=0;
-       gboolean ret;
-       int thr_ret;
-       WapiHandleType type;
-       
-       /* Lock all the handles, with backoff */
-again:
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-       
-       for(i=0; i<numhandles; i++) {
-               gpointer handle = handles[i];
-               guint32 idx = GPOINTER_TO_UINT(handle);
-
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: attempting to lock %p", __func__, handle);
-
-               type = _WAPI_PRIVATE_HANDLES(idx).type;
-
-               thr_ret = _wapi_handle_trylock_handle (handle);
-               
-               if (thr_ret != 0) {
-                       /* Bummer */
-                       
-                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: attempt failed for %p: %s", __func__,
-                                  handle, strerror (thr_ret));
-
-                       thr_ret = _wapi_handle_unlock_shared_handles ();
-                       g_assert (thr_ret == 0);
-                       
-                       while (i--) {
-                               handle = handles[i];
-                               idx = GPOINTER_TO_UINT(handle);
-
-                               thr_ret = _wapi_handle_unlock_handle (handle);
-                               g_assert (thr_ret == 0);
-                       }
-
-                       /* If iter ever reaches 100 the nanosleep will
-                        * return EINVAL immediately, but we have a
-                        * design flaw if that happens.
-                        */
-                       iter++;
-                       if(iter==100) {
-                               g_warning ("%s: iteration overflow!",
-                                          __func__);
-                               iter=1;
-                       }
-                       
-                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Backing off for %d ms", __func__,
-                                  iter*10);
-                       _wapi_handle_spin (10 * iter);
-                       
-                       goto again;
-               }
-       }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Locked all handles", __func__);
-
-       count=0;
-       *lowest=numhandles;
-       
-       for(i=0; i<numhandles; i++) {
-               gpointer handle = handles[i];
-               guint32 idx = GPOINTER_TO_UINT(handle);
-               
-               type = _WAPI_PRIVATE_HANDLES(idx).type;
-
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Checking handle %p", __func__, handle);
-
-               if(((_wapi_handle_test_capabilities (handle, WAPI_HANDLE_CAP_OWN)==TRUE) &&
-                   (_wapi_handle_ops_isowned (handle) == TRUE)) ||
-                  (_WAPI_SHARED_HANDLE(type) &&
-                   WAPI_SHARED_HANDLE_DATA(handle).signalled == TRUE) ||
-                  (!_WAPI_SHARED_HANDLE(type) &&
-                   _WAPI_PRIVATE_HANDLES(idx).signalled == TRUE)) {
-                       count++;
-                       
-                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Handle %p signalled", __func__,
-                                  handle);
-                       if(*lowest>i) {
-                               *lowest=i;
-                       }
-               }
-       }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %d event handles signalled", __func__, count);
-
-       if ((waitall == TRUE && count == numhandles) ||
-           (waitall == FALSE && count > 0)) {
-               ret=TRUE;
-       } else {
-               ret=FALSE;
-       }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Returning %d", __func__, ret);
-
-       *retcount=count;
-       
-       return(ret);
-}
-
-void _wapi_handle_unlock_handles (guint32 numhandles, gpointer *handles)
-{
-       guint32 i;
-       int thr_ret;
-       
-       thr_ret = _wapi_handle_unlock_shared_handles ();
-       g_assert (thr_ret == 0);
-       
-       for(i=0; i<numhandles; i++) {
-               gpointer handle = handles[i];
-               
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking handle %p", __func__, handle);
-
-               thr_ret = _wapi_handle_unlock_handle (handle);
-               g_assert (thr_ret == 0);
-       }
-}
-
-int
-_wapi_handle_timedwait_signal (guint32 timeout, gboolean poll, gboolean *alerted)
-{
-       return _wapi_handle_timedwait_signal_handle (_wapi_global_signal_handle, timeout, TRUE, poll, alerted);
-}
-
-static void
-signal_handle_and_unref (gpointer handle)
-{
-       pthread_cond_t *cond;
-       mono_mutex_t *mutex;
-       guint32 idx;
-
-       g_assert (handle);
-
-       /* If we reach here, then interrupt token is set to the flag value, which
-        * means that the target thread is either
-        * - before the first CAS in timedwait, which means it won't enter the wait.
-        * - it is after the first CAS, so it is already waiting, or it will enter
-        *    the wait, and it will be interrupted by the broadcast. */
-       idx = GPOINTER_TO_UINT (handle);
-       cond = &_WAPI_PRIVATE_HANDLES (idx).signal_cond;
-       mutex = &_WAPI_PRIVATE_HANDLES (idx).signal_mutex;
-
-       mono_os_mutex_lock (mutex);
-       mono_os_cond_broadcast (cond);
-       mono_os_mutex_unlock (mutex);
-
-       _wapi_handle_unref (handle);
-}
-
-int
-_wapi_handle_timedwait_signal_handle (gpointer handle, guint32 timeout, gboolean alertable, gboolean poll, gboolean *alerted)
-{
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: waiting for %p (type %s)", __func__, handle,
-                  _wapi_handle_typename[_wapi_handle_type (handle)]);
-
-       if (alertable)
-               g_assert (alerted);
-
-       if (alerted)
-               *alerted = FALSE;
-
-       if (_WAPI_SHARED_HANDLE (_wapi_handle_type (handle))) {
-               if (WAPI_SHARED_HANDLE_DATA(handle).signalled == TRUE) {
-                       return (0);
-               }
-               if (timeout != INFINITE) {
-                       if (timeout < 100) {
-                               /* FIXME: Real timeout is less than
-                                * 100ms time, but is it really worth
-                                * calculating to the exact ms?
-                                */
-                               _wapi_handle_spin (100);
-
-                               if (WAPI_SHARED_HANDLE_DATA(handle).signalled == TRUE) {
-                                       return (0);
-                               } else {
-                                       return (ETIMEDOUT);
-                               }
-                       }
-               }
-               _wapi_handle_spin (100);
-               return (0);
-               
-       } else {
-               guint32 idx = GPOINTER_TO_UINT(handle);
-               int res;
-               pthread_cond_t *cond;
-               mono_mutex_t *mutex;
-
-               if (alertable) {
-                       mono_thread_info_install_interrupt (signal_handle_and_unref, handle, alerted);
-                       if (*alerted)
-                               return 0;
-                       _wapi_handle_ref (handle);
-               }
-
-               cond = &_WAPI_PRIVATE_HANDLES (idx).signal_cond;
-               mutex = &_WAPI_PRIVATE_HANDLES (idx).signal_mutex;
-
-               if (!poll) {
-                       res = mono_os_cond_timedwait (cond, mutex, timeout);
-               } else {
-                       /* This is needed when waiting for process handles */
-                       if (!alertable) {
-                               /*
-                                * pthread_cond_(timed)wait() can return 0 even if the condition was not
-                                * signalled.  This happens at least on Darwin.  We surface this, i.e., we
-                                * get spurious wake-ups.
-                                *
-                                * http://pubs.opengroup.org/onlinepubs/007908775/xsh/pthread_cond_wait.html
-                                */
-                               res = mono_os_cond_timedwait (cond, mutex, timeout);
-                       } else {
-                               if (timeout < 100) {
-                                       /* Real timeout is less than 100ms time */
-                                       res = mono_os_cond_timedwait (cond, mutex, timeout);
-                               } else {
-                                       res = mono_os_cond_timedwait (cond, mutex, 100);
-
-                                       /* Mask the fake timeout, this will cause
-                                        * another poll if the cond was not really signaled
-                                        */
-                                       if (res == ETIMEDOUT)
-                                               res = 0;
-                               }
-                       }
-               }
-
-               if (alertable) {
-                       mono_thread_info_uninstall_interrupt (alerted);
-                       if (!*alerted) {
-                               /* if it is alerted, then the handle is unref in the interrupt callback */
-                               _wapi_handle_unref (handle);
-                       }
-               }
-
-               return res;
-       }
-}
-
-void
-_wapi_free_share_info (_WapiFileShare *share_info)
-{
-       file_share_hash_lock ();
-       g_hash_table_remove (file_share_hash, share_info);
-       file_share_hash_unlock ();
-       /* The hashtable dtor frees share_info */
-}
-
-static gint
-wapi_share_info_equal (gconstpointer ka, gconstpointer kb)
-{
-       const _WapiFileShare *s1 = (const _WapiFileShare *)ka;
-       const _WapiFileShare *s2 = (const _WapiFileShare *)kb;
-
-       return (s1->device == s2->device && s1->inode == s2->inode) ? 1 : 0;
-}
-
-static guint
-wapi_share_info_hash (gconstpointer data)
-{
-       const _WapiFileShare *s = (const _WapiFileShare *)data;
-
-       return s->inode;
-}
-
-gboolean _wapi_handle_get_or_set_share (guint64 device, guint64 inode,
-                                       guint32 new_sharemode,
-                                       guint32 new_access,
-                                       guint32 *old_sharemode,
-                                       guint32 *old_access,
-                                       struct _WapiFileShare **share_info)
-{
-       struct _WapiFileShare *file_share;
-       int thr_ret;
-       gboolean exists = FALSE;
-
-       /* Prevents entries from expiring under us as we search
-        */
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-       
-       /* Prevent new entries racing with us */
-       thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE);
-       g_assert (thr_ret == 0);
-
-       _WapiFileShare tmp;
-
-       /*
-        * Instead of allocating a 4MB array, we use a hash table to keep track of this
-        * info. This is needed even if SHM is disabled, to track sharing inside
-        * the current process.
-        */
-       if (!file_share_hash) {
-               file_share_hash = g_hash_table_new_full (wapi_share_info_hash, wapi_share_info_equal, NULL, g_free);
-               mono_os_mutex_init_recursive (&file_share_hash_mutex);
-       }
-
-       tmp.device = device;
-       tmp.inode = inode;
-
-       file_share_hash_lock ();
-
-       file_share = (_WapiFileShare *)g_hash_table_lookup (file_share_hash, &tmp);
-       if (file_share) {
-               *old_sharemode = file_share->sharemode;
-               *old_access = file_share->access;
-               *share_info = file_share;
-
-               InterlockedIncrement ((gint32 *)&file_share->handle_refs);
-               exists = TRUE;
-       } else {
-               file_share = g_new0 (_WapiFileShare, 1);
-
-               file_share->device = device;
-               file_share->inode = inode;
-               file_share->opened_by_pid = _wapi_getpid ();
-               file_share->sharemode = new_sharemode;
-               file_share->access = new_access;
-               file_share->handle_refs = 1;
-               *share_info = file_share;
-
-               g_hash_table_insert (file_share_hash, file_share, file_share);
-       }
-
-       file_share_hash_unlock ();
-       
-       thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
-
-       _wapi_handle_unlock_shared_handles ();
-
-       return(exists);
-}
-
-/* If we don't have the info in /proc, check if the process that
- * opened this share info is still there (it's not a perfect method,
- * due to pid reuse)
- */
-static void _wapi_handle_check_share_by_pid (struct _WapiFileShare *share_info)
-{
-#if defined(__native_client__)
-       g_assert_not_reached ();
-#elif defined(HAVE_KILL)
-       if (kill (share_info->opened_by_pid, 0) == -1 &&
-           (errno == ESRCH ||
-            errno == EPERM)) {
-               /* It's gone completely (or there's a new process
-                * owned by someone else) so mark this share info as
-                * dead
-                */
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Didn't find it, destroying entry", __func__);
-
-               _wapi_free_share_info (share_info);
-       }
-#endif
-}
-
-#ifdef __linux__
-/* Scan /proc/<pids>/fd/ for open file descriptors to the file in
- * question.  If there are none, reset the share info.
- *
- * This implementation is Linux-specific; legacy systems will have to
- * implement their own ways of finding out if a particular file is
- * open by a process.
- */
-void _wapi_handle_check_share (struct _WapiFileShare *share_info, int fd)
-{
-       gboolean found = FALSE, proc_fds = FALSE;
-       int thr_ret, i;
-       
-       /* Prevents entries from expiring under us if we remove this
-        * one
-        */
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-       
-       /* Prevent new entries racing with us */
-       thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE);
-       g_assert (thr_ret == 0);
-       
-       /* If there is no /proc, there's nothing more we can do here */
-       if (access ("/proc", F_OK) == -1) {
-               _wapi_handle_check_share_by_pid (share_info);
-               goto done;
-       }
-
-       /* If there's another handle that thinks it owns this fd, then even
-        * if the fd has been closed behind our back consider it still owned.
-        * See bugs 75764 and 75891
-        */
-       for (i = 0; i < _wapi_fd_reserve; i++) {
-               if (_wapi_private_handles [SLOT_INDEX (i)]) {
-                       struct _WapiHandleUnshared *handle = &_WAPI_PRIVATE_HANDLES(i);
-
-                       if (i != fd &&
-                               handle->type == WAPI_HANDLE_FILE) {
-                               struct _WapiHandle_file *file_handle = &handle->u.file;
-
-                               if (file_handle->share_info == share_info) {
-                                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle 0x%x has this file open!",
-                                                          __func__, i);
-
-                                       goto done;
-                               }
-                       }
-               }
-       }
-
-       if (proc_fds == FALSE) {
-               _wapi_handle_check_share_by_pid (share_info);
-       } else if (found == FALSE) {
-               /* Blank out this entry, as it is stale */
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Didn't find it, destroying entry", __func__);
-
-               _wapi_free_share_info (share_info);
-       }
-
-done:
-       thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
-
-       _wapi_handle_unlock_shared_handles ();
-}
-#else
-//
-// Other implementations (non-Linux)
-//
-void _wapi_handle_check_share (struct _WapiFileShare *share_info, int fd)
-{
-       int thr_ret;
-       
-       /* Prevents entries from expiring under us if we remove this
-        * one */
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-       
-       /* Prevent new entries racing with us */
-       thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE);
-       g_assert (thr_ret == 0);
-       
-       _wapi_handle_check_share_by_pid (share_info);
-
-       thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
-       _wapi_handle_unlock_shared_handles ();
-}
-#endif
-
-void _wapi_handle_dump (void)
-{
-       struct _WapiHandleUnshared *handle_data;
-       guint32 i, k;
-       int thr_ret;
-       
-       thr_ret = mono_os_mutex_lock (&scan_mutex);
-       g_assert (thr_ret == 0);
-       
-       for(i = SLOT_INDEX (0); i < _wapi_private_handle_slot_count; i++) {
-               if (_wapi_private_handles [i]) {
-                       for (k = SLOT_OFFSET (0); k < _WAPI_HANDLE_INITIAL_COUNT; k++) {
-                               handle_data = &_wapi_private_handles [i][k];
-
-                               if (handle_data->type == WAPI_HANDLE_UNUSED) {
-                                       continue;
-                               }
-               
-                               g_print ("%3x [%7s] %s %d ",
-                                                i * _WAPI_HANDLE_INITIAL_COUNT + k,
-                                                _wapi_handle_typename[handle_data->type],
-                                                handle_data->signalled?"Sg":"Un",
-                                                handle_data->ref);
-                               if (handle_details[handle_data->type])
-                                       handle_details[handle_data->type](&handle_data->u);
-                               g_print ("\n");
-                       }
-               }
-       }
-
-       thr_ret = mono_os_mutex_unlock (&scan_mutex);
-       g_assert (thr_ret == 0);
-}
-
-static void _wapi_shared_details (gpointer handle_info)
-{
-       struct _WapiHandle_shared_ref *shared = (struct _WapiHandle_shared_ref *)handle_info;
-       
-       g_print ("offset: 0x%x", shared->offset);
-}
diff --git a/mono/io-layer/handles.h b/mono/io-layer/handles.h
deleted file mode 100644 (file)
index 31cab7b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * handles.h:  Generic operations on handles
- *
- * Author:
- *     Dick Porter (dick@ximian.com)
- *
- * (C) 2002 Ximian, Inc.
- */
-
-#ifndef _WAPI_HANDLES_H_
-#define _WAPI_HANDLES_H_
-
-#define INVALID_HANDLE_VALUE (gpointer)-1
-
-G_BEGIN_DECLS
-
-extern gboolean CloseHandle (gpointer handle);
-extern gboolean DuplicateHandle (gpointer srcprocess, gpointer src, gpointer targetprocess, gpointer *target, guint32 access, gboolean inherit, guint32 options);
-
-extern void wapi_init (void);
-extern void wapi_cleanup (void);
-
-int wapi_getdtablesize (void);
-
-G_END_DECLS
-
-#endif /* _WAPI_HANDLES_H_ */
index 9af4b1f0a11f0c4d65152b1b5ab7eccdc75b3168..392b081ca798927e41c67fbd9c824fa17fd6fd97 100644 (file)
 #include <mono/io-layer/io.h>
 #include <mono/io-layer/wapi-private.h>
 
-extern struct _WapiHandleOps _wapi_file_ops;
-extern struct _WapiHandleOps _wapi_console_ops;
-extern struct _WapiHandleOps _wapi_find_ops;
-extern struct _WapiHandleOps _wapi_pipe_ops;
-
 extern gboolean _wapi_lock_file_region (int fd, off_t offset, off_t length);
 extern gboolean _wapi_unlock_file_region (int fd, off_t offset, off_t length);
-extern void _wapi_file_details (gpointer handle_info);
-extern void _wapi_console_details (gpointer handle_info);
-extern void _wapi_pipe_details (gpointer handle_info);
 extern gpointer _wapi_stdhandle_create (int fd, const gchar *name);
 
 /* Currently used for both FILE, CONSOLE and PIPE handle types.  This may
index f67ff65f842d42f6ab847bf40d867d4f49dce97c..e65fdc345a336f6c846e577b47b359a85c393813 100644 (file)
@@ -13,6 +13,7 @@
 #ifdef DISABLE_IO_LAYER_TRACE
 #define MONO_TRACE(...)
 #else
+#include "mono/utils/mono-logger-internals.h"
 #define MONO_TRACE(...) mono_trace (__VA_ARGS__)
 #endif
 
index 5d10b370a9c8309a629414a236804a9d1a7962c6..8ec7c50ae58ac61949a50fe4b3d51f45278dff33 100644 (file)
@@ -38,7 +38,6 @@
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/io-private.h>
 #include <mono/io-layer/timefuncs-private.h>
 #include <mono/io-layer/thread-private.h>
 #include <mono/utils/strenc.h>
 #include <mono/utils/mono-once.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
+
+/*
+ * If SHM is disabled, this will point to a hash of _WapiFileShare structures, otherwise
+ * it will be NULL. We use this instead of _wapi_fileshare_layout to avoid allocating a
+ * 4MB array.
+ */
+static GHashTable *file_share_hash;
+static mono_mutex_t file_share_hash_mutex;
+
+#define file_share_hash_lock() mono_os_mutex_lock (&file_share_hash_mutex)
+#define file_share_hash_unlock() mono_os_mutex_unlock (&file_share_hash_mutex)
+
+static void
+_wapi_handle_share_release (_WapiFileShare *share_info)
+{
+       int thr_ret;
+
+       g_assert (share_info->handle_refs > 0);
+       
+       /* Prevent new entries racing with us */
+       thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE);
+       g_assert(thr_ret == 0);
+
+       if (InterlockedDecrement ((gint32 *)&share_info->handle_refs) == 0) {
+               file_share_hash_lock ();
+               g_hash_table_remove (file_share_hash, share_info);
+               file_share_hash_unlock ();
+       }
+
+       thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
+       g_assert (thr_ret == 0);
+}
+
+static gint
+wapi_share_info_equal (gconstpointer ka, gconstpointer kb)
+{
+       const _WapiFileShare *s1 = (const _WapiFileShare *)ka;
+       const _WapiFileShare *s2 = (const _WapiFileShare *)kb;
+
+       return (s1->device == s2->device && s1->inode == s2->inode) ? 1 : 0;
+}
+
+static guint
+wapi_share_info_hash (gconstpointer data)
+{
+       const _WapiFileShare *s = (const _WapiFileShare *)data;
+
+       return s->inode;
+}
+
+static gboolean
+_wapi_handle_get_or_set_share (guint64 device, guint64 inode, guint32 new_sharemode, guint32 new_access,
+       guint32 *old_sharemode, guint32 *old_access, struct _WapiFileShare **share_info)
+{
+       struct _WapiFileShare *file_share;
+       int thr_ret;
+       gboolean exists = FALSE;
+
+       /* Prevent new entries racing with us */
+       thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE);
+       g_assert (thr_ret == 0);
+
+       _WapiFileShare tmp;
+
+       /*
+        * Instead of allocating a 4MB array, we use a hash table to keep track of this
+        * info. This is needed even if SHM is disabled, to track sharing inside
+        * the current process.
+        */
+       if (!file_share_hash) {
+               file_share_hash = g_hash_table_new_full (wapi_share_info_hash, wapi_share_info_equal, NULL, g_free);
+               mono_os_mutex_init_recursive (&file_share_hash_mutex);
+       }
+
+       tmp.device = device;
+       tmp.inode = inode;
+
+       file_share_hash_lock ();
+
+       file_share = (_WapiFileShare *)g_hash_table_lookup (file_share_hash, &tmp);
+       if (file_share) {
+               *old_sharemode = file_share->sharemode;
+               *old_access = file_share->access;
+               *share_info = file_share;
+
+               InterlockedIncrement ((gint32 *)&file_share->handle_refs);
+               exists = TRUE;
+       } else {
+               file_share = g_new0 (_WapiFileShare, 1);
+
+               file_share->device = device;
+               file_share->inode = inode;
+               file_share->opened_by_pid = _wapi_getpid ();
+               file_share->sharemode = new_sharemode;
+               file_share->access = new_access;
+               file_share->handle_refs = 1;
+               *share_info = file_share;
+
+               g_hash_table_insert (file_share_hash, file_share, file_share);
+       }
+
+       file_share_hash_unlock ();
+       
+       thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
+       g_assert (thr_ret == 0);
+
+       return(exists);
+}
 
 static void file_close (gpointer handle, gpointer data);
+static void file_details (gpointer data);
+static const gchar* file_typename (void);
+static gsize file_typesize (void);
 static WapiFileType file_getfiletype(void);
 static gboolean file_read(gpointer handle, gpointer buffer,
                          guint32 numbytes, guint32 *bytesread,
@@ -71,31 +182,22 @@ static gboolean file_setfiletime(gpointer handle,
 static guint32 GetDriveTypeFromPath (const gchar *utf8_root_path_name);
 
 /* File handle is only signalled for overlapped IO */
-struct _WapiHandleOps _wapi_file_ops = {
+static MonoW32HandleOps _wapi_file_ops = {
        file_close,             /* close */
        NULL,                   /* signal */
        NULL,                   /* own */
        NULL,                   /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       NULL,                   /* prewait */
+       file_details,   /* details */
+       file_typename,  /* typename */
+       file_typesize,  /* typesize */
 };
 
-void _wapi_file_details (gpointer handle_info)
-{
-       struct _WapiHandle_file *file = (struct _WapiHandle_file *)handle_info;
-       
-       g_print ("[%20s] acc: %c%c%c, shr: %c%c%c, attrs: %5u",
-                file->filename,
-                file->fileaccess&GENERIC_READ?'R':'.',
-                file->fileaccess&GENERIC_WRITE?'W':'.',
-                file->fileaccess&GENERIC_EXECUTE?'X':'.',
-                file->sharemode&FILE_SHARE_READ?'R':'.',
-                file->sharemode&FILE_SHARE_WRITE?'W':'.',
-                file->sharemode&FILE_SHARE_DELETE?'D':'.',
-                file->attrs);
-}
-
 static void console_close (gpointer handle, gpointer data);
+static void console_details (gpointer data);
+static const gchar* console_typename (void);
+static gsize console_typesize (void);
 static WapiFileType console_getfiletype(void);
 static gboolean console_read(gpointer handle, gpointer buffer,
                             guint32 numbytes, guint32 *bytesread,
@@ -107,32 +209,37 @@ static gboolean console_write(gpointer handle, gconstpointer buffer,
 /* Console is mostly the same as file, except it can block waiting for
  * input or output
  */
-struct _WapiHandleOps _wapi_console_ops = {
+static MonoW32HandleOps _wapi_console_ops = {
        console_close,          /* close */
        NULL,                   /* signal */
        NULL,                   /* own */
        NULL,                   /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       NULL,                   /* prewait */
+       console_details,        /* details */
+       console_typename,       /* typename */
+       console_typesize,       /* typesize */
 };
 
-void _wapi_console_details (gpointer handle_info)
-{
-       _wapi_file_details (handle_info);
-}
+static const gchar* find_typename (void);
+static gsize find_typesize (void);
 
-/* Find handle has no ops.
- */
-struct _WapiHandleOps _wapi_find_ops = {
+static MonoW32HandleOps _wapi_find_ops = {
        NULL,                   /* close */
        NULL,                   /* signal */
        NULL,                   /* own */
        NULL,                   /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       NULL,                   /* prewait */
+       NULL,                   /* details */
+       find_typename,  /* typename */
+       find_typesize,  /* typesize */
 };
 
 static void pipe_close (gpointer handle, gpointer data);
+static void pipe_details (gpointer data);
+static const gchar* pipe_typename (void);
+static gsize pipe_typesize (void);
 static WapiFileType pipe_getfiletype (void);
 static gboolean pipe_read (gpointer handle, gpointer buffer, guint32 numbytes,
                           guint32 *bytesread, WapiOverlapped *overlapped);
@@ -142,20 +249,18 @@ static gboolean pipe_write (gpointer handle, gconstpointer buffer,
 
 /* Pipe handles
  */
-struct _WapiHandleOps _wapi_pipe_ops = {
+static MonoW32HandleOps _wapi_pipe_ops = {
        pipe_close,             /* close */
        NULL,                   /* signal */
        NULL,                   /* own */
        NULL,                   /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       NULL,                   /* prewait */
+       pipe_details,   /* details */
+       pipe_typename,  /* typename */
+       pipe_typesize,  /* typesize */
 };
 
-void _wapi_pipe_details (gpointer handle_info)
-{
-       _wapi_file_details (handle_info);
-}
-
 static const struct {
        /* File, console and pipe handles */
        WapiFileType (*getfiletype)(void);
@@ -181,7 +286,7 @@ static const struct {
                                const WapiFileTime *create_time,
                                const WapiFileTime *last_access,
                                const WapiFileTime *last_write);
-} io_ops[WAPI_HANDLE_COUNT]={
+} io_ops[MONO_W32HANDLE_COUNT]={
        {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
        /* file */
        {file_getfiletype,
@@ -217,21 +322,8 @@ static const struct {
         NULL, NULL, NULL, NULL, NULL, NULL},
 };
 
-static mono_once_t io_ops_once=MONO_ONCE_INIT;
 static gboolean lock_while_writing = FALSE;
 
-static void io_ops_init (void)
-{
-/*     _wapi_handle_register_capabilities (WAPI_HANDLE_FILE, */
-/*                                         WAPI_HANDLE_CAP_WAIT); */
-/*     _wapi_handle_register_capabilities (WAPI_HANDLE_CONSOLE, */
-/*                                         WAPI_HANDLE_CAP_WAIT); */
-
-       if (g_getenv ("MONO_STRICT_IO_EMULATION") != NULL) {
-               lock_while_writing = TRUE;
-       }
-}
-
 /* Some utility functions.
  */
 
@@ -384,6 +476,31 @@ static void file_close (gpointer handle, gpointer data)
        close (fd);
 }
 
+static void file_details (gpointer data)
+{
+       struct _WapiHandle_file *file = (struct _WapiHandle_file *)data;
+       
+       g_print ("[%20s] acc: %c%c%c, shr: %c%c%c, attrs: %5u",
+                file->filename,
+                file->fileaccess&GENERIC_READ?'R':'.',
+                file->fileaccess&GENERIC_WRITE?'W':'.',
+                file->fileaccess&GENERIC_EXECUTE?'X':'.',
+                file->sharemode&FILE_SHARE_READ?'R':'.',
+                file->sharemode&FILE_SHARE_WRITE?'W':'.',
+                file->sharemode&FILE_SHARE_DELETE?'D':'.',
+                file->attrs);
+}
+
+static const gchar* file_typename (void)
+{
+       return "File";
+}
+
+static gsize file_typesize (void)
+{
+       return sizeof (struct _WapiHandle_file);
+}
+
 static WapiFileType file_getfiletype(void)
 {
        return(FILE_TYPE_DISK);
@@ -397,7 +514,7 @@ static gboolean file_read(gpointer handle, gpointer buffer,
        gboolean ok;
        int fd, ret;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                (gpointer *)&file_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -450,7 +567,7 @@ static gboolean file_write(gpointer handle, gconstpointer buffer,
        int ret, fd;
        off_t current_pos = 0;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                (gpointer *)&file_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -526,7 +643,7 @@ static gboolean file_flush(gpointer handle)
        gboolean ok;
        int ret, fd;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                (gpointer *)&file_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -566,7 +683,7 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
        int whence, fd;
        guint32 ret;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                (gpointer *)&file_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -663,7 +780,7 @@ static gboolean file_setendoffile(gpointer handle)
        off_t pos;
        int ret, fd;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                (gpointer *)&file_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -773,7 +890,7 @@ static guint32 file_getfilesize(gpointer handle, guint32 *highsize)
        int ret;
        int fd;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                (gpointer *)&file_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -859,7 +976,7 @@ static gboolean file_getfiletime(gpointer handle, WapiFileTime *create_time,
        guint64 create_ticks, access_ticks, write_ticks;
        int ret, fd;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                (gpointer *)&file_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -941,7 +1058,7 @@ static gboolean file_setfiletime(gpointer handle,
        guint64 access_ticks, write_ticks;
        int ret, fd;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                (gpointer *)&file_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -1058,6 +1175,21 @@ static void console_close (gpointer handle, gpointer data)
        }
 }
 
+static void console_details (gpointer data)
+{
+       file_details (data);
+}
+
+static const gchar* console_typename (void)
+{
+       return "Console";
+}
+
+static gsize console_typesize (void)
+{
+       return sizeof (struct _WapiHandle_file);
+}
+
 static WapiFileType console_getfiletype(void)
 {
        return(FILE_TYPE_CHAR);
@@ -1071,7 +1203,7 @@ static gboolean console_read(gpointer handle, gpointer buffer,
        gboolean ok;
        int ret, fd;
 
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_CONSOLE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_CONSOLE,
                                (gpointer *)&console_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up console handle %p", __func__,
@@ -1121,7 +1253,7 @@ static gboolean console_write(gpointer handle, gconstpointer buffer,
        gboolean ok;
        int ret, fd;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_CONSOLE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_CONSOLE,
                                (gpointer *)&console_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up console handle %p", __func__,
@@ -1167,6 +1299,16 @@ static gboolean console_write(gpointer handle, gconstpointer buffer,
        return(TRUE);
 }
 
+static const gchar* find_typename (void)
+{
+       return "Find";
+}
+
+static gsize find_typesize (void)
+{
+       return sizeof (struct _WapiHandle_find);
+}
+
 static void pipe_close (gpointer handle, gpointer data)
 {
        struct _WapiHandle_file *pipe_handle = (struct _WapiHandle_file*)data;
@@ -1182,6 +1324,21 @@ static void pipe_close (gpointer handle, gpointer data)
        close (fd);
 }
 
+static void pipe_details (gpointer data)
+{
+       file_details (data);
+}
+
+static const gchar* pipe_typename (void)
+{
+       return "Pipe";
+}
+
+static gsize pipe_typesize (void)
+{
+       return sizeof (struct _WapiHandle_file);
+}
+
 static WapiFileType pipe_getfiletype(void)
 {
        return(FILE_TYPE_PIPE);
@@ -1195,7 +1352,7 @@ static gboolean pipe_read (gpointer handle, gpointer buffer,
        gboolean ok;
        int ret, fd;
 
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_PIPE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_PIPE,
                                (gpointer *)&pipe_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up pipe handle %p", __func__,
@@ -1255,7 +1412,7 @@ static gboolean pipe_write(gpointer handle, gconstpointer buffer,
        gboolean ok;
        int ret, fd;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_PIPE,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_PIPE,
                                (gpointer *)&pipe_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up pipe handle %p", __func__,
@@ -1454,31 +1611,6 @@ share_allows_delete (struct stat *statbuf, struct _WapiFileShare **share_info)
 
        return(TRUE);
 }
-static gboolean share_check (struct stat *statbuf, guint32 sharemode,
-                            guint32 fileaccess,
-                            struct _WapiFileShare **share_info, int fd)
-{
-       if (share_allows_open (statbuf, sharemode, fileaccess,
-                              share_info) == TRUE) {
-               return (TRUE);
-       }
-       
-       /* Got a share violation.  Double check that the file is still
-        * open by someone, in case a process crashed while still
-        * holding a file handle.  This will also cope with someone
-        * using Mono.Posix to close the file.  This is cheaper and
-        * less intrusive to other processes than initiating a handle
-        * collection.
-        */
-
-       _wapi_handle_check_share (*share_info, fd);
-       if (share_allows_open (statbuf, sharemode, fileaccess,
-                              share_info) == TRUE) {
-               return (TRUE);
-       }
-
-       return(share_allows_open (statbuf, sharemode, fileaccess, share_info));
-}
 
 /**
  * CreateFile:
@@ -1522,10 +1654,8 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
        mode_t perms=0666;
        gchar *filename;
        int fd, ret;
-       WapiHandleType handle_type;
+       MonoW32HandleType handle_type;
        struct stat statbuf;
-       
-       mono_once (&io_ops_once, io_ops_init);
 
        if (attrs & FILE_ATTRIBUTE_TEMPORARY)
                perms = 0600;
@@ -1578,7 +1708,7 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
                return(INVALID_HANDLE_VALUE);
        }
 
-       if (fd >= _wapi_fd_reserve) {
+       if (fd >= mono_w32handle_fd_reserve) {
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: File descriptor is too big", __func__);
 
                SetLastError (ERROR_TOO_MANY_OPEN_FILES);
@@ -1607,8 +1737,8 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
        statbuf.st_ino = g_str_hash(filename);
 #endif
 
-       if (share_check (&statbuf, sharemode, fileaccess,
-                        &file_handle.share_info, fd) == FALSE) {
+       if (share_allows_open (&statbuf, sharemode, fileaccess,
+                        &file_handle.share_info) == FALSE) {
                SetLastError (ERROR_SHARING_VIOLATION);
                g_free (filename);
                close (fd);
@@ -1649,19 +1779,19 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
 #define S_ISFIFO(m) ((m & S_IFIFO) != 0)
 #endif
        if (S_ISFIFO (statbuf.st_mode)) {
-               handle_type = WAPI_HANDLE_PIPE;
+               handle_type = MONO_W32HANDLE_PIPE;
                /* maintain invariant that pipes have no filename */
                file_handle.filename = NULL;
                g_free (filename);
                filename = NULL;
        } else if (S_ISCHR (statbuf.st_mode)) {
-               handle_type = WAPI_HANDLE_CONSOLE;
+               handle_type = MONO_W32HANDLE_CONSOLE;
        } else {
-               handle_type = WAPI_HANDLE_FILE;
+               handle_type = MONO_W32HANDLE_FILE;
        }
 
-       handle = _wapi_handle_new_fd (handle_type, fd, &file_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
+       handle = mono_w32handle_new_fd (handle_type, fd, &file_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating file handle", __func__);
                g_free (filename);
                close (fd);
@@ -2200,7 +2330,7 @@ gpointer GetStdHandle(WapiStdHandle stdhandle)
        thr_ret = mono_os_mutex_lock (&stdhandle_mutex);
        g_assert (thr_ret == 0);
 
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_CONSOLE,
+       ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_CONSOLE,
                                  (gpointer *)&file_handle);
        if (ok == FALSE) {
                /* Need to create this console handle */
@@ -2212,7 +2342,7 @@ gpointer GetStdHandle(WapiStdHandle stdhandle)
                }
        } else {
                /* Add a reference to this handle */
-               _wapi_handle_ref (handle);
+               mono_w32handle_ref (handle);
        }
        
   done:
@@ -2252,9 +2382,9 @@ gpointer GetStdHandle(WapiStdHandle stdhandle)
 gboolean ReadFile(gpointer handle, gpointer buffer, guint32 numbytes,
                  guint32 *bytesread, WapiOverlapped *overlapped)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if(io_ops[type].readfile==NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2293,9 +2423,9 @@ gboolean ReadFile(gpointer handle, gpointer buffer, guint32 numbytes,
 gboolean WriteFile(gpointer handle, gconstpointer buffer, guint32 numbytes,
                   guint32 *byteswritten, WapiOverlapped *overlapped)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if(io_ops[type].writefile==NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2318,9 +2448,9 @@ gboolean WriteFile(gpointer handle, gconstpointer buffer, guint32 numbytes,
  */
 gboolean FlushFileBuffers(gpointer handle)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if(io_ops[type].flushfile==NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2342,9 +2472,9 @@ gboolean FlushFileBuffers(gpointer handle)
  */
 gboolean SetEndOfFile(gpointer handle)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if (io_ops[type].setendoffile == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2386,9 +2516,9 @@ gboolean SetEndOfFile(gpointer handle)
 guint32 SetFilePointer(gpointer handle, gint32 movedistance,
                       gint32 *highmovedistance, WapiSeekMethod method)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if (io_ops[type].seek == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2412,14 +2542,9 @@ guint32 SetFilePointer(gpointer handle, gint32 movedistance,
  */
 WapiFileType GetFileType(gpointer handle)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       if (!_WAPI_PRIVATE_HAVE_SLOT (handle)) {
-               SetLastError (ERROR_INVALID_HANDLE);
-               return(FILE_TYPE_UNKNOWN);
-       }
-
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if (io_ops[type].getfiletype == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2447,9 +2572,9 @@ WapiFileType GetFileType(gpointer handle)
  */
 guint32 GetFileSize(gpointer handle, guint32 *highsize)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if (io_ops[type].getfilesize == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2487,9 +2612,9 @@ guint32 GetFileSize(gpointer handle, guint32 *highsize)
 gboolean GetFileTime(gpointer handle, WapiFileTime *create_time,
                     WapiFileTime *last_access, WapiFileTime *last_write)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if (io_ops[type].getfiletime == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2527,9 +2652,9 @@ gboolean SetFileTime(gpointer handle, const WapiFileTime *create_time,
                     const WapiFileTime *last_access,
                     const WapiFileTime *last_write)
 {
-       WapiHandleType type;
+       MonoW32HandleType type;
 
-       type = _wapi_handle_type (handle);
+       type = mono_w32handle_get_type (handle);
        
        if (io_ops[type].setfiletime == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -2762,8 +2887,8 @@ gpointer FindFirstFile (const gunichar2 *pattern, WapiFindData *find_data)
        find_handle.num = result;
        find_handle.count = 0;
        
-       handle = _wapi_handle_new (WAPI_HANDLE_FIND, &find_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
+       handle = mono_w32handle_new (MONO_W32HANDLE_FIND, &find_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating find handle", __func__);
                g_free (dir_part);
                g_free (entry_part);
@@ -2797,7 +2922,7 @@ gboolean FindNextFile (gpointer handle, WapiFindData *find_data)
        int thr_ret;
        gboolean ret = FALSE;
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FIND,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FIND,
                                (gpointer *)&find_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up find handle %p", __func__,
@@ -2806,7 +2931,7 @@ gboolean FindNextFile (gpointer handle, WapiFindData *find_data)
                return(FALSE);
        }
 
-       thr_ret = _wapi_handle_lock_handle (handle);
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
        
 retry:
@@ -2913,7 +3038,7 @@ retry:
        g_free (utf16_basename);
 
 cleanup:
-       thr_ret = _wapi_handle_unlock_handle (handle);
+       thr_ret = mono_w32handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
        
        return(ret);
@@ -2938,7 +3063,7 @@ gboolean FindClose (gpointer handle)
                return(FALSE);
        }
        
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FIND,
+       ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FIND,
                                (gpointer *)&find_handle);
        if(ok==FALSE) {
                g_warning ("%s: error looking up find handle %p", __func__,
@@ -2947,16 +3072,16 @@ gboolean FindClose (gpointer handle)
                return(FALSE);
        }
 
-       thr_ret = _wapi_handle_lock_handle (handle);
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
        
        g_strfreev (find_handle->namelist);
        g_free (find_handle->dir_part);
 
-       thr_ret = _wapi_handle_unlock_handle (handle);
+       thr_ret = mono_w32handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
        
-       _wapi_handle_unref (handle);
+       mono_w32handle_unref (handle);
        
        return(TRUE);
 }
@@ -3371,8 +3496,6 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
        int filedes[2];
        int ret;
        
-       mono_once (&io_ops_once, io_ops_init);
-       
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating pipe", __func__);
 
        ret=pipe (filedes);
@@ -3384,8 +3507,8 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
                return(FALSE);
        }
 
-       if (filedes[0] >= _wapi_fd_reserve ||
-           filedes[1] >= _wapi_fd_reserve) {
+       if (filedes[0] >= mono_w32handle_fd_reserve ||
+           filedes[1] >= mono_w32handle_fd_reserve) {
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: File descriptor is too big", __func__);
 
                SetLastError (ERROR_TOO_MANY_OPEN_FILES);
@@ -3400,9 +3523,9 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
 
        pipe_read_handle.fd = filedes [0];
        pipe_read_handle.fileaccess = GENERIC_READ;
-       read_handle = _wapi_handle_new_fd (WAPI_HANDLE_PIPE, filedes[0],
+       read_handle = mono_w32handle_new_fd (MONO_W32HANDLE_PIPE, filedes[0],
                                           &pipe_read_handle);
-       if (read_handle == _WAPI_HANDLE_INVALID) {
+       if (read_handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating pipe read handle", __func__);
                close (filedes[0]);
                close (filedes[1]);
@@ -3413,11 +3536,11 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
        
        pipe_write_handle.fd = filedes [1];
        pipe_write_handle.fileaccess = GENERIC_WRITE;
-       write_handle = _wapi_handle_new_fd (WAPI_HANDLE_PIPE, filedes[1],
+       write_handle = mono_w32handle_new_fd (MONO_W32HANDLE_PIPE, filedes[1],
                                            &pipe_write_handle);
-       if (write_handle == _WAPI_HANDLE_INVALID) {
+       if (write_handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating pipe write handle", __func__);
-               _wapi_handle_unref (read_handle);
+               mono_w32handle_unref (read_handle);
                
                close (filedes[0]);
                close (filedes[1]);
@@ -4298,9 +4421,30 @@ GetVolumeInformation (const gunichar2 *path, gunichar2 *volumename, int volumesi
 }
 #endif
 
-
 void
 _wapi_io_init (void)
 {
        mono_os_mutex_init (&stdhandle_mutex);
+
+       mono_w32handle_register_ops (MONO_W32HANDLE_FILE,    &_wapi_file_ops);
+       mono_w32handle_register_ops (MONO_W32HANDLE_CONSOLE, &_wapi_console_ops);
+       mono_w32handle_register_ops (MONO_W32HANDLE_FIND,    &_wapi_find_ops);
+       mono_w32handle_register_ops (MONO_W32HANDLE_PIPE,    &_wapi_pipe_ops);
+
+/*     mono_w32handle_register_capabilities (MONO_W32HANDLE_FILE, */
+/*                                         MONO_W32HANDLE_CAP_WAIT); */
+/*     mono_w32handle_register_capabilities (MONO_W32HANDLE_CONSOLE, */
+/*                                         MONO_W32HANDLE_CAP_WAIT); */
+
+       if (g_getenv ("MONO_STRICT_IO_EMULATION"))
+               lock_while_writing = TRUE;
+}
+
+void
+_wapi_io_cleanup (void)
+{
+       if (file_share_hash) {
+               g_hash_table_destroy (file_share_hash);
+               mono_os_mutex_destroy (&file_share_hash_mutex);
+       }
 }
index 4c5a492b95b004db8c46322334e0bea5310ebe01..5321bcd7c4459da7642a1dd34fbe00d936c6e6c6 100644 (file)
@@ -225,6 +225,7 @@ extern gboolean GetVolumeInformation (const gunichar2 *path, gunichar2 *volumena
 
 
 extern void _wapi_io_init (void);
+extern void _wapi_io_cleanup (void);
 
 G_END_DECLS
 
index c014a2d3dc4f983c19f4b70dcb878fa47ef0f751..001df9bef7e9273d726f2999880915377f1cb9ef 100644 (file)
 #include <errno.h>
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/io-private.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
 
 gboolean
 _wapi_lock_file_region (int fd, off_t offset, off_t length)
@@ -125,7 +125,7 @@ LockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
        off_t offset, length;
        int fd = GPOINTER_TO_UINT(handle);
        
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                  (gpointer *)&file_handle);
        if (ok == FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
@@ -172,7 +172,7 @@ UnlockFile (gpointer handle, guint32 offset_low,
        off_t offset, length;
        int fd = GPOINTER_TO_UINT(handle);
        
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
+       ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_FILE,
                                  (gpointer *)&file_handle);
        if (ok == FALSE) {
                g_warning ("%s: error looking up file handle %p", __func__,
index 4faa3b720233cd3281fd9708c0ad7a94359ae53c..74dbb84122474d4bb6fe1540a84949eae36a6c20 100644 (file)
 #include <pthread.h>
 #include <sys/types.h>
 
-extern struct _WapiHandleOps _wapi_mutex_ops;
-extern struct _WapiHandleOps _wapi_namedmutex_ops;
-
-extern void _wapi_mutex_details (gpointer handle_info);
+#include "wapi-private.h"
 
 struct _WapiHandle_mutex
 {
-       pid_t pid;
        pthread_t tid;
        guint32 recursion;
 };
 
 struct _WapiHandle_namedmutex 
 {
+       struct _WapiHandle_mutex m;
        WapiSharedNamespace sharedns;
-       pid_t pid;
-       pthread_t tid;
-       guint32 recursion;
 };
 
+void
+_wapi_mutex_init (void);
+
 extern void _wapi_mutex_abandon (gpointer data, pid_t pid, pthread_t tid);
 
 #endif /* _WAPI_MUTEX_PRIVATE_H_ */
index 730363e6302b1fa16a42da9722eb0690ea970402..0bddd29ed0f42a7ff31ac1a60ca51532bf527e56 100644 (file)
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/mutex-private.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-once.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
 
 static void mutex_signal(gpointer handle);
 static gboolean mutex_own (gpointer handle);
 static gboolean mutex_is_owned (gpointer handle);
+static void mutex_prewait (gpointer handle);
+static void mutex_details (gpointer data);
+static const gchar* mutex_typename (void);
+static gsize mutex_typesize (void);
 
 static void namedmutex_signal (gpointer handle);
 static gboolean namedmutex_own (gpointer handle);
 static gboolean namedmutex_is_owned (gpointer handle);
 static void namedmutex_prewait (gpointer handle);
+static void namedmutex_details (gpointer data);
+static const gchar* namedmutex_typename (void);
+static gsize namedmutex_typesize (void);
 
-struct _WapiHandleOps _wapi_mutex_ops = {
+static MonoW32HandleOps _wapi_mutex_ops = {
        NULL,                   /* close */
        mutex_signal,           /* signal */
        mutex_own,              /* own */
        mutex_is_owned,         /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       mutex_prewait,                  /* prewait */
+       mutex_details,  /* details */
+       mutex_typename, /* typename */
+       mutex_typesize, /* typesize */
 };
 
-void _wapi_mutex_details (gpointer handle_info)
-{
-       struct _WapiHandle_mutex *mut = (struct _WapiHandle_mutex *)handle_info;
-       
-#ifdef PTHREAD_POINTER_ID
-       g_print ("own: %5d:%5p, count: %5u", mut->pid, mut->tid,
-                mut->recursion);
-#else
-       g_print ("own: %5d:%5ld, count: %5u", mut->pid, mut->tid,
-                mut->recursion);
-#endif
-}
-
-struct _WapiHandleOps _wapi_namedmutex_ops = {
+static MonoW32HandleOps _wapi_namedmutex_ops = {
        NULL,                   /* close */
        namedmutex_signal,      /* signal */
        namedmutex_own,         /* own */
        namedmutex_is_owned,    /* is_owned */
        NULL,                   /* special_wait */
-       namedmutex_prewait      /* prewait */
+       namedmutex_prewait,     /* prewait */
+       namedmutex_details,     /* details */
+       namedmutex_typename,    /* typename */
+       namedmutex_typesize,    /* typesize */
 };
 
-static gboolean mutex_release (gpointer handle);
-static gboolean namedmutex_release (gpointer handle);
-
-static struct 
+void
+_wapi_mutex_init (void)
 {
-       gboolean (*release)(gpointer handle);
-} mutex_ops[WAPI_HANDLE_COUNT] = {
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {mutex_release},
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {namedmutex_release},
-};
-
-static mono_once_t mutex_ops_once=MONO_ONCE_INIT;
+       mono_w32handle_register_ops (MONO_W32HANDLE_MUTEX,      &_wapi_mutex_ops);
+       mono_w32handle_register_ops (MONO_W32HANDLE_NAMEDMUTEX, &_wapi_namedmutex_ops);
 
-static void mutex_ops_init (void)
-{
-       _wapi_handle_register_capabilities (WAPI_HANDLE_MUTEX,
-               (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SIGNAL | WAPI_HANDLE_CAP_OWN));
-       _wapi_handle_register_capabilities (WAPI_HANDLE_NAMEDMUTEX,
-               (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SIGNAL | WAPI_HANDLE_CAP_OWN));
+       mono_w32handle_register_capabilities (MONO_W32HANDLE_MUTEX,
+               (MonoW32HandleCapability)(MONO_W32HANDLE_CAP_WAIT | MONO_W32HANDLE_CAP_SIGNAL | MONO_W32HANDLE_CAP_OWN));
+       mono_w32handle_register_capabilities (MONO_W32HANDLE_NAMEDMUTEX,
+               (MonoW32HandleCapability)(MONO_W32HANDLE_CAP_WAIT | MONO_W32HANDLE_CAP_SIGNAL | MONO_W32HANDLE_CAP_OWN));
 }
 
-static void mutex_signal(gpointer handle)
+static const char* mutex_handle_type_to_string (MonoW32HandleType type)
 {
-       ReleaseMutex(handle);
+       switch (type) {
+       case MONO_W32HANDLE_MUTEX: return "mutex";
+       case MONO_W32HANDLE_NAMEDMUTEX: return "named mutex";
+       default:
+               g_assert_not_reached ();
+       }
 }
 
-static gboolean mutex_own (gpointer handle)
+static gboolean
+mutex_handle_own (gpointer handle, MonoW32HandleType type)
 {
        struct _WapiHandle_mutex *mutex_handle;
-       gboolean ok;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_MUTEX,
-                                 (gpointer *)&mutex_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up mutex handle %p", __func__,
-                          handle);
-               return(FALSE);
+
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
+               g_warning ("%s: error looking up %s handle %p", __func__, mutex_handle_type_to_string (type), handle);
+               return FALSE;
        }
 
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p, tid %p, recursion %u",
+               __func__, mutex_handle_type_to_string (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
+
        _wapi_thread_own_mutex (handle);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning mutex handle %p", __func__, handle);
 
-       _wapi_handle_set_signal_state (handle, FALSE, FALSE);
-       
-       mutex_handle->pid = _wapi_getpid ();
        mutex_handle->tid = pthread_self ();
        mutex_handle->recursion++;
 
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: mutex handle %p locked %d times by %d:%ld", __func__,
-                  handle, mutex_handle->recursion, mutex_handle->pid,
-                  mutex_handle->tid);
+       mono_w32handle_set_signal_state (handle, FALSE, FALSE);
 
-       return(TRUE);
+       return TRUE;
 }
 
-static gboolean mutex_is_owned (gpointer handle)
+static gboolean
+mutex_handle_is_owned (gpointer handle, MonoW32HandleType type)
 {
        struct _WapiHandle_mutex *mutex_handle;
-       gboolean ok;
-       
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_MUTEX,
-                               (gpointer *)&mutex_handle);
-       if(ok==FALSE) {
-               g_warning ("%s: error looking up mutex handle %p", __func__,
-                          handle);
-               return(FALSE);
+
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
+               g_warning ("%s: error looking up %s handle %p", __func__, mutex_handle_type_to_string (type), handle);
+               return FALSE;
        }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: testing ownership mutex handle %p", __func__, handle);
 
-       if (mutex_handle->recursion > 0 &&
-           mutex_handle->pid == _wapi_getpid () &&
-           pthread_equal (mutex_handle->tid, pthread_self ())) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: mutex handle %p owned by %d:%ld", __func__,
-                          handle, _wapi_getpid (), pthread_self ());
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: testing ownership %s handle %p",
+               __func__, mutex_handle_type_to_string (type), handle);
 
-               return(TRUE);
+       if (mutex_handle->recursion > 0 && pthread_equal (mutex_handle->tid, pthread_self ())) {
+               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p owned by %p",
+                       __func__, mutex_handle_type_to_string (type), handle, (gpointer) pthread_self ());
+               return TRUE;
        } else {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: mutex handle %p not owned by %d:%ld, but locked %d times by %d:%ld", __func__, handle, _wapi_getpid (), pthread_self (), mutex_handle->recursion, mutex_handle->pid, mutex_handle->tid);
-
-               return(FALSE);
+               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p not owned by %p, but locked %d times by %p",
+                       __func__, mutex_handle_type_to_string (type), handle, (gpointer) pthread_self (), mutex_handle->recursion, (gpointer) mutex_handle->tid);
+               return FALSE;
        }
 }
 
-static void namedmutex_signal (gpointer handle)
+static void mutex_signal(gpointer handle)
 {
        ReleaseMutex(handle);
 }
 
-/* NB, always called with the shared handle lock held */
-static gboolean namedmutex_own (gpointer handle)
+static gboolean mutex_own (gpointer handle)
 {
-       struct _WapiHandle_namedmutex *namedmutex_handle;
-       gboolean ok;
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning named mutex handle %p", __func__, handle);
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDMUTEX,
-                                 (gpointer *)&namedmutex_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up named mutex handle %p",
-                          __func__, handle);
-               return(FALSE);
-       }
-
-       _wapi_thread_own_mutex (handle);
-
-       namedmutex_handle->pid = _wapi_getpid ();
-       namedmutex_handle->tid = pthread_self ();
-       namedmutex_handle->recursion++;
-
-       _wapi_shared_handle_set_signal_state (handle, FALSE);
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: mutex handle %p locked %d times by %d:%ld", __func__,
-                  handle, namedmutex_handle->recursion,
-                  namedmutex_handle->pid, namedmutex_handle->tid);
-       
-       return(TRUE);
+       return mutex_handle_own (handle, MONO_W32HANDLE_MUTEX);
 }
 
-static gboolean namedmutex_is_owned (gpointer handle)
+static gboolean mutex_is_owned (gpointer handle)
 {
-       struct _WapiHandle_namedmutex *namedmutex_handle;
-       gboolean ok;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDMUTEX,
-                                 (gpointer *)&namedmutex_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up mutex handle %p", __func__,
-                          handle);
-               return(FALSE);
-       }
        
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: testing ownership mutex handle %p", __func__, handle);
+       return mutex_handle_is_owned (handle, MONO_W32HANDLE_MUTEX);
+}
 
-       if (namedmutex_handle->recursion > 0 &&
-           namedmutex_handle->pid == _wapi_getpid () &&
-           pthread_equal (namedmutex_handle->tid, pthread_self ())) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: mutex handle %p owned by %d:%ld", __func__,
-                          handle, _wapi_getpid (), pthread_self ());
+static void namedmutex_signal (gpointer handle)
+{
+       ReleaseMutex(handle);
+}
 
-               return(TRUE);
-       } else {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: mutex handle %p not owned by %d:%ld, but locked %d times by %d:%ld", __func__, handle, _wapi_getpid (), pthread_self (), namedmutex_handle->recursion, namedmutex_handle->pid, namedmutex_handle->tid);
+/* NB, always called with the shared handle lock held */
+static gboolean namedmutex_own (gpointer handle)
+{
+       return mutex_handle_own (handle, MONO_W32HANDLE_NAMEDMUTEX);
+}
 
-               return(FALSE);
-       }
+static gboolean namedmutex_is_owned (gpointer handle)
+{
+       return mutex_handle_is_owned (handle, MONO_W32HANDLE_NAMEDMUTEX);
 }
 
-/* The shared state is not locked when prewait methods are called */
-static void namedmutex_prewait (gpointer handle)
+static void mutex_handle_prewait (gpointer handle, MonoW32HandleType type)
 {
        /* If the mutex is not currently owned, do nothing and let the
         * usual wait carry on.  If it is owned, check that the owner
@@ -230,270 +170,198 @@ static void namedmutex_prewait (gpointer handle)
         * and assume that process exited abnormally and failed to
         * clean up.
         */
-       struct _WapiHandle_namedmutex *namedmutex_handle;
-       gboolean ok;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDMUTEX,
-                                 (gpointer *)&namedmutex_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up named mutex handle %p",
-                          __func__, handle);
+       struct _WapiHandle_mutex *mutex_handle;
+
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
+               g_warning ("%s: error looking up %s handle %p",
+                       __func__, mutex_handle_type_to_string (type), handle);
                return;
        }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Checking ownership of named mutex handle %p", __func__,
-                  handle);
-
-       if (namedmutex_handle->recursion == 0) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Named mutex handle %p not owned", __func__,
-                          handle);
-       } else if (namedmutex_handle->pid == _wapi_getpid ()) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Named mutex handle %p owned by this process",
-                          __func__, handle);
-       } else {
-               int thr_ret;
-               gpointer proc_handle;
-               
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Named mutex handle %p owned by another process", __func__, handle);
-               proc_handle = OpenProcess (0, 0, namedmutex_handle->pid);
-               if (proc_handle == NULL) {
-                       /* Didn't find the process that this handle
-                        * was owned by, overriding it
-                        */
-                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: overriding old owner of named mutex handle %p", __func__, handle);
-                       thr_ret = _wapi_handle_lock_shared_handles ();
-                       g_assert (thr_ret == 0);
-
-                       namedmutex_handle->pid = 0;
-                       namedmutex_handle->tid = 0;
-                       namedmutex_handle->recursion = 0;
-
-                       _wapi_shared_handle_set_signal_state (handle, TRUE);
-                       _wapi_handle_unlock_shared_handles ();
-               } else {
-                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Found active pid %d for named mutex handle %p", __func__, namedmutex_handle->pid, handle);
-               }
-               if (proc_handle != NULL)
-                       CloseProcess (proc_handle);
-       }
+
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: pre-waiting %s handle %p, owned? %s",
+               __func__, mutex_handle_type_to_string (type), handle, mutex_handle->recursion != 0 ? "true" : "false");
 }
 
-static void mutex_abandon (gpointer handle, pid_t pid, pthread_t tid)
+/* The shared state is not locked when prewait methods are called */
+static void mutex_prewait (gpointer handle)
 {
-       struct _WapiHandle_mutex *mutex_handle;
-       gboolean ok;
-       int thr_ret;
+       mutex_handle_prewait (handle, MONO_W32HANDLE_MUTEX);
+}
+
+/* The shared state is not locked when prewait methods are called */
+static void namedmutex_prewait (gpointer handle)
+{
+       mutex_handle_prewait (handle, MONO_W32HANDLE_NAMEDMUTEX);
+}
+
+static void mutex_details (gpointer data)
+{
+       struct _WapiHandle_mutex *mut = (struct _WapiHandle_mutex *)data;
        
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_MUTEX,
-                                 (gpointer *)&mutex_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up mutex handle %p", __func__,
-                          handle);
-               return;
-       }
+#ifdef PTHREAD_POINTER_ID
+       g_print ("own: %5p, count: %5u", mut->tid, mut->recursion);
+#else
+       g_print ("own: %5ld, count: %5u", mut->tid, mut->recursion);
+#endif
+}
 
-       thr_ret = _wapi_handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+static void namedmutex_details (gpointer data)
+{
+       struct _WapiHandle_namedmutex *namedmut = (struct _WapiHandle_namedmutex *)data;
        
-       if (mutex_handle->pid == pid &&
-           pthread_equal (mutex_handle->tid, tid)) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Mutex handle %p abandoned!", __func__, handle);
+#ifdef PTHREAD_POINTER_ID
+       g_print ("own: %5p, count: %5u, name: \"%s\"",
+               namedmut->m.tid, namedmut->m.recursion, namedmut->sharedns.name);
+#else
+       g_print ("own: %5ld, count: %5u, name: \"%s\"",
+               namedmut->m.tid, namedmut->m.recursion, namedmut->sharedns.name);
+#endif
+}
 
-               mutex_handle->recursion = 0;
-               mutex_handle->pid = 0;
-               mutex_handle->tid = 0;
-               
-               _wapi_handle_set_signal_state (handle, TRUE, FALSE);
-       }
+static const gchar* mutex_typename (void)
+{
+       return "Mutex";
+}
 
-       thr_ret = _wapi_handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+static gsize mutex_typesize (void)
+{
+       return sizeof (struct _WapiHandle_mutex);
+}
+
+static const gchar* namedmutex_typename (void)
+{
+       return "N.Mutex";
 }
 
-static void namedmutex_abandon (gpointer handle, pid_t pid, pthread_t tid)
+static gsize namedmutex_typesize (void)
 {
-       struct _WapiHandle_namedmutex *mutex_handle;
-       gboolean ok;
+       return sizeof (struct _WapiHandle_namedmutex);
+}
+
+/* When a thread exits, any mutexes it still holds need to be signalled. */
+void _wapi_mutex_abandon (gpointer handle, pid_t pid, pthread_t tid)
+{
+       MonoW32HandleType type;
+       struct _WapiHandle_mutex *mutex_handle;
        int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDMUTEX,
-                                 (gpointer *)&mutex_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up named mutex handle %p",
-                          __func__, handle);
+
+       switch (type = mono_w32handle_get_type (handle)) {
+       case MONO_W32HANDLE_MUTEX:
+       case MONO_W32HANDLE_NAMEDMUTEX:
+               break;
+       default:
+               g_assert_not_reached ();
+       }
+
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
+               g_warning ("%s: error looking up %s handle %p",
+                       __func__, mutex_handle_type_to_string (type), handle);
                return;
        }
 
-       thr_ret = _wapi_handle_lock_shared_handles ();
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandon %s handle %p",
+               __func__, mutex_handle_type_to_string (type), handle);
+
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
-       
-       if (mutex_handle->pid == pid &&
-           pthread_equal (mutex_handle->tid, tid)) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Mutex handle %p abandoned!", __func__, handle);
 
+       if (pthread_equal (mutex_handle->tid, tid)) {
                mutex_handle->recursion = 0;
-               mutex_handle->pid = 0;
                mutex_handle->tid = 0;
-               
-               _wapi_shared_handle_set_signal_state (handle, TRUE);
-       }
 
-       _wapi_handle_unlock_shared_handles ();
-}
-
-/* When a thread exits, any mutexes it still holds need to be
- * signalled.  This function must not be called with the shared handle
- * lock held, as namedmutex_abandon () will try to acquire it
- */
-void _wapi_mutex_abandon (gpointer data, pid_t pid, pthread_t tid)
-{
-       WapiHandleType type = _wapi_handle_type (data);
+               mono_w32handle_set_signal_state (handle, TRUE, FALSE);
 
-       if (type == WAPI_HANDLE_MUTEX) {
-               mutex_abandon (data, pid, tid);
-       } else if (type == WAPI_HANDLE_NAMEDMUTEX) {
-               namedmutex_abandon (data, pid, tid);
-       } else {
-               g_assert_not_reached ();
+               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandoned %s handle %p",
+                       __func__, mutex_handle_type_to_string (type), handle);
        }
+
+       thr_ret = mono_w32handle_unlock_handle (handle);
+       g_assert (thr_ret == 0);
 }
 
-static gpointer mutex_create (WapiSecurityAttributes *security G_GNUC_UNUSED,
-                             gboolean owned)
+static gpointer mutex_handle_create (struct _WapiHandle_mutex *mutex_handle, MonoW32HandleType type, gboolean owned)
 {
-       struct _WapiHandle_mutex mutex_handle = {0};
        gpointer handle;
        int thr_ret;
-       
-       /* Need to blow away any old errors here, because code tests
-        * for ERROR_ALREADY_EXISTS on success (!) to see if a mutex
-        * was freshly created
-        */
-       SetLastError (ERROR_SUCCESS);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating unnamed mutex", __func__);
-       
-       handle = _wapi_handle_new (WAPI_HANDLE_MUTEX, &mutex_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error creating mutex handle", __func__);
+
+       mutex_handle->tid = 0;
+       mutex_handle->recursion = 0;
+
+       handle = mono_w32handle_new (type, mutex_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
+               g_warning ("%s: error creating %s handle",
+                       __func__, mutex_handle_type_to_string (type));
                SetLastError (ERROR_GEN_FAILURE);
-               return(NULL);
+               return NULL;
        }
 
-       thr_ret = _wapi_handle_lock_handle (handle);
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
-       
-       if(owned==TRUE) {
-               mutex_own (handle);
-       } else {
-               _wapi_handle_set_signal_state (handle, TRUE, FALSE);
-       }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: returning mutex handle %p", __func__, handle);
 
-       thr_ret = _wapi_handle_unlock_handle (handle);
+       if (owned)
+               mutex_handle_own (handle, type);
+       else
+               mono_w32handle_set_signal_state (handle, TRUE, FALSE);
+
+       thr_ret = mono_w32handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
-       
-       return(handle);
+
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
+               __func__, mutex_handle_type_to_string (type), handle);
+
+       return handle;
+}
+
+static gpointer mutex_create (gboolean owned)
+{
+       struct _WapiHandle_mutex mutex_handle;
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
+               __func__, mutex_handle_type_to_string (MONO_W32HANDLE_MUTEX));
+       return mutex_handle_create (&mutex_handle, MONO_W32HANDLE_MUTEX, owned);
 }
 
-static gpointer namedmutex_create (WapiSecurityAttributes *security G_GNUC_UNUSED, gboolean owned,
-                       const gunichar2 *name)
+static gpointer namedmutex_create (gboolean owned, const gunichar2 *name)
 {
-       struct _WapiHandle_namedmutex namedmutex_handle = {{{0}}, 0};
        gpointer handle;
        gchar *utf8_name;
        int thr_ret;
-       gpointer ret = NULL;
-       guint32 namelen;
-       gint32 offset;
 
-       /* w32 seems to guarantee that opening named objects can't
-        * race each other
-        */
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
+               __func__, mutex_handle_type_to_string (MONO_W32HANDLE_NAMEDMUTEX));
+
+       /* w32 seems to guarantee that opening named objects can't race each other */
        thr_ret = _wapi_namespace_lock ();
        g_assert (thr_ret == 0);
 
-       /* Need to blow away any old errors here, because code tests
-        * for ERROR_ALREADY_EXISTS on success (!) to see if a mutex
-        * was freshly created
-        */
-       SetLastError (ERROR_SUCCESS);
-       
        utf8_name = g_utf16_to_utf8 (name, -1, NULL, NULL, NULL);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating named mutex [%s]", __func__, utf8_name);
-       
-       offset = _wapi_search_handle_namespace (WAPI_HANDLE_NAMEDMUTEX,
-                                               utf8_name);
-       if (offset == -1) {
-               /* The name has already been used for a different
-                * object.
-                */
+
+       handle = _wapi_search_handle_namespace (MONO_W32HANDLE_NAMEDMUTEX, utf8_name);
+       if (handle == INVALID_HANDLE_VALUE) {
+               /* The name has already been used for a different object. */
+               handle = NULL;
                SetLastError (ERROR_INVALID_HANDLE);
-               goto cleanup;
-       } else if (offset != 0) {
-               /* Not an error, but this is how the caller is
-                * informed that the mutex wasn't freshly created
-                */
+       } else if (handle) {
+               /* Not an error, but this is how the caller is informed that the mutex wasn't freshly created */
                SetLastError (ERROR_ALREADY_EXISTS);
-       }
-       /* Fall through to create the mutex handle. */
-
-       if (offset == 0) {
-               /* A new named mutex, so create both the private and
-                * shared parts
-                */
-       
-               if (strlen (utf8_name) < MAX_PATH) {
-                       namelen = strlen (utf8_name);
-               } else {
-                       namelen = MAX_PATH;
-               }
-       
-               memcpy (&namedmutex_handle.sharedns.name, utf8_name, namelen);
 
-               handle = _wapi_handle_new (WAPI_HANDLE_NAMEDMUTEX,
-                                          &namedmutex_handle);
+               /* this is used as creating a new handle */
+               mono_w32handle_ref (handle);
        } else {
-               /* A new reference to an existing named mutex, so just
-                * create the private part
-                */
-               handle = _wapi_handle_new_from_offset (WAPI_HANDLE_NAMEDMUTEX,
-                                                      offset, TRUE);
-       }
-       
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error creating mutex handle", __func__);
-               SetLastError (ERROR_GEN_FAILURE);
-               goto cleanup;
-       }
-       ret = handle;
+               /* A new named mutex */
+               struct _WapiHandle_namedmutex namedmutex_handle;
 
-       if (offset == 0) {
-               /* Set the initial state, as this is a completely new
-                * handle
-                */
-               thr_ret = _wapi_handle_lock_shared_handles ();
-               g_assert (thr_ret == 0);
-       
-               if (owned == TRUE) {
-                       namedmutex_own (handle);
-               } else {
-                       _wapi_shared_handle_set_signal_state (handle, TRUE);
-               }
+               strncpy (&namedmutex_handle.sharedns.name [0], utf8_name, MAX_PATH);
+               namedmutex_handle.sharedns.name [MAX_PATH] = '\0';
 
-               _wapi_handle_unlock_shared_handles ();
+               handle = mutex_handle_create ((struct _WapiHandle_mutex*) &namedmutex_handle, MONO_W32HANDLE_NAMEDMUTEX, owned);
        }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: returning mutex handle %p", __func__, handle);
 
-cleanup:
        g_free (utf8_name);
 
-       _wapi_namespace_unlock (NULL);
-       
-       return(ret);
+       thr_ret = _wapi_namespace_unlock (NULL);
+       g_assert (thr_ret == 0);
+
+       return handle;
 }
 
 /**
@@ -515,143 +383,87 @@ cleanup:
  *
  * Return value: A new handle, or %NULL on error.
  */
-gpointer CreateMutex(WapiSecurityAttributes *security G_GNUC_UNUSED, gboolean owned,
-                       const gunichar2 *name)
+gpointer CreateMutex(WapiSecurityAttributes *security G_GNUC_UNUSED, gboolean owned, const gunichar2 *name)
 {
-       mono_once (&mutex_ops_once, mutex_ops_init);
+       /* Need to blow away any old errors here, because code tests
+        * for ERROR_ALREADY_EXISTS on success (!) to see if a mutex
+        * was freshly created */
+       SetLastError (ERROR_SUCCESS);
 
-       if (name == NULL) {
-               return(mutex_create (security, owned));
-       } else {
-               return(namedmutex_create (security, owned, name));
-       }
+       return name ? namedmutex_create (owned, name) : mutex_create (owned);
 }
 
-static gboolean mutex_release (gpointer handle)
+/**
+ * ReleaseMutex:
+ * @handle: The mutex handle.
+ *
+ * Releases ownership if the mutex handle @handle.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise.  This function
+ * fails if the calling thread does not own the mutex @handle.
+ */
+gboolean ReleaseMutex(gpointer handle)
 {
+       MonoW32HandleType type;
        struct _WapiHandle_mutex *mutex_handle;
-       gboolean ok;
-       pthread_t tid = pthread_self ();
-       pid_t pid = _wapi_getpid ();
+       pthread_t tid;
        int thr_ret;
-       gboolean ret = FALSE;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_MUTEX,
-                                 (gpointer *)&mutex_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up mutex handle %p", __func__,
-                          handle);
-               return(FALSE);
-       }
-
-       thr_ret = _wapi_handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Releasing mutex handle %p", __func__, handle);
-
-       if (!pthread_equal (mutex_handle->tid, tid) ||
-           mutex_handle->pid != pid) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: We don't own mutex handle %p (owned by %d:%ld, me %d:%ld)", __func__, handle, mutex_handle->pid, mutex_handle->tid, _wapi_getpid (), tid);
+       gboolean ret;
 
-               goto cleanup;
+       if (handle == NULL) {
+               SetLastError (ERROR_INVALID_HANDLE);
+               return FALSE;
        }
-       ret = TRUE;
-       
-       /* OK, we own this mutex */
-       mutex_handle->recursion--;
-       
-       if(mutex_handle->recursion==0) {
-               _wapi_thread_disown_mutex (handle);
-
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Unlocking mutex handle %p", __func__, handle);
 
-               mutex_handle->pid=0;
-               mutex_handle->tid=0;
-               _wapi_handle_set_signal_state (handle, TRUE, FALSE);
+       switch (type = mono_w32handle_get_type (handle)) {
+       case MONO_W32HANDLE_MUTEX:
+       case MONO_W32HANDLE_NAMEDMUTEX:
+               break;
+       default:
+               SetLastError (ERROR_INVALID_HANDLE);
+               return FALSE;
        }
 
-cleanup:
-       thr_ret = _wapi_handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
-       
-       return(ret);
-}
-
-static gboolean namedmutex_release (gpointer handle)
-{
-       struct _WapiHandle_namedmutex *mutex_handle;
-       gboolean ok;
-       pthread_t tid = pthread_self ();
-       pid_t pid = _wapi_getpid ();
-       int thr_ret;
-       gboolean ret = FALSE;
-       
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDMUTEX,
-                               (gpointer *)&mutex_handle);
-       if(ok==FALSE) {
-               g_warning ("%s: error looking up named mutex handle %p",
-                          __func__, handle);
-               return(FALSE);
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
+               g_warning ("%s: error looking up %s handle %p",
+                       __func__, mutex_handle_type_to_string (type), handle);
+               return FALSE;
        }
 
-       thr_ret = _wapi_handle_lock_shared_handles ();
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: releasing %s handle %p",
+               __func__, mutex_handle_type_to_string (type), handle);
+
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Releasing mutex handle %p", __func__, handle);
 
-       if (!pthread_equal (mutex_handle->tid, tid) ||
-           mutex_handle->pid != pid) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: We don't own mutex handle %p (owned by %d:%ld, me %d:%ld)", __func__, handle, mutex_handle->pid, mutex_handle->tid, _wapi_getpid (), tid);
+       tid = pthread_self ();
 
-               goto cleanup;
-       }
-       ret = TRUE;
-       
-       /* OK, we own this mutex */
-       mutex_handle->recursion--;
-       
-       if(mutex_handle->recursion==0) {
-               _wapi_thread_disown_mutex (handle);
+       if (!pthread_equal (mutex_handle->tid, tid)) {
+               ret = FALSE;
 
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Unlocking mutex handle %p", __func__, handle);
+               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: we don't own %s handle %p (owned by %ld, me %ld)",
+                       __func__, mutex_handle_type_to_string (type), handle, mutex_handle->tid, tid);
+       } else {
+               ret = TRUE;
 
-               mutex_handle->pid=0;
-               mutex_handle->tid=0;
-               _wapi_shared_handle_set_signal_state (handle, TRUE);
-       }
+               /* OK, we own this mutex */
+               mutex_handle->recursion--;
 
-cleanup:
-       _wapi_handle_unlock_shared_handles ();
-       
-       return(ret);
-}
+               if (mutex_handle->recursion == 0) {
+                       _wapi_thread_disown_mutex (handle);
 
-/**
- * ReleaseMutex:
- * @handle: The mutex handle.
- *
- * Releases ownership if the mutex handle @handle.
- *
- * Return value: %TRUE on success, %FALSE otherwise.  This function
- * fails if the calling thread does not own the mutex @handle.
- */
-gboolean ReleaseMutex(gpointer handle)
-{
-       WapiHandleType type;
+                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking %s handle %p",
+                               __func__, mutex_handle_type_to_string (type), handle);
 
-       if (handle == NULL) {
-               SetLastError (ERROR_INVALID_HANDLE);
-               return(FALSE);
-       }
-       
-       type = _wapi_handle_type (handle);
-       
-       if (mutex_ops[type].release == NULL) {
-               SetLastError (ERROR_INVALID_HANDLE);
-               return(FALSE);
+                       mutex_handle->tid = 0;
+                       mono_w32handle_set_signal_state (handle, TRUE, FALSE);
+               }
        }
-       
-       return(mutex_ops[type].release (handle));
+
+       thr_ret = mono_w32handle_unlock_handle (handle);
+       g_assert (thr_ret == 0);
+
+       return ret;
 }
 
 gpointer OpenMutex (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, const gunichar2 *name)
@@ -659,10 +471,6 @@ gpointer OpenMutex (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED
        gpointer handle;
        gchar *utf8_name;
        int thr_ret;
-       gpointer ret = NULL;
-       gint32 offset;
-
-       mono_once (&mutex_ops_once, mutex_ops_init);
 
        /* w32 seems to guarantee that opening named objects can't
         * race each other
@@ -674,33 +482,20 @@ gpointer OpenMutex (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED
        
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Opening named mutex [%s]", __func__, utf8_name);
        
-       offset = _wapi_search_handle_namespace (WAPI_HANDLE_NAMEDMUTEX,
+       handle = _wapi_search_handle_namespace (MONO_W32HANDLE_NAMEDMUTEX,
                                                utf8_name);
-       if (offset == -1) {
+       if (handle == INVALID_HANDLE_VALUE) {
                /* The name has already been used for a different
                 * object.
                 */
                SetLastError (ERROR_INVALID_HANDLE);
                goto cleanup;
-       } else if (offset == 0) {
+       } else if (!handle) {
                /* This name doesn't exist */
                SetLastError (ERROR_FILE_NOT_FOUND);    /* yes, really */
                goto cleanup;
        }
 
-       /* A new reference to an existing named mutex, so just create
-        * the private part
-        */
-       handle = _wapi_handle_new_from_offset (WAPI_HANDLE_NAMEDMUTEX, offset,
-                                              TRUE);
-       
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error opening named mutex handle", __func__);
-               SetLastError (ERROR_GEN_FAILURE);
-               goto cleanup;
-       }
-       ret = handle;
-
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: returning named mutex handle %p", __func__, handle);
 
 cleanup:
@@ -708,5 +503,5 @@ cleanup:
 
        _wapi_namespace_unlock (NULL);
        
-       return(ret);
+       return handle;
 }
index 2856d4fcd615cf7dbb973f27830bc391c66255df..fe350c8b8660e59da13d8a2646a62f49db2fb2d9 100644 (file)
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/io-private.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
 
 static guint32
 convert_from_flags(int flags)
@@ -101,8 +101,8 @@ gpointer _wapi_stdhandle_create (int fd, const gchar *name)
        file_handle.sharemode=0;
        file_handle.attrs=0;
 
-       handle = _wapi_handle_new_fd (WAPI_HANDLE_CONSOLE, fd, &file_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
+       handle = mono_w32handle_new_fd (MONO_W32HANDLE_CONSOLE, fd, &file_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating file handle", __func__);
                SetLastError (ERROR_GEN_FAILURE);
                return(INVALID_HANDLE_VALUE);
index ddd6e863f36623426672ab8244c2fdf9f7ae216b..a17de8a3adb607fd5e6f3ad509033ffcbf6f9271 100644 (file)
 #define WAPI_PID_TO_HANDLE(pid) GINT_TO_POINTER (_WAPI_PROCESS_UNHANDLED + (pid))
 #define WAPI_HANDLE_TO_PID(handle) (GPOINTER_TO_UINT ((handle)) - _WAPI_PROCESS_UNHANDLED)
 
-void wapi_processes_init (void);
+void _wapi_processes_init (void);
 extern gpointer _wapi_process_duplicate (void);
 extern void wapi_processes_cleanup (void);
 
-extern struct _WapiHandleOps _wapi_process_ops;
-
 /*
  * MonoProcess describes processes we create.
  * It contains a semaphore that can be waited on in order to wait
index 212079346038545bd84f02e27809bacd4990ef9a..20ad800c0485190fef7af966b92544b107ff14d9 100644 (file)
@@ -95,7 +95,6 @@
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/process-private.h>
 #include <mono/io-layer/threads.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-proclib.h>
 #include <mono/utils/mono-once.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
 
 /* The process' environment strings */
 #if defined(__APPLE__)
@@ -129,6 +129,9 @@ extern char **environ;
 
 static guint32 process_wait (gpointer handle, guint32 timeout, gboolean alertable);
 static void process_close (gpointer handle, gpointer data);
+static void process_details (gpointer data);
+static const gchar* process_typename (void);
+static gsize process_typesize (void);
 static gboolean is_pid_valid (pid_t pid);
 
 #if !(defined(USE_OSX_LOADER) || defined(USE_BSD_LOADER) || defined(USE_HAIKU_LOADER))
@@ -136,13 +139,16 @@ static FILE *
 open_process_map (int pid, const char *mode);
 #endif
 
-struct _WapiHandleOps _wapi_process_ops = {
+static MonoW32HandleOps _wapi_process_ops = {
        process_close,          /* close_shared */
        NULL,                           /* signal */
        NULL,                           /* own */
        NULL,                           /* is_owned */
        process_wait,                   /* special_wait */
-       NULL                            /* prewait */   
+       NULL,                           /* prewait */
+       process_details,        /* details */
+       process_typename,       /* typename */
+       process_typesize,       /* typesize */
 };
 
 #if HAVE_SIGACTION
@@ -178,7 +184,7 @@ lookup_process_handle (gpointer handle)
        WapiHandle_process *process_data;
        gboolean ret;
 
-       ret = _wapi_lookup_handle (handle, WAPI_HANDLE_PROCESS,
+       ret = mono_w32handle_lookup (handle, MONO_W32HANDLE_PROCESS,
                                                           (gpointer *)&process_data);
        if (!ret)
                return NULL;
@@ -577,7 +583,6 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
        GError *gerr = NULL;
        int in_fd, out_fd, err_fd;
        pid_t pid = 0;
-       int thr_ret;
        int startup_pipe [2] = {-1, -1};
        int dummy;
        struct MonoProcess *mono_process;
@@ -895,8 +900,8 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
 
        process_set_defaults (&process_handle);
        
-       handle = _wapi_handle_new (WAPI_HANDLE_PROCESS, &process_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
+       handle = mono_w32handle_new (MONO_W32HANDLE_PROCESS, &process_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating process handle", __func__);
 
                ret = FALSE;
@@ -999,7 +1004,7 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
                }
                
                /* Close all file descriptors */
-               for (i = wapi_getdtablesize () - 1; i > 2; i--)
+               for (i = mono_w32handle_fd_reserve - 1; i > 2; i--)
                        close (i);
 
 #ifdef DEBUG_ENABLED
@@ -1027,13 +1032,10 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
                break;
        }
        default: /* Parent */ {
-               thr_ret = _wapi_handle_lock_shared_handles ();
-               g_assert (thr_ret == 0);
-
                process_handle_data = lookup_process_handle (handle);
                if (!process_handle_data) {
                        g_warning ("%s: error looking up process handle %p", __func__, handle);
-                       _wapi_handle_unref (handle);
+                       mono_w32handle_unref (handle);
                } else {
                        process_handle_data->id = pid;
 
@@ -1050,7 +1052,7 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
                        } else {
                                /* Keep the process handle artificially alive until the process
                                 * exits so that the information in the handle isn't lost. */
-                               _wapi_handle_ref (handle);
+                               mono_w32handle_ref (handle);
                                mono_process->handle = handle;
 
                                process_handle_data->mono_process = mono_process;
@@ -1071,14 +1073,12 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
                        }
                }
 
-               _wapi_handle_unlock_shared_handles ();
-
                break;
        }
        }
 
        if (fork_failed)
-               _wapi_handle_unref (handle);
+               mono_w32handle_unref (handle);
 
        if (startup_pipe [1] != -1) {
                /* Write 1 byte, doesn't matter what */
@@ -1136,20 +1136,22 @@ process_set_name (WapiHandle_process *process_handle)
 }
 
 void
-wapi_processes_init (void)
+_wapi_processes_init (void)
 {
        pid_t pid = _wapi_getpid ();
        WapiHandle_process process_handle = {0};
 
-       _wapi_handle_register_capabilities (WAPI_HANDLE_PROCESS,
-               (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SPECIAL_WAIT));
+       mono_w32handle_register_ops (MONO_W32HANDLE_PROCESS, &_wapi_process_ops);
+
+       mono_w32handle_register_capabilities (MONO_W32HANDLE_PROCESS,
+               (MonoW32HandleCapability)(MONO_W32HANDLE_CAP_WAIT | MONO_W32HANDLE_CAP_SPECIAL_WAIT));
        
        process_handle.id = pid;
 
        process_set_defaults (&process_handle);
        process_set_name (&process_handle);
 
-       current_process = _wapi_handle_new (WAPI_HANDLE_PROCESS,
+       current_process = mono_w32handle_new (MONO_W32HANDLE_PROCESS,
                                            &process_handle);
        g_assert (current_process);
 
@@ -1159,7 +1161,7 @@ wapi_processes_init (void)
 gpointer
 _wapi_process_duplicate (void)
 {
-       _wapi_handle_ref (current_process);
+       mono_w32handle_ref (current_process);
        
        return current_process;
 }
@@ -1215,9 +1217,9 @@ process_open_compare (gpointer handle, gpointer user_data)
         * unsignalled
         */
        if (checking_pid == wanted_pid &&
-           !_wapi_handle_issignalled (handle)) {
+           !mono_w32handle_issignalled (handle)) {
                /* If the handle is blown away in the window between
-                * returning TRUE here and _wapi_search_handle pinging
+                * returning TRUE here and mono_w32handle_search pinging
                 * the timestamp, the search will continue
                 */
                return TRUE;
@@ -1245,7 +1247,7 @@ OpenProcess (guint32 req_access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, g
        
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: looking for process %d", __func__, pid);
 
-       handle = _wapi_search_handle (WAPI_HANDLE_PROCESS,
+       handle = mono_w32handle_search (MONO_W32HANDLE_PROCESS,
                                      process_open_compare,
                                      GUINT_TO_POINTER (pid), NULL, TRUE);
        if (handle == 0) {
@@ -1263,7 +1265,7 @@ OpenProcess (guint32 req_access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, g
                }
        }
 
-       /* _wapi_search_handle () already added a ref */
+       /* mono_w32handle_search () already added a ref */
        return handle;
 }
 
@@ -1310,7 +1312,7 @@ GetExitCodeProcess (gpointer process, guint32 *code)
         */
        process_wait (process, 0, TRUE);
        
-       if (_wapi_handle_issignalled (process))
+       if (mono_w32handle_issignalled (process))
                *code = process_handle->exitstatus;
        else
                *code = STILL_ACTIVE;
@@ -1356,7 +1358,7 @@ GetProcessTimes (gpointer process, WapiFileTime *create_time,
        /* A process handle is only signalled if the process has
         * exited.  Otherwise exit_time isn't set
         */
-       if (_wapi_handle_issignalled (process))
+       if (mono_w32handle_issignalled (process))
                *exit_time = process_handle->exit_time;
 
 #ifdef HAVE_GETRUSAGE
@@ -2594,7 +2596,7 @@ mono_processes_cleanup (void)
                        mp->handle = NULL;
                        mono_os_mutex_unlock (&mono_processes_mutex);
                        if (unref_handle)
-                               _wapi_handle_unref (unref_handle);
+                               mono_w32handle_unref (unref_handle);
                }
        }
 
@@ -2663,6 +2665,23 @@ process_close (gpointer handle, gpointer data)
        mono_processes_cleanup ();
 }
 
+static void process_details (gpointer data)
+{
+       WapiHandle_process *process_handle = (WapiHandle_process *) data;
+       g_print ("id: %d, exited: %s, exitstatus: %d",
+               process_handle->id, process_handle->exited ? "true" : "false", process_handle->exitstatus);
+}
+
+static const gchar* process_typename (void)
+{
+       return "Process";
+}
+
+static gsize process_typesize (void)
+{
+       return sizeof (WapiHandle_process);
+}
+
 #if HAVE_SIGACTION
 MONO_SIGNAL_HANDLER_FUNC (static, mono_sigchld_signal_handler, (int _dummy, siginfo_t *info, void *context))
 {
@@ -2828,9 +2847,6 @@ process_wait (gpointer handle, guint32 timeout, gboolean alertable)
        /* Process must have exited */
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s (%p, %u): Waited successfully", __func__, handle, timeout);
 
-       ret = _wapi_handle_lock_shared_handles ();
-       g_assert (ret == 0);
-
        status = mp ? mp->status : 0;
        if (WIFSIGNALED (status))
                process_handle->exitstatus = 128 + WTERMSIG (status);
@@ -2843,9 +2859,7 @@ process_wait (gpointer handle, guint32 timeout, gboolean alertable)
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s (%p, %u): Setting pid %d signalled, exit status %d",
                   __func__, handle, timeout, process_handle->id, process_handle->exitstatus);
 
-       _wapi_handle_set_signal_state (handle, TRUE, TRUE);
-
-       _wapi_handle_unlock_shared_handles ();
+       mono_w32handle_set_signal_state (handle, TRUE, TRUE);
 
        return WAIT_OBJECT_0;
 }
index a5ff917f4dfb392ce2941f152b600cce216163f8..a388d63ef9332ccfff65e5bc4ef92d67a2c33e6d 100644 (file)
@@ -15,7 +15,6 @@
 #endif
 #include <glib.h>
 
-#include <mono/io-layer/handles.h>
 #include <mono/io-layer/access.h>
 #include <mono/io-layer/versioninfo.h>
 
index 8414f4e9205266daca7305346e1f59a15f6ddd93..3c27eef98921a6cfb891503ec68e47dc9ded51da 100644 (file)
 #include <config.h>
 #include <glib.h>
 
-extern struct _WapiHandleOps _wapi_sem_ops;
-extern struct _WapiHandleOps _wapi_namedsem_ops;
-
-extern void _wapi_sem_details (gpointer handle_info);
+#include "wapi-private.h"
 
 /* emulate sem_t, so that we can prod the internal state more easily */
 struct _WapiHandle_sem
@@ -27,9 +24,11 @@ struct _WapiHandle_sem
 
 struct _WapiHandle_namedsem
 {
+       struct _WapiHandle_sem s;
        WapiSharedNamespace sharedns;
-       guint32 val;
-       gint32 max;
 };
 
+void
+_wapi_semaphore_init (void);
+
 #endif /* _WAPI_SEMAPHORE_PRIVATE_H_ */
index a8131fa97f6a7d36d862f8a66f64cc5b8cb3c63b..c473f4dc00483b59d7dcce3d84388b53b3457df4 100644 (file)
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/semaphore-private.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-once.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
 
 static void sema_signal(gpointer handle);
 static gboolean sema_own (gpointer handle);
+static void sema_details (gpointer data);
+static const gchar* sema_typename (void);
+static gsize sema_typesize (void);
 
 static void namedsema_signal (gpointer handle);
 static gboolean namedsema_own (gpointer handle);
+static void namedsema_details (gpointer data);
+static const gchar* namedsema_typename (void);
+static gsize namedsema_typesize (void);
 
-struct _WapiHandleOps _wapi_sem_ops = {
+static MonoW32HandleOps _wapi_sem_ops = {
        NULL,                   /* close */
        sema_signal,            /* signal */
        sema_own,               /* own */
        NULL,                   /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       NULL,                   /* prewait */
+       sema_details,   /* details */
+       sema_typename,  /* typename */
+       sema_typesize,  /* typesize */
 };
 
-void _wapi_sem_details (gpointer handle_info)
-{
-       struct _WapiHandle_sem *sem = (struct _WapiHandle_sem *)handle_info;
-       
-       g_print ("val: %5u, max: %5d", sem->val, sem->max);
-}
-
-struct _WapiHandleOps _wapi_namedsem_ops = {
+static MonoW32HandleOps _wapi_namedsem_ops = {
        NULL,                   /* close */
        namedsema_signal,       /* signal */
        namedsema_own,          /* own */
        NULL,                   /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       NULL,                   /* prewait */
+       namedsema_details,      /* details */
+       namedsema_typename,     /* typename */
+       namedsema_typesize,     /* typesize */
 };
 
-static gboolean sem_release (gpointer handle, gint32 count, gint32 *prev);
-static gboolean namedsem_release (gpointer handle, gint32 count, gint32 *prev);
-
-static struct 
+void
+_wapi_semaphore_init (void)
 {
-       gboolean (*release)(gpointer handle, gint32 count, gint32 *prev);
-} sem_ops[WAPI_HANDLE_COUNT] = {
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {sem_release},
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {NULL},
-       {namedsem_release},
-};
+       mono_w32handle_register_ops (MONO_W32HANDLE_SEM,      &_wapi_sem_ops);
+       mono_w32handle_register_ops (MONO_W32HANDLE_NAMEDSEM, &_wapi_namedsem_ops);
 
-static mono_once_t sem_ops_once=MONO_ONCE_INIT;
-
-static void sem_ops_init (void)
-{
-       _wapi_handle_register_capabilities (WAPI_HANDLE_SEM,
-               (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SIGNAL));
-       _wapi_handle_register_capabilities (WAPI_HANDLE_NAMEDSEM,
-               (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SIGNAL));
+       mono_w32handle_register_capabilities (MONO_W32HANDLE_SEM,
+               (MonoW32HandleCapability)(MONO_W32HANDLE_CAP_WAIT | MONO_W32HANDLE_CAP_SIGNAL));
+       mono_w32handle_register_capabilities (MONO_W32HANDLE_NAMEDSEM,
+               (MonoW32HandleCapability)(MONO_W32HANDLE_CAP_WAIT | MONO_W32HANDLE_CAP_SIGNAL));
 }
 
-static void sema_signal(gpointer handle)
+static const char* sem_handle_type_to_string (MonoW32HandleType type)
 {
-       ReleaseSemaphore(handle, 1, NULL);
+       switch (type) {
+       case MONO_W32HANDLE_SEM: return "sem";
+       case MONO_W32HANDLE_NAMEDSEM: return "named sem";
+       default:
+               g_assert_not_reached ();
+       }
 }
 
-static gboolean sema_own (gpointer handle)
+static gboolean sem_handle_own (gpointer handle, MonoW32HandleType type)
 {
        struct _WapiHandle_sem *sem_handle;
-       gboolean ok;
-       
-       ok=_wapi_lookup_handle (handle, WAPI_HANDLE_SEM,
-                               (gpointer *)&sem_handle);
-       if(ok==FALSE) {
-               g_warning ("%s: error looking up sem handle %p", __func__,
-                          handle);
-               return(FALSE);
+
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&sem_handle)) {
+               g_warning ("%s: error looking up %s handle %p",
+                       __func__, sem_handle_type_to_string (type), handle);
+               return FALSE;
        }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning sem handle %p", __func__, handle);
+
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p",
+               __func__, sem_handle_type_to_string (type), handle);
 
        sem_handle->val--;
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: sem %p val now %d", __func__, handle, sem_handle->val);
 
-       if(sem_handle->val==0) {
-               _wapi_handle_set_signal_state (handle, FALSE, FALSE);
-       }
+       if (sem_handle->val == 0)
+               mono_w32handle_set_signal_state (handle, FALSE, FALSE);
+
+       return TRUE;
+}
+
+static void sema_signal(gpointer handle)
+{
+       ReleaseSemaphore(handle, 1, NULL);
+}
 
-       return(TRUE);
+static gboolean sema_own (gpointer handle)
+{
+       return sem_handle_own (handle, MONO_W32HANDLE_SEM);
 }
 
 static void namedsema_signal (gpointer handle)
@@ -127,165 +122,124 @@ static void namedsema_signal (gpointer handle)
 /* NB, always called with the shared handle lock held */
 static gboolean namedsema_own (gpointer handle)
 {
-       struct _WapiHandle_namedsem *namedsem_handle;
-       gboolean ok;
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning named sem handle %p", __func__, handle);
-
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDSEM,
-                                 (gpointer *)&namedsem_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up named sem handle %p",
-                          __func__, handle);
-               return (FALSE);
-       }
-       
-       namedsem_handle->val--;
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: named sem %p val now %d", __func__, handle,
-                  namedsem_handle->val);
+       return sem_handle_own (handle, MONO_W32HANDLE_NAMEDSEM);
+}
 
-       if (namedsem_handle->val == 0) {
-               _wapi_shared_handle_set_signal_state (handle, FALSE);
-       }
-       
-       return (TRUE);
+static void sema_details (gpointer data)
+{
+       struct _WapiHandle_sem *sem = (struct _WapiHandle_sem *)data;
+       g_print ("val: %5u, max: %5d", sem->val, sem->max);
 }
-static gpointer sem_create (WapiSecurityAttributes *security G_GNUC_UNUSED,
-                           gint32 initial, gint32 max)
+
+static void namedsema_details (gpointer data)
+{
+       struct _WapiHandle_namedsem *namedsem = (struct _WapiHandle_namedsem *)data;
+       g_print ("val: %5u, max: %5d, name: \"%s\"", namedsem->s.val, namedsem->s.max, namedsem->sharedns.name);
+}
+
+static const gchar* sema_typename (void)
+{
+       return "Semaphore";
+}
+
+static gsize sema_typesize (void)
+{
+       return sizeof (struct _WapiHandle_sem);
+}
+
+static const gchar* namedsema_typename (void)
+{
+       return "N.Semaphore";
+}
+
+static gsize namedsema_typesize (void)
+{
+       return sizeof (struct _WapiHandle_namedsem);
+}
+
+static gpointer sem_handle_create (struct _WapiHandle_sem *sem_handle, MonoW32HandleType type, gint32 initial, gint32 max)
 {
-       struct _WapiHandle_sem sem_handle = {0};
        gpointer handle;
        int thr_ret;
-       
-       /* Need to blow away any old errors here, because code tests
-        * for ERROR_ALREADY_EXISTS on success (!) to see if a
-        * semaphore was freshly created
-        */
-       SetLastError (ERROR_SUCCESS);
-       
-       sem_handle.val = initial;
-       sem_handle.max = max;
 
-       handle = _wapi_handle_new (WAPI_HANDLE_SEM, &sem_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error creating semaphore handle", __func__);
+       sem_handle->val = initial;
+       sem_handle->max = max;
+
+       handle = mono_w32handle_new (type, sem_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
+               g_warning ("%s: error creating %s handle",
+                       __func__, sem_handle_type_to_string (type));
                SetLastError (ERROR_GEN_FAILURE);
-               return(NULL);
+               return NULL;
        }
 
-       thr_ret = _wapi_handle_lock_handle (handle);
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
-       
-       if (initial != 0) {
-               _wapi_handle_set_signal_state (handle, TRUE, FALSE);
-       }
 
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Created semaphore handle %p initial %d max %d",
-                  __func__, handle, initial, max);
+       if (initial != 0)
+               mono_w32handle_set_signal_state (handle, TRUE, FALSE);
 
-       thr_ret = _wapi_handle_unlock_handle (handle);
+       thr_ret = mono_w32handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
 
-       return(handle);
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
+               __func__, sem_handle_type_to_string (type), handle);
+
+       return handle;
+}
+
+static gpointer sem_create (gint32 initial, gint32 max)
+{
+       struct _WapiHandle_sem sem_handle;
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle, initial %d max %d",
+               __func__, sem_handle_type_to_string (MONO_W32HANDLE_SEM), initial, max);
+       return sem_handle_create (&sem_handle, MONO_W32HANDLE_SEM, initial, max);
 }
 
-static gpointer namedsem_create (WapiSecurityAttributes *security G_GNUC_UNUSED, gint32 initial, gint32 max, const gunichar2 *name G_GNUC_UNUSED)
+static gpointer namedsem_create (gint32 initial, gint32 max, const gunichar2 *name)
 {
-       struct _WapiHandle_namedsem namedsem_handle = {{{0}}, 0};
        gpointer handle;
        gchar *utf8_name;
        int thr_ret;
-       gpointer ret = NULL;
-       guint32 namelen;
-       gint32 offset;
-       
-       /* w32 seems to guarantee that opening named objects can't
-        * race each other
-        */
+
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle, initial %d max %d name \"%s\"",
+               __func__, sem_handle_type_to_string (MONO_W32HANDLE_NAMEDSEM), initial, max, name);
+
+       /* w32 seems to guarantee that opening named objects can't race each other */
        thr_ret = _wapi_namespace_lock ();
        g_assert (thr_ret == 0);
-       
-       /* Need to blow away any old errors here, because code tests
-        * for ERROR_ALREADY_EXISTS on success (!) to see if a
-        * semaphore was freshly created
-        */
-       SetLastError (ERROR_SUCCESS);
 
        utf8_name = g_utf16_to_utf8 (name, -1, NULL, NULL, NULL);
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating named sem [%s]", __func__, utf8_name);
 
-       offset = _wapi_search_handle_namespace (WAPI_HANDLE_NAMEDSEM,
-                                               utf8_name);
-       if (offset == -1) {
-               /* The name has already been used for a different
-                * object.
-                */
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Creating named sem name [%s] initial %d max %d", __func__, utf8_name, initial, max);
+
+       handle = _wapi_search_handle_namespace (MONO_W32HANDLE_NAMEDSEM, utf8_name);
+       if (handle == INVALID_HANDLE_VALUE) {
+               /* The name has already been used for a different object. */
+               handle = NULL;
                SetLastError (ERROR_INVALID_HANDLE);
-               goto cleanup;
-       } else if (offset != 0) {
-               /* Not an error, but this is how the caller is
-                * informed that the semaphore wasn't freshly created
-                */
+       } else if (handle) {
+               /* Not an error, but this is how the caller is informed that the semaphore wasn't freshly created */
                SetLastError (ERROR_ALREADY_EXISTS);
-       }
-       /* Fall through to create the semaphore handle */
-
-       if (offset == 0) {
-               /* A new named semaphore, so create both the private
-                * and shared parts
-                */
-               if (strlen (utf8_name) < MAX_PATH) {
-                       namelen = strlen (utf8_name);
-               } else {
-                       namelen = MAX_PATH;
-               }
-       
-               memcpy (&namedsem_handle.sharedns.name, utf8_name, namelen);
-       
-               namedsem_handle.val = initial;
-               namedsem_handle.max = max;
 
-               handle = _wapi_handle_new (WAPI_HANDLE_NAMEDSEM,
-                                          &namedsem_handle);
+               /* this is used as creating a new handle */
+               mono_w32handle_ref (handle);
        } else {
-               /* A new reference to an existing named semaphore, so
-                * just create the private part
-                */
-               handle = _wapi_handle_new_from_offset (WAPI_HANDLE_NAMEDSEM,
-                                                      offset, TRUE);
-       }
-       
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error creating named sem handle", __func__);
-               SetLastError (ERROR_GEN_FAILURE);
-               goto cleanup;
-       }
-       ret = handle;
-       
-       if (offset == 0) {
-               /* Set the initial state, as this is a completely new
-                * handle
-                */
-               thr_ret = _wapi_handle_lock_shared_handles ();
-               g_assert (thr_ret == 0);
-               
-               if (initial != 0) {
-                       _wapi_shared_handle_set_signal_state (handle, TRUE);
-               }
-               
-               _wapi_handle_unlock_shared_handles ();
+               /* A new named semaphore */
+               struct _WapiHandle_namedsem namedsem_handle;
+
+               strncpy (&namedsem_handle.sharedns.name [0], utf8_name, MAX_PATH);
+               namedsem_handle.sharedns.name [MAX_PATH] = '\0';
+
+               handle = sem_handle_create ((struct _WapiHandle_sem*) &namedsem_handle, MONO_W32HANDLE_NAMEDSEM, initial, max);
        }
-       
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: returning named sem handle %p", __func__, handle);
 
-cleanup:
        g_free (utf8_name);
-       
-       _wapi_namespace_unlock (NULL);
-       
-       return (ret);
+
+       thr_ret = _wapi_namespace_unlock (NULL);
+       g_assert (thr_ret == 0);
+
+       return handle;
 }
 
 
@@ -309,8 +263,6 @@ cleanup:
  */
 gpointer CreateSemaphore(WapiSecurityAttributes *security G_GNUC_UNUSED, gint32 initial, gint32 max, const gunichar2 *name)
 {
-       mono_once (&sem_ops_once, sem_ops_init);
-       
        if (max <= 0) {
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: max <= 0", __func__);
 
@@ -325,110 +277,13 @@ gpointer CreateSemaphore(WapiSecurityAttributes *security G_GNUC_UNUSED, gint32
                return(NULL);
        }
 
-       if (name == NULL) {
-               return (sem_create (security, initial, max));
-       } else {
-               return (namedsem_create (security, initial, max, name));
-       }
-}
-
-static gboolean sem_release (gpointer handle, gint32 count, gint32 *prevcount)
-{
-       struct _WapiHandle_sem *sem_handle;
-       gboolean ok;
-       gboolean ret=FALSE;
-       int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SEM,
-                                 (gpointer *)&sem_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up sem handle %p", __func__,
-                          handle);
-               return(FALSE);
-       }
-
-       thr_ret = _wapi_handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: sem %p val %d count %d", __func__, handle,
-                  sem_handle->val, count);
-       
-       /* Do this before checking for count overflow, because overflowing max
-        * is a listed technique for finding the current value
-        */
-       if (prevcount != NULL) {
-               *prevcount = sem_handle->val;
-       }
-       
-       /* No idea why max is signed, but thats the spec :-( */
-       if (sem_handle->val + count > (guint32)sem_handle->max) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: sem %p max value would be exceeded: max %d current %d count %d", __func__, handle, sem_handle->max, sem_handle->val, count);
-
-               goto end;
-       }
-       
-       sem_handle->val += count;
-       _wapi_handle_set_signal_state (handle, TRUE, TRUE);
-       
-       ret = TRUE;
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: sem %p val now %d", __func__, handle, sem_handle->val);
-       
-end:
-       thr_ret = _wapi_handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
-
-       return(ret);
-}
-
-static gboolean namedsem_release (gpointer handle, gint32 count,
-                                 gint32 *prevcount)
-{
-       struct _WapiHandle_namedsem *sem_handle;
-       gboolean ok;
-       gboolean ret=FALSE;
-       int thr_ret;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_NAMEDSEM,
-                                 (gpointer *)&sem_handle);
-       if (ok == FALSE) {
-               g_warning ("%s: error looking up sem handle %p", __func__,
-                          handle);
-               return(FALSE);
-       }
-
-       thr_ret = _wapi_handle_lock_shared_handles ();
-       g_assert (thr_ret == 0);
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: named sem %p val %d count %d", __func__, handle,
-                 sem_handle->val, count);
-       
-       /* Do this before checking for count overflow, because overflowing max
-        * is a listed technique for finding the current value
+       /* Need to blow away any old errors here, because code tests
+        * for ERROR_ALREADY_EXISTS on success (!) to see if a
+        * semaphore was freshly created
         */
-       if (prevcount != NULL) {
-               *prevcount = sem_handle->val;
-       }
-       
-       /* No idea why max is signed, but thats the spec :-( */
-       if (sem_handle->val + count > (guint32)sem_handle->max) {
-               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: named sem %p max value would be exceeded: max %d current %d count %d", __func__, handle, sem_handle->max, sem_handle->val, count);
-
-               goto end;
-       }
-       
-       sem_handle->val += count;
-       _wapi_shared_handle_set_signal_state (handle, TRUE);
-       
-       ret = TRUE;
-
-       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: named sem %p val now %d", __func__, handle,
-                 sem_handle->val);
-       
-end:
-       _wapi_handle_unlock_shared_handles ();
+       SetLastError (ERROR_SUCCESS);
 
-       return(ret);
+       return name ? namedsem_create (initial, max, name) : sem_create (initial, max);
 }
 
 /**
@@ -445,21 +300,61 @@ end:
  */
 gboolean ReleaseSemaphore(gpointer handle, gint32 count, gint32 *prevcount)
 {
-       WapiHandleType type;
-       
-       if (handle == NULL) {
+       MonoW32HandleType type;
+       struct _WapiHandle_sem *sem_handle;
+       int thr_ret;
+       gboolean ret;
+
+       if (!handle) {
                SetLastError (ERROR_INVALID_HANDLE);
-               return (FALSE);
+               return FALSE;
        }
-       
-       type = _wapi_handle_type (handle);
-       
-       if (sem_ops[type].release == NULL) {
+
+       switch (type = mono_w32handle_get_type (handle)) {
+       case MONO_W32HANDLE_SEM:
+       case MONO_W32HANDLE_NAMEDSEM:
+               break;
+       default:
                SetLastError (ERROR_INVALID_HANDLE);
-               return (FALSE);
+               return FALSE;
        }
-       
-       return (sem_ops[type].release (handle, count, prevcount));
+
+       if (!mono_w32handle_lookup (handle, type, (gpointer *)&sem_handle)) {
+               g_warning ("%s: error looking up sem handle %p", __func__, handle);
+               return FALSE;
+       }
+
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: releasing %s handle %p",
+               __func__, sem_handle_type_to_string (type), handle);
+
+       thr_ret = mono_w32handle_lock_handle (handle);
+       g_assert (thr_ret == 0);
+
+       /* Do this before checking for count overflow, because overflowing
+        * max is a listed technique for finding the current value */
+       if (prevcount)
+               *prevcount = sem_handle->val;
+
+       /* No idea why max is signed, but thats the spec :-( */
+       if (sem_handle->val + count > (guint32)sem_handle->max) {
+               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p val %d count %d max %d, max value would be exceeded",
+                       __func__, sem_handle_type_to_string (type), handle, sem_handle->val, count, sem_handle->max, count);
+
+               ret = FALSE;
+       } else {
+               MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p val %d count %d max %d",
+                       __func__, sem_handle_type_to_string (type), handle, sem_handle->val, count, sem_handle->max, count);
+
+               sem_handle->val += count;
+               mono_w32handle_set_signal_state (handle, TRUE, TRUE);
+
+               ret = TRUE;
+       }
+
+       thr_ret = mono_w32handle_unlock_handle (handle);
+       g_assert (thr_ret == 0);
+
+       return ret;
 }
 
 gpointer OpenSemaphore (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED,
@@ -468,11 +363,7 @@ gpointer OpenSemaphore (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UN
        gpointer handle;
        gchar *utf8_name;
        int thr_ret;
-       gpointer ret = NULL;
-       gint32 offset;
 
-       mono_once (&sem_ops_once, sem_ops_init);
-       
        /* w32 seems to guarantee that opening named objects can't
         * race each other
         */
@@ -483,33 +374,20 @@ gpointer OpenSemaphore (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UN
        
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Opening named sem [%s]", __func__, utf8_name);
 
-       offset = _wapi_search_handle_namespace (WAPI_HANDLE_NAMEDSEM,
+       handle = _wapi_search_handle_namespace (MONO_W32HANDLE_NAMEDSEM,
                                                utf8_name);
-       if (offset == -1) {
+       if (handle == INVALID_HANDLE_VALUE) {
                /* The name has already been used for a different
                 * object.
                 */
                SetLastError (ERROR_INVALID_HANDLE);
                goto cleanup;
-       } else if (offset == 0) {
+       } else if (!handle) {
                /* This name doesn't exist */
                SetLastError (ERROR_FILE_NOT_FOUND);    /* yes, really */
                goto cleanup;
        }
 
-       /* A new reference to an existing named semaphore, so just
-        * create the private part
-        */
-       handle = _wapi_handle_new_from_offset (WAPI_HANDLE_NAMEDSEM, offset,
-                                              TRUE);
-       
-       if (handle == _WAPI_HANDLE_INVALID) {
-               g_warning ("%s: error opening named sem handle", __func__);
-               SetLastError (ERROR_GEN_FAILURE);
-               goto cleanup;
-       }
-       ret = handle;
-       
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: returning named sem handle %p", __func__, handle);
 
 cleanup:
@@ -517,5 +395,5 @@ cleanup:
        
        _wapi_namespace_unlock (NULL);
        
-       return (ret);
+       return handle;
 }
index 64a8b330d4400934a3c8bb5667fa2fc3cc6d5fdb..b1d9c1ba509b45542d88ca895c3b937ec344c32f 100644 (file)
@@ -27,12 +27,6 @@ _wapi_shm_semaphores_init (void)
                mono_os_mutex_init (&noshm_sems [i]);
 }
 
-void
-_wapi_shm_semaphores_remove (void)
-{
-       /* Nothing */
-}
-
 int
 _wapi_shm_sem_lock (int sem)
 {
index 4807adc5a8e8af2567b97cf6e1b514d88eefe1e9..204f50661ff4eff220f0d9ba4f5c427c5e4c5a2b 100644 (file)
@@ -11,7 +11,6 @@
 #define _WAPI_SHARED_H_
 
 extern void _wapi_shm_semaphores_init (void);
-extern void _wapi_shm_semaphores_remove (void);
 extern int _wapi_shm_sem_lock (int sem);
 extern int _wapi_shm_sem_trylock (int sem);
 extern int _wapi_shm_sem_unlock (int sem);
index db210e2356827dcbe42d4ee0c6213fa0bbdafee2..31bbfe33c89c995c8eaed0b5428b78268b362b1e 100644 (file)
@@ -13,7 +13,7 @@
 #include <config.h>
 #include <glib.h>
 
-extern struct _WapiHandleOps _wapi_socket_ops;
+#include "wapi-private.h"
 
 struct _WapiHandle_socket
 {
@@ -24,4 +24,7 @@ struct _WapiHandle_socket
        int still_readable;
 };
 
+void
+_wapi_socket_init (void);
+
 #endif /* _WAPI_SOCKET_PRIVATE_H_ */
index 6d0da527bd65c54a31c77c2f1b0255c0d43add1a..bc4e032ef4e56ef7c23c7f4e4a5faab9a10f5969 100644 (file)
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
 #include <mono/io-layer/socket-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/socket-wrappers.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-poll.h>
 #include <mono/utils/mono-once.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
 
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 static guint32 in_cleanup = 0;
 
 static void socket_close (gpointer handle, gpointer data);
+static void socket_details (gpointer data);
+static const gchar* socket_typename (void);
+static gsize socket_typesize (void);
 
-struct _WapiHandleOps _wapi_socket_ops = {
+static MonoW32HandleOps _wapi_socket_ops = {
        socket_close,           /* close */
        NULL,                   /* signal */
        NULL,                   /* own */
        NULL,                   /* is_owned */
        NULL,                   /* special_wait */
-       NULL                    /* prewait */
+       NULL,                   /* prewait */
+       socket_details, /* details */
+       socket_typename,        /* typename */
+       socket_typesize,        /* typesize */
 };
 
-static mono_once_t socket_ops_once=MONO_ONCE_INIT;
-
-static void socket_ops_init (void)
+void
+_wapi_socket_init (void)
 {
-       /* No capabilities to register */
+       mono_w32handle_register_ops (MONO_W32HANDLE_SOCKET, &_wapi_socket_ops);
 }
 
 static void socket_close (gpointer handle, gpointer data)
@@ -105,11 +110,28 @@ static void socket_close (gpointer handle, gpointer data)
                socket_handle->saved_error = 0;
 }
 
+static void socket_details (gpointer data)
+{
+       /* FIXME: do something */
+}
+
+static const gchar* socket_typename (void)
+{
+       return "Socket";
+}
+
+static gsize socket_typesize (void)
+{
+       return sizeof (struct _WapiHandle_socket);
+}
+
 static gboolean
-cleanup_close (gpointer handle, gpointer data)
+cleanup_close (gpointer handle, gpointer data, gpointer user_data)
 {
-       _wapi_handle_ops_close (handle, NULL);
-       return TRUE;
+       if (mono_w32handle_get_type (handle) == MONO_W32HANDLE_SOCKET)
+               mono_w32handle_ops_close (handle, data);
+
+       return FALSE;
 }
 
 void _wapi_cleanup_networking(void)
@@ -117,7 +139,7 @@ void _wapi_cleanup_networking(void)
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: cleaning up", __func__);
 
        in_cleanup = 1;
-       _wapi_handle_foreach (WAPI_HANDLE_SOCKET, cleanup_close, NULL);
+       mono_w32handle_foreach (cleanup_close, NULL);
        in_cleanup = 0;
 }
 
@@ -135,12 +157,12 @@ int closesocket(guint32 fd)
 {
        gpointer handle = GUINT_TO_POINTER (fd);
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(0);
        }
        
-       _wapi_handle_unref (handle);
+       mono_w32handle_unref (handle);
        return(0);
 }
 
@@ -158,12 +180,12 @@ guint32 _wapi_accept(guint32 fd, struct sockaddr *addr, socklen_t *addrlen)
                return(INVALID_SOCKET);
        }
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(INVALID_SOCKET);
        }
        
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
+       ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_SOCKET,
                                  (gpointer *)&socket_handle);
        if (ok == FALSE) {
                g_warning ("%s: error looking up socket handle %p",
@@ -187,7 +209,7 @@ guint32 _wapi_accept(guint32 fd, struct sockaddr *addr, socklen_t *addrlen)
                return(INVALID_SOCKET);
        }
 
-       if (new_fd >= _wapi_fd_reserve) {
+       if (new_fd >= mono_w32handle_fd_reserve) {
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: File descriptor is too big", __func__);
 
                WSASetLastError (WSASYSCALLFAILURE);
@@ -202,9 +224,9 @@ guint32 _wapi_accept(guint32 fd, struct sockaddr *addr, socklen_t *addrlen)
        new_socket_handle.protocol = socket_handle->protocol;
        new_socket_handle.still_readable = 1;
 
-       new_handle = _wapi_handle_new_fd (WAPI_HANDLE_SOCKET, new_fd,
+       new_handle = mono_w32handle_new_fd (MONO_W32HANDLE_SOCKET, new_fd,
                                          &new_socket_handle);
-       if(new_handle == _WAPI_HANDLE_INVALID) {
+       if(new_handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating socket handle", __func__);
                WSASetLastError (ERROR_GEN_FAILURE);
                return(INVALID_SOCKET);
@@ -221,7 +243,7 @@ int _wapi_bind(guint32 fd, struct sockaddr *my_addr, socklen_t addrlen)
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -246,7 +268,7 @@ int _wapi_connect(guint32 fd, const struct sockaddr *serv_addr,
        gboolean ok;
        gint errnum;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -275,8 +297,8 @@ int _wapi_connect(guint32 fd, const struct sockaddr *serv_addr,
                         * But don't do this for EWOULDBLOCK (bug 317315)
                         */
                        if (errnum != WSAEWOULDBLOCK) {
-                               ok = _wapi_lookup_handle (handle,
-                                                         WAPI_HANDLE_SOCKET,
+                               ok = mono_w32handle_lookup (handle,
+                                                         MONO_W32HANDLE_SOCKET,
                                                          (gpointer *)&socket_handle);
                                if (ok == FALSE) {
                                        /* ECONNRESET means the socket was closed by another thread */
@@ -321,7 +343,7 @@ int _wapi_connect(guint32 fd, const struct sockaddr *serv_addr,
                        errnum = errno_to_WSA (so_error, __func__);
 
                        /* Need to save this socket error */
-                       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
+                       ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_SOCKET,
                                                  (gpointer *)&socket_handle);
                        if (ok == FALSE) {
                                g_warning ("%s: error looking up socket handle %p", __func__, handle);
@@ -345,7 +367,7 @@ int _wapi_getpeername(guint32 fd, struct sockaddr *name, socklen_t *namelen)
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -370,7 +392,7 @@ int _wapi_getsockname(guint32 fd, struct sockaddr *name, socklen_t *namelen)
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -400,7 +422,7 @@ int _wapi_getsockopt(guint32 fd, int level, int optname, void *optval,
        struct _WapiHandle_socket *socket_handle;
        gboolean ok;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -431,7 +453,7 @@ int _wapi_getsockopt(guint32 fd, int level, int optname, void *optval,
        }
 
        if (optname == SO_ERROR) {
-               ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
+               ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_SOCKET,
                                          (gpointer *)&socket_handle);
                if (ok == FALSE) {
                        g_warning ("%s: error looking up socket handle %p",
@@ -459,7 +481,7 @@ int _wapi_listen(guint32 fd, int backlog)
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -491,7 +513,7 @@ int _wapi_recvfrom(guint32 fd, void *buf, size_t len, int recv_flags,
        gboolean ok;
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -520,7 +542,7 @@ int _wapi_recvfrom(guint32 fd, void *buf, size_t len, int recv_flags,
                 * still_readable != 1 then shutdown
                 * (SHUT_RD|SHUT_RDWR) has been called locally.
                 */
-               ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
+               ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_SOCKET,
                                          (gpointer *)&socket_handle);
                if (ok == FALSE || socket_handle->still_readable != 1) {
                        ret = -1;
@@ -548,7 +570,7 @@ _wapi_recvmsg(guint32 fd, struct msghdr *msg, int recv_flags)
        gboolean ok;
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -560,7 +582,7 @@ _wapi_recvmsg(guint32 fd, struct msghdr *msg, int recv_flags)
 
        if (ret == 0) {
                /* see _wapi_recvfrom */
-               ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
+               ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_SOCKET,
                                          (gpointer *)&socket_handle);
                if (ok == FALSE || socket_handle->still_readable != 1) {
                        ret = -1;
@@ -585,7 +607,7 @@ int _wapi_send(guint32 fd, const void *msg, size_t len, int send_flags)
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -622,7 +644,7 @@ int _wapi_sendto(guint32 fd, const void *msg, size_t len, int send_flags,
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -650,7 +672,7 @@ _wapi_sendmsg(guint32 fd,  const struct msghdr *msg, int send_flags)
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -684,7 +706,7 @@ int _wapi_setsockopt(guint32 fd, int level, int optname,
 #endif
        struct timeval tv;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -747,14 +769,14 @@ int _wapi_shutdown(guint32 fd, int how)
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
 
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
 
        if (how == SHUT_RD ||
            how == SHUT_RDWR) {
-               ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
+               ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_SOCKET,
                                          (gpointer *)&socket_handle);
                if (ok == FALSE) {
                        g_warning ("%s: error looking up socket handle %p",
@@ -811,9 +833,9 @@ guint32 _wapi_socket(int domain, int type, int protocol, void *unused,
                return(INVALID_SOCKET);
        }
 
-       if (fd >= _wapi_fd_reserve) {
+       if (fd >= mono_w32handle_fd_reserve) {
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: File descriptor is too big (%d >= %d)",
-                          __func__, fd, _wapi_fd_reserve);
+                          __func__, fd, mono_w32handle_fd_reserve);
 
                WSASetLastError (WSASYSCALLFAILURE);
                close (fd);
@@ -856,10 +878,8 @@ guint32 _wapi_socket(int domain, int type, int protocol, void *unused,
        }
        
        
-       mono_once (&socket_ops_once, socket_ops_init);
-       
-       handle = _wapi_handle_new_fd (WAPI_HANDLE_SOCKET, fd, &socket_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
+       handle = mono_w32handle_new_fd (MONO_W32HANDLE_SOCKET, fd, &socket_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating socket handle", __func__);
                WSASetLastError (WSASYSCALLFAILURE);
                close (fd);
@@ -878,7 +898,7 @@ static gboolean socket_disconnect (guint32 fd)
        gpointer handle = GUINT_TO_POINTER (fd);
        int newsock, ret;
        
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
+       ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_SOCKET,
                                  (gpointer *)&socket_handle);
        if (ok == FALSE) {
                g_warning ("%s: error looking up socket handle %p", __func__,
@@ -996,7 +1016,7 @@ wapi_sendfile (guint32 socket, gpointer fd, guint32 bytes_to_write, guint32 byte
                do {
                        n = send (socket, buffer, n, 0); /* short sends? enclose this in a loop? */
                } while (n == -1 && errno == EINTR && !_wapi_thread_cur_apc_pending ());
-       } while (n != -1);
+       } while (n != -1 && errno == EINTR && !_wapi_thread_cur_apc_pending ());
 
        if (n == -1) {
                gint errnum = errno;
@@ -1017,7 +1037,7 @@ TransmitFile (guint32 socket, gpointer file, guint32 bytes_to_write, guint32 byt
        gpointer sock = GUINT_TO_POINTER (socket);
        gint ret;
 
-       if (_wapi_handle_type (sock) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (sock) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return FALSE;
        }
@@ -1066,7 +1086,7 @@ WSAIoctl (guint32 fd, gint32 command,
        int ret;
        gchar *buffer = NULL;
 
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return SOCKET_ERROR;
        }
@@ -1204,7 +1224,7 @@ int ioctlsocket(guint32 fd, unsigned long command, gpointer arg)
        gpointer handle = GUINT_TO_POINTER (fd);
        int ret;
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(SOCKET_ERROR);
        }
@@ -1316,7 +1336,7 @@ void _wapi_FD_CLR(guint32 fd, fd_set *set)
                return;
        }
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return;
        }
@@ -1333,7 +1353,7 @@ int _wapi_FD_ISSET(guint32 fd, fd_set *set)
                return(0);
        }
        
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return(0);
        }
@@ -1350,7 +1370,7 @@ void _wapi_FD_SET(guint32 fd, fd_set *set)
                return;
        }
 
-       if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+       if (mono_w32handle_get_type (handle) != MONO_W32HANDLE_SOCKET) {
                WSASetLastError (WSAENOTSOCK);
                return;
        }
index 3cf5535c5b821492f971a9c347cc1144a4f0ba28..a4095002dddf441f117ea52f039f0e9791398cf2 100644 (file)
 #include <glib.h>
 #include <pthread.h>
 
+#include "wapi-private.h"
+
 /* There doesn't seem to be a defined symbol for this */
 #define _WAPI_THREAD_CURRENT (gpointer)0xFFFFFFFE
 
-extern struct _WapiHandleOps _wapi_thread_ops;
-
 struct _WapiHandle_thread
 {
        pthread_t id;
        GPtrArray *owned_mutexes;
+       gint32 priority;
 };
 
 typedef struct _WapiHandle_thread WapiHandle_thread;
 
+void
+_wapi_thread_init (void);
+
 extern gboolean _wapi_thread_cur_apc_pending (void);
 extern void _wapi_thread_own_mutex (gpointer mutex);
 extern void _wapi_thread_disown_mutex (gpointer mutex);
index a00569d1a99a34f20708bd86650d0591e54f19fb..412f0f1ebe89acbe106fc605c82312e054628d61 100644 (file)
@@ -12,7 +12,6 @@
 
 #include <glib.h>
 
-#include <mono/io-layer/handles.h>
 #include <mono/io-layer/io.h>
 #include <mono/io-layer/status.h>
 #include <mono/io-layer/processes.h>
@@ -25,16 +24,27 @@ G_BEGIN_DECLS
 #define THREAD_ALL_ACCESS              (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff)
 
 typedef guint32 (*WapiThreadStart)(gpointer);
+typedef enum {
+       THREAD_PRIORITY_LOWEST = -2,
+       THREAD_PRIORITY_BELOW_NORMAL = -1,
+       THREAD_PRIORITY_NORMAL = 0,
+       THREAD_PRIORITY_ABOVE_NORMAL = 1,
+       THREAD_PRIORITY_HIGHEST = 2
+} WapiThreadPriority;
 
 gpointer wapi_create_thread_handle (void);
 void wapi_thread_handle_set_exited (gpointer handle, guint32 exitstatus);
 void wapi_ref_thread_handle (gpointer handle);
 gpointer wapi_get_current_thread_handle (void);
 
-charwapi_current_thread_desc (void);
+char *wapi_current_thread_desc (void);
 
 extern gint32 GetThreadPriority (gpointer handle);
 extern gboolean SetThreadPriority (gpointer handle, gint32 priority);
 
+extern int wapi_thread_priority_to_posix_priority (WapiThreadPriority, int);
+extern void wapi_init_thread_info_priority (gpointer, gint32);
+
 G_END_DECLS
 #endif /* _WAPI_THREADS_H_ */
index a91fff80d57c0697f6431d99b75fd9327a945433..e9b46f450cc4c488818877a61a0aa710ab3019be 100644 (file)
 #include <errno.h>
 
 #include <mono/io-layer/wapi.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/wapi-private.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-logger-internals.h>
 #include <mono/utils/mono-time.h>
+#include <mono/utils/w32handle.h>
 
 static gboolean own_if_signalled(gpointer handle)
 {
        gboolean ret = FALSE;
-       
-       if (_WAPI_SHARED_HANDLE (_wapi_handle_type (handle))) {
-               if (_wapi_handle_trylock_shared_handles () == EBUSY) {
-                       return (FALSE);
-               }
-       }
-       
-       if (_wapi_handle_issignalled (handle)) {
-               _wapi_handle_ops_own (handle);
-               ret = TRUE;
-       }
 
-       if (_WAPI_SHARED_HANDLE (_wapi_handle_type (handle))) {
-               _wapi_handle_unlock_shared_handles ();
+       if (mono_w32handle_issignalled (handle)) {
+               mono_w32handle_ops_own (handle);
+               ret = TRUE;
        }
 
        return(ret);
@@ -44,20 +34,10 @@ static gboolean own_if_signalled(gpointer handle)
 static gboolean own_if_owned(gpointer handle)
 {
        gboolean ret = FALSE;
-       
-       if (_WAPI_SHARED_HANDLE (_wapi_handle_type (handle))) {
-               if (_wapi_handle_trylock_shared_handles () == EBUSY) {
-                       return (FALSE);
-               }
-       }
-       
-       if (_wapi_handle_ops_isowned (handle)) {
-               _wapi_handle_ops_own (handle);
-               ret = TRUE;
-       }
 
-       if (_WAPI_SHARED_HANDLE (_wapi_handle_type (handle))) {
-               _wapi_handle_unlock_shared_handles ();
+       if (mono_w32handle_ops_isowned (handle)) {
+               mono_w32handle_ops_own (handle);
+               ret = TRUE;
        }
 
        return(ret);
@@ -109,20 +89,20 @@ guint32 WaitForSingleObjectEx(gpointer handle, guint32 timeout,
                return(WAIT_FAILED);
        }
        
-       if (_wapi_handle_test_capabilities (handle,
-                                           WAPI_HANDLE_CAP_WAIT) == FALSE) {
+       if (mono_w32handle_test_capabilities (handle,
+                                           MONO_W32HANDLE_CAP_WAIT) == FALSE) {
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p can't be waited for", __func__,
                           handle);
 
                return(WAIT_FAILED);
        }
 
-       _wapi_handle_ops_prewait (handle);
+       mono_w32handle_ops_prewait (handle);
        
-       if (_wapi_handle_test_capabilities (handle, WAPI_HANDLE_CAP_SPECIAL_WAIT) == TRUE) {
+       if (mono_w32handle_test_capabilities (handle, MONO_W32HANDLE_CAP_SPECIAL_WAIT) == TRUE) {
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p has special wait", __func__, handle);
 
-               ret = _wapi_handle_ops_special_wait (handle, timeout, alertable);
+               ret = mono_w32handle_ops_specialwait (handle, timeout, alertable);
        
                if (alertable && _wapi_thread_cur_apc_pending ())
                        ret = WAIT_IO_COMPLETION;
@@ -133,11 +113,11 @@ guint32 WaitForSingleObjectEx(gpointer handle, guint32 timeout,
        
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: locking handle %p", __func__, handle);
 
-       thr_ret = _wapi_handle_lock_handle (handle);
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
 
-       if (_wapi_handle_test_capabilities (handle,
-                                           WAPI_HANDLE_CAP_OWN) == TRUE) {
+       if (mono_w32handle_test_capabilities (handle,
+                                           MONO_W32HANDLE_CAP_OWN) == TRUE) {
                if (own_if_owned (handle) == TRUE) {
                        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p already owned", __func__,
                                   handle);
@@ -165,7 +145,7 @@ guint32 WaitForSingleObjectEx(gpointer handle, guint32 timeout,
        do {
                /* Check before waiting on the condition, just in case
                 */
-               _wapi_handle_ops_prewait (handle);
+               mono_w32handle_ops_prewait (handle);
 
                if (own_if_signalled (handle)) {
                        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p signalled", __func__,
@@ -176,7 +156,7 @@ guint32 WaitForSingleObjectEx(gpointer handle, guint32 timeout,
                }
 
                if (timeout == INFINITE) {
-                       waited = _wapi_handle_timedwait_signal_handle (handle, INFINITE, alertable, FALSE, &apc_pending);
+                       waited = mono_w32handle_timedwait_signal_handle (handle, INFINITE, FALSE, alertable ? &apc_pending : NULL);
                } else {
                        now = mono_100ns_ticks ();
                        if (end < now) {
@@ -184,7 +164,7 @@ guint32 WaitForSingleObjectEx(gpointer handle, guint32 timeout,
                                goto done;
                        }
 
-                       waited = _wapi_handle_timedwait_signal_handle (handle, (end - now) / 10 / 1000, alertable, FALSE, &apc_pending);
+                       waited = mono_w32handle_timedwait_signal_handle (handle, (end - now) / 10 / 1000, FALSE, alertable ? &apc_pending : NULL);
                }
 
                if(waited==0 && !apc_pending) {
@@ -214,7 +194,7 @@ done:
 
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking handle %p", __func__, handle);
        
-       thr_ret = _wapi_handle_unlock_handle (handle);
+       thr_ret = mono_w32handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
 
        return(ret);
@@ -301,19 +281,19 @@ guint32 SignalObjectAndWait(gpointer signal_handle, gpointer wait,
                return(WAIT_FAILED);
        }
        
-       if (_wapi_handle_test_capabilities (signal_handle,
-                                           WAPI_HANDLE_CAP_SIGNAL)==FALSE) {
+       if (mono_w32handle_test_capabilities (signal_handle,
+                                           MONO_W32HANDLE_CAP_SIGNAL)==FALSE) {
                return(WAIT_FAILED);
        }
        
-       if (_wapi_handle_test_capabilities (wait,
-                                           WAPI_HANDLE_CAP_WAIT)==FALSE) {
+       if (mono_w32handle_test_capabilities (wait,
+                                           MONO_W32HANDLE_CAP_WAIT)==FALSE) {
                return(WAIT_FAILED);
        }
 
-       _wapi_handle_ops_prewait (wait);
+       mono_w32handle_ops_prewait (wait);
        
-       if (_wapi_handle_test_capabilities (wait, WAPI_HANDLE_CAP_SPECIAL_WAIT) == TRUE) {
+       if (mono_w32handle_test_capabilities (wait, MONO_W32HANDLE_CAP_SPECIAL_WAIT) == TRUE) {
                g_warning ("%s: handle %p has special wait, implement me!!",
                           __func__, wait);
 
@@ -322,12 +302,12 @@ guint32 SignalObjectAndWait(gpointer signal_handle, gpointer wait,
 
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: locking handle %p", __func__, wait);
 
-       thr_ret = _wapi_handle_lock_handle (wait);
+       thr_ret = mono_w32handle_lock_handle (wait);
        g_assert (thr_ret == 0);
 
-       _wapi_handle_ops_signal (signal_handle);
+       mono_w32handle_ops_signal (signal_handle);
 
-       if (_wapi_handle_test_capabilities (wait, WAPI_HANDLE_CAP_OWN)==TRUE) {
+       if (mono_w32handle_test_capabilities (wait, MONO_W32HANDLE_CAP_OWN)==TRUE) {
                if (own_if_owned (wait)) {
                        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p already owned", __func__,
                                   wait);
@@ -349,7 +329,7 @@ guint32 SignalObjectAndWait(gpointer signal_handle, gpointer wait,
        do {
                /* Check before waiting on the condition, just in case
                 */
-               _wapi_handle_ops_prewait (wait);
+               mono_w32handle_ops_prewait (wait);
        
                if (own_if_signalled (wait)) {
                        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p signalled", __func__, wait);
@@ -359,7 +339,7 @@ guint32 SignalObjectAndWait(gpointer signal_handle, gpointer wait,
                }
 
                if (timeout == INFINITE) {
-                       waited = _wapi_handle_timedwait_signal_handle (wait, INFINITE, alertable, FALSE, &apc_pending);
+                       waited = mono_w32handle_timedwait_signal_handle (wait, INFINITE, FALSE, alertable ? &apc_pending : NULL);
                } else {
                        now = mono_100ns_ticks ();
                        if (end < now) {
@@ -367,7 +347,7 @@ guint32 SignalObjectAndWait(gpointer signal_handle, gpointer wait,
                                goto done;
                        }
 
-                       waited = _wapi_handle_timedwait_signal_handle (wait, (end - now) / 10 / 1000, alertable, FALSE, &apc_pending);
+                       waited = mono_w32handle_timedwait_signal_handle (wait, (end - now) / 10 / 1000, FALSE, alertable ? &apc_pending : NULL);
                }
 
                if (waited==0 && !apc_pending) {
@@ -396,7 +376,7 @@ done:
 
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking handle %p", __func__, wait);
 
-       thr_ret = _wapi_handle_unlock_handle (wait);
+       thr_ret = mono_w32handle_unlock_handle (wait);
        g_assert (thr_ret == 0);
 
        return(ret);
@@ -411,7 +391,7 @@ static gboolean test_and_own (guint32 numobjects, gpointer *handles,
        
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: locking handles", __func__);
        
-       done = _wapi_handle_count_signalled_handles (numobjects, handles,
+       done = mono_w32handle_count_signalled_handles (numobjects, handles,
                                                     waitall, count, lowest);
        if (done == TRUE) {
                if (waitall == TRUE) {
@@ -425,7 +405,7 @@ static gboolean test_and_own (guint32 numobjects, gpointer *handles,
        
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking handles", __func__);
 
-       _wapi_handle_unlock_handles (numobjects, handles);
+       mono_w32handle_unlock_handles (numobjects, handles);
 
        return(done);
 }
@@ -512,7 +492,7 @@ guint32 WaitForMultipleObjectsEx(guint32 numobjects, gpointer *handles,
                        break;
                }
 
-               if (_wapi_handle_test_capabilities (handles[i], WAPI_HANDLE_CAP_WAIT) == FALSE) {
+               if (mono_w32handle_test_capabilities (handles[i], MONO_W32HANDLE_CAP_WAIT) == FALSE) {
                        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Handle %p can't be waited for",
                                   __func__, handles[i]);
 
@@ -521,7 +501,7 @@ guint32 WaitForMultipleObjectsEx(guint32 numobjects, gpointer *handles,
                }
 
                sorted_handles [i] = handles [i];
-               _wapi_handle_ops_prewait (handles[i]);
+               mono_w32handle_ops_prewait (handles[i]);
        }
 
        qsort (sorted_handles, numobjects, sizeof (gpointer), g_direct_equal);
@@ -546,7 +526,7 @@ guint32 WaitForMultipleObjectsEx(guint32 numobjects, gpointer *handles,
 
        poll = FALSE;
        for (i = 0; i < numobjects; ++i)
-               if (_wapi_handle_type (handles [i]) == WAPI_HANDLE_PROCESS || _WAPI_SHARED_HANDLE (_wapi_handle_type (handles[i]))) 
+               if (mono_w32handle_get_type (handles [i]) == MONO_W32HANDLE_PROCESS)
                        /* Can't wait for a process handle + another handle without polling */
                        poll = TRUE;
 
@@ -570,7 +550,7 @@ guint32 WaitForMultipleObjectsEx(guint32 numobjects, gpointer *handles,
                 * disappear from under us while we're waiting in the loop
                 * (not lock, as we don't want exclusive access here)
                 */
-               _wapi_handle_ref (handles[i]);
+               mono_w32handle_ref (handles[i]);
        }
 
        while(1) {
@@ -578,41 +558,41 @@ guint32 WaitForMultipleObjectsEx(guint32 numobjects, gpointer *handles,
                 * special-wait handles that aren't already signalled
                 */
                for (i = 0; i < numobjects; i++) {
-                       _wapi_handle_ops_prewait (handles[i]);
+                       mono_w32handle_ops_prewait (handles[i]);
                
-                       if (_wapi_handle_test_capabilities (handles[i], WAPI_HANDLE_CAP_SPECIAL_WAIT) == TRUE && _wapi_handle_issignalled (handles[i]) == FALSE) {
-                               _wapi_handle_ops_special_wait (handles[i], 0, alertable);
+                       if (mono_w32handle_test_capabilities (handles[i], MONO_W32HANDLE_CAP_SPECIAL_WAIT) == TRUE && mono_w32handle_issignalled (handles[i]) == FALSE) {
+                               mono_w32handle_ops_specialwait (handles[i], 0, alertable);
                        }
                }
                
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: locking signal mutex", __func__);
 
-               thr_ret = _wapi_handle_lock_signal_mutex ();
+               thr_ret = mono_w32handle_lock_signal_mutex ();
                g_assert (thr_ret == 0);
 
                /* Check the signalled state of handles inside the critical section */
                if (waitall) {
                        done = TRUE;
                        for (i = 0; i < numobjects; i++)
-                               if (!_wapi_handle_issignalled (handles [i]))
+                               if (!mono_w32handle_issignalled (handles [i]))
                                        done = FALSE;
                } else {
                        done = FALSE;
                        for (i = 0; i < numobjects; i++)
-                               if (_wapi_handle_issignalled (handles [i]))
+                               if (mono_w32handle_issignalled (handles [i]))
                                        done = TRUE;
                }
                
                if (!done) {
                        /* Enter the wait */
                        if (timeout == INFINITE) {
-                               ret = _wapi_handle_timedwait_signal (INFINITE, poll, &apc_pending);
+                               ret = mono_w32handle_timedwait_signal (INFINITE, poll, &apc_pending);
                        } else {
                                now = mono_100ns_ticks ();
                                if (end < now) {
                                        ret = WAIT_TIMEOUT;
                                } else {
-                                       ret = _wapi_handle_timedwait_signal ((end - now) / 10 / 1000, poll, &apc_pending);
+                                       ret = mono_w32handle_timedwait_signal ((end - now) / 10 / 1000, poll, &apc_pending);
                                }
                        }
                } else {
@@ -622,7 +602,7 @@ guint32 WaitForMultipleObjectsEx(guint32 numobjects, gpointer *handles,
 
                MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking signal mutex", __func__);
 
-               thr_ret = _wapi_handle_unlock_signal_mutex (NULL);
+               thr_ret = mono_w32handle_unlock_signal_mutex ();
                g_assert (thr_ret == 0);
                
                if (alertable && apc_pending) {
@@ -657,7 +637,7 @@ guint32 WaitForMultipleObjectsEx(guint32 numobjects, gpointer *handles,
 
        for (i = 0; i < numobjects; i++) {
                /* Unref everything we reffed above */
-               _wapi_handle_unref (handles[i]);
+               mono_w32handle_unref (handles[i]);
        }
 
        return retval;
index e01cdf6804cda195b9b55d6cd89a89f9d0e8c109..8d3617f1f3e34d873067f762c656064bd022a837 100644 (file)
 #include <sys/stat.h>
 
 #include <mono/io-layer/wapi.h>
-#include <mono/io-layer/handles.h>
 #include <mono/io-layer/io.h>
+#include <mono/io-layer/shared.h>
 
 #include <mono/utils/mono-os-mutex.h>
 
-/* Increment this whenever an incompatible change is made to the
- * shared handle structure.
- */
-#define _WAPI_HANDLE_VERSION 12
-
-typedef enum {
-       WAPI_HANDLE_UNUSED=0,
-       WAPI_HANDLE_FILE,
-       WAPI_HANDLE_CONSOLE,
-       WAPI_HANDLE_THREAD,
-       WAPI_HANDLE_SEM,
-       WAPI_HANDLE_MUTEX,
-       WAPI_HANDLE_EVENT,
-       WAPI_HANDLE_SOCKET,
-       WAPI_HANDLE_FIND,
-       WAPI_HANDLE_PROCESS,
-       WAPI_HANDLE_PIPE,
-       WAPI_HANDLE_NAMEDMUTEX,
-       WAPI_HANDLE_NAMEDSEM,
-       WAPI_HANDLE_NAMEDEVENT,
-       WAPI_HANDLE_COUNT
-} WapiHandleType;
-
-extern const char *_wapi_handle_typename[];
-
-#define _WAPI_SHARED_HANDLE(type) (type == WAPI_HANDLE_NAMEDMUTEX || \
-                                  type == WAPI_HANDLE_NAMEDSEM || \
-                                  type == WAPI_HANDLE_NAMEDEVENT)
-
-#define _WAPI_FD_HANDLE(type) (type == WAPI_HANDLE_FILE || \
-                              type == WAPI_HANDLE_CONSOLE || \
-                              type == WAPI_HANDLE_SOCKET || \
-                              type == WAPI_HANDLE_PIPE)
-
-#define _WAPI_SHARED_NAMESPACE(type) (type == WAPI_HANDLE_NAMEDMUTEX || \
-                                     type == WAPI_HANDLE_NAMEDSEM || \
-                                     type == WAPI_HANDLE_NAMEDEVENT)
+extern gboolean _wapi_has_shut_down;
 
 typedef struct 
 {
        gchar name[MAX_PATH + 1];
 } WapiSharedNamespace;
 
-typedef enum {
-       WAPI_HANDLE_CAP_WAIT=0x01,
-       WAPI_HANDLE_CAP_SIGNAL=0x02,
-       WAPI_HANDLE_CAP_OWN=0x04,
-       WAPI_HANDLE_CAP_SPECIAL_WAIT=0x08
-} WapiHandleCapability;
-
-struct _WapiHandleOps 
-{
-       void (*close)(gpointer handle, gpointer data);
-
-       /* SignalObjectAndWait */
-       void (*signal)(gpointer signal);
-
-       /* Called by WaitForSingleObject and WaitForMultipleObjects,
-        * with the handle locked (shared handles aren't locked.)
-        * Returns TRUE if ownership was established, false otherwise.
-        */
-       gboolean (*own_handle)(gpointer handle);
-
-       /* Called by WaitForSingleObject and WaitForMultipleObjects, if the
-        * handle in question is "ownable" (ie mutexes), to see if the current
-        * thread already owns this handle
-        */
-       gboolean (*is_owned)(gpointer handle);
-
-       /* Called by WaitForSingleObject and WaitForMultipleObjects,
-        * if the handle in question needs a special wait function
-        * instead of using the normal handle signal mechanism.
-        * Returns the WaitForSingleObject return code.
-        */
-       guint32 (*special_wait)(gpointer handle, guint32 timeout, gboolean alertable);
-
-       /* Called by WaitForSingleObject and WaitForMultipleObjects,
-        * if the handle in question needs some preprocessing before the
-        * signal wait.
-        */
-       void (*prewait)(gpointer handle);
-};
-
 #include <mono/io-layer/event-private.h>
 #include <mono/io-layer/io-private.h>
 #include <mono/io-layer/mutex-private.h>
@@ -110,6 +34,7 @@ struct _WapiHandleOps
 #include <mono/io-layer/socket-private.h>
 #include <mono/io-layer/thread-private.h>
 #include <mono/io-layer/process-private.h>
+#include <mono/utils/w32handle.h>
 
 struct _WapiHandle_shared_ref
 {
@@ -119,63 +44,13 @@ struct _WapiHandle_shared_ref
        guint32 offset;
 };
 
-#define _WAPI_HANDLE_INITIAL_COUNT 256
-
-struct _WapiHandleUnshared
-{
-       WapiHandleType type;
-       guint ref;
-       gboolean signalled;
-       mono_mutex_t signal_mutex;
-       pthread_cond_t signal_cond;
-       
-       union 
-       {
-               struct _WapiHandle_event event;
-               struct _WapiHandle_file file;
-               struct _WapiHandle_find find;
-               struct _WapiHandle_mutex mutex;
-               struct _WapiHandle_sem sem;
-               struct _WapiHandle_socket sock;
-               struct _WapiHandle_thread thread;
-               struct _WapiHandle_process process;
-               struct _WapiHandle_shared_ref shared;
-       } u;
-};
-
-struct _WapiHandleShared
-{
-       WapiHandleType type;
-       guint32 timestamp;
-       guint32 handle_refs;
-       volatile gboolean signalled;
-       
-       union
-       {
-               struct _WapiHandle_namedmutex namedmutex;
-               struct _WapiHandle_namedsem namedsem;
-               struct _WapiHandle_namedevent namedevent;
-       } u;
-};
-
 #define _WAPI_SHARED_SEM_NAMESPACE 0
 /*#define _WAPI_SHARED_SEM_COLLECTION 1*/
 #define _WAPI_SHARED_SEM_FILESHARE 2
-#define _WAPI_SHARED_SEM_SHARED_HANDLES 3
 #define _WAPI_SHARED_SEM_PROCESS_COUNT_LOCK 6
 #define _WAPI_SHARED_SEM_PROCESS_COUNT 7
 #define _WAPI_SHARED_SEM_COUNT 8       /* Leave some future expansion space */
 
-struct _WapiHandleSharedLayout
-{
-       volatile guint32 collection_count;
-       volatile key_t sem_key;
-       
-       struct _WapiHandleShared handles[_WAPI_HANDLE_INITIAL_COUNT];
-};
-
-typedef struct _WapiHandleSharedLayout _WapiHandleSharedLayout;
-
 struct _WapiFileShare
 {
 #ifdef WAPI_FILE_SHARE_PLATFORM_EXTRA_DATA
@@ -192,6 +67,21 @@ struct _WapiFileShare
 
 typedef struct _WapiFileShare _WapiFileShare;
 
-#define _WAPI_HANDLE_INVALID (gpointer)-1
+pid_t
+_wapi_getpid (void);
+
+gpointer
+_wapi_search_handle_namespace (MonoW32HandleType type, gchar *utf8_name);
+
+static inline int _wapi_namespace_lock (void)
+{
+       return(_wapi_shm_sem_lock (_WAPI_SHARED_SEM_NAMESPACE));
+}
+
+/* This signature makes it easier to use in pthread cleanup handlers */
+static inline int _wapi_namespace_unlock (gpointer data G_GNUC_UNUSED)
+{
+       return(_wapi_shm_sem_unlock (_WAPI_SHARED_SEM_NAMESPACE));
+}
 
 #endif /* _WAPI_PRIVATE_H_ */
diff --git a/mono/io-layer/wapi.c b/mono/io-layer/wapi.c
new file mode 100644 (file)
index 0000000..81e6f6f
--- /dev/null
@@ -0,0 +1,186 @@
+
+#include "wapi.h"
+
+#include "process-private.h"
+#include "thread-private.h"
+#include "io-trace.h"
+
+#include "mono/utils/mono-lazy-init.h"
+#include "mono/utils/w32handle.h"
+
+gboolean _wapi_has_shut_down = FALSE;
+
+void
+wapi_init (void)
+{
+       _wapi_shm_semaphores_init ();
+       _wapi_io_init ();
+       _wapi_processes_init ();
+       _wapi_thread_init ();
+       _wapi_semaphore_init ();
+       _wapi_mutex_init ();
+       _wapi_event_init ();
+       _wapi_socket_init ();
+}
+
+void
+wapi_cleanup (void)
+{
+       g_assert (_wapi_has_shut_down == FALSE);
+       _wapi_has_shut_down = TRUE;
+
+       _wapi_error_cleanup ();
+       _wapi_thread_cleanup ();
+       wapi_processes_cleanup ();
+       _wapi_io_cleanup ();
+}
+
+/* Use this instead of getpid(), to cope with linuxthreads.  It's a
+ * function rather than a variable lookup because we need to get at
+ * this before share_init() might have been called. */
+static mono_lazy_init_t _wapi_pid_init_lazy = MONO_LAZY_INIT_STATUS_NOT_INITIALIZED;
+static pid_t _wapi_pid;
+
+static void
+_wapi_pid_init (void)
+{
+       _wapi_pid = getpid ();
+}
+
+pid_t
+_wapi_getpid (void)
+{
+       mono_lazy_initialize (&_wapi_pid_init_lazy, _wapi_pid_init);
+       return _wapi_pid;
+}
+
+static gboolean
+_WAPI_SHARED_NAMESPACE (MonoW32HandleType type)
+{
+       switch (type) {
+       case MONO_W32HANDLE_NAMEDMUTEX:
+       case MONO_W32HANDLE_NAMEDSEM:
+       case MONO_W32HANDLE_NAMEDEVENT:
+               return TRUE;
+       default:
+               return FALSE;
+       }
+}
+
+typedef struct {
+       gpointer ret;
+       MonoW32HandleType type;
+       gchar *utf8_name;
+} _WapiSearchHandleNamespaceData;
+
+static gboolean mono_w32handle_search_namespace_callback (gpointer handle, gpointer data, gpointer user_data)
+{
+       _WapiSearchHandleNamespaceData *search_data;
+       MonoW32HandleType type;
+       WapiSharedNamespace *sharedns;
+
+       type = mono_w32handle_get_type (handle);
+       if (!_WAPI_SHARED_NAMESPACE (type))
+               return FALSE;
+
+       search_data = (_WapiSearchHandleNamespaceData*) user_data;
+
+       switch (type) {
+       case MONO_W32HANDLE_NAMEDMUTEX: sharedns = &((struct _WapiHandle_namedmutex*) data)->sharedns; break;
+       case MONO_W32HANDLE_NAMEDSEM:   sharedns = &((struct _WapiHandle_namedsem*)   data)->sharedns; break;
+       case MONO_W32HANDLE_NAMEDEVENT: sharedns = &((struct _WapiHandle_namedevent*) data)->sharedns; break;
+       default:
+               g_assert_not_reached ();
+       }
+
+       if (strcmp (sharedns->name, search_data->utf8_name) == 0) {
+               if (type != search_data->type) {
+                       /* Its the wrong type, so fail now */
+                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p matches name but is wrong type: %s",
+                               __func__, handle, mono_w32handle_ops_typename (type));
+                       search_data->ret = INVALID_HANDLE_VALUE;
+               } else {
+                       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: handle %p matches name and type",
+                               __func__, handle);
+                       search_data->ret = handle;
+               }
+
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+/* Returns the offset of the metadata array, or INVALID_HANDLE_VALUE on error, or NULL for
+ * not found
+ */
+gpointer _wapi_search_handle_namespace (MonoW32HandleType type, gchar *utf8_name)
+{
+       _WapiSearchHandleNamespaceData search_data;
+
+       g_assert(_WAPI_SHARED_NAMESPACE(type));
+
+       MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Lookup for handle named [%s] type %s",
+               __func__, utf8_name, mono_w32handle_ops_typename (type));
+
+       search_data.ret = NULL;
+       search_data.type = type;
+       search_data.utf8_name = utf8_name;
+       mono_w32handle_foreach (mono_w32handle_search_namespace_callback, &search_data);
+       return search_data.ret;
+}
+
+/* Lots more to implement here, but this is all we need at the moment */
+gboolean
+DuplicateHandle (gpointer srcprocess, gpointer src, gpointer targetprocess, gpointer *target,
+       guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, guint32 options G_GNUC_UNUSED)
+{
+       if (srcprocess != _WAPI_PROCESS_CURRENT || targetprocess != _WAPI_PROCESS_CURRENT) {
+               /* Duplicating other process's handles is not supported */
+               SetLastError (ERROR_INVALID_HANDLE);
+               return FALSE;
+       }
+
+       if (src == _WAPI_PROCESS_CURRENT) {
+               *target = _wapi_process_duplicate ();
+       } else if (src == _WAPI_THREAD_CURRENT) {
+               g_assert_not_reached ();
+       } else {
+               mono_w32handle_ref (src);
+               *target = src;
+       }
+
+       return TRUE;
+}
+
+/**
+ * CloseHandle:
+ * @handle: The handle to release
+ *
+ * Closes and invalidates @handle, releasing any resources it
+ * consumes.  When the last handle to a temporary or non-persistent
+ * object is closed, that object can be deleted.  Closing the same
+ * handle twice is an error.
+ *
+ * Return value: %TRUE on success, %FALSE otherwise.
+ */
+gboolean CloseHandle(gpointer handle)
+{
+       if (handle == INVALID_HANDLE_VALUE){
+               SetLastError (ERROR_INVALID_PARAMETER);
+               return FALSE;
+       }
+       if (handle == (gpointer)0 && mono_w32handle_get_type (handle) != MONO_W32HANDLE_CONSOLE) {
+               /* Problem: because we map file descriptors to the
+                * same-numbered handle we can't tell the difference
+                * between a bogus handle and the handle to stdin.
+                * Assume that it's the console handle if that handle
+                * exists...
+                */
+               SetLastError (ERROR_INVALID_PARAMETER);
+               return FALSE;
+       }
+
+       mono_w32handle_unref (handle);
+       return TRUE;
+}
index c6cbecd49c5758a4501b732c3e840e0b9c80a719..85da19911035a1d7677ab91b47591a5fb6ea2609 100644 (file)
@@ -13,7 +13,6 @@
 #include <mono/io-layer/wapi-remap.h>
 #include <mono/io-layer/types.h>
 #include <mono/io-layer/macros.h>
-#include <mono/io-layer/handles.h>
 #include <mono/io-layer/io.h>
 #include <mono/io-layer/access.h>
 #include <mono/io-layer/context.h>
 #include <mono/io-layer/versioninfo.h>
 #include <mono/io-layer/wait.h>
 
+void
+wapi_init (void);
+
+void
+wapi_cleanup (void);
+
+gboolean
+CloseHandle (gpointer handle);
+
+gboolean
+DuplicateHandle (gpointer srcprocess, gpointer src, gpointer targetprocess, gpointer *target,
+       guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, guint32 options G_GNUC_UNUSED);
+
 #endif /* _WAPI_WAPI_H_ */
index 304fd35adf807e349c77529ee2813686d0e6553a..16c5f0e50d216792013e68cce625bed5cd8fc06c 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/thread-private.h>
 #include <mono/io-layer/mutex-private.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-time.h>
 #include <mono/utils/mono-once.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/utils/w32handle.h>
 
 #ifdef HAVE_VALGRIND_MEMCHECK_H
 #include <valgrind/memcheck.h>
 #endif
 
-struct _WapiHandleOps _wapi_thread_ops = {
+static void thread_details (gpointer data);
+static const gchar* thread_typename (void);
+static gsize thread_typesize (void);
+
+static MonoW32HandleOps _wapi_thread_ops = {
        NULL,                           /* close */
        NULL,                           /* signal */
        NULL,                           /* own */
        NULL,                           /* is_owned */
        NULL,                           /* special_wait */
-       NULL                            /* prewait */
+       NULL,                           /* prewait */
+       thread_details,         /* details */
+       thread_typename,        /* typename */
+       thread_typesize,        /* typesize */
 };
-typedef enum {
-       THREAD_PRIORITY_LOWEST = -2,
-       THREAD_PRIORITY_BELOW_NORMAL = -1,
-       THREAD_PRIORITY_NORMAL = 0,
-       THREAD_PRIORITY_ABOVE_NORMAL = 1,
-       THREAD_PRIORITY_HIGHEST = 2
-} WapiThreadPriority;
-
-static mono_once_t thread_ops_once = MONO_ONCE_INIT;
-
-static void
-thread_ops_init (void)
+
+void
+_wapi_thread_init (void)
+{
+       mono_w32handle_register_ops (MONO_W32HANDLE_THREAD, &_wapi_thread_ops);
+
+       mono_w32handle_register_capabilities (MONO_W32HANDLE_THREAD, MONO_W32HANDLE_CAP_WAIT);
+}
+
+static void thread_details (gpointer data)
+{
+       WapiHandle_thread *thread = (WapiHandle_thread*) data;
+       g_print ("id: %p, owned_mutexes: %d, priority: %d",
+               thread->id, thread->owned_mutexes->len, thread->priority);
+}
+
+static const gchar* thread_typename (void)
+{
+       return "Thread";
+}
+
+static gsize thread_typesize (void)
 {
-       _wapi_handle_register_capabilities (WAPI_HANDLE_THREAD,
-                                           WAPI_HANDLE_CAP_WAIT);
+       return sizeof (WapiHandle_thread);
 }
 
 void
@@ -86,7 +101,7 @@ lookup_thread (HANDLE handle)
        WapiHandle_thread *thread;
        gboolean ok;
 
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_THREAD,
+       ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_THREAD,
                                                          (gpointer *)&thread);
        g_assert (ok);
        return thread;
@@ -109,8 +124,8 @@ wapi_thread_handle_set_exited (gpointer handle, guint32 exitstatus)
        pid_t pid = _wapi_getpid ();
        pthread_t tid = pthread_self ();
        
-       if (_wapi_handle_issignalled (handle) ||
-           _wapi_handle_type (handle) == WAPI_HANDLE_UNUSED) {
+       if (mono_w32handle_issignalled (handle) ||
+           mono_w32handle_get_type (handle) == MONO_W32HANDLE_UNUSED) {
                /* We must have already deliberately finished with
                 * this thread, so don't do any more now
                 */
@@ -131,19 +146,19 @@ wapi_thread_handle_set_exited (gpointer handle, guint32 exitstatus)
        }
        g_ptr_array_free (thread_handle->owned_mutexes, TRUE);
        
-       thr_ret = _wapi_handle_lock_handle (handle);
+       thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
 
-       _wapi_handle_set_signal_state (handle, TRUE, TRUE);
+       mono_w32handle_set_signal_state (handle, TRUE, TRUE);
 
-       thr_ret = _wapi_handle_unlock_handle (handle);
+       thr_ret = mono_w32handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
        
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Recording thread handle %p id %ld status as %d",
                  __func__, handle, thread_handle->id, exitstatus);
        
        /* The thread is no longer active, so unref it */
-       _wapi_handle_unref (handle);
+       mono_w32handle_unref (handle);
 }
 
 /*
@@ -157,12 +172,10 @@ wapi_create_thread_handle (void)
        WapiHandle_thread thread_handle = {0}, *thread;
        gpointer handle;
 
-       mono_once (&thread_ops_once, thread_ops_init);
-
        thread_handle.owned_mutexes = g_ptr_array_new ();
 
-       handle = _wapi_handle_new (WAPI_HANDLE_THREAD, &thread_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
+       handle = mono_w32handle_new (MONO_W32HANDLE_THREAD, &thread_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating thread handle", __func__);
                SetLastError (ERROR_GEN_FAILURE);
                
@@ -177,7 +190,7 @@ wapi_create_thread_handle (void)
         * Hold a reference while the thread is active, because we use
         * the handle to store thread exit information
         */
-       _wapi_handle_ref (handle);
+       mono_w32handle_ref (handle);
 
        MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: started thread id %ld", __func__, thread->id);
        
@@ -187,7 +200,7 @@ wapi_create_thread_handle (void)
 void
 wapi_ref_thread_handle (gpointer handle)
 {
-       _wapi_handle_ref (handle);
+       mono_w32handle_ref (handle);
 }
 
 gpointer
@@ -209,7 +222,7 @@ _wapi_thread_own_mutex (gpointer mutex)
        
        thread = get_current_thread ();
 
-       _wapi_handle_ref (mutex);
+       mono_w32handle_ref (mutex);
        
        g_ptr_array_add (thread->owned_mutexes, mutex);
 }
@@ -221,11 +234,29 @@ _wapi_thread_disown_mutex (gpointer mutex)
 
        thread = get_current_thread ();
 
-       _wapi_handle_unref (mutex);
+       mono_w32handle_unref (mutex);
        
        g_ptr_array_remove (thread->owned_mutexes, mutex);
 }
 
+/**
+ * wapi_init_thread_info_priority:
+ * @param handle: The thread handle to set.
+ * @param priority: Priority to initialize with
+ *
+ *   Initialize the priority field of the thread info
+ */
+void
+wapi_init_thread_info_priority (gpointer handle, gint32 priority)
+{
+       struct _WapiHandle_thread *thread_handle = NULL;
+       gboolean ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_THREAD,
+                                 (gpointer *)&thread_handle);
+                                 
+       if (ok == TRUE)
+               thread_handle->priority = priority;
+}
+
 /**
  * _wapi_thread_posix_priority_to_priority:
  *
@@ -280,14 +311,14 @@ _wapi_thread_posix_priority_to_priority (int sched_priority, int policy)
 }
 
 /**
- * _wapi_thread_priority_to_posix_priority:
+ * wapi_thread_priority_to_posix_priority:
  *
  *   Convert a WapiThreadPriority to a POSIX priority.
  * priority is a WapiThreadPriority,
  * policy is the current scheduling policy
  */
-static int 
-_wapi_thread_priority_to_posix_priority (WapiThreadPriority priority, int policy)
+int 
+wapi_thread_priority_to_posix_priority (WapiThreadPriority priority, int policy)
 {
 /* Necessary to get valid priority range */
 #ifdef _POSIX_PRIORITY_SCHEDULING
@@ -351,19 +382,21 @@ _wapi_thread_priority_to_posix_priority (WapiThreadPriority priority, int policy
 gint32 
 GetThreadPriority (gpointer handle)
 {
-       struct _WapiHandle_thread *thread_handle;
+       struct _WapiHandle_thread *thread_handle = NULL;
        int policy;
        struct sched_param param;
-       gboolean ok = _wapi_lookup_handle (handle, WAPI_HANDLE_THREAD,
+       gboolean ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_THREAD,
                                  (gpointer *)&thread_handle);
                                  
-       if (ok == FALSE) {
+       if (ok == FALSE)
                return (THREAD_PRIORITY_NORMAL);
-       }
        
        switch (pthread_getschedparam (thread_handle->id, &policy, &param)) {
                case 0:
-                       return (_wapi_thread_posix_priority_to_priority (param.sched_priority, policy));
+                       if ((policy == SCHED_FIFO) || (policy == SCHED_RR))
+                               return (_wapi_thread_posix_priority_to_priority (param.sched_priority, policy));
+                       else
+                               return (thread_handle->priority);
                case ESRCH:
                        g_warning ("pthread_getschedparam: error looking up thread id %x", (gsize)thread_handle->id);
        }
@@ -382,12 +415,12 @@ GetThreadPriority (gpointer handle)
 gboolean 
 SetThreadPriority (gpointer handle, gint32 priority)
 {
-       struct _WapiHandle_thread *thread_handle;
+       struct _WapiHandle_thread *thread_handle = NULL;
        int policy,
            posix_priority,
            rv;
        struct sched_param param;
-       gboolean ok = _wapi_lookup_handle (handle, WAPI_HANDLE_THREAD,
+       gboolean ok = mono_w32handle_lookup (handle, MONO_W32HANDLE_THREAD,
                                  (gpointer *)&thread_handle);
                                  
        if (ok == FALSE) {
@@ -401,16 +434,17 @@ SetThreadPriority (gpointer handle, gint32 priority)
                return FALSE;
        }
        
-       posix_priority =  _wapi_thread_priority_to_posix_priority (priority, policy);
+       posix_priority =  wapi_thread_priority_to_posix_priority (priority, policy);
        if (0 > posix_priority)
                return FALSE;
                
        param.sched_priority = posix_priority;
        switch (pthread_setschedparam (thread_handle->id, policy, &param)) {
                case 0:
+                       thread_handle->priority = priority;
                        return TRUE;
                case ESRCH:
-                       g_warning ("pthread_setschedparam: error looking up thread id %x", (gsize)thread_handle->id);
+                       g_warning ("pthread_setschedprio: error looking up thread id %x", (gsize)thread_handle->id);
                        break;
                case ENOTSUP:
                        g_warning ("%s: priority %d not supported", __func__, priority);
index 147fbe83a78c2ce70fb02e43b311afa43a9e9278..e4419f293228df23373567e0d873400ae7d82271 100644 (file)
@@ -1,8 +1,6 @@
 /Makefile
 /Makefile.in
 /Makefile.am
-/pedump
-/pedump.exe
 /monosn
 /monodiet
 /.libs
index 87f9a916dd941011e2b0ca66b0ffb1eda5f74971..32f5628d5f75c2bd602e7255bebff10d6e3c79bb 100644 (file)
@@ -32,12 +32,6 @@ if PLATFORM_ANDROID
 platform_sources += ../../support/libm/complex.c
 endif
 
-if SHARED_MONO
-if SUPPORT_SGEN
-bin_PROGRAMS = pedump
-endif
-endif
-
 #
 # libtool is not capable of creating static/shared versions of the same
 # convenience lib, so we have to do it ourselves
@@ -297,32 +291,5 @@ libmonoruntimeinclude_HEADERS = \
        tokentype.h             \
        verify.h                
 
-if DTRACE_G_REQUIRED
-
-PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
-
-pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d $(shared_sgen_libraries) ../io-layer/libwapi.la ../utils/libmonoutils.la
-       DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
-       --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d $(shared_sgen_libraries) ../io-layer/libwapi.la ../utils/libmonoutils.la
-
-else
-PEDUMP_DTRACE_OBJECT = 
-endif
-
-if SHARED_MONO
-pedump_SOURCES =               \
-       pedump.c
-
-$(top_srcdir)/mono/sgen/libmonosgen.la:
-       make -w -C $(top_srcdir)/mono/sgen libmonosgen.la
-
-pedump_LDADD = $(sgen_libraries) $(top_srcdir)/mono/sgen/libmonosgen.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
-       $(GLIB_LIBS) -lm $(LIBICONV) $(PEDUMP_DTRACE_OBJECT)
-
-if PLATFORM_DARWIN
-pedump_LDFLAGS=-framework CoreFoundation -framework Foundation
-endif
-endif
-
 EXTRA_DIST = $(win32_sources) $(unix_sources) $(null_sources) runtime.h \
-               threadpool-ms-io-poll.c threadpool-ms-io-epoll.c threadpool-ms-io-kqueue.c
+               threadpool-ms-io-poll.c threadpool-ms-io-epoll.c threadpool-ms-io-kqueue.c sgen-dynarray.h
index c57d8e9fb5b9f9db68819846e311953c5a4e6671..955ad9371a0e9152f1e69cf09c26e7af3575cc7b 100644 (file)
@@ -67,6 +67,7 @@
 #include <mono/utils/atomic.h>
 #include <mono/utils/mono-memory-model.h>
 #include <mono/utils/mono-threads.h>
+#include <mono/utils/w32handle.h>
 #ifdef HOST_WIN32
 #include <direct.h>
 #endif
@@ -82,7 +83,7 @@
  * Changes which are already detected at runtime, like the addition
  * of icalls, do not require an increment.
  */
-#define MONO_CORLIB_VERSION 150
+#define MONO_CORLIB_VERSION 151
 
 typedef struct
 {
@@ -1513,97 +1514,6 @@ get_shadow_assembly_location (const char *filename, MonoError *error)
        return location;
 }
 
-static gboolean
-ensure_directory_exists (const char *filename)
-{
-#ifdef HOST_WIN32
-       gchar *dir_utf8 = g_path_get_dirname (filename);
-       gunichar2 *p;
-       gunichar2 *dir_utf16 = NULL;
-       int retval;
-       
-       if (!dir_utf8 || !dir_utf8 [0])
-               return FALSE;
-
-       dir_utf16 = g_utf8_to_utf16 (dir_utf8, strlen (dir_utf8), NULL, NULL, NULL);
-       g_free (dir_utf8);
-
-       if (!dir_utf16)
-               return FALSE;
-
-       p = dir_utf16;
-
-       /* make life easy and only use one directory seperator */
-       while (*p != '\0')
-       {
-               if (*p == '/')
-                       *p = '\\';
-               p++;
-       }
-
-       p = dir_utf16;
-
-       /* get past C:\ )*/
-       while (*p++ != '\\')    
-       {
-       }
-
-       while (1) {
-               BOOL bRet = FALSE;
-               p = wcschr (p, '\\');
-               if (p)
-                       *p = '\0';
-               retval = _wmkdir (dir_utf16);
-               if (retval != 0 && errno != EEXIST) {
-                       g_free (dir_utf16);
-                       return FALSE;
-               }
-               if (!p)
-                       break;
-               *p++ = '\\';
-       }
-       
-       g_free (dir_utf16);
-       return TRUE;
-#else
-       char *p;
-       gchar *dir = g_path_get_dirname (filename);
-       int retval;
-       struct stat sbuf;
-       
-       if (!dir || !dir [0]) {
-               g_free (dir);
-               return FALSE;
-       }
-       
-       if (stat (dir, &sbuf) == 0 && S_ISDIR (sbuf.st_mode)) {
-               g_free (dir);
-               return TRUE;
-       }
-       
-       p = dir;
-       while (*p == '/')
-               p++;
-
-       while (1) {
-               p = strchr (p, '/');
-               if (p)
-                       *p = '\0';
-               retval = mkdir (dir, 0777);
-               if (retval != 0 && errno != EEXIST) {
-                       g_free (dir);
-                       return FALSE;
-               }
-               if (!p)
-                       break;
-               *p++ = '/';
-       }
-       
-       g_free (dir);
-       return TRUE;
-#endif
-}
-
 static gboolean
 private_file_needs_copying (const char *src, struct stat *sbuf_src, char *dest)
 {
@@ -1802,7 +1712,7 @@ mono_make_shadow_copy (const char *filename, MonoError *oerror)
                return NULL;
        }
 
-       if (ensure_directory_exists (shadow) == FALSE) {
+       if (g_ensure_directory_exists (shadow) == FALSE) {
                g_free (shadow);
                mono_error_set_execution_engine (oerror, "Failed to create shadow copy (ensure directory exists).");
                return NULL;
@@ -1852,13 +1762,13 @@ mono_make_shadow_copy (const char *filename, MonoError *oerror)
        sibling_target_len = strlen (sibling_target);
        
        copy_result = shadow_copy_sibling (sibling_source, sibling_source_len, ".mdb", sibling_target, sibling_target_len, 7);
-       if (copy_result == TRUE)
+       if (copy_result)
                copy_result = shadow_copy_sibling (sibling_source, sibling_source_len, ".config", sibling_target, sibling_target_len, 7);
        
        g_free (sibling_source);
        g_free (sibling_target);
        
-       if (copy_result == FALSE)  {
+       if (!copy_result)  {
                g_free (shadow);
                mono_error_set_execution_engine (oerror, "Failed to create shadow copy of sibling data (CopyFile).");
                return NULL;
@@ -2593,6 +2503,7 @@ mono_domain_try_unload (MonoDomain *domain, MonoObject **exc)
        unload_data *thread_data;
        MonoNativeThreadId tid;
        MonoDomain *caller_domain = mono_domain_get ();
+       MonoThreadParm tp;
 
        /* printf ("UNLOAD STARTING FOR %s (%p) IN THREAD 0x%x.\n", domain->friendly_name, domain, mono_native_thread_id_get ()); */
 
@@ -2649,7 +2560,10 @@ mono_domain_try_unload (MonoDomain *domain, MonoObject **exc)
         * First we create a separate thread for unloading, since
         * we might have to abort some threads, including the current one.
         */
-       thread_handle = mono_threads_create_thread ((LPTHREAD_START_ROUTINE)unload_thread_main, thread_data, 0, CREATE_SUSPENDED, &tid);
+       tp.priority = 0;
+       tp.stack_size = 0;
+       tp.creation_flags = CREATE_SUSPENDED;
+       thread_handle = mono_threads_create_thread ((LPTHREAD_START_ROUTINE)unload_thread_main, thread_data, &tp, &tid);
        if (thread_handle == NULL)
                return;
        mono_thread_info_resume (tid);
index 9f6f1e6a836f794dca7bbc2ae4453786b1845f6c..f1d52f5607d7dc558a677f2bdc6c46590bcb6888 100644 (file)
@@ -475,12 +475,17 @@ transport_send (int fd, guint8 *data, int len)
 static void
 transport_start_receive (void)
 {
+       MonoThreadParm tp;
+
        transport_connect ();
 
        if (!listen_fd)
                return;
 
-       receiver_thread_handle = mono_threads_create_thread (receiver_thread, NULL, 0, 0, NULL);
+       tp.priority = 0;
+       tp.stack_size = 0;
+       tp.creation_flags = 0;
+       receiver_thread_handle = mono_threads_create_thread (receiver_thread, NULL, &tp, NULL);
        g_assert (receiver_thread_handle);
 }
 
index 26b4782ca5a101ac942172f0dbd61fb5a857493c..8581a042f2c310bafe764a2992b0897816939f08 100644 (file)
@@ -295,8 +295,8 @@ typedef struct {
 #define CLI_FLAGS_ILONLY         0x01
 #define CLI_FLAGS_32BITREQUIRED  0x02
 #define CLI_FLAGS_STRONGNAMESIGNED 0x8
-#define CLI_FLAGS_PREFERRED32BIT  0x10
 #define CLI_FLAGS_TRACKDEBUGDATA 0x00010000
+#define CLI_FLAGS_PREFERRED32BIT 0x00020000
        guint32        ch_flags;
 
        guint32        ch_entry_point;
index b72657fda72f1e55b2195782581692a490447c74..f51c979a50fab8ab5d230010e483867b188a7ed5 100644 (file)
@@ -573,6 +573,7 @@ struct _MonoGenericParam {
 };
 
 /* Additional details about a MonoGenericParam */
+/* Keep in sync with managed Mono.RuntimeStructs.GenericParamInfo */
 typedef struct {
        MonoClass *pklass;              /* The corresponding `MonoClass'. */
        const char *name;
@@ -1402,7 +1403,7 @@ void
 mono_unload_interface_id (MonoClass *klass);
 
 GPtrArray*
-mono_class_get_methods_by_name (MonoClass *klass, const char *name, guint32 bflags, gboolean ignore_case, gboolean allow_ctors, MonoException **ex);
+mono_class_get_methods_by_name (MonoClass *klass, const char *name, guint32 bflags, gboolean ignore_case, gboolean allow_ctors, MonoError *error);
 
 char*
 mono_class_full_name (MonoClass *klass);
index 39fc6e491df965cc8ba8e37d76072cb467533c3e..a419af381492313e250c7887c0217c26ea071269 100644 (file)
@@ -7895,10 +7895,8 @@ mono_class_from_name_checked_aux (MonoImage *image, const char* name_space, cons
                klass = search_modules (image, name_space, name, error);
                if (klass || !is_ok (error))
                        return klass;
-       }
-
-       if (!token)
                return NULL;
+       }
 
        if (mono_metadata_token_table (token) == MONO_TABLE_EXPORTEDTYPE) {
                MonoTableInfo  *t = &image->tables [MONO_TABLE_EXPORTEDTYPE];
@@ -10209,6 +10207,9 @@ can_access_type (MonoClass *access_klass, MonoClass *member_klass)
 {
        int access_level;
 
+       if (access_klass == member_klass)
+               return TRUE;
+
        if (access_klass->image->assembly && access_klass->image->assembly->corlib_internal)
                return TRUE;
 
@@ -10357,26 +10358,9 @@ mono_method_can_access_field (MonoMethod *method, MonoClassField *field)
 gboolean
 mono_method_can_access_method (MonoMethod *method, MonoMethod *called)
 {
-       int can = can_access_member (method->klass, called->klass, NULL, called->flags & METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK);
-       if (!can) {
-               MonoClass *nested = method->klass->nested_in;
-               while (nested) {
-                       can = can_access_member (nested, called->klass, NULL, called->flags & METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK);
-                       if (can)
-                               return TRUE;
-                       nested = nested->nested_in;
-               }
-       }
-       /* 
-        * FIXME:
-        * with generics calls to explicit interface implementations can be expressed
-        * directly: the method is private, but we must allow it. This may be opening
-        * a hole or the generics code should handle this differently.
-        * Maybe just ensure the interface type is public.
-        */
-       if ((called->flags & METHOD_ATTRIBUTE_VIRTUAL) && (called->flags & METHOD_ATTRIBUTE_FINAL))
-               return TRUE;
-       return can;
+       method = mono_method_get_method_definition (method);
+       called = mono_method_get_method_definition (called);
+       return mono_method_can_access_method_full (method, called, NULL);
 }
 
 /*
@@ -10393,6 +10377,10 @@ mono_method_can_access_method (MonoMethod *method, MonoMethod *called)
 gboolean
 mono_method_can_access_method_full (MonoMethod *method, MonoMethod *called, MonoClass *context_klass)
 {
+       /* Wrappers are except from access checks */
+       if (method->wrapper_type != MONO_WRAPPER_NONE || called->wrapper_type != MONO_WRAPPER_NONE)
+               return TRUE;
+
        MonoClass *access_class = method->klass;
        MonoClass *member_class = called->klass;
        int can = can_access_member (access_class, member_class, context_klass, called->flags & METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK);
index f0e2f0d58c8fcbf1fdc89d337f116e67a0376762..4436229376e10101b1d16f827601c72f466d2328 100644 (file)
@@ -23,6 +23,7 @@
 #include "domain-internals.h"
 #include "appdomain.h"
 #include "object.h"
+#include "object-internals.h"
 #include "loader.h"
 #include "threads.h"
 #include "environment.h"
@@ -198,7 +199,7 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void)
        LocalFree (argvw);
 
        mono_runtime_run_main_checked (method, argc, argv, &error);
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       mono_error_raise_exception (&error); /* OK, triggers unhandled exn handler */
        mono_thread_manage ();
 
        mono_runtime_quit ();
index a3989ab74aad127f831b879358a0de850accc5dc..daf7de90b1cdcba2af650d2c0c25cdcce2c4c16b 100644 (file)
@@ -325,7 +325,10 @@ struct _MonoDomain {
        /* hashtables for Reflection handles */
        MonoGHashTable     *type_hash;
        MonoGHashTable     *refobject_hash;
-       /* a GC-tracked array to keep references to the static fields of types */
+       /*
+        * A GC-tracked array to keep references to the static fields of types.
+        * See note [Domain Static Data Array].
+        */
        gpointer           *static_data_array;
        /* maps class -> type initialization exception object */
        MonoGHashTable    *type_init_exception_hash;
index a3ba4a76e0492b35533b95791df77c3eab1a235c..d564151b7df43e403c7a72cb7f58ca3810e3a468 100644 (file)
@@ -43,6 +43,7 @@
 #include <metadata/threads.h>
 #include <metadata/profiler-private.h>
 #include <mono/metadata/coree.h>
+#include <mono/utils/w32handle.h>
 
 //#define DEBUG_DOMAIN_UNLOAD 1
 
@@ -525,6 +526,7 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
 #endif
 
 #ifndef HOST_WIN32
+       mono_w32handle_init ();
        wapi_init ();
 #endif
 
@@ -893,6 +895,7 @@ mono_cleanup (void)
 
 #ifndef HOST_WIN32
        wapi_cleanup ();
+       mono_w32handle_cleanup ();
 #endif
 }
 
@@ -1483,8 +1486,10 @@ mono_context_get_domain_id (MonoAppContext *context)
 void
 mono_domain_add_class_static_data (MonoDomain *domain, MonoClass *klass, gpointer data, guint32 *bitmap)
 {
-       /* The first entry in the array is the index of the next free slot
-        * and the total size of the array
+       /* Note [Domain Static Data Array]:
+        *
+        * Entry 0 in the array is the index of the next free slot.
+        * Entry 1 is the total size of the array.
         */
        int next;
        if (domain->static_data_array) {
index a871337ee36d15cd920d5edc8997f67a7d32d350..9315bdf828fed4df658bc31e68eab9fda9c95f93 100644 (file)
@@ -34,6 +34,7 @@
 #include <mono/metadata/marshal.h>
 #include <mono/utils/strenc.h>
 #include <utils/mono-io-portability.h>
+#include <mono/utils/w32handle.h>
 
 #undef DEBUG
 
@@ -1272,11 +1273,11 @@ mono_filesize_from_fd (int fd)
 
 #endif
 
-void _wapi_handle_dump (void);
+void mono_w32handle_dump (void);
 
 void ves_icall_System_IO_MonoIO_DumpHandles (void)
 {
 #ifndef HOST_WIN32
-       _wapi_handle_dump ();
+       mono_w32handle_dump ();
 #endif
 }
index e44f07f6d8329cb3e3811eb9387baeb4aa6654a0..bcf125022088de9abe6d121ab115e33dd4de222b 100644 (file)
@@ -105,7 +105,7 @@ add_thread_to_finalize (MonoInternalThread *thread, MonoError *error)
        return is_ok (error);
 }
 
-static gboolean suspend_finalizers = FALSE;
+static volatile gboolean suspend_finalizers = FALSE;
 /* 
  * actually, we might want to queue the finalize requests in a separate thread,
  * but we need to be careful about the execution domain of the thread...
@@ -724,7 +724,7 @@ finalize_domain_objects (DomainFinalizationReq *req)
                g_ptr_array_free (objs, TRUE);
        }
 #elif defined(HAVE_SGEN_GC)
-       while ((count = mono_gc_finalizers_for_domain (domain, to_finalize, NUM_FOBJECTS))) {
+       while (!suspend_finalizers && (count = mono_gc_finalizers_for_domain (domain, to_finalize, NUM_FOBJECTS))) {
                int i;
                for (i = 0; i < count; ++i) {
                        mono_gc_run_finalize (to_finalize [i], 0);
@@ -870,7 +870,6 @@ mono_gc_cleanup (void)
        if (!gc_disabled) {
                finished = TRUE;
                if (mono_thread_internal_current () != gc_thread) {
-                       gboolean timed_out = FALSE;
                        gint64 start_ticks = mono_msec_ticks ();
                        gint64 end_ticks = start_ticks + 2000;
 
@@ -898,31 +897,30 @@ mono_gc_cleanup (void)
                                suspend_finalizers = TRUE;
 
                                /* Try to abort the thread, in the hope that it is running managed code */
-                               mono_thread_internal_stop (gc_thread);
+                               mono_thread_internal_abort (gc_thread);
 
                                /* Wait for it to stop */
                                ret = guarded_wait (gc_thread->handle, 100, TRUE);
 
                                if (ret == WAIT_TIMEOUT) {
-                                       /* 
-                                        * The finalizer thread refused to die. There is not much we 
-                                        * can do here, since the runtime is shutting down so the 
-                                        * state the finalizer thread depends on will vanish.
+                                       /*
+                                        * The finalizer thread refused to exit. Make it stop.
                                         */
-                                       g_warning ("Shutting down finalizer thread timed out.");
-                                       timed_out = TRUE;
+                                       mono_thread_internal_stop (gc_thread);
+                                       ret = guarded_wait (gc_thread->handle, 100, TRUE);
+                                       g_assert (ret != WAIT_TIMEOUT);
+                                       /* The thread can't set this flag */
+                                       finalizer_thread_exited = TRUE;
                                }
                        }
 
-                       if (!timed_out) {
-                               int ret;
+                       int ret;
 
-                               /* Wait for the thread to actually exit */
-                               ret = guarded_wait (gc_thread->handle, INFINITE, TRUE);
-                               g_assert (ret == WAIT_OBJECT_0);
+                       /* Wait for the thread to actually exit */
+                       ret = guarded_wait (gc_thread->handle, INFINITE, TRUE);
+                       g_assert (ret == WAIT_OBJECT_0);
 
-                               mono_thread_join (GUINT_TO_POINTER (gc_thread->tid));
-                       }
+                       mono_thread_join (GUINT_TO_POINTER (gc_thread->tid));
                        g_assert (finalizer_thread_exited);
                }
                gc_thread = NULL;
index 4b4239eb66f7cfbd3b08ac9da26439b27bf64993..bf538fa6d285f2d5a58a4e46989081bdcbc146a1 100644 (file)
@@ -45,8 +45,7 @@ Combine: MonoDefaults, GENERATE_GET_CLASS_WITH_CACHE, TYPED_HANDLE_DECL and frie
        We could then generate neat type safe wrappers.
 */
 
-const MonoObject *null_cell = { NULL };
-const MonoObjectHandle mono_null_value_handle = { (MonoObject**)&null_cell };
+const MonoObjectHandle mono_null_value_handle = NULL;
 
 #define THIS_IS_AN_OK_NUMBER_OF_HANDLES 100
 
index 3d48c0648580442e50dde4272fa6b130f434f60c..b34036958110e02635f658282157dafad6848134 100644 (file)
@@ -180,22 +180,30 @@ Handle macros/functions
 
 #ifdef ENABLE_CHECKED_BUILD
 void mono_handle_verify (MonoRawHandle handle);
-#define HANDLE_INVARIANTS(H) mono_handle_verify((void*)(H).__obj)
+#define HANDLE_INVARIANTS(H) mono_handle_verify((void*)(H))
 #else
 #define HANDLE_INVARIANTS(H) (0)
 #endif
 
+#define TYPED_HANDLE_PAYLOAD_NAME(TYPE) TYPE ## HandlePayload
 #define TYPED_HANDLE_NAME(TYPE) TYPE ## Handle
-#define TYPED_HANDLE_DECL(TYPE) typedef struct { TYPE **__obj; } TYPED_HANDLE_NAME (TYPE) ;
+/*
+ * typedef struct {
+ *   MonoObject *__obj;
+ * } MonoObjectHandlePayload;
+ *
+ * typedef MonoObjectHandlePayload* MonoObjectHandle;
+ */
+#define TYPED_HANDLE_DECL(TYPE) typedef struct { TYPE *__obj; } TYPED_HANDLE_PAYLOAD_NAME (TYPE) ; typedef TYPED_HANDLE_PAYLOAD_NAME (TYPE) * TYPED_HANDLE_NAME (TYPE);
 
-#define MONO_HANDLE_INIT { (void*)mono_null_value_handle.__obj }
+#define MONO_HANDLE_INIT ((void*) mono_null_value_handle)
 #define NULL_HANDLE mono_null_value_handle
 
 //XXX add functions to get/set raw, set field, set field to null, set array, set array to null
-#define MONO_HANDLE_RAW(HANDLE) (HANDLE_INVARIANTS (HANDLE), (*(HANDLE).__obj))
-#define MONO_HANDLE_DCL(TYPE, NAME) TYPED_HANDLE_NAME(TYPE) NAME = { mono_handle_new ((MonoObject*)(NAME ## _raw)) }
-#define MONO_HANDLE_NEW(TYPE, VALUE) (TYPED_HANDLE_NAME(TYPE)){ mono_handle_new ((MonoObject*)(VALUE)) }
-#define MONO_HANDLE_CAST(TYPE, VALUE) (TYPED_HANDLE_NAME(TYPE)){ (TYPE**)((VALUE).__obj) }
+#define MONO_HANDLE_RAW(HANDLE) (HANDLE_INVARIANTS (HANDLE), ((HANDLE)->__obj))
+#define MONO_HANDLE_DCL(TYPE, NAME) TYPED_HANDLE_NAME(TYPE) NAME = (TYPED_HANDLE_NAME(TYPE))(mono_handle_new ((MonoObject*)(NAME ## _raw)))
+#define MONO_HANDLE_NEW(TYPE, VALUE) (TYPED_HANDLE_NAME(TYPE))( mono_handle_new ((MonoObject*)(VALUE)) )
+#define MONO_HANDLE_CAST(TYPE, VALUE) (TYPED_HANDLE_NAME(TYPE))( VALUE )
 
 /*
 WARNING WARNING WARNING
index 9f413224e0237fb97ec1e9833dd0ce517b31af27..757ed8c5be79f0dbc270a476f5eb2c9c359d997a 100644 (file)
@@ -62,6 +62,12 @@ ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_1)
 ICALL(RUNTIME_1, "GetDisplayName", ves_icall_Mono_Runtime_GetDisplayName)
 ICALL(RUNTIME_12, "GetNativeStackTrace", ves_icall_Mono_Runtime_GetNativeStackTrace)
 
+ICALL_TYPE(RTCLASS, "Mono.RuntimeClassHandle", RTCLASS_1)
+ICALL(RTCLASS_1, "GetTypeFromClass", ves_icall_Mono_RuntimeClassHandle_GetTypeFromClass)
+
+ICALL_TYPE(RTPTRARRAY, "Mono.RuntimeGPtrArrayHandle", RTPTRARRAY_1)
+ICALL(RTPTRARRAY_1, "GPtrArrayFree", ves_icall_Mono_RuntimeGPtrArrayHandle_GPtrArrayFree)
+
 #ifndef PLATFORM_RO_FS
 ICALL_TYPE(KPAIR, "Mono.Security.Cryptography.KeyPairPersistence", KPAIR_1)
 ICALL(KPAIR_1, "_CanSecure", ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure)
@@ -456,6 +462,7 @@ ICALL(OBJ_3, "MemberwiseClone", ves_icall_System_Object_MemberwiseClone)
 
 ICALL_TYPE(ASSEM, "System.Reflection.Assembly", ASSEM_1)
 ICALL(ASSEM_1, "FillName", ves_icall_System_Reflection_Assembly_FillName)
+ICALL(ASSEM_1a, "GetAotId", ves_icall_System_Reflection_Assembly_GetAotId)
 ICALL(ASSEM_2, "GetCallingAssembly", ves_icall_System_Reflection_Assembly_GetCallingAssembly)
 ICALL(ASSEM_3, "GetEntryAssembly", ves_icall_System_Reflection_Assembly_GetEntryAssembly)
 ICALL(ASSEM_4, "GetExecutingAssembly", ves_icall_System_Reflection_Assembly_GetExecutingAssembly)
@@ -541,6 +548,9 @@ ICALL(TYPEB_5, "get_event_info", mono_reflection_event_builder_get_event_info)
 ICALL(TYPEB_6, "setup_generic_class", mono_reflection_setup_generic_class)
 ICALL(TYPEB_7, "setup_internal_class", mono_reflection_setup_internal_class)
 
+ICALL_TYPE(EVENTI, "System.Reflection.EventInfo", EVENTI_1)
+ICALL(EVENTI_1, "internal_from_handle_type", ves_icall_System_Reflection_EventInfo_internal_from_handle_type)
+
 ICALL_TYPE(FIELDI, "System.Reflection.FieldInfo", FILEDI_1)
 ICALL(FILEDI_1, "GetTypeModifiers", ves_icall_System_Reflection_FieldInfo_GetTypeModifiers)
 ICALL(FILEDI_2, "get_marshal_info", ves_icall_System_Reflection_FieldInfo_get_marshal_info)
@@ -552,7 +562,7 @@ ICALL(MEMBERI_1, "get_MetadataToken", ves_icall_reflection_get_token)
 ICALL_TYPE(MBASE, "System.Reflection.MethodBase", MBASE_1)
 ICALL(MBASE_1, "GetCurrentMethod", ves_icall_GetCurrentMethod)
 ICALL(MBASE_2, "GetMethodBodyInternal", ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal)
-ICALL(MBASE_4, "GetMethodFromHandleInternalType", ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType)
+ICALL(MBASE_4, "GetMethodFromHandleInternalType_native", ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType_native)
 
 ICALL_TYPE(MODULE, "System.Reflection.Module", MODULE_1)
 ICALL(MODULE_1, "Close", ves_icall_System_Reflection_Module_Close)
@@ -618,6 +628,9 @@ ICALL_TYPE(PARAMI, "System.Reflection.ParameterInfo", PARAMI_1)
 ICALL(PARAMI_1, "GetMetadataToken", ves_icall_reflection_get_token)
 ICALL(PARAMI_2, "GetTypeModifiers", ves_icall_ParameterInfo_GetTypeModifiers)
 
+ICALL_TYPE(PROPI, "System.Reflection.PropertyInfo", PROPI_1)
+ICALL(PROPI_1, "internal_from_handle_type", ves_icall_System_Reflection_PropertyInfo_internal_from_handle_type)
+
 ICALL_TYPE(RTFIELD, "System.Reflection.RtFieldInfo", RTFIELD_1)
 ICALL(RTFIELD_1, "UnsafeGetValue", ves_icall_MonoField_GetValueInternal)
 
@@ -706,9 +719,6 @@ ICALL(CONTEXT_2, "ReleaseContext", ves_icall_System_Runtime_Remoting_Contexts_Co
 ICALL_TYPE(ARES, "System.Runtime.Remoting.Messaging.AsyncResult", ARES_1)
 ICALL(ARES_1, "Invoke", ves_icall_System_Runtime_Remoting_Messaging_AsyncResult_Invoke)
 
-ICALL_TYPE(MONOMM, "System.Runtime.Remoting.Messaging.MonoMethodMessage", MONOMM_1)
-ICALL(MONOMM_1, "InitMessage", ves_icall_MonoMethodMessage_InitMessage)
-
 #ifndef DISABLE_REMOTING
 ICALL_TYPE(REALP, "System.Runtime.Remoting.Proxies.RealProxy", REALP_1)
 ICALL(REALP_1, "InternalGetProxyType", ves_icall_Remoting_RealProxy_InternalGetProxyType)
@@ -732,21 +742,19 @@ ICALL(MHAN_1, "GetFunctionPointer", ves_icall_RuntimeMethodHandle_GetFunctionPoi
 
 ICALL_TYPE(RT, "System.RuntimeType", RT_1)
 ICALL(RT_1, "CreateInstanceInternal", ves_icall_System_Activator_CreateInstanceInternal)
-ICALL(RT_2, "GetConstructors_internal", ves_icall_RuntimeType_GetConstructors_internal)
+ICALL(RT_2, "GetConstructors_native", ves_icall_RuntimeType_GetConstructors_native)
 ICALL(RT_30, "GetCorrespondingInflatedConstructor", ves_icall_RuntimeType_GetCorrespondingInflatedMethod)
 ICALL(RT_31, "GetCorrespondingInflatedMethod", ves_icall_RuntimeType_GetCorrespondingInflatedMethod)
-ICALL(RT_3, "GetEvents_internal", ves_icall_RuntimeType_GetEvents_internal)
-ICALL(RT_5, "GetFields_internal", ves_icall_RuntimeType_GetFields_internal)
+ICALL(RT_3, "GetEvents_native", ves_icall_RuntimeType_GetEvents_native)
+ICALL(RT_5, "GetFields_native", ves_icall_RuntimeType_GetFields_native)
 ICALL(RT_6, "GetGenericArgumentsInternal", ves_icall_RuntimeType_GetGenericArguments)
-ICALL(RT_7, "GetGenericParameterAttributes", ves_icall_RuntimeType_GetGenericParameterAttributes)
-ICALL(RT_8, "GetGenericParameterConstraints_impl", ves_icall_RuntimeType_GetGenericParameterConstraints)
 ICALL(RT_9, "GetGenericParameterPosition", ves_icall_RuntimeType_GetGenericParameterPosition)
 ICALL(RT_10, "GetInterfaceMapData", ves_icall_RuntimeType_GetInterfaceMapData)
 ICALL(RT_11, "GetInterfaces", ves_icall_RuntimeType_GetInterfaces)
-ICALL(RT_12, "GetMethodsByName", ves_icall_RuntimeType_GetMethodsByName)
+ICALL(RT_12, "GetMethodsByName_native", ves_icall_RuntimeType_GetMethodsByName_native)
 ICALL(RT_13, "GetNestedTypes_internal", ves_icall_RuntimeType_GetNestedTypes)
 ICALL(RT_14, "GetPacking", ves_icall_RuntimeType_GetPacking)
-ICALL(RT_15, "GetPropertiesByName", ves_icall_RuntimeType_GetPropertiesByName)
+ICALL(RT_15, "GetPropertiesByName_native", ves_icall_RuntimeType_GetPropertiesByName_native)
 ICALL(RT_16, "GetTypeCodeImplInternal", ves_icall_type_GetTypeCodeInternal)
 ICALL(RT_28, "IsTypeExportedToWindowsRuntime", ves_icall_System_RuntimeType_IsTypeExportedToWindowsRuntime)
 ICALL(RT_29, "IsWindowsRuntimeObjectType", ves_icall_System_RuntimeType_IsWindowsRuntimeObjectType)
@@ -767,6 +775,7 @@ ICALL(RTH_2, "GetAssembly", ves_icall_RuntimeTypeHandle_GetAssembly)
 ICALL(RTH_3, "GetAttributes", ves_icall_RuntimeTypeHandle_GetAttributes)
 ICALL(RTH_4, "GetBaseType", ves_icall_RuntimeTypeHandle_GetBaseType)
 ICALL(RTH_5, "GetElementType", ves_icall_RuntimeTypeHandle_GetElementType)
+ICALL(RTH_19, "GetGenericParameterInfo", ves_icall_RuntimeTypeHandle_GetGenericParameterInfo)
 ICALL(RTH_6, "GetGenericTypeDefinition_impl", ves_icall_RuntimeTypeHandle_GetGenericTypeDefinition_impl)
 ICALL(RTH_7, "GetMetadataToken", ves_icall_reflection_get_token)
 ICALL(RTH_8, "GetModule", ves_icall_RuntimeTypeHandle_GetModule)
index 636d7eab796547ce4fb7d2f79a42a5193f7cad71..25273d463d9d72c50a947eb45997a4ac60cde09b 100644 (file)
@@ -1529,6 +1529,18 @@ ves_icall_System_Type_internal_from_handle (MonoType *handle)
        return ret;
 }
 
+ICALL_EXPORT MonoType*
+ves_icall_Mono_RuntimeClassHandle_GetTypeFromClass (MonoClass *klass)
+{
+       return mono_class_get_type (klass);
+}
+
+ICALL_EXPORT void
+ves_icall_Mono_RuntimeGPtrArrayHandle_GPtrArrayFree (GPtrArray *ptr_array, MonoBoolean freeSeg)
+{
+       g_ptr_array_free (ptr_array, freeSeg);
+}
+
 /* System.TypeCode */
 typedef enum {
        TYPECODE_EMPTY,
@@ -1753,7 +1765,6 @@ ves_icall_System_Reflection_FieldInfo_internal_from_handle_type (MonoClassField
        MonoError error;
        gboolean found = FALSE;
        MonoClass *klass;
-       MonoClass *k;
 
        g_assert (handle);
 
@@ -1762,13 +1773,7 @@ ves_icall_System_Reflection_FieldInfo_internal_from_handle_type (MonoClassField
        } else {
                klass = mono_class_from_mono_type (type);
 
-               /* Check that the field belongs to the class */
-               for (k = klass; k; k = k->parent) {
-                       if (k == handle->parent) {
-                               found = TRUE;
-                               break;
-                       }
-               }
+               found = klass == handle->parent || mono_class_has_parent (klass, handle->parent);
 
                if (!found)
                        /* The managed code will throw the exception */
@@ -1780,6 +1785,55 @@ ves_icall_System_Reflection_FieldInfo_internal_from_handle_type (MonoClassField
        return result;
 }
 
+ICALL_EXPORT MonoReflectionEvent*
+ves_icall_System_Reflection_EventInfo_internal_from_handle_type (MonoEvent *handle, MonoType *type)
+{
+       MonoError error;
+       MonoClass *klass;
+
+       g_assert (handle);
+
+       if (!type) {
+               klass = handle->parent;
+       } else {
+               klass = mono_class_from_mono_type (type);
+
+               gboolean found = klass == handle->parent || mono_class_has_parent (klass, handle->parent);
+               if (!found)
+                       /* Managed code will throw an exception */
+                       return NULL;
+       }
+
+       MonoReflectionEvent *result = mono_event_get_object_checked (mono_domain_get (), klass, handle, &error);
+       mono_error_set_pending_exception (&error);
+       return result;
+}
+
+
+ICALL_EXPORT MonoReflectionProperty*
+ves_icall_System_Reflection_PropertyInfo_internal_from_handle_type (MonoProperty *handle, MonoType *type)
+{
+       MonoError error;
+       MonoClass *klass;
+
+       g_assert (handle);
+
+       if (!type) {
+               klass = handle->parent;
+       } else {
+               klass = mono_class_from_mono_type (type);
+
+               gboolean found = klass == handle->parent || mono_class_has_parent (klass, handle->parent);
+               if (!found)
+                       /* Managed code will throw an exception */
+                       return NULL;
+       }
+
+       MonoReflectionProperty *result = mono_property_get_object_checked (mono_domain_get (), klass, handle, &error);
+       mono_error_set_pending_exception (&error);
+       return result;
+}
+
 ICALL_EXPORT MonoArray*
 ves_icall_System_Reflection_FieldInfo_GetTypeModifiers (MonoReflectionField *field, MonoBoolean optional)
 {
@@ -2875,45 +2929,10 @@ ves_icall_RuntimeType_GetGenericParameterPosition (MonoReflectionType *type)
        return -1;
 }
 
-ICALL_EXPORT GenericParameterAttributes
-ves_icall_RuntimeType_GetGenericParameterAttributes (MonoReflectionType *type)
-{
-       g_assert (IS_MONOTYPE (type));
-       g_assert (is_generic_parameter (type->type));
-       return (GenericParameterAttributes)mono_generic_param_info (type->type->data.generic_param)->flags;
-}
-
-ICALL_EXPORT MonoArray *
-ves_icall_RuntimeType_GetGenericParameterConstraints (MonoReflectionType *type)
+ICALL_EXPORT MonoGenericParamInfo *
+ves_icall_RuntimeTypeHandle_GetGenericParameterInfo (MonoReflectionType *type)
 {
-       MonoError error;
-       MonoReflectionType *rt;
-       MonoGenericParamInfo *param_info;
-       MonoDomain *domain;
-       MonoClass **ptr;
-       MonoArray *res;
-       int i, count;
-
-       g_assert (IS_MONOTYPE (type));
-
-       domain = mono_object_domain (type);
-       param_info = mono_generic_param_info (type->type->data.generic_param);
-       for (count = 0, ptr = param_info->constraints; ptr && *ptr; ptr++, count++)
-               ;
-
-       res = mono_array_new_checked (domain, mono_defaults.runtimetype_class, count, &error);
-       if (mono_error_set_pending_exception (&error))
-               return NULL;
-       for (i = 0; i < count; i++) {
-               rt = mono_type_get_object_checked (domain, &param_info->constraints [i]->byval_arg, &error);
-               if (mono_error_set_pending_exception (&error))
-                       return NULL;
-
-               mono_array_setref (res, i, rt);
-       }
-
-
-       return res;
+       return mono_generic_param_info (type->type->data.generic_param);
 }
 
 ICALL_EXPORT MonoBoolean
@@ -3770,38 +3789,32 @@ enum {
        BFLAGS_OptionalParamBinding = 0x40000
 };
 
-ICALL_EXPORT MonoArray*
-ves_icall_RuntimeType_GetFields_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
+ICALL_EXPORT GPtrArray*
+ves_icall_RuntimeType_GetFields_native (MonoReflectionType *type, MonoString *name, guint32 bflags)
 {
        MonoError error;
        MonoDomain *domain; 
-       MonoClass *startklass, *klass, *refklass;
-       MonoArray *res;
-       MonoObject *member;
-       int i, match;
+       MonoClass *startklass, *klass;
+       int match;
        gpointer iter;
        char *utf8_name = NULL;
        int (*compare_func) (const char *s1, const char *s2) = NULL;    
        MonoClassField *field;
-       MonoPtrArray tmp_array;
 
        domain = ((MonoObject *)type)->vtable->domain;
        if (type->type->byref) {
-               MonoArray *result = mono_array_new_checked (domain, mono_defaults.field_info_class, 0, &error);
-               mono_error_set_pending_exception (&error);
-               return result;
+               return g_ptr_array_new ();
        }
 
        klass = startklass = mono_class_from_mono_type (type->type);
-       refklass = mono_class_from_mono_type (reftype->type);
 
-       mono_ptr_array_init (tmp_array, 2, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection fields list");
+       GPtrArray *ptr_array = g_ptr_array_sized_new (16);
        
 handle_parent: 
        if (mono_class_has_failure (klass)) {
-               mono_ptr_array_destroy (tmp_array);
-               mono_set_pending_exception (mono_class_get_exception_for_failure (klass));
-               return NULL;
+               mono_error_init (&error);
+               mono_error_set_for_class_failure (&error, klass);
+               goto fail;
        }
 
        iter = NULL;
@@ -3845,29 +3858,17 @@ handle_parent:
                                continue;
                }
 
-               member = (MonoObject*)mono_field_get_object_checked (domain, refklass, field, &error);
-               if (!mono_error_ok (&error))
-                   goto fail;
-               mono_ptr_array_append (tmp_array, member);
+               g_ptr_array_add (ptr_array, field);
        }
        if (!(bflags & BFLAGS_DeclaredOnly) && (klass = klass->parent))
                goto handle_parent;
 
-       res = mono_array_new_cached (domain, mono_defaults.field_info_class, mono_ptr_array_size (tmp_array), &error);
-       if (!is_ok (&error))
-               goto fail;
-
-       for (i = 0; i < mono_ptr_array_size (tmp_array); ++i)
-               mono_array_setref (res, i, mono_ptr_array_get (tmp_array, i));
-
-       mono_ptr_array_destroy (tmp_array);
-
        if (utf8_name != NULL)
                g_free (utf8_name);
+       return ptr_array;
 
-       return res;
 fail:
-       mono_ptr_array_destroy (tmp_array);
+       g_ptr_array_free (ptr_array, FALSE);
        mono_error_set_pending_exception (&error);
        return NULL;
 }
@@ -3888,7 +3889,7 @@ method_nonpublic (MonoMethod* method, gboolean start_klass)
 }
 
 GPtrArray*
-mono_class_get_methods_by_name (MonoClass *klass, const char *name, guint32 bflags, gboolean ignore_case, gboolean allow_ctors, MonoException **ex)
+mono_class_get_methods_by_name (MonoClass *klass, const char *name, guint32 bflags, gboolean ignore_case, gboolean allow_ctors, MonoError *error)
 {
        GPtrArray *array;
        MonoClass *startklass;
@@ -3902,7 +3903,7 @@ mono_class_get_methods_by_name (MonoClass *klass, const char *name, guint32 bfla
 
        array = g_ptr_array_new ();
        startklass = klass;
-       *ex = NULL;
+       mono_error_init (error);
 
        if (name != NULL)
                compare_func = (ignore_case) ? mono_utf8_strcasecmp : strcmp;
@@ -3991,49 +3992,24 @@ loader_error:
                g_free (method_slots);
        g_ptr_array_free (array, TRUE);
 
-       if (mono_class_has_failure (klass)) {
-               *ex = mono_class_get_exception_for_failure (klass);
-       } else {
-               *ex = mono_get_exception_execution_engine ("Unknown error");
-       }
+       g_assert (mono_class_has_failure (klass));
+       mono_error_set_for_class_failure (error, klass);
        return NULL;
 }
 
-ICALL_EXPORT MonoArray*
-ves_icall_RuntimeType_GetMethodsByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
+ICALL_EXPORT GPtrArray*
+ves_icall_RuntimeType_GetMethodsByName_native (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case)
 {
-       static MonoClass *MethodInfo_array;
        MonoError error;
        MonoDomain *domain; 
-       MonoArray *res;
-       MonoVTable *array_vtable;
-       MonoException *ex = NULL;
        const char *mname = NULL;
        GPtrArray *method_array;
-       MonoClass *klass, *refklass;
-       int i;
-
-       mono_error_init (&error);
-
-       if (!MethodInfo_array) {
-               MonoClass *klass = mono_array_class_get (mono_defaults.method_info_class, 1);
-               mono_memory_barrier ();
-               MethodInfo_array = klass;
-       }
+       MonoClass *klass;
 
        klass = mono_class_from_mono_type (type->type);
-       refklass = mono_class_from_mono_type (reftype->type);
        domain = ((MonoObject *)type)->vtable->domain;
-       array_vtable = mono_class_vtable_full (domain, MethodInfo_array, &error);
-       if (!is_ok (&error)) {
-               mono_error_set_pending_exception (&error);
-               return NULL;
-       }
        if (type->type->byref) {
-               res = mono_array_new_specific_checked (array_vtable, 0, &error);
-               mono_error_set_pending_exception (&error);
-
-               return res;
+               return g_ptr_array_new ();
        }
 
        if (name) {
@@ -4042,66 +4018,38 @@ ves_icall_RuntimeType_GetMethodsByName (MonoReflectionType *type, MonoString *na
                    return NULL;
        }
 
-       method_array = mono_class_get_methods_by_name (klass, mname, bflags, ignore_case, FALSE, &ex);
+       method_array = mono_class_get_methods_by_name (klass, mname, bflags, ignore_case, FALSE, &error);
        g_free ((char*)mname);
-       if (ex) {
-               mono_set_pending_exception (ex);
-               return NULL;
-       }
-
-       res = mono_array_new_specific_checked (array_vtable, method_array->len, &error);
-       if (!mono_error_ok (&error)) {
-               mono_error_set_pending_exception (&error);
-               return NULL;
-       }
-
-       for (i = 0; i < method_array->len; ++i) {
-               MonoMethod *method = (MonoMethod *)g_ptr_array_index (method_array, i);
-               MonoReflectionMethod *rm = mono_method_get_object_checked (domain, method, refklass, &error);
-               if (!mono_error_ok (&error))
-                       goto failure;
-               mono_array_setref (res, i, rm);
-       }
-
-failure:
-       g_ptr_array_free (method_array, TRUE);
-       if (!mono_error_ok (&error))
-               mono_set_pending_exception (mono_error_convert_to_exception (&error));
-       return res;
+       mono_error_set_pending_exception (&error);
+       return method_array;
 }
 
-ICALL_EXPORT MonoArray*
-ves_icall_RuntimeType_GetConstructors_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype)
+ICALL_EXPORT GPtrArray*
+ves_icall_RuntimeType_GetConstructors_native (MonoReflectionType *type, guint32 bflags)
 {
-       MonoDomain *domain; 
-       MonoClass *startklass, *klass, *refklass;
-       MonoArray *res = NULL;
+       MonoClass *startklass, *klass;
        MonoMethod *method;
-       MonoObject *member;
-       int i, match;
+       int match;
        gpointer iter = NULL;
-       MonoPtrArray tmp_array;
+       GPtrArray *res_array;
        MonoError error;
        
-       domain = ((MonoObject *)type)->vtable->domain;
        if (type->type->byref) {
-               res = mono_array_new_cached (domain, mono_defaults.method_info_class, 0, &error);
-               mono_error_set_pending_exception (&error);
-               return res;
+               return g_ptr_array_new ();
        }
 
-       mono_ptr_array_init (tmp_array, 4, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection constructors list"); /*FIXME, guestimating*/
-
-
        klass = startklass = mono_class_from_mono_type (type->type);
-       refklass = mono_class_from_mono_type (reftype->type);
 
        mono_class_setup_methods (klass);
        if (mono_class_has_failure (klass)) {
-               mono_set_pending_exception (mono_class_get_exception_for_failure (klass));
-               goto leave;
+               mono_error_init (&error);
+               mono_error_set_for_class_failure (&error, klass);
+               mono_error_set_pending_exception (&error);
+               return NULL;
        }
 
+       res_array = g_ptr_array_sized_new (4); /* FIXME, guestimating */
+
        iter = NULL;
        while ((method = mono_class_get_methods (klass, &iter))) {
                match = 0;
@@ -4128,24 +4076,10 @@ ves_icall_RuntimeType_GetConstructors_internal (MonoReflectionType *type, guint3
 
                if (!match)
                        continue;
-               member = (MonoObject*)mono_method_get_object_checked (domain, method, refklass, &error);
-               if (mono_error_set_pending_exception (&error))
-                       goto leave;
-
-               mono_ptr_array_append (tmp_array, member);
+               g_ptr_array_add (res_array, method);
        }
 
-       res = mono_array_new_cached (domain, mono_class_get_constructor_info_class (), mono_ptr_array_size (tmp_array), &error);
-       if (mono_error_set_pending_exception (&error))
-               goto leave;
-
-       for (i = 0; i < mono_ptr_array_size (tmp_array); ++i)
-               mono_array_setref (res, i, mono_ptr_array_get (tmp_array, i));
-
-leave:
-       mono_ptr_array_destroy (tmp_array);
-
-       return res;
+       return res_array;
 }
 
 static guint
@@ -4157,12 +4091,17 @@ property_hash (gconstpointer data)
 }
 
 static gboolean
-method_declaring_signatures_equal (MonoMethod *method1, MonoMethod *method2)
+property_accessor_override (MonoMethod *method1, MonoMethod *method2)
 {
-       if (method1->is_inflated)
-               method1 = ((MonoMethodInflated*) method1)->declaring;
-       if (method2->is_inflated)
-               method2 = ((MonoMethodInflated*) method2)->declaring;
+       if (method1->slot != -1 && method1->slot == method2->slot)
+               return TRUE;
+
+       if (mono_class_get_generic_type_definition (method1->klass) == mono_class_get_generic_type_definition (method2->klass)) {
+               if (method1->is_inflated)
+                       method1 = ((MonoMethodInflated*) method1)->declaring;
+               if (method2->is_inflated)
+                       method2 = ((MonoMethodInflated*) method2)->declaring;
+       }
 
        return mono_metadata_signature_equal (mono_method_signature (method1), mono_method_signature (method2));
 }
@@ -4188,10 +4127,10 @@ property_equal (MonoProperty *prop1, MonoProperty *prop2)
           the indexer came from method 1 or from method 2, and we
           shouldn't conflate them.   (Bugzilla 36283)
        */
-       if (prop1->get && prop2->get && !method_declaring_signatures_equal (prop1->get, prop2->get))
+       if (prop1->get && prop2->get && !property_accessor_override (prop1->get, prop2->get))
                return FALSE;
 
-       if (prop1->set && prop2->set && !method_declaring_signatures_equal (prop1->set, prop2->set))
+       if (prop1->set && prop2->set && !property_accessor_override (prop1->set, prop2->set))
                return FALSE;
 
        return TRUE;
@@ -4206,34 +4145,27 @@ property_accessor_nonpublic (MonoMethod* accessor, gboolean start_klass)
        return method_nonpublic (accessor, start_klass);
 }
 
-ICALL_EXPORT MonoArray*
-ves_icall_RuntimeType_GetPropertiesByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
+ICALL_EXPORT GPtrArray*
+ves_icall_RuntimeType_GetPropertiesByName_native (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case)
 {
        MonoError error;
-       MonoDomain *domain; 
        MonoClass *startklass, *klass;
-       MonoArray *res;
        MonoMethod *method;
        MonoProperty *prop;
-       int i, match;
+       int match;
        guint32 flags;
        gchar *propname = NULL;
        int (*compare_func) (const char *s1, const char *s2) = NULL;
        gpointer iter;
        GHashTable *properties = NULL;
-       MonoPtrArray tmp_array;
+       GPtrArray *res_array;
 
-       mono_error_init (&error);
-       
-       domain = ((MonoObject *)type)->vtable->domain;
        if (type->type->byref) {
-               res = mono_array_new_cached (domain, mono_class_get_property_info_class (), 0, &error);
-               mono_error_set_pending_exception (&error);
-               return res;
+               return g_ptr_array_new ();
        }
 
-       mono_ptr_array_init (tmp_array, 8, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection properties list"); /*This the average for ASP.NET types*/
-
+       mono_error_init (&error);
+       
        klass = startklass = mono_class_from_mono_type (type->type);
 
        if (name != NULL) {
@@ -4243,6 +4175,8 @@ ves_icall_RuntimeType_GetPropertiesByName (MonoReflectionType *type, MonoString
                compare_func = (ignore_case) ? mono_utf8_strcasecmp : strcmp;
        }
 
+       res_array = g_ptr_array_sized_new (8); /*This the average for ASP.NET types*/
+
        properties = g_hash_table_new (property_hash, (GEqualFunc)property_equal);
 handle_parent:
        mono_class_setup_methods (klass);
@@ -4294,41 +4228,28 @@ handle_parent:
                if (g_hash_table_lookup (properties, prop))
                        continue;
 
-               MonoReflectionProperty *pr = mono_property_get_object_checked (domain, startklass, prop, &error);
-               if (!pr)
-                       goto failure;
-               mono_ptr_array_append (tmp_array, pr);
+               g_ptr_array_add (res_array, prop);
                
                g_hash_table_insert (properties, prop, prop);
        }
-       if ((!(bflags & BFLAGS_DeclaredOnly) && (klass = klass->parent)))
+       if (!(bflags & BFLAGS_DeclaredOnly) && (klass = klass->parent))
                goto handle_parent;
 
        g_hash_table_destroy (properties);
        g_free (propname);
 
-       res = mono_array_new_cached (domain, mono_class_get_property_info_class (), mono_ptr_array_size (tmp_array), &error);
-       if (!is_ok (&error))
-               goto failure;
-       for (i = 0; i < mono_ptr_array_size (tmp_array); ++i)
-               mono_array_setref (res, i, mono_ptr_array_get (tmp_array, i));
-
-       mono_ptr_array_destroy (tmp_array);
-
-       return res;
-
+       return res_array;
 
 
 loader_error:
        if (mono_class_has_failure (klass))
                mono_error_set_for_class_failure (&error, klass);
 
-failure:
        if (properties)
                g_hash_table_destroy (properties);
        if (name)
                g_free (propname);
-       mono_ptr_array_destroy (tmp_array);
+       g_ptr_array_free (res_array, FALSE);
 
        mono_error_set_pending_exception (&error);
 
@@ -4350,32 +4271,27 @@ event_equal (MonoEvent *event1, MonoEvent *event2)
        return g_str_equal (event1->name, event2->name);
 }
 
-ICALL_EXPORT MonoArray*
-ves_icall_RuntimeType_GetEvents_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
+ICALL_EXPORT GPtrArray*
+ves_icall_RuntimeType_GetEvents_native (MonoReflectionType *type, MonoString *name, guint32 bflags)
 {
        MonoError error;
-       MonoDomain *domain; 
        MonoClass *startklass, *klass;
-       MonoArray *res;
        MonoMethod *method;
        MonoEvent *event;
-       int i, match;
+       int match;
        gpointer iter;
        char *utf8_name = NULL;
        int (*compare_func) (const char *s1, const char *s2) = NULL;    
        GHashTable *events = NULL;
-       MonoPtrArray tmp_array;
+       GPtrArray *res_array;
 
-       mono_error_init (&error);
-       
-       domain = mono_object_domain (type);
        if (type->type->byref) {
-               res = mono_array_new_cached (domain, mono_class_get_event_info_class (), 0, &error);
-               mono_error_set_pending_exception (&error);
-               return res;
+               return g_ptr_array_new ();
        }
 
-       mono_ptr_array_init (tmp_array, 4, MONO_ROOT_SOURCE_REFLECTION, "temporary reflection events list");
+       mono_error_init (&error);
+
+       res_array = g_ptr_array_sized_new (4);
 
        klass = startklass = mono_class_from_mono_type (type->type);
 
@@ -4440,11 +4356,7 @@ handle_parent:
                if (g_hash_table_lookup (events, event))
                        continue;
 
-               MonoReflectionEvent *ev_obj;
-               ev_obj = mono_event_get_object_checked (domain, startklass, event, &error);
-               if (!ev_obj)
-                       goto failure;
-               mono_ptr_array_append (tmp_array, ev_obj);
+               g_ptr_array_add (res_array, event); 
 
                g_hash_table_insert (events, event, event);
        }
@@ -4453,19 +4365,10 @@ handle_parent:
 
        g_hash_table_destroy (events);
 
-       res = mono_array_new_cached (domain, mono_class_get_event_info_class (), mono_ptr_array_size (tmp_array), &error);
-       if (!is_ok (&error))
-               goto failure;
-
-       for (i = 0; i < mono_ptr_array_size (tmp_array); ++i)
-               mono_array_setref (res, i, mono_ptr_array_get (tmp_array, i));
-
-       mono_ptr_array_destroy (tmp_array);
-
        if (utf8_name != NULL)
                g_free (utf8_name);
 
-       return res;
+       return res_array;
 
 loader_error:
        if (mono_class_has_failure (klass))
@@ -4478,7 +4381,7 @@ failure:
        if (utf8_name != NULL)
                g_free (utf8_name);
 
-       mono_ptr_array_destroy (tmp_array);
+       g_ptr_array_free (res_array, FALSE);
 
        mono_error_set_pending_exception (&error);
        return NULL;
@@ -4888,6 +4791,27 @@ ves_icall_System_Reflection_Assembly_GetManifestResourceNames (MonoReflectionAss
        return result;
 }
 
+ICALL_EXPORT MonoString*
+ves_icall_System_Reflection_Assembly_GetAotId ()
+{
+       int i;
+       guint8 aotid_sum = 0;
+       MonoDomain* domain = mono_domain_get ();
+
+       if (!domain->entry_assembly || !domain->entry_assembly->image)
+               return NULL;
+
+       guint8 (*aotid)[16] = &domain->entry_assembly->image->aotid;
+
+       for (i = 0; i < 16; ++i)
+               aotid_sum |= (*aotid)[i];
+
+       if (aotid_sum == 0)
+               return NULL;
+       
+       return mono_string_new (domain, mono_guid_to_string((guint8*) aotid));
+}
+
 static MonoObject*
 create_version (MonoDomain *domain, guint32 major, guint32 minor, guint32 build, guint32 revision, MonoError *error)
 {
@@ -5126,7 +5050,7 @@ ves_icall_System_Reflection_Assembly_GetManifestResourceInfoInternal (MonoReflec
                        mono_metadata_decode_row (table, i - 1, file_cols, MONO_FILE_SIZE);
                        val = mono_metadata_string_heap (assembly->assembly->image, file_cols [MONO_FILE_NAME]);
                        MONO_OBJECT_SETREF (info, filename, mono_string_new (mono_object_domain (assembly), val));
-                       if (file_cols [MONO_FILE_FLAGS] && FILE_CONTAINS_NO_METADATA)
+                       if (file_cols [MONO_FILE_FLAGS] & FILE_CONTAINS_NO_METADATA)
                                info->location = 0;
                        else
                                info->location = RESOURCE_LOCATION_EMBEDDED;
@@ -5269,7 +5193,7 @@ ves_icall_System_Reflection_Assembly_GetModulesInternal (MonoReflectionAssembly
 
        for (i = 0; i < file_count; ++i, ++j) {
                mono_metadata_decode_row (table, i, cols, MONO_FILE_SIZE);
-               if (cols [MONO_FILE_FLAGS] && FILE_CONTAINS_NO_METADATA) {
+               if (cols [MONO_FILE_FLAGS] & FILE_CONTAINS_NO_METADATA) {
                        MonoReflectionModule *rm = mono_module_file_get_object_checked (domain, image, i, &error);
                        if (mono_error_set_pending_exception (&error))
                                return NULL;
@@ -5352,21 +5276,24 @@ mono_method_get_equivalent_method (MonoMethod *method, MonoClass *klass)
 }
 
 ICALL_EXPORT MonoReflectionMethod*
-ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType (MonoMethod *method, MonoType *type)
+ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType_native (MonoMethod *method, MonoType *type, MonoBoolean generic_check)
 {
        MonoReflectionMethod *res = NULL;
        MonoError error;
        MonoClass *klass;
-       if (type) {
+       if (type && generic_check) {
                klass = mono_class_from_mono_type (type);
-               if (mono_class_get_generic_type_definition (method->klass) != mono_class_get_generic_type_definition (klass)) 
+               if (mono_class_get_generic_type_definition (method->klass) != mono_class_get_generic_type_definition (klass))
                        return NULL;
+
                if (method->klass != klass) {
                        method = mono_method_get_equivalent_method (method, klass);
                        if (!method)
                                return NULL;
                }
-       } else
+       } else if (type)
+               klass = mono_class_from_mono_type (type);
+       else
                klass = method->klass;
        res = mono_method_get_object_checked (mono_domain_get (), method, klass, &error);
        mono_error_set_pending_exception (&error);
@@ -7331,16 +7258,6 @@ ves_icall_System_Runtime_Versioning_VersioningHelper_GetRuntimeId (void)
        return 9;
 }
 
-ICALL_EXPORT void
-ves_icall_MonoMethodMessage_InitMessage (MonoMethodMessage *this_obj, 
-                                        MonoReflectionMethod *method,
-                                        MonoArray *out_args)
-{
-       MonoError error;
-       mono_message_init (mono_object_domain (this_obj), this_obj, method, out_args, &error);
-       mono_error_set_pending_exception (&error);
-}
-
 #ifndef DISABLE_REMOTING
 ICALL_EXPORT MonoBoolean
 ves_icall_IsTransparentProxy (MonoObject *proxy)
index c58c4b6794a056cdcec340a869748af3bb66bfa0..50eaded2e37279442560273998901d1e3cbb82ea 100644 (file)
@@ -1802,6 +1802,7 @@ mono_image_close_except_pools (MonoImage *image)
        free_hash (image->stfld_wrapper_cache);
        free_hash (image->isinst_cache);
        free_hash (image->castclass_cache);
+       free_hash (image->icall_wrapper_cache);
        free_hash (image->proxy_isinst_cache);
        free_hash (image->var_cache_slow);
        free_hash (image->mvar_cache_slow);
@@ -1992,13 +1993,13 @@ mono_image_walk_resource_tree (MonoCLIImageInfo *info, guint32 res_id,
                }
 #endif
        } else if (level==2) {
-               if (is_string == TRUE || (is_string == FALSE && lang_id != 0 && name_offset != lang_id))
+               if (is_string || (lang_id != 0 && name_offset != lang_id))
                        return NULL;
        } else {
                g_assert_not_reached ();
        }
 
-       if(is_dir==TRUE) {
+       if (is_dir) {
                MonoPEResourceDir *res_dir=(MonoPEResourceDir *)(((char *)root)+dir_offset);
                MonoPEResourceDirEntry *sub_entries=(MonoPEResourceDirEntry *)(res_dir+1);
                guint32 entries, i;
index 2922234965a5035b83acf0ce6b3f0f7b51d22f18..4f36ba3c82c11fd5f55a5e8e10866928fdf0a9a5 100644 (file)
@@ -994,6 +994,7 @@ mono_dllmap_lookup_list (MonoDllMap *dll_map, const char *dll, const char* func,
                         */
                }
                if (dll_map->func && strcmp (dll_map->func, func) == 0) {
+                       *rdll = dll_map->target;
                        *rfunc = dll_map->target_func;
                        break;
                }
@@ -1021,7 +1022,7 @@ mono_dllmap_lookup (MonoImage *assembly, const char *dll, const char* func, cons
  * @dll: The name of the external library, as it would be found in the DllImport declaration.  If prefixed with 'i:' the matching of the library name is done without case sensitivity
  * @func: if not null, the mapping will only applied to the named function (the value of EntryPoint)
  * @tdll: The name of the library to map the specified @dll if it matches.
- * @tfunc: if func is not NULL, the name of the function that replaces the invocation
+ * @tfunc: The name of the function that replaces the invocation.  If NULL, it is replaced with a copy of @func.
  *
  * LOCKING: Acquires the loader lock.
  *
@@ -1056,7 +1057,7 @@ mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, cons
                entry->dll = dll? g_strdup (dll): NULL;
                entry->target = tdll? g_strdup (tdll): NULL;
                entry->func = func? g_strdup (func): NULL;
-               entry->target_func = tfunc? g_strdup (tfunc): NULL;
+               entry->target_func = tfunc? g_strdup (tfunc): (func? g_strdup (func): NULL);
 
                global_loader_data_lock ();
                entry->next = global_dll_map;
@@ -1067,7 +1068,7 @@ mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, cons
                entry->dll = dll? mono_image_strdup (assembly, dll): NULL;
                entry->target = tdll? mono_image_strdup (assembly, tdll): NULL;
                entry->func = func? mono_image_strdup (assembly, func): NULL;
-               entry->target_func = tfunc? mono_image_strdup (assembly, tfunc): NULL;
+               entry->target_func = tfunc? mono_image_strdup (assembly, tfunc): (func? mono_image_strdup (assembly, func): NULL);
 
                mono_image_lock (assembly);
                entry->next = assembly->dll_map;
index 86e66ece626ce9a7560ea03a47cf58d44222bf69..86229fbe3284a572d97ff84ba64aa4f3d1216be7 100644 (file)
@@ -422,7 +422,8 @@ mono_delegate_to_ftnptr (MonoDelegate *delegate)
        return delegate->delegate_trampoline;
 
 fail:
-       mono_gchandle_free (target_handle);
+       if (target_handle != 0)
+               mono_gchandle_free (target_handle);
        mono_error_set_pending_exception (&error);
        return NULL;
 }
@@ -962,7 +963,7 @@ mono_string_utf16_to_builder (MonoStringBuilder *sb, gunichar2 *text)
  *
  * Returns: a utf8 string with the contents of the StringBuilder.
  *
- * The return value must be released with g_free.
+ * The return value must be released with mono_marshal_free.
  *
  * This is a JIT icall, it sets the pending exception and returns NULL on error.
  */
@@ -983,14 +984,14 @@ mono_string_builder_to_utf8 (MonoStringBuilder *sb)
 
        if (gerror) {
                g_error_free (gerror);
-               g_free (str_utf16);
+               mono_marshal_free (str_utf16);
                mono_set_pending_exception (mono_get_exception_execution_engine ("Failed to convert StringBuilder from utf16 to utf8"));
                return NULL;
        } else {
                guint len = mono_string_builder_capacity (sb) + 1;
                gchar *res = (gchar *)mono_marshal_alloc (len * sizeof (gchar), &error);
                if (!mono_error_ok (&error)) {
-                       g_free (str_utf16);
+                       mono_marshal_free (str_utf16);
                        g_free (tmp);
                        mono_error_set_pending_exception (&error);
                        return NULL;
@@ -1000,7 +1001,7 @@ mono_string_builder_to_utf8 (MonoStringBuilder *sb)
                memcpy (res, tmp, str_len * sizeof (gchar));
                res[str_len] = '\0';
 
-               g_free (str_utf16);
+               mono_marshal_free (str_utf16);
                g_free (tmp);
                return res;
        }
@@ -1014,7 +1015,8 @@ mono_string_builder_to_utf8 (MonoStringBuilder *sb)
  *
  * Returns: a utf16 string with the contents of the StringBuilder.
  *
- * The return value must not be freed.
+ * The return value must be released with mono_marshal_free.
+ *
  * This is a JIT icall, it sets the pending exception and returns NULL on error.
  */
 gunichar2*
@@ -4219,7 +4221,6 @@ mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual_)
  * ARGS should contain the this argument too.
  * This wrapper serves the same purpose as the runtime-invoke wrappers, but there
  * is only one copy of it, which is useful in full-aot.
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod*
 mono_marshal_get_runtime_invoke_dynamic (void)
@@ -4446,7 +4447,6 @@ mono_mb_emit_auto_layout_exception (MonoMethodBuilder *mb, MonoClass *klass)
 /*
  * generates IL code for the icall wrapper (the generated method
  * calls the unmanaged code in func)
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_icall_wrapper (MonoMethodSignature *sig, const char *name, gconstpointer func, gboolean check_exceptions)
@@ -4457,6 +4457,10 @@ mono_marshal_get_icall_wrapper (MonoMethodSignature *sig, const char *name, gcon
        int i;
        WrapperInfo *info;
        
+       GHashTable *cache = get_cache (&mono_defaults.object_class->image->icall_wrapper_cache, mono_aligned_addr_hash, NULL);
+       if ((res = mono_marshal_find_in_cache (cache, (gpointer) func)))
+               return res;
+
        g_assert (sig->pinvoke);
 
        mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_MANAGED_TO_NATIVE);
@@ -4491,7 +4495,7 @@ mono_marshal_get_icall_wrapper (MonoMethodSignature *sig, const char *name, gcon
 
        info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_ICALL_WRAPPER);
        info->d.icall.func = (gpointer)func;
-       res = mono_mb_create (mb, csig, csig->param_count + 16, info);
+       res = mono_mb_create_and_cache_full (cache, (gpointer) func, mb, csig, csig->param_count + 16, info, NULL);
        mono_mb_free (mb);
 
        return res;
@@ -7452,19 +7456,25 @@ mono_marshal_emit_native_wrapper (MonoImage *image, MonoMethodBuilder *mb, MonoM
        /* Set LastError if needed */
        if (piinfo->piflags & PINVOKE_ATTRIBUTE_SUPPORTS_LAST_ERROR) {
 #ifdef TARGET_WIN32
-               static MonoMethodSignature *get_last_error_sig = NULL;
-               if (!get_last_error_sig) {
-                       get_last_error_sig = mono_metadata_signature_alloc (mono_defaults.corlib, 0);
-                       get_last_error_sig->ret = &mono_defaults.int_class->byval_arg;
-                       get_last_error_sig->pinvoke = 1;
-               }
+               if (!aot) {
+                       static MonoMethodSignature *get_last_error_sig = NULL;
+                       if (!get_last_error_sig) {
+                               get_last_error_sig = mono_metadata_signature_alloc (mono_defaults.corlib, 0);
+                               get_last_error_sig->ret = &mono_defaults.int_class->byval_arg;
+                               get_last_error_sig->pinvoke = 1;
+                       }
 
-               /*
-                * Have to call GetLastError () early and without a wrapper, since various runtime components could
-                * clobber its value.
-                */
-               mono_mb_emit_native_call (mb, get_last_error_sig, GetLastError);
-               mono_mb_emit_icall (mb, mono_marshal_set_last_error_windows);
+                       /*
+                        * Have to call GetLastError () early and without a wrapper, since various runtime components could
+                        * clobber its value.
+                        */
+                       mono_mb_emit_native_call (mb, get_last_error_sig, GetLastError);
+                       mono_mb_emit_icall (mb, mono_marshal_set_last_error_windows);
+               } else {
+                       mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
+                       mono_mb_emit_byte (mb, CEE_MONO_GET_LAST_ERROR);
+                       mono_mb_emit_icall (mb, mono_marshal_set_last_error_windows);
+               }
 #else
                mono_mb_emit_icall (mb, mono_marshal_set_last_error);
 #endif
@@ -7589,7 +7599,6 @@ mono_marshal_emit_native_wrapper (MonoImage *image, MonoMethodBuilder *mb, MonoM
  *
  * generates IL code for the pinvoke wrapper (the generated method
  * calls the unmanaged code in piinfo->addr)
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions, gboolean aot)
@@ -8648,7 +8657,6 @@ generate_check_cache (int obj_arg_position, int class_arg_position, int cache_ar
 
 /*
  * This does the equivalent of mono_object_castclass_with_cache.
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_castclass_with_cache (void)
@@ -8734,7 +8742,6 @@ mono_marshal_isinst_with_cache (MonoObject *obj, MonoClass *klass, uintptr_t *ca
 
 /*
  * This does the equivalent of mono_object_isinst_with_cache.
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_isinst_with_cache (void)
@@ -8911,7 +8918,6 @@ mono_marshal_get_isinst (MonoClass *klass)
  * an instance of the given type, icluding the case where the object is a proxy.
  * The generated function has the following signature:
  * MonoObject* __castclass_wrapper_ (MonoObject *obj)
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_castclass (MonoClass *klass)
@@ -8994,7 +9000,6 @@ mono_marshal_get_castclass (MonoClass *klass)
  * @klass:
  *
  * generates IL code for StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld)
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_struct_to_ptr (MonoClass *klass)
@@ -9068,7 +9073,6 @@ mono_marshal_get_struct_to_ptr (MonoClass *klass)
  * @klass:
  *
  * generates IL code for PtrToStructure (IntPtr src, object structure)
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_ptr_to_struct (MonoClass *klass)
@@ -9147,7 +9151,6 @@ mono_marshal_get_ptr_to_struct (MonoClass *klass)
  * This is used to avoid infinite recursion since it is hard to determine where to
  * replace a method with its synchronized wrapper, and where not.
  * The runtime should execute METHOD instead of the wrapper.
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_synchronized_inner_wrapper (MonoMethod *method)
@@ -9515,8 +9518,6 @@ record_slot_vstore (MonoObject *array, size_t index, MonoObject *value)
 #endif
 
 /*
- * The wrapper info for the wrapper is a WrapperInfo structure.
- *
  * TODO:
  *     - Separate simple interfaces from variant interfaces or mbr types. This way we can avoid the icall for them.
  *     - Emit a (new) mono bytecode that produces OP_COND_EXC_NE_UN to raise ArrayTypeMismatch
@@ -9532,7 +9533,7 @@ get_virtual_stelemref_wrapper (int kind)
        MonoMethod *res;
        char *name;
        const char *param_names [16];
-       guint32 b1, b2, b3;
+       guint32 b1, b2, b3, b4;
        int aklass, vklass, vtable, uiid;
        int array_slot_addr;
        WrapperInfo *info;
@@ -9745,7 +9746,7 @@ get_virtual_stelemref_wrapper (int kind)
                mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
                mono_mb_emit_byte (mb, CEE_LDIND_U2);
 
-               b2 = mono_mb_emit_branch (mb, CEE_BLT_UN);
+               b3 = mono_mb_emit_branch (mb, CEE_BLT_UN);
 
                /* if (vklass->supertypes [aklass->idepth - 1] != aklass) goto failure */
                mono_mb_emit_ldloc (mb, vklass);
@@ -9763,7 +9764,7 @@ get_virtual_stelemref_wrapper (int kind)
                mono_mb_emit_byte (mb, CEE_LDIND_I);
 
                mono_mb_emit_ldloc (mb, aklass);
-               b3 = mono_mb_emit_branch (mb, CEE_BNE_UN);
+               b4 = mono_mb_emit_branch (mb, CEE_BNE_UN);
 
                /* do_store: */
                mono_mb_patch_branch (mb, b1);
@@ -9775,6 +9776,7 @@ get_virtual_stelemref_wrapper (int kind)
                /* do_exception: */
                mono_mb_patch_branch (mb, b2);
                mono_mb_patch_branch (mb, b3);
+               mono_mb_patch_branch (mb, b4);
 
                mono_mb_emit_exception (mb, "ArrayTypeMismatchException", NULL);
                break;
@@ -9925,9 +9927,6 @@ mono_marshal_get_virtual_stelemref_wrappers (int *nwrappers)
        return res;
 }
 
-/*
- * The wrapper info for the wrapper is a WrapperInfo structure.
- */
 MonoMethod*
 mono_marshal_get_stelemref (void)
 {
@@ -10078,8 +10077,6 @@ mono_marshal_get_stelemref (void)
  * mono_marshal_get_gsharedvt_in_wrapper:
  *
  *   This wrapper handles calls from normal code to gsharedvt code.
- *
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod*
 mono_marshal_get_gsharedvt_in_wrapper (void)
@@ -10114,8 +10111,6 @@ mono_marshal_get_gsharedvt_in_wrapper (void)
  * mono_marshal_get_gsharedvt_out_wrapper:
  *
  *   This wrapper handles calls from gsharedvt code to normal code.
- *
- * The wrapper info for the wrapper is a WrapperInfo structure.
  */
 MonoMethod*
 mono_marshal_get_gsharedvt_out_wrapper (void)
@@ -11902,8 +11897,6 @@ ftnptr_eh_callback_default (guint32 gchandle)
        MonoException *exc;
        gpointer stackdata;
 
-       g_assert (gchandle >= 0);
-
        mono_threads_enter_gc_unsafe_region_unbalanced (&stackdata);
 
        exc = (MonoException*) mono_gchandle_get_target (gchandle);
index 60d36ae2ad1765d76cbf450dbb8feb9b616bf479..6bf3410d818ec7115921f01c4e9c45dd27109e80 100644 (file)
@@ -172,7 +172,7 @@ mono_mempool_stats (MonoMemPool *pool)
 {
        MonoMemPool *p;
        int count = 0;
-       guint32 still_free = pool->end - pool->pos;
+       guint32 still_free;
 
        p = pool;
        while (p) {
@@ -180,6 +180,7 @@ mono_mempool_stats (MonoMemPool *pool)
                count++;
        }
        if (pool) {
+               still_free = pool->end - pool->pos;
                g_print ("Mempool %p stats:\n", pool);
                g_print ("Total mem allocated: %d\n", pool->d.allocated);
                g_print ("Num chunks: %d\n", count);
index ba5f9d72e1aa81d635a3e6e5d1d1979da9985620..a1b9eb841781775dcf0fdc3cc5d768ddcfde08e8 100644 (file)
@@ -271,6 +271,8 @@ struct _MonoImage {
 
        gpointer aot_module;
 
+       guint8 aotid[16];
+
        /*
         * The Assembly this image was loaded from.
         */
@@ -334,6 +336,8 @@ struct _MonoImage {
        GHashTable *ldflda_wrapper_cache;
        GHashTable *stfld_wrapper_cache;
        GHashTable *isinst_cache;
+
+       GHashTable *icall_wrapper_cache;
        GHashTable *castclass_cache;
        GHashTable *proxy_isinst_cache;
        GHashTable *rgctx_template_hash; /* LOCKING: templates lock */
index 287c68fbfb79d3413a3767ca63c0a9a0e3e66b35..c3beaa4553795cf7d9285b3b0f68c5d3c88abf7e 100644 (file)
@@ -730,7 +730,7 @@ verify_cli_header (VerifyContext *ctx)
        if (!read32 (ptr + 8) || !read32 (ptr + 12))
                ADD_ERROR (ctx, g_strdup_printf ("Missing medatata section in the CLI header"));
 
-       if ((read32 (ptr + 16) & ~0x0001000B) != 0)
+       if ((read32 (ptr + 16) & ~0x0003000B) != 0)
                ADD_ERROR (ctx, g_strdup_printf ("Invalid CLI header flags"));
 
        ptr += 24;
@@ -4228,8 +4228,6 @@ mono_verifier_is_sig_compatible (MonoImage *image, MonoMethod *method, MonoMetho
                        return FALSE;
                if (original_sig->explicit_this != signature->explicit_this)
                        return FALSE;
-               if (original_sig->call_convention != signature->call_convention)
-                       return FALSE;
                if (original_sig->pinvoke != signature->pinvoke)
                        return FALSE;
                if (original_sig->sentinelpos != signature->sentinelpos)
index ab0911bc677f89e1459c8f7476aff317c5e4eccf..2df6db21ec67febd81d791c9663007b2d3660c01 100644 (file)
@@ -6069,6 +6069,21 @@ mono_guid_to_string (const guint8 *guid)
                                guid[10], guid[11], guid[12], guid[13], guid[14], guid[15]);
 }
 
+/**
+ * mono_guid_to_string_minimal:
+ *
+ * Converts a 16 byte Microsoft GUID to lower case no '-' representation..
+ */
+char *
+mono_guid_to_string_minimal (const guint8 *guid)
+{
+       return g_strdup_printf ("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+                               guid[3], guid[2], guid[1], guid[0],
+                               guid[5], guid[4],
+                               guid[7], guid[6],
+                               guid[8], guid[9],
+                               guid[10], guid[11], guid[12], guid[13], guid[14], guid[15]);
+}
 static gboolean
 get_constraints (MonoImage *image, int owner, MonoClass ***constraints, MonoGenericContainer *container, MonoError *error)
 {
index 542f9e108e4c9d4eea8ff0a5fa5ccb556a48a2ca..6a5172d8810d4b3c4e6d0400952e663f01381184 100644 (file)
@@ -301,7 +301,10 @@ typedef struct {
 
 struct _MonoArrayType {
        MonoClass *eklass;
+       // Number of dimensions of the array
        uint8_t rank;
+
+       // Arrays recording known upper and lower index bounds for each dimension
        uint8_t numsizes;
        uint8_t numlobounds;
        int *sizes;
@@ -480,6 +483,8 @@ MONO_API uint32_t mono_metadata_token_from_dor (uint32_t dor_index);
 
 MONO_API char *mono_guid_to_string (const uint8_t *guid);
 
+MONO_API char *mono_guid_to_string_minimal (const uint8_t *guid);
+
 MONO_API uint32_t mono_metadata_declsec_from_index (MonoImage *meta, uint32_t idx);
 
 MONO_API uint32_t mono_metadata_translate_token_index (MonoImage *image, int table, uint32_t idx);
index b9a305121641975286467b84392ceba8856a4111..3dfd3c4e08f720871d564e55926e9009fa568e7a 100644 (file)
@@ -951,11 +951,6 @@ mono_monitor_try_enter_internal (MonoObject *obj, guint32 ms, gboolean allow_int
 
        LOCK_DEBUG (g_message("%s: (%d) Trying to lock object %p (%d ms)", __func__, id, obj, ms));
 
-       if (G_UNLIKELY (!obj)) {
-               mono_set_pending_exception (mono_get_exception_argument_null ("obj"));
-               return FALSE;
-       }
-
        lw.sync = obj->synchronisation;
 
        if (G_LIKELY (lock_word_is_free (lw))) {
@@ -1001,18 +996,31 @@ mono_monitor_try_enter_internal (MonoObject *obj, guint32 ms, gboolean allow_int
 gboolean 
 mono_monitor_enter (MonoObject *obj)
 {
+       if (G_UNLIKELY (!obj)) {
+               mono_set_pending_exception (mono_get_exception_argument_null ("obj"));
+               return FALSE;
+       }
        return mono_monitor_try_enter_internal (obj, INFINITE, FALSE) == 1;
 }
 
 gboolean 
 mono_monitor_enter_fast (MonoObject *obj)
 {
+       if (G_UNLIKELY (!obj)) {
+               /* don't set pending exn on the fast path, just return
+                * FALSE and let the slow path take care of it. */
+               return FALSE;
+       }
        return mono_monitor_try_enter_internal (obj, 0, FALSE) == 1;
 }
 
 gboolean
 mono_monitor_try_enter (MonoObject *obj, guint32 ms)
 {
+       if (G_UNLIKELY (!obj)) {
+               mono_set_pending_exception (mono_get_exception_argument_null ("obj"));
+               return FALSE;
+       }
        return mono_monitor_try_enter_internal (obj, ms, FALSE) == 1;
 }
 
@@ -1075,6 +1083,10 @@ void
 ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObject *obj, guint32 ms, char *lockTaken)
 {
        gint32 res;
+       if (G_UNLIKELY (!obj)) {
+               mono_set_pending_exception (mono_get_exception_argument_null ("obj"));
+               return;
+       }
        do {
                res = mono_monitor_try_enter_internal (obj, ms, TRUE);
                /*This means we got interrupted during the wait and didn't got the monitor.*/
index 80261f2b62e9a3d74741b48af5aff8fb135903b9..42f36d36854a771c3b1a7c1915cbfe1cf81038dd 100644 (file)
@@ -702,7 +702,7 @@ publisher_policy_start (gpointer user_data,
                memset (&info->old_version_bottom, 0, sizeof (info->old_version_bottom));
                memset (&info->old_version_top, 0, sizeof (info->old_version_top));
                memset (&info->new_version, 0, sizeof (info->new_version));
-       } if (!strcmp (element_name, "assemblyIdentity")) {
+       } else if (!strcmp (element_name, "assemblyIdentity")) {
                for (n = 0; attribute_names [n]; n++) {
                        const gchar *attribute_name = attribute_names [n];
                        
index ee0f6ab546ab55a4c933df452df3add21e567ed2..a6e5ab526995458a00bcb978b4ec7f08543b4431 100644 (file)
@@ -391,6 +391,7 @@ struct _MonoThread {
        struct _MonoInternalThread *internal_thread;
        MonoObject *start_obj;
        MonoException *pending_exception;
+       gint32 priority;
 };
 
 typedef struct {
@@ -1455,9 +1456,6 @@ mono_upgrade_remote_class (MonoDomain *domain, MonoObject *tproxy, MonoClass *kl
 void*
 mono_load_remote_field_checked (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, void **res, MonoError *error);
 
-MonoObject *
-mono_load_remote_field_new_icall (MonoObject *this_obj, MonoClass *klass, MonoClassField *field);
-
 MonoObject *
 mono_load_remote_field_new_checked (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, MonoError *error);
 
@@ -1746,13 +1744,13 @@ mono_runtime_run_main_checked (MonoMethod *method, int argc, char* argv[],
 
 int
 mono_runtime_try_run_main (MonoMethod *method, int argc, char* argv[],
-                          MonoObject **exc, MonoError *error);
+                          MonoObject **exc);
 
 int
 mono_runtime_exec_main_checked (MonoMethod *method, MonoArray *args, MonoError *error);
 
 int
-mono_runtime_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc, MonoError *error);
+mono_runtime_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc);
 
 
 #endif /* __MONO_OBJECT_INTERNALS_H__ */
index 7e4c9dc4e062b84777f32afaf1ab51e5ddd3ea04..5abeed72821c95d91b536b504d0dab39dad94c8f 100644 (file)
@@ -4289,11 +4289,7 @@ mono_runtime_run_main (MonoMethod *method, int argc, char* argv[],
        MonoArray *args = prepare_run_main (method, argc, argv);
        int res;
        if (exc) {
-               res = mono_runtime_try_exec_main (method, args, exc, &error);
-               if (*exc == NULL && !is_ok (&error))
-                       *exc = (MonoObject*) mono_error_convert_to_exception (&error);
-               else
-                       mono_error_cleanup (&error);
+               res = mono_runtime_try_exec_main (method, args, exc);
        } else {
                res = mono_runtime_exec_main_checked (method, args, &error);
                mono_error_raise_exception (&error); /* OK to throw, external only without a better alternative */
@@ -4340,12 +4336,11 @@ mono_runtime_run_main_checked (MonoMethod *method, int argc, char* argv[],
  */
 int
 mono_runtime_try_run_main (MonoMethod *method, int argc, char* argv[],
-                          MonoObject **exc, MonoError *error)
+                          MonoObject **exc)
 {
        g_assert (exc);
-       mono_error_init (error);
        MonoArray *args = prepare_run_main (method, argc, argv);
-       return mono_runtime_try_exec_main (method, args, exc, error);
+       return mono_runtime_try_exec_main (method, args, exc);
 }
 
 
@@ -4780,27 +4775,20 @@ do_exec_main_checked (MonoMethod *method, MonoArray *args, MonoError *error)
                if (is_ok (error))
                        rval = 0;
                else {
-                       /* If the return type of Main is void, only
-                        * set the exitcode if an exception was thrown
-                        * (we don't want to blow away an
-                        * explicitly-set exit code)
-                        */
                        rval = -1;
-                       mono_environment_exitcode_set (rval);
                }
        }
        return rval;
 }
 
 static int
-do_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc, MonoError *error)
+do_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc)
 {
        MONO_REQ_GC_UNSAFE_MODE;
 
        gpointer pa [1];
        int rval;
 
-       mono_error_init (error);
        g_assert (args);
        g_assert (exc);
 
@@ -4808,12 +4796,13 @@ do_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc, MonoErr
 
        /* FIXME: check signature of method */
        if (mono_method_signature (method)->ret->type == MONO_TYPE_I4) {
+               MonoError inner_error;
                MonoObject *res;
-               res = mono_runtime_try_invoke (method, NULL, pa, exc, error);
-               if (*exc == NULL && !mono_error_ok (error))
-                       *exc = (MonoObject*) mono_error_convert_to_exception (error);
+               res = mono_runtime_try_invoke (method, NULL, pa, exc, &inner_error);
+               if (*exc == NULL && !mono_error_ok (&inner_error))
+                       *exc = (MonoObject*) mono_error_convert_to_exception (&inner_error);
                else
-                       mono_error_cleanup (error);
+                       mono_error_cleanup (&inner_error);
 
                if (*exc == NULL)
                        rval = *(guint32 *)((char *)res + sizeof (MonoObject));
@@ -4822,11 +4811,12 @@ do_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc, MonoErr
 
                mono_environment_exitcode_set (rval);
        } else {
-               mono_runtime_try_invoke (method, NULL, pa, exc, error);
-               if (*exc == NULL && !mono_error_ok (error))
-                       *exc = (MonoObject*) mono_error_convert_to_exception (error);
+               MonoError inner_error;
+               mono_runtime_try_invoke (method, NULL, pa, exc, &inner_error);
+               if (*exc == NULL && !mono_error_ok (&inner_error))
+                       *exc = (MonoObject*) mono_error_convert_to_exception (&inner_error);
                else
-                       mono_error_cleanup (error);
+                       mono_error_cleanup (&inner_error);
 
                if (*exc == NULL)
                        rval = 0;
@@ -4854,11 +4844,7 @@ mono_runtime_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc)
        MonoError error;
        prepare_thread_to_exec_main (mono_object_domain (args), method);
        if (exc) {
-               int rval = do_try_exec_main (method, args, exc, &error);
-               if (*exc == NULL && !is_ok (&error))
-                       *exc = (MonoObject*) mono_error_convert_to_exception (&error);
-               else
-                       mono_error_cleanup (&error);
+               int rval = do_try_exec_main (method, args, exc);
                return rval;
        } else {
                int rval = do_exec_main_checked (method, args, &error);
@@ -4888,11 +4874,10 @@ mono_runtime_exec_main_checked (MonoMethod *method, MonoArray *args, MonoError *
  * On failure sets @error if Main couldn't be executed, or @exc if it threw an exception.
  */
 int
-mono_runtime_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc, MonoError *error)
+mono_runtime_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc)
 {
-       mono_error_init (error);
        prepare_thread_to_exec_main (mono_object_domain (args), method);
-       return do_try_exec_main (method, args, exc, error);
+       return do_try_exec_main (method, args, exc);
 }
 
 
@@ -7580,88 +7565,24 @@ mono_message_init (MonoDomain *domain,
 {
        MONO_REQ_GC_UNSAFE_MODE;
 
-       static MonoClass *object_array_klass;
-       static MonoClass *byte_array_klass;
-       static MonoClass *string_array_klass;
-       mono_error_init (error);
-       MonoMethodSignature *sig = mono_method_signature (method->method);
-       MonoString *name;
-       MonoArray *arr;
-       int i, j;
-       char **names;
-       guint8 arg_type;
-
-       if (!object_array_klass) {
-               MonoClass *klass;
-
-               klass = mono_array_class_get (mono_defaults.byte_class, 1);
-               g_assert (klass);
-               byte_array_klass = klass;
-
-               klass = mono_array_class_get (mono_defaults.string_class, 1);
-               g_assert (klass);
-               string_array_klass = klass;
-
-               klass = mono_array_class_get (mono_defaults.object_class, 1);
-               g_assert (klass);
+       static MonoMethod *init_message_method = NULL;
 
-               mono_atomic_store_release (&object_array_klass, klass);
+       if (!init_message_method) {
+               init_message_method = mono_class_get_method_from_name (mono_defaults.mono_method_message_class, "InitMessage", 2);
+               g_assert (init_message_method != NULL);
        }
 
-       MONO_OBJECT_SETREF (this_obj, method, method);
-
-       arr = mono_array_new_specific_checked (mono_class_vtable (domain, object_array_klass), sig->param_count, error);
-       return_val_if_nok (error, FALSE);
-
-       MONO_OBJECT_SETREF (this_obj, args, arr);
-
-       arr = mono_array_new_specific_checked (mono_class_vtable (domain, byte_array_klass), sig->param_count, error);
-       return_val_if_nok (error, FALSE);
-
-       MONO_OBJECT_SETREF (this_obj, arg_types, arr);
-
-       this_obj->async_result = NULL;
-       this_obj->call_type = CallType_Sync;
-
-       names = g_new (char *, sig->param_count);
-       mono_method_get_param_names (method->method, (const char **) names);
-
-       arr = mono_array_new_specific_checked (mono_class_vtable (domain, string_array_klass), sig->param_count, error);
-       if (!is_ok (error))
-               goto fail;
-
-       MONO_OBJECT_SETREF (this_obj, names, arr);
+       mono_error_init (error);
+       /* FIXME set domain instead? */
+       g_assert (domain == mono_domain_get ());
        
-       for (i = 0; i < sig->param_count; i++) {
-               name = mono_string_new_checked (domain, names [i], error);
-               if (!is_ok (error))
-                       goto fail;
-               mono_array_setref (this_obj->names, i, name);   
-       }
+       gpointer args[2];
 
-       g_free (names);
-       for (i = 0, j = 0; i < sig->param_count; i++) {
-               if (sig->params [i]->byref) {
-                       if (out_args) {
-                               MonoObject* arg = (MonoObject *)mono_array_get (out_args, gpointer, j);
-                               mono_array_setref (this_obj->args, i, arg);
-                               j++;
-                       }
-                       arg_type = 2;
-                       if (!(sig->params [i]->attrs & PARAM_ATTRIBUTE_OUT))
-                               arg_type |= 1;
-               } else {
-                       arg_type = 1;
-                       if (sig->params [i]->attrs & PARAM_ATTRIBUTE_OUT)
-                               arg_type |= 4;
-               }
-               mono_array_set (this_obj->arg_types, guint8, i, arg_type);
-       }
+       args[0] = method;
+       args[1] = out_args;
 
-       return TRUE;
-fail:
-       g_free (names);
-       return FALSE;
+       mono_runtime_invoke_checked (init_message_method, this_obj, args, error);
+       return is_ok (error);
 }
 
 #ifndef DISABLE_REMOTING
@@ -8287,28 +8208,6 @@ mono_load_remote_field_new (MonoObject *this_obj, MonoClass *klass, MonoClassFie
        return result;
 }
 
-/**
- * mono_load_remote_field_new_icall:
- * @this: pointer to an object
- * @klass: klass of the object containing @field
- * @field: the field to load
- *
- * This method is called by the runtime on attempts to load fields of
- * transparent proxy objects. @this points to such TP, @klass is the class of
- * the object containing @field.
- * 
- * Returns: a freshly allocated object containing the value of the
- * field.  On failure returns NULL and throws an exception.
- */
-MonoObject *
-mono_load_remote_field_new_icall (MonoObject *this_obj, MonoClass *klass, MonoClassField *field)
-{
-       MonoError error;
-       MonoObject *result = mono_load_remote_field_new_checked (this_obj, klass, field, &error);
-       mono_error_set_pending_exception (&error);
-       return result;
-}
-
 /**
  * mono_load_remote_field_new_checked:
  * @this: pointer to an object
@@ -8329,69 +8228,25 @@ mono_load_remote_field_new_checked (MonoObject *this_obj, MonoClass *klass, Mono
 
        mono_error_init (error);
 
-       static MonoMethod *getter = NULL;
-       MonoDomain *domain = mono_domain_get ();
-       MonoTransparentProxy *tp = (MonoTransparentProxy *) this_obj;
-       MonoClass *field_class;
-       MonoMethodMessage *msg;
-       MonoArray *out_args;
-       MonoObject *exc, *res;
-       char* full_name;
+       static MonoMethod *tp_load = NULL;
 
        g_assert (mono_object_is_transparent_proxy (this_obj));
 
-       field_class = mono_class_from_mono_type (field->type);
-
-       if (mono_class_is_contextbound (tp->remote_class->proxy_class) && tp->rp->context == (MonoObject *) mono_context_get ()) {
-               gpointer val;
-               if (field_class->valuetype) {
-                       res = mono_object_new_checked (domain, field_class, error);
-                       return_val_if_nok (error, NULL);
-                       val = ((gchar *) res) + sizeof (MonoObject);
-               } else {
-                       val = &res;
-               }
-               mono_field_get_value (tp->rp->unwrapped_server, field, val);
-               return res;
-       }
-
-       if (!getter) {
-               getter = mono_class_get_method_from_name (mono_defaults.object_class, "FieldGetter", -1);
-               if (!getter) {
+       if (!tp_load) {
+               tp_load = mono_class_get_method_from_name (mono_defaults.transparent_proxy_class, "LoadRemoteFieldNew", -1);
+               if (!tp_load) {
                        mono_error_set_not_supported (error, "Linked away.");
                        return NULL;
                }
        }
        
-       msg = (MonoMethodMessage *)mono_object_new_checked (domain, mono_defaults.mono_method_message_class, error);
-       return_val_if_nok (error, NULL);
-       out_args = mono_array_new_checked (domain, mono_defaults.object_class, 1, error);
-       return_val_if_nok (error, NULL);
+       /* MonoType *type = mono_class_get_type (klass); */
 
-       MonoReflectionMethod *rm = mono_method_get_object_checked (domain, getter, NULL, error);
-       return_val_if_nok (error, NULL);
-       mono_message_init (domain, msg, rm, out_args, error);
-       return_val_if_nok (error, NULL);
+       gpointer args[2];
+       args [0] = &klass;
+       args [1] = &field;
 
-       full_name = mono_type_get_full_name (klass);
-       mono_array_setref (msg->args, 0, mono_string_new (domain, full_name));
-       mono_array_setref (msg->args, 1, mono_string_new (domain, mono_field_get_name (field)));
-       g_free (full_name);
-
-       mono_remoting_invoke ((MonoObject *)(tp->rp), msg, &exc, &out_args, error);
-       return_val_if_nok (error, NULL);
-
-       if (exc) {
-               mono_error_set_exception_instance (error, (MonoException *)exc);
-               return NULL;
-       }
-
-       if (mono_array_length (out_args) == 0)
-               res = NULL;
-       else
-               res = mono_array_get (out_args, MonoObject *, 0);
-
-       return res;
+       return mono_runtime_invoke_checked (tp_load, this_obj, args, error);
 }
 
 /**
index 71b4cb495861d7f923827b6c07c23737b799a879..d70d6f07bef754c0ad0f0b9f42dbb000b6e278a3 100644 (file)
@@ -62,7 +62,7 @@ typedef struct {
        unsigned short opval;
 } MonoOpcode;
 
-extern const MonoOpcode mono_opcodes [];
+MONO_API extern const MonoOpcode mono_opcodes [];
 
 MONO_API const char*
 mono_opcode_name (int opcode);
diff --git a/mono/metadata/pedump.c b/mono/metadata/pedump.c
deleted file mode 100644 (file)
index eac9bfb..0000000
+++ /dev/null
@@ -1,750 +0,0 @@
-/*
- * pedump.c: Dumps the contents of an extended PE/COFF file
- *
- * Author:
- *   Miguel de Icaza (miguel@ximian.com)
- *
- * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
- * Copyright 2004-2009 Novell, Inc (http://www.novell.com)
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-#include <config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "image.h"
-#include <glib.h>
-#include "cil-coff.h"
-#include "mono-endian.h"
-#include "verify.h"
-#include <mono/metadata/class.h>
-#include <mono/metadata/debug-helpers.h>
-#include <mono/metadata/tokentype.h>
-#include <mono/metadata/appdomain.h>
-#include <mono/metadata/assembly.h>
-#include <mono/metadata/metadata-internals.h>
-#include <mono/metadata/class-internals.h>
-#include <mono/metadata/verify-internals.h>
-#include <mono/metadata/marshal.h>
-#include "mono/utils/mono-digest.h"
-#include <mono/utils/mono-mmap.h>
-#include <mono/utils/mono-counters.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-gboolean dump_data = TRUE;
-gboolean verify_pe = FALSE;
-gboolean verify_metadata = FALSE;
-gboolean verify_code = FALSE;
-gboolean verify_partial_md = FALSE;
-
-static MonoAssembly *pedump_preload (MonoAssemblyName *aname, gchar **assemblies_path, gpointer user_data);
-static void pedump_assembly_load_hook (MonoAssembly *assembly, gpointer user_data);
-static MonoAssembly *pedump_assembly_search_hook (MonoAssemblyName *aname, gpointer user_data);
-
-/* unused
-static void
-hex_dump (const char *buffer, int base, int count)
-{
-       int i;
-       
-       for (i = 0; i < count; i++){
-               if ((i % 16) == 0)
-                       printf ("\n0x%08x: ", (unsigned char) base + i);
-
-               printf ("%02x ", (unsigned char) (buffer [i]));
-       }
-}
-*/
-
-static void
-hex8 (const char *label, unsigned char x)
-{
-       printf ("\t%s: 0x%02x\n", label, (unsigned char) x);
-}
-
-static void
-hex16 (const char *label, guint16 x)
-{
-       printf ("\t%s: 0x%04x\n", label, x);
-}
-
-static void
-hex32 (const char *label, guint32 x)
-{
-       printf ("\t%s: 0x%08x\n", label, x);
-}
-
-static void
-dump_coff_header (MonoCOFFHeader *coff)
-{
-       printf ("\nCOFF Header:\n");
-       hex16 ("                Machine", coff->coff_machine);
-       hex16 ("               Sections", coff->coff_sections);
-       hex32 ("             Time stamp", coff->coff_time);
-       hex32 ("Pointer to Symbol Table", coff->coff_symptr);
-       hex32 ("           Symbol Count", coff->coff_symcount);
-       hex16 ("   Optional Header Size", coff->coff_opt_header_size);
-       hex16 ("        Characteristics", coff->coff_attributes);
-
-}
-
-static void
-dump_pe_header (MonoPEHeader *pe)
-{
-       printf ("\nPE Header:\n");
-       hex16 ("         Magic (0x010b)", pe->pe_magic);
-       hex8  ("             LMajor (6)", pe->pe_major);
-       hex8  ("             LMinor (0)", pe->pe_minor);
-       hex32 ("              Code Size", pe->pe_code_size);
-       hex32 ("  Initialized Data Size", pe->pe_data_size);
-       hex32 ("Uninitialized Data Size", pe->pe_uninit_data_size);
-       hex32 ("        Entry Point RVA", pe->pe_rva_entry_point);
-       hex32 ("          Code Base RVA", pe->pe_rva_code_base);
-       hex32 ("          Data Base RVA", pe->pe_rva_data_base);
-       printf ("\n");
-}
-
-static void
-dump_nt_header (MonoPEHeaderNT *nt)
-{
-       printf ("\nNT Header:\n");
-
-       hex32 ("   Image Base (0x400000)", nt->pe_image_base);
-       hex32 ("Section Alignment (8192)", nt->pe_section_align);
-       hex32 ("   File Align (512/4096)", nt->pe_file_alignment);
-       hex16 ("            OS Major (4)", nt->pe_os_major);
-       hex16 ("            OS Minor (0)", nt->pe_os_minor);
-       hex16 ("          User Major (0)", nt->pe_user_major);
-       hex16 ("          User Minor (0)", nt->pe_user_minor);
-       hex16 ("        Subsys major (4)", nt->pe_subsys_major);
-       hex16 ("        Subsys minor (0)", nt->pe_subsys_minor);
-       hex32 ("               Reserverd", nt->pe_reserved_1);
-       hex32 ("              Image Size", nt->pe_image_size);
-       hex32 ("             Header Size", nt->pe_header_size);
-       hex32 ("            Checksum (0)", nt->pe_checksum);
-       hex16 ("               Subsystem", nt->pe_subsys_required);
-       hex16 ("           DLL Flags (0)", nt->pe_dll_flags);
-       hex32 (" Stack Reserve Size (1M)", nt->pe_stack_reserve);
-       hex32 ("Stack commit Size (4096)", nt->pe_stack_commit);
-       hex32 ("  Heap Reserve Size (1M)", nt->pe_heap_reserve);
-       hex32 (" Heap Commit Size (4096)", nt->pe_heap_commit);
-       hex32 ("      Loader flags (0x1)", nt->pe_loader_flags);
-       hex32 ("   Data Directories (16)", nt->pe_data_dir_count);
-}
-
-static void
-dent (const char *label, MonoPEDirEntry de)
-{
-       printf ("\t%s: 0x%08x [0x%08x]\n", label, de.rva, de.size);
-}
-
-static void
-dump_blob (const char *desc, const char* p, guint32 size)
-{
-       int i;
-
-       printf ("%s", desc);
-       if (!p) {
-               printf (" none\n");
-               return;
-       }
-
-       for (i = 0; i < size; ++i) {
-               if (!(i % 16))
-                       printf ("\n\t");
-               printf (" %02X", p [i] & 0xFF);
-       }
-       printf ("\n");
-}
-
-static void
-dump_public_key (MonoImage *m)
-{
-       guint32 size;
-       const char *p;
-
-       p = mono_image_get_public_key (m, &size);
-       dump_blob ("\nPublic key:", p, size);
-}
-
-static void
-dump_strong_name (MonoImage *m)
-{
-       guint32 size;
-       const char *p;
-
-       p = mono_image_get_strong_name (m, &size);
-       dump_blob ("\nStrong name:", p, size);
-}
-
-static void
-dump_datadir (MonoPEDatadir *dd)
-{
-       printf ("\nData directories:\n");
-       dent ("     Export Table", dd->pe_export_table);
-       dent ("     Import Table", dd->pe_import_table);
-       dent ("   Resource Table", dd->pe_resource_table);
-       dent ("  Exception Table", dd->pe_exception_table);
-       dent ("Certificate Table", dd->pe_certificate_table);
-       dent ("      Reloc Table", dd->pe_reloc_table);
-       dent ("            Debug", dd->pe_debug);
-       dent ("        Copyright", dd->pe_copyright);
-       dent ("       Global Ptr", dd->pe_global_ptr);
-       dent ("        TLS Table", dd->pe_tls_table);
-       dent ("Load Config Table", dd->pe_load_config_table);
-       dent ("     Bound Import", dd->pe_bound_import);
-       dent ("              IAT", dd->pe_iat);
-       dent ("Delay Import Desc", dd->pe_delay_import_desc);
-       dent ("       CLI Header", dd->pe_cli_header);
-}
-
-static void
-dump_dotnet_header (MonoDotNetHeader *header)
-{
-       dump_coff_header (&header->coff);
-       dump_pe_header (&header->pe);
-       dump_nt_header (&header->nt);
-       dump_datadir (&header->datadir);
-}
-
-static void
-dump_section_table (MonoSectionTable *st)
-{
-       guint32 flags = st->st_flags;
-               
-       printf ("\n\tName: %s\n", st->st_name);
-       hex32 ("   Virtual Size", st->st_virtual_size);
-       hex32 ("Virtual Address", st->st_virtual_address);
-       hex32 ("  Raw Data Size", st->st_raw_data_size);
-       hex32 ("   Raw Data Ptr", st->st_raw_data_ptr);
-       hex32 ("      Reloc Ptr", st->st_reloc_ptr);
-       hex32 ("     LineNo Ptr", st->st_lineno_ptr);
-       hex16 ("    Reloc Count", st->st_reloc_count);
-       hex16 ("     Line Count", st->st_line_count);
-
-       printf ("\tFlags: %s%s%s%s%s%s%s%s%s%s\n",
-               (flags & SECT_FLAGS_HAS_CODE) ? "code, " : "",
-               (flags & SECT_FLAGS_HAS_INITIALIZED_DATA) ? "data, " : "",
-               (flags & SECT_FLAGS_HAS_UNINITIALIZED_DATA) ? "bss, " : "",
-               (flags & SECT_FLAGS_MEM_DISCARDABLE) ? "discard, " : "",
-               (flags & SECT_FLAGS_MEM_NOT_CACHED) ? "nocache, " : "",
-               (flags & SECT_FLAGS_MEM_NOT_PAGED) ? "nopage, " : "",
-               (flags & SECT_FLAGS_MEM_SHARED) ? "shared, " : "",
-               (flags & SECT_FLAGS_MEM_EXECUTE) ? "exec, " : "",
-               (flags & SECT_FLAGS_MEM_READ) ? "read, " : "",
-               (flags & SECT_FLAGS_MEM_WRITE) ? "write" : "");
-}
-
-static void
-dump_sections (MonoCLIImageInfo *iinfo)
-{
-       const int top = iinfo->cli_header.coff.coff_sections;
-       int i;
-       
-       for (i = 0; i < top; i++)
-               dump_section_table (&iinfo->cli_section_tables [i]);
-}
-
-static void
-dump_cli_header (MonoCLIHeader *ch)
-{
-       printf ("\n");
-       printf ("          CLI header size: %d\n", ch->ch_size);
-       printf ("         Runtime required: %d.%d\n", ch->ch_runtime_major, ch->ch_runtime_minor);
-       printf ("                    Flags: %s, %s, %s, %s\n",
-               (ch->ch_flags & CLI_FLAGS_ILONLY ? "ilonly" : "contains native"),
-               (ch->ch_flags & CLI_FLAGS_32BITREQUIRED ? "32bits" : "32/64"),
-               (ch->ch_flags & CLI_FLAGS_TRACKDEBUGDATA ? "trackdebug" : "no-trackdebug"),
-               (ch->ch_flags & CLI_FLAGS_STRONGNAMESIGNED ? "strongnamesigned" : "notsigned"));
-       dent   ("         Metadata", ch->ch_metadata);
-       hex32  ("Entry Point Token", ch->ch_entry_point);
-       dent   ("     Resources at", ch->ch_resources);
-       dent   ("   Strong Name at", ch->ch_strong_name);
-       dent   ("  Code Manager at", ch->ch_code_manager_table);
-       dent   ("  VTableFixups at", ch->ch_vtable_fixups);
-       dent   ("     EAT jumps at", ch->ch_export_address_table_jumps);
-}      
-
-static void
-dsh (const char *label, MonoImage *meta, MonoStreamHeader *sh)
-{
-       printf ("%s: 0x%08x - 0x%08x [%d == 0x%08x]\n",
-               label,
-               (int)(sh->data - meta->raw_metadata), (int)(sh->data + sh->size - meta->raw_metadata),
-               sh->size, sh->size);
-}
-
-static void
-dump_metadata_header (MonoImage *meta)
-{
-       printf ("\nMetadata header:\n");
-       printf ("           Version: %d.%d\n", meta->md_version_major, meta->md_version_minor);
-       printf ("    Version string: %s\n", meta->version);
-}
-
-static void
-dump_metadata_ptrs (MonoImage *meta)
-{
-       printf ("\nMetadata pointers:\n");
-       dsh ("\tTables (#~)", meta, &meta->heap_tables);
-       dsh ("\t    Strings", meta, &meta->heap_strings);
-       dsh ("\t       Blob", meta, &meta->heap_blob);
-       dsh ("\tUser string", meta, &meta->heap_us);
-       dsh ("\t       GUID", meta, &meta->heap_guid);
-}
-
-static void
-dump_metadata (MonoImage *meta)
-{
-       int table;
-
-       dump_metadata_header (meta);
-
-       dump_metadata_ptrs (meta);
-
-       printf ("Rows:\n");
-       for (table = 0; table < MONO_TABLE_NUM; table++){
-               if (meta->tables [table].rows == 0)
-                       continue;
-               printf ("Table %s: %d records (%d bytes, at %x)\n",
-                       mono_meta_table_name (table),
-                       meta->tables [table].rows,
-                       meta->tables [table].row_size,
-                       (unsigned int)(meta->tables [table].base - meta->raw_data)
-                       );
-       }
-}
-
-static void
-dump_methoddef (MonoImage *metadata, guint32 token)
-{
-       const char *loc;
-
-       if (!token)
-               return;
-       loc = mono_metadata_locate_token (metadata, token);
-
-       printf ("RVA for Entry Point: 0x%08x\n", read32 (loc));
-}
-
-static void
-dump_dotnet_iinfo (MonoImage *image)
-{
-       MonoCLIImageInfo *iinfo = (MonoCLIImageInfo *)image->image_info;
-
-       dump_dotnet_header (&iinfo->cli_header);
-       dump_sections (iinfo);
-       dump_cli_header (&iinfo->cli_cli_header);
-       dump_strong_name (image);
-       dump_public_key (image);
-       dump_metadata (image);
-
-       dump_methoddef (image, iinfo->cli_cli_header.ch_entry_point);
-}
-
-static int
-dump_verify_info (MonoImage *image, int flags)
-{
-       GSList *errors, *tmp;
-       int count = 0, verifiable = 0;
-       const char* desc [] = {
-               "Ok", "Error", "Warning", NULL, "CLS", NULL, NULL, NULL, "Not Verifiable"
-       };
-
-       if (verify_code) { /* verify code */
-               int i;
-               MonoTableInfo *m = &image->tables [MONO_TABLE_METHOD];
-
-               for (i = 0; i < m->rows; ++i) {
-                       MonoMethod *method;
-                       MonoError error;
-
-                       method = mono_get_method_checked (image, MONO_TOKEN_METHOD_DEF | (i+1), NULL, NULL, &error);
-                       if (!method) {
-                               g_print ("Warning: Cannot lookup method with token 0x%08x due to %s\n", i + 1, mono_error_get_message (&error));
-                               mono_error_cleanup (&error);
-                               continue;
-                       }
-                       errors = mono_method_verify (method, flags);
-                       if (errors) {
-                               MonoClass *klass = mono_method_get_class (method);
-                               char *name = mono_type_full_name (&klass->byval_arg);
-                               if (mono_method_signature (method) == NULL) {
-                                       g_print ("In method: %s::%s(ERROR)\n", name, mono_method_get_name (method));
-                               } else {
-                                       char *sig;
-                                       sig = mono_signature_get_desc (mono_method_signature (method), FALSE);  
-                                       g_print ("In method: %s::%s(%s)\n", name, mono_method_get_name (method), sig);
-                                       g_free (sig);
-                               }
-                               g_free (name);
-                       }
-
-                       for (tmp = errors; tmp; tmp = tmp->next) {
-                               MonoVerifyInfo *info = (MonoVerifyInfo *)tmp->data;
-                               g_print ("%s: %s\n", desc [info->status], info->message);
-                               if (info->status == MONO_VERIFY_ERROR) {
-                                       count++;
-                                       verifiable = 3;
-                               }
-                               if(info->status == MONO_VERIFY_NOT_VERIFIABLE) {
-                                       if (verifiable < 2)
-                                               verifiable = 2; 
-                               }
-                       }
-                       mono_free_verify_list (errors);
-               }
-       }
-
-       if (count)
-               g_print ("Error count: %d\n", count);
-       return verifiable;
-}
-
-static void
-usage (void)
-{
-       printf ("Usage is: pedump [--verify error,warn,cls,all,code,fail-on-verifiable,non-strict,valid-only,metadata] file.exe\n");
-       exit (1);
-}
-
-static int
-verify_image_file (const char *fname)
-{
-       GSList *errors = NULL, *tmp;
-       MonoImage *image;
-       MonoTableInfo *table;
-       MonoAssembly *assembly;
-       MonoImageOpenStatus status;
-       int i, count = 0;
-       const char* desc [] = {
-               "Ok", "Error", "Warning", NULL, "CLS", NULL, NULL, NULL, "Not Verifiable"
-       };
-
-       image = mono_image_open_raw (fname, &status);
-       if (!image) {
-               printf ("Could not open %s\n", fname);
-               return 1;
-       }
-
-       if (!mono_verifier_verify_pe_data (image, &errors))
-               goto invalid_image;
-
-       if (!mono_image_load_pe_data (image)) {
-               printf ("Could not load pe data for assembly %s\n", fname);
-               return 1;
-       }
-
-       if (!mono_verifier_verify_cli_data (image, &errors))
-               goto invalid_image;
-
-       if (!mono_image_load_cli_data (image)) {
-               printf ("Could not load cli data for assembly %s\n", fname);
-               return 1;
-       }
-
-       if (!mono_verifier_verify_table_data (image, &errors))
-               goto invalid_image;
-
-       mono_image_load_names (image);
-
-       /*fake an assembly for class loading to work*/
-       assembly = g_new0 (MonoAssembly, 1);
-       assembly->in_gac = FALSE;
-       assembly->image = image;
-       image->assembly = assembly;
-       mono_assembly_fill_assembly_name (image, &assembly->aname);
-
-       /*Finish initializing the runtime*/
-       mono_install_assembly_load_hook (pedump_assembly_load_hook, NULL);
-       mono_install_assembly_search_hook (pedump_assembly_search_hook, NULL);
-
-       mono_init_version ("pedump", image->version);
-
-       mono_install_assembly_preload_hook (pedump_preload, GUINT_TO_POINTER (FALSE));
-
-       mono_icall_init ();
-       mono_marshal_init ();
-
-
-       if (!verify_partial_md && !mono_verifier_verify_full_table_data (image, &errors))
-               goto invalid_image;
-
-
-       table = &image->tables [MONO_TABLE_TYPEDEF];
-       for (i = 1; i <= table->rows; ++i) {
-               MonoError error;
-               guint32 token = i | MONO_TOKEN_TYPE_DEF;
-               MonoClass *klass = mono_class_get_checked (image, token, &error);
-               if (!klass) {
-                       printf ("Could not load class with token %x due to %s\n", token, mono_error_get_message (&error));
-                       mono_error_cleanup (&error);
-                       continue;
-               }
-               mono_class_init (klass);
-               if (mono_class_has_failure (klass)) {
-                       printf ("Error verifying class(0x%08x) %s.%s a type load error happened\n", token, klass->name_space, klass->name);
-                       ++count;
-               }
-
-               mono_class_setup_vtable (klass);
-               if (mono_class_has_failure (klass)) {
-                       printf ("Error verifying class(0x%08x) %s.%s a type load error happened\n", token, klass->name_space, klass->name);
-                       ++count;
-               }
-       }
-       if (count)
-               return 5;
-       return 0;
-
-invalid_image:
-       for (tmp = errors; tmp; tmp = tmp->next) {
-               MonoVerifyInfo *info = (MonoVerifyInfo *)tmp->data;
-               g_print ("%s: %s\n", desc [info->status], info->message);
-               if (info->status == MONO_VERIFY_ERROR)
-                       count++;
-       }
-       mono_free_verify_list (errors);
-       if (count)
-               g_print ("Error count: %d\n", count);
-       return 1;
-}
-
-static gboolean
-try_load_from (MonoAssembly **assembly, const gchar *path1, const gchar *path2,
-                                       const gchar *path3, const gchar *path4, gboolean refonly)
-{
-       gchar *fullpath;
-
-       *assembly = NULL;
-       fullpath = g_build_filename (path1, path2, path3, path4, NULL);
-       if (g_file_test (fullpath, G_FILE_TEST_IS_REGULAR))
-               *assembly = mono_assembly_open_full (fullpath, NULL, refonly);
-
-       g_free (fullpath);
-       return (*assembly != NULL);
-}
-
-static MonoAssembly *
-real_load (gchar **search_path, const gchar *culture, const gchar *name, gboolean refonly)
-{
-       MonoAssembly *result = NULL;
-       gchar **path;
-       gchar *filename;
-       const gchar *local_culture;
-       gint len;
-
-       if (!culture || *culture == '\0') {
-               local_culture = "";
-       } else {
-               local_culture = culture;
-       }
-
-       filename =  g_strconcat (name, ".dll", NULL);
-       len = strlen (filename);
-
-       for (path = search_path; *path; path++) {
-               if (**path == '\0')
-                       continue; /* Ignore empty ApplicationBase */
-
-               /* See test cases in bug #58992 and bug #57710 */
-               /* 1st try: [culture]/[name].dll (culture may be empty) */
-               strcpy (filename + len - 4, ".dll");
-               if (try_load_from (&result, *path, local_culture, "", filename, refonly))
-                       break;
-
-               /* 2nd try: [culture]/[name].exe (culture may be empty) */
-               strcpy (filename + len - 4, ".exe");
-               if (try_load_from (&result, *path, local_culture, "", filename, refonly))
-                       break;
-
-               /* 3rd try: [culture]/[name]/[name].dll (culture may be empty) */
-               strcpy (filename + len - 4, ".dll");
-               if (try_load_from (&result, *path, local_culture, name, filename, refonly))
-                       break;
-
-               /* 4th try: [culture]/[name]/[name].exe (culture may be empty) */
-               strcpy (filename + len - 4, ".exe");
-               if (try_load_from (&result, *path, local_culture, name, filename, refonly))
-                       break;
-       }
-
-       g_free (filename);
-       return result;
-}
-
-/*
- * Try to load referenced assemblies from assemblies_path.
- */
-static MonoAssembly *
-pedump_preload (MonoAssemblyName *aname,
-                                gchar **assemblies_path,
-                                gpointer user_data)
-{
-       MonoAssembly *result = NULL;
-       gboolean refonly = GPOINTER_TO_UINT (user_data);
-
-       if (assemblies_path && assemblies_path [0] != NULL) {
-               result = real_load (assemblies_path, aname->culture, aname->name, refonly);
-       }
-
-       return result;
-}
-
-static GList *loaded_assemblies = NULL;
-
-static void
-pedump_assembly_load_hook (MonoAssembly *assembly, gpointer user_data)
-{
-       loaded_assemblies = g_list_prepend (loaded_assemblies, assembly);
-}
-
-static MonoAssembly *
-pedump_assembly_search_hook (MonoAssemblyName *aname, gpointer user_data)
-{
-        GList *tmp;
-
-       for (tmp = loaded_assemblies; tmp; tmp = tmp->next) {
-               MonoAssembly *ass = (MonoAssembly *)tmp->data;
-               if (mono_assembly_names_equal (aname, &ass->aname))
-                      return ass;
-       }
-       return NULL;
-}
-
-#define VALID_ONLY_FLAG 0x08000000
-#define VERIFY_CODE_ONLY MONO_VERIFY_ALL + 1 
-#define VERIFY_METADATA_ONLY VERIFY_CODE_ONLY + 1
-#define VERIFY_PARTIAL_METADATA VERIFY_CODE_ONLY + 2
-
-int
-main (int argc, char *argv [])
-{
-       int image_result = 0;
-       MonoImage *image;
-       char *file = NULL;
-       char *flags = NULL;
-       MiniVerifierMode verifier_mode = MONO_VERIFIER_MODE_VERIFIABLE;
-       const char *flag_desc [] = {"error", "warn", "cls", "all", "code", "fail-on-verifiable", "non-strict", "valid-only", "metadata", "partial-md", NULL};
-       guint flag_vals [] = {MONO_VERIFY_ERROR, MONO_VERIFY_WARNING, MONO_VERIFY_CLS, MONO_VERIFY_ALL, VERIFY_CODE_ONLY, MONO_VERIFY_FAIL_FAST, MONO_VERIFY_NON_STRICT, VALID_ONLY_FLAG, VERIFY_METADATA_ONLY, VERIFY_PARTIAL_METADATA, 0};
-       int i, verify_flags = MONO_VERIFY_REPORT_ALL_ERRORS, run_new_metadata_verifier = 0;
-       
-       for (i = 1; i < argc; i++){
-               if (argv [i][0] != '-'){
-                       file = argv [i];
-                       continue;
-               }
-
-               if (strcmp (argv [i], "--help") == 0)
-                       usage ();
-               else if (strcmp (argv [i], "--verify") == 0) {
-                       verify_pe = 1;
-                       dump_data = 0;
-                       ++i;
-                       flags = argv [i];
-               } else {
-                       usage ();
-               }
-       }
-       
-       if (!file)
-               usage ();
-
-#ifndef DISABLE_PERFCOUNTERS
-       mono_perfcounters_init ();
-#endif
-       mono_counters_init ();
-       mono_metadata_init ();
-       mono_images_init ();
-       mono_assemblies_init ();
-       mono_loader_init ();
-       if (verify_pe) {
-               char *tok = strtok (flags, ",");
-
-               verify_metadata = 1;
-               verify_code = 0;
-               while (tok) {
-                       for (i = 0; flag_desc [i]; ++i) {
-                               if (strcmp (tok, flag_desc [i]) == 0) {
-                                       if (flag_vals [i] == VERIFY_CODE_ONLY) {
-                                               verify_metadata = 0;
-                                               verify_code = 1;
-                                       } else if(flag_vals [i] == MONO_VERIFY_ALL) {
-                                               verify_code = 1;
-                                       } else if(flag_vals [i] == VERIFY_METADATA_ONLY) {
-                                               verify_metadata = 0;
-                                               run_new_metadata_verifier = 1;
-                                       } else if(flag_vals [i] == VERIFY_PARTIAL_METADATA) {
-                                               verify_partial_md = 1;
-                                       }
-                                       if (flag_vals [i] == VALID_ONLY_FLAG)
-                                               verifier_mode = MONO_VERIFIER_MODE_VALID;
-                                       else
-                                               verify_flags |= flag_vals [i];
-                                       break;
-                               }
-                       }
-                       if (!flag_desc [i])
-                               g_print ("Unknown verify flag %s\n", tok);
-                       tok = strtok (NULL, ",");
-               }
-
-               mono_verifier_set_mode (verifier_mode);
-               /**/
-       }
-
-       if (verify_pe || run_new_metadata_verifier) {
-               run_new_metadata_verifier = 1;
-       }
-       
-       if (run_new_metadata_verifier) {
-               mono_verifier_set_mode (verifier_mode);
-
-               image_result = verify_image_file (file);
-               if (image_result == 1 || !verify_code)
-                       return image_result;
-       }
-
-       image = mono_image_open (file, NULL);
-       if (!image){
-               fprintf (stderr, "Cannot open image %s\n", file);
-               exit (1);
-       }
-
-       if (dump_data)
-               dump_dotnet_iinfo (image);
-       if (verify_pe) {
-               MonoAssembly *assembly;
-               MonoImage *image;
-               MonoImageOpenStatus status;
-               int code_result;
-
-               mono_verifier_set_mode (verifier_mode);
-
-               assembly = mono_assembly_open (file, NULL);
-               /*fake an assembly for netmodules so the verifier works*/
-               if (!assembly && (image = mono_image_open (file, &status)) && image->tables [MONO_TABLE_ASSEMBLY].rows == 0) {
-                       assembly = g_new0 (MonoAssembly, 1);
-                       assembly->in_gac = FALSE;
-                       assembly->image = image;
-                       image->assembly = assembly;
-               }
-
-               if (!assembly) {
-                       g_print ("Could not open assembly %s\n", file);
-                       return 4;
-               }
-
-               code_result = dump_verify_info (assembly->image, verify_flags);
-               return code_result ? code_result : image_result;
-       } else
-               mono_image_close (image);
-       
-       return 0;
-}
-
index 138bd98553b4a5d2434edbf760af5e32602f5fb5..8178d283823e569dedf444dc828df54cdfbc324d 100644 (file)
@@ -27,6 +27,7 @@
 #include <mono/io-layer/io-layer.h>
 /* FIXME: fix this code to not depend so much on the internals */
 #include <mono/metadata/class-internals.h>
+#include <mono/utils/w32handle.h>
 
 #define LOGDEBUG(...)  
 /* define LOGDEBUG(...) g_message(__VA_ARGS__)  */
index 2dd53c18b14fa153f37d63e368fb6cfebefe366e..034d0de610a57a92208a27c84b8bc631af58b148 100644 (file)
@@ -7156,7 +7156,7 @@ mono_module_file_get_object_checked (MonoDomain *domain, MonoImage *image, int t
        MONO_OBJECT_SETREF (res, fqname, mono_string_new (domain, name));
        MONO_OBJECT_SETREF (res, name, mono_string_new (domain, name));
        MONO_OBJECT_SETREF (res, scopename, mono_string_new (domain, name));
-       res->is_resource = cols [MONO_FILE_FLAGS] && FILE_CONTAINS_NO_METADATA;
+       res->is_resource = cols [MONO_FILE_FLAGS] & FILE_CONTAINS_NO_METADATA;
        res->token = mono_metadata_make_token (MONO_TABLE_FILE, table_index + 1);
 
        return res;
@@ -7638,6 +7638,7 @@ mono_event_get_object_checked (MonoDomain *domain, MonoClass *klass, MonoEvent *
        MonoReflectionEvent *res;
        MonoReflectionMonoEvent *mono_event;
 
+       mono_error_init (error);
        CHECK_OBJECT (MonoReflectionEvent *, event, klass);
        mono_event = (MonoReflectionMonoEvent *)mono_object_new_checked (domain, mono_class_get_mono_event_class (), error);
        if (!mono_event)
index 9bc72faa28bc344fe09de1b5338e2b56bb34ec1f..62379f245e97f296a16b4a72a252c86bf7d79a84 100644 (file)
@@ -198,7 +198,6 @@ mono_remoting_marshal_init (void)
                register_icall (mono_remoting_wrapper, "mono_remoting_wrapper", "object ptr ptr", FALSE);
                register_icall (mono_upgrade_remote_class_wrapper, "mono_upgrade_remote_class_wrapper", "void object object", FALSE);
                register_icall (mono_compile_method_icall, "mono_compile_method_icall", "ptr ptr", FALSE);
-               /* mono_load_remote_field_new_icall registered  by mini-runtime.c */
                /* mono_store_remote_field_new_icall registered  by mini-runtime.c */
 
        }
@@ -1327,72 +1326,6 @@ mono_marshal_get_remoting_invoke_with_check (MonoMethod *method)
        return res;
 }
 
-/*
- * mono_marshal_get_ldfld_remote_wrapper:
- * @klass: The return type
- *
- * This method generates a wrapper for calling mono_load_remote_field_new.
- * The return type is ignored for now, as mono_load_remote_field_new () always
- * returns an object. In the future, to optimize some codepaths, we might
- * call a different function that takes a pointer to a valuetype, instead.
- */
-MonoMethod *
-mono_marshal_get_ldfld_remote_wrapper (MonoClass *klass)
-{
-       MonoMethodSignature *sig;
-       MonoMethodBuilder *mb;
-       MonoMethod *res;
-       static MonoMethod* cached = NULL;
-
-       mono_marshal_lock_internal ();
-       if (cached) {
-               mono_marshal_unlock_internal ();
-               return cached;
-       }
-       mono_marshal_unlock_internal ();
-
-       mb = mono_mb_new_no_dup_name (mono_defaults.object_class, "__mono_load_remote_field_new_wrapper", MONO_WRAPPER_LDFLD_REMOTE);
-
-       mb->method->save_lmf = 1;
-
-       sig = mono_metadata_signature_alloc (mono_defaults.corlib, 3);
-       sig->params [0] = &mono_defaults.object_class->byval_arg;
-       sig->params [1] = &mono_defaults.int_class->byval_arg;
-       sig->params [2] = &mono_defaults.int_class->byval_arg;
-       sig->ret = &mono_defaults.object_class->byval_arg;
-
-#ifndef DISABLE_JIT
-       mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldarg (mb, 1);
-       mono_mb_emit_ldarg (mb, 2);
-
-       mono_mb_emit_icall (mb, mono_load_remote_field_new_icall);
-
-       mono_mb_emit_byte (mb, CEE_RET);
-#endif
-
-       mono_marshal_lock_internal ();
-       res = cached;
-       mono_marshal_unlock_internal ();
-       if (!res) {
-               MonoMethod *newm;
-               newm = mono_mb_create (mb, sig, 4, NULL);
-               mono_marshal_lock_internal ();
-               res = cached;
-               if (!res) {
-                       res = newm;
-                       cached = res;
-                       mono_marshal_unlock_internal ();
-               } else {
-                       mono_marshal_unlock_internal ();
-                       mono_free_method (newm);
-               }
-       }
-       mono_mb_free (mb);
-
-       return res;
-}
-
 /*
  * mono_marshal_get_ldfld_wrapper:
  * @type: the type of the field
@@ -1412,6 +1345,7 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
        WrapperInfo *info;
        char *name;
        int t, pos0, pos1 = 0;
+       static MonoMethod* tp_load = NULL;
 
        type = mono_type_get_underlying_type (type);
 
@@ -1442,6 +1376,13 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
        if ((res = mono_marshal_find_in_cache (cache, klass)))
                return res;
 
+#ifndef DISABLE_REMOTING
+       if (!tp_load) {
+               tp_load = mono_class_get_method_from_name (mono_defaults.transparent_proxy_class, "LoadRemoteFieldNew", -1);
+               g_assert (tp_load != NULL);
+       }
+#endif
+
        /* we add the %p pointer value of klass because class names are not unique */
        name = g_strdup_printf ("__ldfld_wrapper_%p_%s.%s", klass, klass->name_space, klass->name); 
        mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_LDFLD);
@@ -1458,11 +1399,12 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
        mono_mb_emit_ldarg (mb, 0);
        pos0 = mono_mb_emit_proxy_check (mb, CEE_BNE_UN);
 
+#ifndef DISABLE_REMOTING
        mono_mb_emit_ldarg (mb, 0);
        mono_mb_emit_ldarg (mb, 1);
        mono_mb_emit_ldarg (mb, 2);
 
-       mono_mb_emit_managed_call (mb, mono_marshal_get_ldfld_remote_wrapper (klass), NULL);
+       mono_mb_emit_managed_call (mb, tp_load, NULL);
 
        /*
        csig = mono_metadata_signature_alloc (mono_defaults.corlib, 3);
@@ -1482,6 +1424,7 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
        } else {
                mono_mb_emit_byte (mb, CEE_RET);
        }
+#endif
 
        mono_mb_patch_branch (mb, pos0);
 
@@ -1578,8 +1521,7 @@ mono_marshal_get_ldflda_wrapper (MonoType *type)
                        klass = mono_defaults.array_class;
                } else if (type->type == MONO_TYPE_VALUETYPE) {
                        klass = type->data.klass;
-               } else if (t == MONO_TYPE_OBJECT || t == MONO_TYPE_CLASS || t == MONO_TYPE_STRING ||
-                          t == MONO_TYPE_CLASS) { 
+               } else if (t == MONO_TYPE_OBJECT || t == MONO_TYPE_CLASS || t == MONO_TYPE_STRING) { 
                        klass = mono_defaults.object_class;
                } else if (t == MONO_TYPE_PTR || t == MONO_TYPE_FNPTR) {
                        klass = mono_defaults.int_class;
index df6a4bb8cdee7513673b29f6cd08b8ed3e3ae84b..0597bdd7882fdd994391eadbe65c84ca58c0c181 100644 (file)
@@ -45,6 +45,8 @@ typedef struct {
        void (*register_finalized_object) (GCObject *object);
        void (*describe_pointer) (GCObject *object);
        void (*enable_accounting) (void);
+
+       // Optional-- used for debugging
        void (*set_dump_prefix) (const char *prefix);
 
        /*
@@ -62,6 +64,7 @@ void sgen_new_bridge_init (SgenBridgeProcessor *collector);
 void sgen_tarjan_bridge_init (SgenBridgeProcessor *collector);
 void sgen_set_bridge_implementation (const char *name);
 void sgen_bridge_set_dump_prefix (const char *prefix);
+void sgen_init_bridge (void);
 
 #endif
 
index 303f8ea837210f8f843a03b321da1a82bfd469dc..006e68c50121f32e9de1a776a9f164ead82907dd 100644 (file)
 #include "sgen/sgen-qsort.h"
 #include "utils/mono-logger-internals.h"
 
+typedef enum {
+       BRIDGE_PROCESSOR_INVALID,
+       BRIDGE_PROCESSOR_OLD,
+       BRIDGE_PROCESSOR_NEW,
+       BRIDGE_PROCESSOR_TARJAN,
+       BRIDGE_PROCESSOR_DEFAULT = BRIDGE_PROCESSOR_TARJAN
+} BridgeProcessorSelection;
+
+// Bridge processor type pending / in use
+static BridgeProcessorSelection bridge_processor_selection = BRIDGE_PROCESSOR_DEFAULT;
+// Most recently requested callbacks
+static MonoGCBridgeCallbacks pending_bridge_callbacks;
+// Currently-in-use callbacks
 MonoGCBridgeCallbacks bridge_callbacks;
+
+// Bridge processor state
 static SgenBridgeProcessor bridge_processor;
+// This is used for a special debug feature
 static SgenBridgeProcessor compare_to_bridge_processor;
 
 volatile gboolean bridge_processing_in_progress = FALSE;
 
+// FIXME: The current usage pattern for this function is unsafe. Bridge processing could start immediately after unlock
 void
 mono_gc_wait_for_bridge_processing (void)
 {
@@ -39,42 +56,101 @@ mono_gc_wait_for_bridge_processing (void)
        sgen_gc_unlock ();
 }
 
-
 void
 mono_gc_register_bridge_callbacks (MonoGCBridgeCallbacks *callbacks)
 {
        if (callbacks->bridge_version != SGEN_BRIDGE_VERSION)
                g_error ("Invalid bridge callback version. Expected %d but got %d\n", SGEN_BRIDGE_VERSION, callbacks->bridge_version);
 
-       bridge_callbacks = *callbacks;
+       // Defer assigning to bridge_callbacks until we have the gc lock.
+       // Note: This line is unsafe if we are on a separate thread from the one the runtime was initialized on.
+       pending_bridge_callbacks = *callbacks;
 
-       if (!bridge_processor.reset_data)
-               sgen_new_bridge_init (&bridge_processor);
+       // If sgen has started, will assign bridge callbacks and init bridge
+       sgen_init_bridge ();
 }
 
-static gboolean
-init_bridge_processor (SgenBridgeProcessor *processor, const char *name)
+static BridgeProcessorSelection
+bridge_processor_name (const char *name)
 {
        if (!strcmp ("old", name)) {
-               memset (processor, 0, sizeof (SgenBridgeProcessor));
-               sgen_old_bridge_init (processor);
+               return BRIDGE_PROCESSOR_OLD;
        } else if (!strcmp ("new", name)) {
-               memset (processor, 0, sizeof (SgenBridgeProcessor));
-               sgen_new_bridge_init (processor);
+               return BRIDGE_PROCESSOR_NEW;
        } else if (!strcmp ("tarjan", name)) {
-               memset (processor, 0, sizeof (SgenBridgeProcessor));
-               sgen_tarjan_bridge_init (processor);
+               return BRIDGE_PROCESSOR_TARJAN;
        } else {
-               return FALSE;
+               return BRIDGE_PROCESSOR_INVALID;
+       }
+}
+
+// Initialize a single bridge processor
+static void
+init_bridge_processor (SgenBridgeProcessor *processor, BridgeProcessorSelection selection)
+{
+       memset (processor, 0, sizeof (SgenBridgeProcessor));
+
+       switch (selection) {
+               case BRIDGE_PROCESSOR_OLD:
+                       sgen_old_bridge_init (processor);
+                       break;
+               case BRIDGE_PROCESSOR_NEW:
+                       sgen_new_bridge_init (processor);
+                       break;
+               case BRIDGE_PROCESSOR_TARJAN:
+                       sgen_tarjan_bridge_init (processor);
+                       break;
+               default:
+                       g_assert_not_reached ();
+       }
+}
+
+/*
+ * Initializing the sgen bridge consists of setting the bridge callbacks,
+ * and initializing the bridge processor. Init should follow these rules:
+ *
+ *   - Init happens only after sgen is initialized (because we don't
+ *     know which bridge processor to initialize until then, and also
+ *     to allow bridge processor init to interact with sgen if it wants)
+ *
+ *   - Init happens only after mono_gc_register_bridge_callbacks is called
+ *
+ *   - Init should not happen concurrently with a GC (because a GC will
+ *     call sgen_need_bridge_processing at various times)
+ *
+ *   - Initializing the bridge processor should happen only once
+ *
+ * We call sgen_init_bridge when the callbacks are set, and also when sgen
+ * is done initing. Actual initialization then only occurs if it is ready.
+ */
+void
+sgen_init_bridge ()
+{
+       if (sgen_gc_initialized ()) {
+               // This lock is not initialized until the GC is
+               sgen_gc_lock ();
+
+               bridge_callbacks = pending_bridge_callbacks;
+
+               // If a bridge was registered but there is no bridge processor yet
+               if (bridge_callbacks.cross_references && !bridge_processor.reset_data)
+                       init_bridge_processor (&bridge_processor, bridge_processor_selection);
+
+               sgen_gc_unlock ();
        }
-       return TRUE;
 }
 
 void
 sgen_set_bridge_implementation (const char *name)
 {
-       if (!init_bridge_processor (&bridge_processor, name))
-               g_warning ("Invalid value for bridge implementation, valid values are: 'new', 'old' and 'tarjan'.");
+       BridgeProcessorSelection selection = bridge_processor_name (name);
+
+       if (selection == BRIDGE_PROCESSOR_INVALID)
+               g_warning ("Invalid value for bridge processor implementation, valid values are: 'new', 'old' and 'tarjan'.");
+       else if (bridge_processor.reset_data)
+               g_warning ("Cannot set bridge processor implementation once bridge has already started");
+       else
+               bridge_processor_selection = selection;
 }
 
 gboolean
@@ -589,11 +665,10 @@ sgen_bridge_handle_gc_debug (const char *opt)
                set_dump_prefix (prefix);
        } else if (g_str_has_prefix (opt, "bridge-compare-to=")) {
                const char *name = strchr (opt, '=') + 1;
-               if (init_bridge_processor (&compare_to_bridge_processor, name)) {
-                       if (compare_to_bridge_processor.reset_data == bridge_processor.reset_data) {
-                               g_warning ("Cannot compare bridge implementation to itself - ignoring.");
-                               memset (&compare_to_bridge_processor, 0, sizeof (SgenBridgeProcessor));
-                       }
+               BridgeProcessorSelection selection = bridge_processor_name (name);
+
+               if (selection != BRIDGE_PROCESSOR_INVALID) {
+                       init_bridge_processor (&compare_to_bridge_processor, selection);
                } else {
                        g_warning ("Invalid bridge implementation to compare against - ignoring.");
                }
index 38dc44637cc05c1fea162908aec0bb741cfb0d8d..b11df8a17b5e39d83ef82e05e98ca52c5125cf87 100644 (file)
@@ -9,20 +9,23 @@
  * unreachable objects.  We use it in monodroid to do garbage collection across
  * the Mono and Java heaps.
  *
- * The client can designate some objects as "bridged", which means that they
- * participate in the bridge processing step once SGen considers them
+ * The client (Monodroid) can designate some objects as "bridged", which means
+ * that they participate in the bridge processing step once SGen considers them
  * unreachable, i.e., dead.  Bridged objects must be registered for
  * finalization.
  *
  * When SGen is done marking, it puts together a list of all dead bridged
- * objects and then does a strongly connected component analysis over their
- * object graph.  That graph will usually contain non-bridged objects, too.
+ * objects.  This is passed to the bridge processor, which does an analysis to
+ * simplify the graph: It replaces strongly-connected components with single
+ * nodes, and then removes any nodes corresponding to components which do not
+ * contain bridged objects.
  *
- * The output of the SCC analysis is passed to the `cross_references()`
- * callback.  It is expected to set the `is_alive` flag on those strongly
- * connected components that it wishes to be kept alive.  Only bridged objects
- * will be reported to the callback, i.e., non-bridged objects are removed from
- * the callback graph.
+ * The output of the SCC analysis is passed to the client's `cross_references()`
+ * callback.  This consists of 2 arrays, an array of SCCs (MonoGCBridgeSCC),
+ * and an array of "xrefs" (edges between SCCs, MonoGCBridgeXRef).  Edges are
+ * encoded as pairs of "API indices", ie indexes in the SCC array.  The client
+ * is expected to set the `is_alive` flag on those strongly connected components
+ * that it wishes to be kept alive.
  *
  * In monodroid each bridged object has a corresponding Java mirror object.  In
  * the bridge callback it reifies the Mono object graph in the Java heap so that
  * point all links to bridged objects that don't have `is_alive` set are nulled.
  * Note that weak links to non-bridged objects reachable from bridged objects
  * are not nulled.  This might be considered a bug.
+ *
+ * There are three different implementations of the bridge processor, each of
+ * which implements 8 callbacks (see SgenBridgeProcessor).  The implementations
+ * differ in the algorithm they use to compute the "simplified" SCC graph.
  */
 
 #ifndef _MONO_SGEN_BRIDGE_H_
@@ -88,6 +95,11 @@ typedef struct {
        void (*cross_references) (int num_sccs, MonoGCBridgeSCC **sccs, int num_xrefs, MonoGCBridgeXRef *xrefs);
 } MonoGCBridgeCallbacks;
 
+/*
+ * Note: This may be called at any time, but cannot be called concurrently
+ * with (during and on a separate thread from) sgen init. Callers are
+ * responsible for enforcing this.
+ */
 MONO_API void mono_gc_register_bridge_callbacks (MonoGCBridgeCallbacks *callbacks);
 
 MONO_API void mono_gc_wait_for_bridge_processing (void);
diff --git a/mono/metadata/sgen-dynarray.h b/mono/metadata/sgen-dynarray.h
new file mode 100644 (file)
index 0000000..f5a6a61
--- /dev/null
@@ -0,0 +1,346 @@
+/*
+ * Copyright 2016 Xamarin, Inc.
+ *
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+
+ // Growable array implementation used by sgen-new-bridge and sgen-tarjan-bridge.
+
+typedef struct {
+       int size;
+       int capacity;           /* if negative, data points to another DynArray's data */
+       char *data;
+} DynArray;
+
+/*Specializations*/
+
+// IntArray supports an optimization (in sgen-new-bridge.c): If capacity is less than 0 it is a "copy" and does not own its buffer.
+typedef struct {
+       DynArray array;
+} DynIntArray;
+
+// PtrArray supports an optimization: If size is equal to 1 it is a "singleton" and data points to the single held item, not to a buffer.
+typedef struct {
+       DynArray array;
+} DynPtrArray;
+
+typedef struct {
+       DynArray array;
+} DynSCCArray;
+
+static void
+dyn_array_init (DynArray *da)
+{
+       da->size = 0;
+       da->capacity = 0;
+       da->data = NULL;
+}
+
+static void
+dyn_array_uninit (DynArray *da, int elem_size)
+{
+       if (da->capacity < 0) {
+               dyn_array_init (da);
+               return;
+       }
+
+       if (da->capacity == 0)
+               return;
+
+       sgen_free_internal_dynamic (da->data, elem_size * da->capacity, INTERNAL_MEM_BRIDGE_DATA);
+       da->data = NULL;
+}
+
+static void
+dyn_array_empty (DynArray *da)
+{
+       if (da->capacity < 0)
+               dyn_array_init (da);
+       else
+               da->size = 0;
+}
+
+static char *
+dyn_array_ensure_capacity_internal (DynArray *da, int capacity, int elem_size)
+{
+       if (da->capacity <= 0)
+               da->capacity = 2;
+       while (capacity > da->capacity)
+               da->capacity *= 2;
+
+       return (char *)sgen_alloc_internal_dynamic (elem_size * da->capacity, INTERNAL_MEM_BRIDGE_DATA, TRUE);
+}
+
+static void
+dyn_array_ensure_capacity (DynArray *da, int capacity, int elem_size)
+{
+       int old_capacity = da->capacity;
+       char *new_data;
+
+       g_assert (capacity > 0);
+
+       if (capacity <= old_capacity)
+               return;
+
+       new_data = dyn_array_ensure_capacity_internal (da, capacity, elem_size);
+       memcpy (new_data, da->data, elem_size * da->size);
+       if (old_capacity > 0)
+               sgen_free_internal_dynamic (da->data, elem_size * old_capacity, INTERNAL_MEM_BRIDGE_DATA);
+       da->data = new_data;
+}
+
+static gboolean
+dyn_array_is_copy (DynArray *da)
+{
+       return da->capacity < 0;
+}
+
+static void
+dyn_array_ensure_independent (DynArray *da, int elem_size)
+{
+       if (!dyn_array_is_copy (da))
+               return;
+       dyn_array_ensure_capacity (da, da->size, elem_size);
+       g_assert (da->capacity > 0);
+}
+
+static void*
+dyn_array_add (DynArray *da, int elem_size)
+{
+       void *p;
+
+       dyn_array_ensure_capacity (da, da->size + 1, elem_size);
+
+       p = da->data + da->size * elem_size;
+       ++da->size;
+       return p;
+}
+
+static void
+dyn_array_copy (DynArray *dst, DynArray *src, int elem_size)
+{
+       dyn_array_uninit (dst, elem_size);
+
+       if (src->size == 0)
+               return;
+
+       dst->size = src->size;
+       dst->capacity = -1;
+       dst->data = src->data;
+}
+
+/* int */
+static void
+dyn_array_int_init (DynIntArray *da)
+{
+       dyn_array_init (&da->array);
+}
+
+static void
+dyn_array_int_uninit (DynIntArray *da)
+{
+       dyn_array_uninit (&da->array, sizeof (int));
+}
+
+static int
+dyn_array_int_size (DynIntArray *da)
+{
+       return da->array.size;
+}
+
+#ifdef NEW_XREFS
+static void
+dyn_array_int_empty (DynIntArray *da)
+{
+       dyn_array_empty (&da->array);
+}
+#endif
+
+static void
+dyn_array_int_add (DynIntArray *da, int x)
+{
+       int *p = (int *)dyn_array_add (&da->array, sizeof (int));
+       *p = x;
+}
+
+static int
+dyn_array_int_get (DynIntArray *da, int x)
+{
+       return ((int*)da->array.data)[x];
+}
+
+#ifdef NEW_XREFS
+static void
+dyn_array_int_set (DynIntArray *da, int idx, int val)
+{
+       ((int*)da->array.data)[idx] = val;
+}
+#endif
+
+static void
+dyn_array_int_ensure_independent (DynIntArray *da)
+{
+       dyn_array_ensure_independent (&da->array, sizeof (int));
+}
+
+static void
+dyn_array_int_copy (DynIntArray *dst, DynIntArray *src)
+{
+       dyn_array_copy (&dst->array, &src->array, sizeof (int));
+}
+
+static gboolean
+dyn_array_int_is_copy (DynIntArray *da)
+{
+       return dyn_array_is_copy (&da->array);
+}
+
+/* ptr */
+
+static void
+dyn_array_ptr_init (DynPtrArray *da)
+{
+       dyn_array_init (&da->array);
+}
+
+static void
+dyn_array_ptr_uninit (DynPtrArray *da)
+{
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+       if (da->array.capacity == 1)
+               dyn_array_ptr_init (da);
+       else
+#endif
+               dyn_array_uninit (&da->array, sizeof (void*));
+}
+
+static int
+dyn_array_ptr_size (DynPtrArray *da)
+{
+       return da->array.size;
+}
+
+static void
+dyn_array_ptr_empty (DynPtrArray *da)
+{
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+       if (da->array.capacity == 1)
+               dyn_array_ptr_init (da);
+       else
+#endif
+               dyn_array_empty (&da->array);
+}
+
+static void*
+dyn_array_ptr_get (DynPtrArray *da, int x)
+{
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+       if (da->array.capacity == 1) {
+               g_assert (x == 0);
+               return da->array.data;
+       }
+#endif
+       return ((void**)da->array.data)[x];
+}
+
+static void
+dyn_array_ptr_set (DynPtrArray *da, int x, void *ptr)
+{
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+       if (da->array.capacity == 1) {
+               g_assert (x == 0);
+               da->array.data = ptr;
+       } else
+#endif
+       {
+               ((void**)da->array.data)[x] = ptr;
+       }
+}
+
+static void
+dyn_array_ptr_add (DynPtrArray *da, void *ptr)
+{
+       void **p;
+
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+       if (da->array.capacity == 0) {
+               da->array.capacity = 1;
+               da->array.size = 1;
+               p = (void**)&da->array.data;
+       } else if (da->array.capacity == 1) {
+               void *ptr0 = da->array.data;
+               void **p0;
+               dyn_array_init (&da->array);
+               p0 = (void **)dyn_array_add (&da->array, sizeof (void*));
+               *p0 = ptr0;
+               p = (void **)dyn_array_add (&da->array, sizeof (void*));
+       } else
+#endif
+       {
+               p = (void **)dyn_array_add (&da->array, sizeof (void*));
+       }
+       *p = ptr;
+}
+
+#define dyn_array_ptr_push dyn_array_ptr_add
+
+static void*
+dyn_array_ptr_pop (DynPtrArray *da)
+{
+       int size = da->array.size;
+       void *p;
+       g_assert (size > 0);
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+       if (da->array.capacity == 1) {
+               p = dyn_array_ptr_get (da, 0);
+               dyn_array_init (&da->array);
+       } else
+#endif
+       {
+               g_assert (da->array.capacity > 1);
+               dyn_array_ensure_independent (&da->array, sizeof (void*));
+               p = dyn_array_ptr_get (da, size - 1);
+               --da->array.size;
+       }
+       return p;
+}
+
+static void
+dyn_array_ptr_ensure_capacity (DynPtrArray *da, int capacity)
+{
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+       if (capacity == 1 && da->array.capacity < 1) {
+               da->array.capacity = 1;
+       } else if (da->array.capacity == 1) // TODO size==1
+       {
+               if (capacity > 1)
+               {
+                       void *ptr = dyn_array_ptr_get (da, 0);
+                       da->array.data = dyn_array_ensure_capacity_internal(&da->array, capacity, sizeof (void*));
+                       dyn_array_ptr_set (da, 0, ptr);
+               }
+       }
+#endif
+       {
+               dyn_array_ensure_capacity (&da->array, capacity, sizeof (void*));
+       }
+}
+
+static void
+dyn_array_ptr_set_all (DynPtrArray *dst, DynPtrArray *src)
+{
+       const int copysize = src->array.size;
+       if (copysize > 0) {
+               dyn_array_ptr_ensure_capacity (dst, copysize);
+
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+               if (copysize == 1) {
+                       dyn_array_ptr_set (dst, 0, dyn_array_ptr_get (src, 0));
+               } else
+#endif
+               {
+                       memcpy (dst->array.data, src->array.data, copysize * sizeof (void*));
+               }
+       }
+       dst->array.size = src->array.size;
+}
index 944bde7f63c15798bbc280a9489d9fe8bd927fe2..5fd9fcbe4d1059e7f96a5ed91f8b80e894ef0a08 100644 (file)
@@ -841,7 +841,7 @@ mono_gc_clear_domain (MonoDomain * domain)
        sgen_stop_world (0);
 
        if (sgen_concurrent_collection_in_progress ())
-               sgen_perform_collection (0, GENERATION_OLD, "clear domain", TRUE);
+               sgen_perform_collection (0, GENERATION_OLD, "clear domain", TRUE, FALSE);
        SGEN_ASSERT (0, !sgen_concurrent_collection_in_progress (), "We just ordered a synchronous collection.  Why are we collecting concurrently?");
 
        major_collector.finish_sweeping ();
@@ -1145,14 +1145,6 @@ create_allocator (int atype, ManagedAllocatorVariant variant)
 
        EMIT_TLS_ACCESS_VAR (mb, thread_var);
 
-#ifdef MANAGED_ALLOCATOR_CAN_USE_CRITICAL_REGION
-       EMIT_TLS_ACCESS_IN_CRITICAL_REGION_ADDR (mb, thread_var);
-       mono_mb_emit_byte (mb, CEE_LDC_I4_1);
-       mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
-       mono_mb_emit_byte (mb, CEE_MONO_ATOMIC_STORE_I4);
-       mono_mb_emit_i4 (mb, MONO_MEMORY_BARRIER_NONE);
-#endif
-
        size_var = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
        if (atype == ATYPE_SMALL) {
                /* size_var = size_arg */
@@ -1279,6 +1271,14 @@ create_allocator (int atype, ManagedAllocatorVariant variant)
                g_assert_not_reached ();
        }
 
+#ifdef MANAGED_ALLOCATOR_CAN_USE_CRITICAL_REGION
+       EMIT_TLS_ACCESS_IN_CRITICAL_REGION_ADDR (mb, thread_var);
+       mono_mb_emit_byte (mb, CEE_LDC_I4_1);
+       mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
+       mono_mb_emit_byte (mb, CEE_MONO_ATOMIC_STORE_I4);
+       mono_mb_emit_i4 (mb, MONO_MEMORY_BARRIER_NONE);
+#endif
+
        /* size += ALLOC_ALIGN - 1; */
        mono_mb_emit_ldloc (mb, size_var);
        mono_mb_emit_icon (mb, SGEN_ALLOC_ALIGN - 1);
@@ -1330,6 +1330,18 @@ create_allocator (int atype, ManagedAllocatorVariant variant)
 
        mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
        mono_mb_emit_byte (mb, CEE_MONO_NOT_TAKEN);
+       /*
+        * We are no longer in a critical section. We need to do this before calling
+        * to unmanaged land in order to avoid stw deadlocks since unmanaged code
+        * might take locks.
+        */
+#ifdef MANAGED_ALLOCATOR_CAN_USE_CRITICAL_REGION
+       EMIT_TLS_ACCESS_IN_CRITICAL_REGION_ADDR (mb, thread_var);
+       mono_mb_emit_byte (mb, CEE_LDC_I4_0);
+       mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
+       mono_mb_emit_byte (mb, CEE_MONO_ATOMIC_STORE_I4);
+       mono_mb_emit_i4 (mb, MONO_MEMORY_BARRIER_NONE);
+#endif
 
        /* FIXME: mono_gc_alloc_obj takes a 'size_t' as an argument, not an int32 */
        mono_mb_emit_ldarg (mb, 0);
@@ -2522,7 +2534,11 @@ mono_gc_get_gc_name (void)
 char*
 mono_gc_get_description (void)
 {
+#ifdef HAVE_CONC_GC_AS_DEFAULT
+       return g_strdup ("sgen (concurrent by default)");
+#else
        return g_strdup ("sgen");
+#endif
 }
 
 void
index a1eb82a714fcdbfa72a89003e1eb988869f8a0b9..4631c0c5430f2ec946931fee01fee5ae079a6ad7 100644 (file)
 #include "tabledefs.h"
 #include "utils/mono-logger-internals.h"
 
+#define OPTIMIZATION_COPY
+#define OPTIMIZATION_FORWARD
+#define OPTIMIZATION_SINGLETON_DYN_ARRAY
+#include "sgen-dynarray.h"
+
 //#define NEW_XREFS
 #ifdef NEW_XREFS
 //#define TEST_NEW_XREFS
 #define XREFS old_xrefs
 #endif
 
-#define OPTIMIZATION_COPY
-#define OPTIMIZATION_FORWARD
-#define OPTIMIZATION_SINGLETON_DYN_ARRAY
-
-typedef struct {
-       int size;
-       int capacity;           /* if negative, data points to another DynArray's data */
-       char *data;
-} DynArray;
-
-/*Specializations*/
-
-typedef struct {
-       DynArray array;
-} DynIntArray;
-
-typedef struct {
-       DynArray array;
-} DynPtrArray;
-
-typedef struct {
-       DynArray array;
-} DynSCCArray;
-
-
 /*
  * Bridge data for a single managed object
  *
@@ -131,266 +111,6 @@ static gboolean bridge_accounting_enabled = FALSE;
 static SgenBridgeProcessor *bridge_processor;
 
 /* Core functions */
-/* public */
-
-/* private */
-
-static void
-dyn_array_init (DynArray *da)
-{
-       da->size = 0;
-       da->capacity = 0;
-       da->data = NULL;
-}
-
-static void
-dyn_array_uninit (DynArray *da, int elem_size)
-{
-       if (da->capacity < 0) {
-               dyn_array_init (da);
-               return;
-       }
-
-       if (da->capacity == 0)
-               return;
-
-       sgen_free_internal_dynamic (da->data, elem_size * da->capacity, INTERNAL_MEM_BRIDGE_DATA);
-       da->data = NULL;
-}
-
-static void
-dyn_array_empty (DynArray *da)
-{
-       if (da->capacity < 0)
-               dyn_array_init (da);
-       else
-               da->size = 0;
-}
-
-static void
-dyn_array_ensure_capacity (DynArray *da, int capacity, int elem_size)
-{
-       int old_capacity = da->capacity;
-       char *new_data;
-
-       g_assert (capacity > 0);
-
-       if (capacity <= old_capacity)
-               return;
-
-       if (old_capacity <= 0)
-               da->capacity = 2;
-       while (capacity > da->capacity)
-               da->capacity *= 2;
-
-       new_data = (char *)sgen_alloc_internal_dynamic (elem_size * da->capacity, INTERNAL_MEM_BRIDGE_DATA, TRUE);
-       memcpy (new_data, da->data, elem_size * da->size);
-       if (old_capacity > 0)
-               sgen_free_internal_dynamic (da->data, elem_size * old_capacity, INTERNAL_MEM_BRIDGE_DATA);
-       da->data = new_data;
-}
-
-static gboolean
-dyn_array_is_copy (DynArray *da)
-{
-       return da->capacity < 0;
-}
-
-static void
-dyn_array_ensure_independent (DynArray *da, int elem_size)
-{
-       if (!dyn_array_is_copy (da))
-               return;
-       dyn_array_ensure_capacity (da, da->size, elem_size);
-       g_assert (da->capacity > 0);
-}
-
-static void*
-dyn_array_add (DynArray *da, int elem_size)
-{
-       void *p;
-
-       dyn_array_ensure_capacity (da, da->size + 1, elem_size);
-
-       p = da->data + da->size * elem_size;
-       ++da->size;
-       return p;
-}
-
-static void
-dyn_array_copy (DynArray *dst, DynArray *src, int elem_size)
-{
-       dyn_array_uninit (dst, elem_size);
-
-       if (src->size == 0)
-               return;
-
-       dst->size = src->size;
-       dst->capacity = -1;
-       dst->data = src->data;
-}
-
-/* int */
-static void
-dyn_array_int_init (DynIntArray *da)
-{
-       dyn_array_init (&da->array);
-}
-
-static void
-dyn_array_int_uninit (DynIntArray *da)
-{
-       dyn_array_uninit (&da->array, sizeof (int));
-}
-
-static int
-dyn_array_int_size (DynIntArray *da)
-{
-       return da->array.size;
-}
-
-#ifdef NEW_XREFS
-static void
-dyn_array_int_empty (DynIntArray *da)
-{
-       dyn_array_empty (&da->array);
-}
-#endif
-
-static void
-dyn_array_int_add (DynIntArray *da, int x)
-{
-       int *p = (int *)dyn_array_add (&da->array, sizeof (int));
-       *p = x;
-}
-
-static int
-dyn_array_int_get (DynIntArray *da, int x)
-{
-       return ((int*)da->array.data)[x];
-}
-
-#ifdef NEW_XREFS
-static void
-dyn_array_int_set (DynIntArray *da, int idx, int val)
-{
-       ((int*)da->array.data)[idx] = val;
-}
-#endif
-
-static void
-dyn_array_int_ensure_independent (DynIntArray *da)
-{
-       dyn_array_ensure_independent (&da->array, sizeof (int));
-}
-
-static void
-dyn_array_int_copy (DynIntArray *dst, DynIntArray *src)
-{
-       dyn_array_copy (&dst->array, &src->array, sizeof (int));
-}
-
-static gboolean
-dyn_array_int_is_copy (DynIntArray *da)
-{
-       return dyn_array_is_copy (&da->array);
-}
-
-/* ptr */
-
-static void
-dyn_array_ptr_init (DynPtrArray *da)
-{
-       dyn_array_init (&da->array);
-}
-
-static void
-dyn_array_ptr_uninit (DynPtrArray *da)
-{
-#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
-       if (da->array.capacity == 1)
-               dyn_array_ptr_init (da);
-       else
-#endif
-               dyn_array_uninit (&da->array, sizeof (void*));
-}
-
-static int
-dyn_array_ptr_size (DynPtrArray *da)
-{
-       return da->array.size;
-}
-
-static void
-dyn_array_ptr_empty (DynPtrArray *da)
-{
-#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
-       if (da->array.capacity == 1)
-               dyn_array_ptr_init (da);
-       else
-#endif
-               dyn_array_empty (&da->array);
-}
-
-static void*
-dyn_array_ptr_get (DynPtrArray *da, int x)
-{
-#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
-       if (da->array.capacity == 1) {
-               g_assert (x == 0);
-               return da->array.data;
-       }
-#endif
-       return ((void**)da->array.data)[x];
-}
-
-static void
-dyn_array_ptr_add (DynPtrArray *da, void *ptr)
-{
-       void **p;
-
-#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
-       if (da->array.capacity == 0) {
-               da->array.capacity = 1;
-               da->array.size = 1;
-               p = (void**)&da->array.data;
-       } else if (da->array.capacity == 1) {
-               void *ptr0 = da->array.data;
-               void **p0;
-               dyn_array_init (&da->array);
-               p0 = (void **)dyn_array_add (&da->array, sizeof (void*));
-               *p0 = ptr0;
-               p = (void **)dyn_array_add (&da->array, sizeof (void*));
-       } else
-#endif
-       {
-               p = (void **)dyn_array_add (&da->array, sizeof (void*));
-       }
-       *p = ptr;
-}
-
-#define dyn_array_ptr_push dyn_array_ptr_add
-
-static void*
-dyn_array_ptr_pop (DynPtrArray *da)
-{
-       int size = da->array.size;
-       void *p;
-       g_assert (size > 0);
-#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
-       if (da->array.capacity == 1) {
-               p = dyn_array_ptr_get (da, 0);
-               dyn_array_init (&da->array);
-       } else
-#endif
-       {
-               g_assert (da->array.capacity > 1);
-               dyn_array_ensure_independent (&da->array, sizeof (void*));
-               p = dyn_array_ptr_get (da, size - 1);
-               --da->array.size;
-       }
-       return p;
-}
 
 /*SCC */
 
index 66dff8d1d1c35bd582640155ea57346b4fabe46e..76c5ac64a90d1380e68f88e5e0f1b44f83a7481c 100644 (file)
 #include "tabledefs.h"
 #include "utils/mono-logger-internals.h"
 
-typedef struct {
-       int size;
-       int capacity;
-       char *data;
-} DynArray;
-
-/*Specializations*/
-
-typedef struct {
-       DynArray array;
-} DynPtrArray;
-
-/* private */
-
-static void
-dyn_array_uninit (DynArray *da, int elem_size)
-{
-       if (da->capacity <= 0)
-               return;
+#include "sgen-dynarray.h"
 
-       sgen_free_internal_dynamic (da->data, elem_size * da->capacity, INTERNAL_MEM_BRIDGE_DATA);
-       da->data = NULL;
-}
-
-static void
-dyn_array_ensure_capacity (DynArray *da, int capacity, int elem_size)
-{
-       int old_capacity = da->capacity;
-       char *new_data;
-
-       if (capacity <= old_capacity)
-               return;
-
-       if (da->capacity == 0)
-               da->capacity = 2;
-       while (capacity > da->capacity)
-               da->capacity *= 2;
-
-       new_data = (char *)sgen_alloc_internal_dynamic (elem_size * da->capacity, INTERNAL_MEM_BRIDGE_DATA, TRUE);
-       if (da->data) {
-               memcpy (new_data, da->data, elem_size * da->size);
-               sgen_free_internal_dynamic (da->data, elem_size * old_capacity, INTERNAL_MEM_BRIDGE_DATA);
-       }
-       da->data = new_data;
-}
-
-static void*
-dyn_array_add (DynArray *da, int elem_size)
-{
-       void *p;
-
-       dyn_array_ensure_capacity (da, da->size + 1, elem_size);
-
-       p = da->data + da->size * elem_size;
-       ++da->size;
-       return p;
-}
-
-/* ptr */
-
-static void
-dyn_array_ptr_uninit (DynPtrArray *da)
-{
-       dyn_array_uninit (&da->array, sizeof (void*));
-}
-
-static int
-dyn_array_ptr_size (DynPtrArray *da)
-{
-       return da->array.size;
-}
-
-static void
-dyn_array_ptr_set_size (DynPtrArray *da, int size)
-{
-       da->array.size = size;
-}
-
-static void*
-dyn_array_ptr_get (DynPtrArray *da, int x)
-{
-       return ((void**)da->array.data)[x];
-}
-
-static void
-dyn_array_ptr_add (DynPtrArray *da, void *ptr)
-{
-       void **p = (void **)dyn_array_add (&da->array, sizeof (void*));
-       *p = ptr;
-}
-
-#define dyn_array_ptr_push dyn_array_ptr_add
-
-static void*
-dyn_array_ptr_pop (DynPtrArray *da)
-{
-       void *p;
-       int size = da->array.size;
-       g_assert (size > 0);
-       p = dyn_array_ptr_get (da, size - 1);
-       --da->array.size;
-       return p;
-}
-
-static void
-dyn_array_ptr_ensure_capacity (DynPtrArray *da, int capacity)
-{
-       dyn_array_ensure_capacity (&da->array, capacity, sizeof (void*));
-}
-
-
-static void
-dyn_array_ptr_set_all (DynPtrArray *dst, DynPtrArray *src)
-{
-       if (src->array.size > 0) {
-               dyn_array_ptr_ensure_capacity (dst, src->array.size);
-               memcpy (dst->array.data, src->array.data, src->array.size * sizeof (void*));
-       }
-       dst->array.size = src->array.size;
-}
+/*
+ * See comments in sgen-bridge.h
+ *
+ * This bridge implementation is based on the tarjan algorithm for strongly
+ * connected components. It has two elements:
+ *
+ *   - Standard tarjan SCC algorithm to convert graph to SCC forest
+ *
+ *   - "Colors": We reduce the SCC forest to bridged-SCCs-only by using a
+ *     "color" algorithm devised by Kumpera. Consider the set of bridged SCCs
+ *     which is reachable from a given object. We call each such unique set a
+ *     "color". We compute the set of colors and which colors contain links to
+ *     which colors. The color graph then becomes the reduced SCC graph.
+ */
 
 static void
 enable_accounting (void)
@@ -152,6 +48,8 @@ enable_accounting (void)
        // hash_table = (SgenHashTable)SGEN_HASH_TABLE_INIT (INTERNAL_MEM_BRIDGE_HASH_TABLE, INTERNAL_MEM_BRIDGE_HASH_TABLE_ENTRY, sizeof (HashEntryWithAccounting), mono_aligned_addr_hash, NULL);
 }
 
+// Is this class bridged or not, and should its dependencies be scanned or not?
+// The result of this callback will be cached for use by is_opaque_object later.
 static MonoGCBridgeObjectKind
 class_kind (MonoClass *klass)
 {
@@ -182,9 +80,10 @@ class_kind (MonoClass *klass)
        return GC_BRIDGE_TRANSPARENT_CLASS;
 }
 
-//enable unsage logging
+//enable usage logging
 // #define DUMP_GRAPH 1
 
+// ScanData state
 enum {
        INITIAL,
        SCANNED,
@@ -197,30 +96,45 @@ Optimizations:
        We can split this data structure in two, those with bridges and those without
 */
 typedef struct {
+    // Colors (ColorDatas) linked to by objects with this color
        DynPtrArray other_colors;
+    // Bridge objects (GCObjects) held by objects with this color
        DynPtrArray bridges;
        int api_index    : 31;
        unsigned visited : 1;
 } ColorData;
 
-
-typedef struct {
-       GCObject *obj; //XXX this can be eliminated.
+// Represents one managed object. Equivalent of new/old bridge "HashEntry"
+typedef struct _ScanData {
+       // FIXME this can be eliminated; if we have a ScanData we generally looked it up from its GCObject
+       GCObject *obj;
+       // We use the sgen lock_word in GCObject to store a pointer to the ScanData. Cache the original here to restore later:
        mword lock_word;
 
        ColorData *color;
+       // Tarjan algorithm index (order visited)
        int index;
+       // Tarjan index of lowest-index object known reachable from here
        int low_index : 27;
 
+       // See "ScanData state" enum above
        unsigned state : 2;
        unsigned is_bridge : 1;
+       // Similar to lock_word, we use these bits in the GCObject as scratch space then restore them when done
        unsigned obj_state : 2;
 } ScanData;
 
 
 
+// Stacks of ScanData objects used for tarjan algorithm.
+// The Tarjan algorithm is normally defined recursively; here scan_stack simulates the call stack of a recursive algorithm,
+// and loop_stack is the stack structure used by the algorithm itself.
+static DynPtrArray scan_stack, loop_stack;
 
-static DynPtrArray scan_stack, loop_stack, registered_bridges;
+// GCObjects on which register_finalized_object has been called
+static DynPtrArray registered_bridges;
+
+// ColorData objects
 static DynPtrArray color_merge_array;
 
 static int ignored_objects;
@@ -299,6 +213,7 @@ free_object_buckets (void)
 //ColorData buckets
 #define NUM_COLOR_ENTRIES ((BUCKET_SIZE - SIZEOF_VOID_P * 2) / sizeof (ColorData))
 
+// Same as ObjectBucket except NUM_COLOR_ENTRIES and NUM_SCAN_ENTRIES differ
 typedef struct _ColorBucket ColorBucket;
 struct _ColorBucket {
        ColorBucket *next;
@@ -372,6 +287,8 @@ create_data (GCObject *obj)
        res->obj = obj;
        res->color = NULL;
        res->index = res->low_index = -1;
+       res->state = INITIAL;
+       res->is_bridge = FALSE;
        res->obj_state = o [0] & SGEN_VTABLE_BITS_MASK;
        res->lock_word = o [1];
 
@@ -574,6 +491,7 @@ is_opaque_object (GCObject *obj)
        return FALSE;
 }
 
+// Called during DFS; visits one child. If it is a candidate to be scanned, pushes it to the stacks.
 static void
 push_object (GCObject *obj)
 {
@@ -627,6 +545,7 @@ push_object (GCObject *obj)
                if (dst) push_object (dst);                     \
        } while (0)
 
+// dfs () function's queue-children-of-object operation.
 static void
 push_all (ScanData *data)
 {
@@ -635,7 +554,7 @@ push_all (ScanData *data)
        mword desc = sgen_obj_get_descriptor_safe (obj);
 
 #if DUMP_GRAPH
-       printf ("**scanning %p %s\n", obj, safe_name_bridge (obj));
+       printf ("+scanning %s (%p) index %d color %p\n", safe_name_bridge (data->obj), data->obj, data->index, data->color);
 #endif
 
        #include "sgen/sgen-scan-object.h"
@@ -647,8 +566,8 @@ compute_low_index (ScanData *data, GCObject *obj)
 {
        ScanData *other;
        ColorData *cd;
-       obj = bridge_object_forward (obj);
 
+       obj = bridge_object_forward (obj);
        other = find_data (obj);
 
 #if DUMP_GRAPH
@@ -723,12 +642,12 @@ create_scc (ScanData *data)
 #if DUMP_GRAPH
        printf ("|SCC rooted in %s (%p) has bridge %d\n", safe_name_bridge (data->obj), data->obj, found_bridge);
        printf ("\tpoints-to-colors: ");
-       for (i = 0; i < dyn_array_ptr_size (&color_merge_array); ++i)
+       for (int i = 0; i < dyn_array_ptr_size (&color_merge_array); ++i)
                printf ("%p ", dyn_array_ptr_get (&color_merge_array, i));
        printf ("\n");
 
        printf ("loop stack: ");
-       for (i = 0; i < dyn_array_ptr_size (&loop_stack); ++i) {
+       for (int i = 0; i < dyn_array_ptr_size (&loop_stack); ++i) {
                ScanData *other = dyn_array_ptr_get (&loop_stack, i);
                printf ("(%d/%d)", other->index, other->low_index);
        }
@@ -775,7 +694,7 @@ create_scc (ScanData *data)
                g_assert (cd->visited);
                cd->visited = FALSE;
        }
-       dyn_array_ptr_set_size (&color_merge_array, 0);
+       dyn_array_ptr_empty (&color_merge_array);
        found_bridge = FALSE;
 }
 
@@ -785,7 +704,7 @@ dfs (void)
        g_assert (dyn_array_ptr_size (&scan_stack) == 1);
        g_assert (dyn_array_ptr_size (&loop_stack) == 0);
 
-       dyn_array_ptr_set_size (&color_merge_array, 0);
+       dyn_array_ptr_empty (&color_merge_array);
 
        while (dyn_array_ptr_size (&scan_stack) > 0) {
                ScanData *data = (ScanData *)dyn_array_ptr_pop (&scan_stack);
@@ -852,15 +771,15 @@ register_finalized_object (GCObject *obj)
 static void
 reset_data (void)
 {
-       dyn_array_ptr_set_size (&registered_bridges, 0);
+       dyn_array_ptr_empty (&registered_bridges);
 }
 
 static void
 cleanup (void)
 {
-       dyn_array_ptr_set_size (&scan_stack, 0);
-       dyn_array_ptr_set_size (&loop_stack, 0);
-       dyn_array_ptr_set_size (&registered_bridges, 0);
+       dyn_array_ptr_empty (&scan_stack);
+       dyn_array_ptr_empty (&loop_stack);
+       dyn_array_ptr_empty (&registered_bridges);
        free_object_buckets ();
        free_color_buckets ();
        reset_cache ();
@@ -951,7 +870,7 @@ processing_stw_step (void)
 #if defined (DUMP_GRAPH)
        printf ("----summary----\n");
        printf ("bridges:\n");
-       for (i = 0; i < bridge_count; ++i) {
+       for (int i = 0; i < bridge_count; ++i) {
                ScanData *sd = find_data (dyn_array_ptr_get (&registered_bridges, i));
                printf ("\t%s (%p) index %d color %p\n", safe_name_bridge (sd->obj), sd->obj, sd->index, sd->color);
        }
@@ -1049,7 +968,7 @@ processing_build_callback_data (int generation)
                        if (!bridges)
                                continue;
 
-                       dyn_array_ptr_set_size (&color_merge_array, 0);
+                       dyn_array_ptr_empty (&color_merge_array);
                        gather_xrefs (cd);
                        reset_xrefs (cd);
                        dyn_array_ptr_set_all (&cd->other_colors, &color_merge_array);
@@ -1089,7 +1008,7 @@ processing_build_callback_data (int generation)
 
 #if defined (DUMP_GRAPH)
        printf ("---xrefs:\n");
-       for (i = 0; i < xref_count; ++i)
+       for (int i = 0; i < xref_count; ++i)
                printf ("\t%d -> %d\n", api_xrefs [i].src_scc_index, api_xrefs [i].dst_scc_index);
 #endif
 
index 95bac2301bd8b5f9d0dc20e5adb70b777ebf1faf..aaef8f6422a9e5fce06a7565c9912321cc17dd51 100644 (file)
@@ -62,6 +62,7 @@
 #include <mono/utils/mono-threads.h>
 #include <mono/utils/mono-memory-model.h>
 #include <mono/utils/networking.h>
+#include <mono/utils/w32handle.h>
 
 #include <time.h>
 #ifdef HAVE_SYS_TIME_H
index b78ca83b28551282d59395dba3d132807871f8c8..7cdaf5be6842228814efe36fa9922ba81fbe4ea5 100644 (file)
@@ -565,7 +565,7 @@ ves_icall_System_IOSelector_Add (gpointer handle, MonoIOSelectorJob *job)
 {
        ThreadPoolIOUpdate *update;
 
-       g_assert (handle >= 0);
+       g_assert (handle);
 
        g_assert ((job->operation == EVENT_IN) ^ (job->operation == EVENT_OUT));
        g_assert (job->callback);
index 1f4a6cc605237a36e6f13c3a28acc3c229086dff..87c976b48739179b813cc7a1364e23d7745df73e 100644 (file)
@@ -476,7 +476,7 @@ domain_get_next (ThreadPoolDomain *current)
                                        break;
                                }
                        }
-                       g_assert (current_idx >= 0);
+                       g_assert (current_idx != (guint)-1);
                }
                for (i = current_idx + 1; i < len + current_idx + 1; ++i) {
                        ThreadPoolDomain *tmp = (ThreadPoolDomain *)g_ptr_array_index (threadpool->domains, i % len);
index 4aa7c5d6435bc5e36a83a75ebd006f8190352856..50a4329603c88dd60e2ad06a1e78e1a2334ad7f4 100644 (file)
@@ -591,6 +591,7 @@ new_thread_with_internal (MonoDomain *domain, MonoInternalThread *internal)
        MonoThread *thread;
 
        thread = create_thread_object (domain);
+       thread->priority = THREAD_PRIORITY_NORMAL;
 
        MONO_OBJECT_SETREF (thread, internal_thread, internal);
 
@@ -744,7 +745,7 @@ static guint32 WINAPI start_wrapper_internal(void *data)
                args [0] = start_arg;
                /* we may want to handle the exception here. See comment below on unhandled exceptions */
                mono_runtime_delegate_invoke_checked (start_delegate, args, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
+               mono_error_raise_exception (&error); /* OK, triggers unhandled exn handler */
        }
 
        /* If the thread calls ExitThread at all, this remaining code
@@ -800,7 +801,7 @@ create_thread (MonoThread *thread, MonoInternalThread *internal, StartInfo *star
 {
        HANDLE thread_handle;
        MonoNativeThreadId tid;
-       guint32 create_flags;
+       MonoThreadParm tp;
 
        /*
         * Join joinable threads to prevent running out of threads since the finalizer
@@ -839,10 +840,11 @@ create_thread (MonoThread *thread, MonoInternalThread *internal, StartInfo *star
        /* Create suspended, so we can do some housekeeping before the thread
         * starts
         */
-       create_flags = CREATE_SUSPENDED;
+       tp.priority = thread->priority;
+       tp.stack_size = stack_size;
+       tp.creation_flags = CREATE_SUSPENDED;
 
-       thread_handle = mono_threads_create_thread ((LPTHREAD_START_ROUTINE)start_wrapper, start_info,
-                                                                                               stack_size, create_flags, &tid);
+       thread_handle = mono_threads_create_thread ((LPTHREAD_START_ROUTINE)start_wrapper, start_info, &tp, &tid);
 
        if (thread_handle == NULL) {
                /* The thread couldn't be created, so set an exception */
@@ -1419,7 +1421,10 @@ ves_icall_System_Threading_Thread_GetPriority (MonoThread *this_obj)
        MonoInternalThread *internal = this_obj->internal_thread;
 
        LOCK_THREAD (internal);
-       priority = GetThreadPriority (internal->handle) + 2;
+       if (internal->handle != NULL)
+               priority = GetThreadPriority (internal->handle) + 2;
+       else
+               priority = this_obj->priority + 2;
        UNLOCK_THREAD (internal);
        return priority;
 }
@@ -1437,7 +1442,9 @@ ves_icall_System_Threading_Thread_SetPriority (MonoThread *this_obj, int priorit
        MonoInternalThread *internal = this_obj->internal_thread;
 
        LOCK_THREAD (internal);
-       SetThreadPriority (internal->handle, priority - 2);
+       this_obj->priority = priority - 2;
+       if (internal->handle != NULL)
+               SetThreadPriority (internal->handle, this_obj->priority);
        UNLOCK_THREAD (internal);
 }
 
@@ -4533,7 +4540,7 @@ mono_thread_resume_interruption (void)
                return NULL;
 
        LOCK_THREAD (thread);
-       still_aborting = (thread->state & ThreadState_AbortRequested) != 0;
+       still_aborting = (thread->state & (ThreadState_AbortRequested|ThreadState_StopRequested)) != 0;
        UNLOCK_THREAD (thread);
 
        /*This can happen if the protected block called Thread::ResetAbort*/
@@ -5083,7 +5090,7 @@ gpointer
 mono_threads_attach_coop (MonoDomain *domain, gpointer *dummy)
 {
        MonoDomain *orig;
-       gboolean fresh_thread;
+       gboolean fresh_thread = FALSE;
 
        if (!domain) {
                /* Happens when called from AOTed code which is only used in the root domain. */
index c3da0227e3c78f729968ffa1e9c4391a47a84e51..09b76d4a128204dd9f34f314c3d4514c5ded671b 100644 (file)
@@ -2768,7 +2768,7 @@ verify_delegate_compatibility (VerifyContext *ctx, MonoClass *delegate, ILStackD
                        CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("This object not compatible with function pointer for delegate creation at 0x%04x", ctx->ip_offset));
        } else {
                if (method->flags & METHOD_ATTRIBUTE_STATIC) {
-                       if (!stack_slot_is_null_literal (value) && !is_first_arg_bound)
+                       if (!stack_slot_is_null_literal (value))
                                CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Non-null this args used with static function for delegate creation at 0x%04x", ctx->ip_offset));
                } else {
                        if (!verify_stack_type_compatibility_full (ctx, &method->klass->byval_arg, value, FALSE, TRUE) && !stack_slot_is_null_literal (value))
index 72ca453eb88436fc1b4c71764ef571566c8abe66..909113cae8e97077451a2dedf70dea6fbf87b99f 100644 (file)
@@ -17,7 +17,6 @@ WRAPPER(XDOMAIN_INVOKE, "xdomain-invoke")
 WRAPPER(XDOMAIN_DISPATCH, "xdomain-dispatch")
 WRAPPER(LDFLD, "ldfld")
 WRAPPER(STFLD, "stfld")
-WRAPPER(LDFLD_REMOTE, "ldfld-remote")
 WRAPPER(STFLD_REMOTE, "stfld-remote")
 WRAPPER(SYNCHRONIZED, "synchronized")
 WRAPPER(DYNAMIC_METHOD, "dynamic-method")
index fddbef9d9cb64556dc4f726d1adfb3a5a9260bce..17a8e84d91a9da461fd4b40e08d5040b4d624d1e 100644 (file)
@@ -183,10 +183,9 @@ print_evaluation_context_ranges (MonoRelationsEvaluationRanges *ranges) {
 }
 
 static void
-print_evaluation_context (MonoRelationsEvaluationContext *context) {
-       printf ("Context status: ");
-       print_evaluation_context_status (context->status);
-       if (context->status & (MONO_RELATIONS_EVALUATION_IN_PROGRESS|MONO_RELATIONS_EVALUATION_COMPLETED)) {
+print_evaluation_context (MonoRelationsEvaluationContext *context, MonoRelationsEvaluationStatus status) {
+       print_evaluation_context_status (status);
+       if (status & (MONO_RELATIONS_EVALUATION_IN_PROGRESS|MONO_RELATIONS_EVALUATION_COMPLETED)) {
                print_evaluation_context_ranges (&(context->ranges));
        }
        printf ("\n");
@@ -537,12 +536,9 @@ remove_change_from_evaluation_area (MonoAdditionalVariableRelation *change)
 
 
 static void
-clean_contexts (MonoRelationsEvaluationContext *contexts, int number)
+clean_contexts (MonoVariableRelationsEvaluationArea *area, int number)
 {
-       int i;
-       for (i = 0; i < number; i++) {
-               contexts [i].status = MONO_RELATIONS_EVALUATION_NOT_STARTED;
-       }
+       memset(area->statuses, MONO_RELATIONS_EVALUATION_NOT_STARTED, number * sizeof(MonoRelationsEvaluationStatus));
 }
 
 
@@ -655,13 +651,14 @@ intersect_ranges( MonoRelationsEvaluationRanges *ranges, MonoRelationsEvaluation
  *                 (or NULL for the first invocation)
  */
 static void
-evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *area, int variable, int target_variable, MonoRelationsEvaluationContext *father_context)
+evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *area, const int variable, const int target_variable, MonoRelationsEvaluationContext *father_context)
 {
-       MonoRelationsEvaluationContext *context = &(area->contexts [variable]);
+       MonoRelationsEvaluationContext * const context = &(area->contexts [variable]);
+       MonoRelationsEvaluationStatus * const status = &(area->statuses [variable]);
        
        // First of all, we check the evaluation status
        // (what must be done is *very* different in each case)
-       switch (context->status) {
+       switch (*status) {
        case MONO_RELATIONS_EVALUATION_NOT_STARTED: {
                MonoSummarizedValueRelation *relation = &(area->relations [variable]);
                
@@ -672,7 +669,7 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
                }
                
                // We properly inizialize the context
-               context->status = MONO_RELATIONS_EVALUATION_IN_PROGRESS;
+               *status = MONO_RELATIONS_EVALUATION_IN_PROGRESS;
                context->father = father_context;
                MONO_MAKE_RELATIONS_EVALUATION_RANGES_WEAK (context->ranges);
                
@@ -714,24 +711,25 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
                                if (relation->relation != MONO_ANY_RELATION) {
                                        int related_variable = relation->related_value.value.variable.variable;
                                        MonoRelationsEvaluationContext *related_context = &(area->contexts [related_variable]);
+                                       MonoRelationsEvaluationStatus related_status = area->statuses [related_variable];
                                        
                                        // The second condition in the "or" avoids messing with "back edges" in the graph traversal
                                        // (they are simply ignored instead of triggering the handling of recursion)
-                                       if ( (related_context->status == MONO_RELATIONS_EVALUATION_NOT_STARTED) || !
+                                       if ( (related_status == MONO_RELATIONS_EVALUATION_NOT_STARTED) || !
                                                        ((related_context->current_relation->related_value.type == MONO_VARIABLE_SUMMARIZED_VALUE) &&
                                                        (related_context->current_relation->related_value.value.variable.variable == variable))) {
                                                // Evaluate the related variable
                                                evaluate_relation_with_target_variable (area, related_variable, target_variable, context);
                                                
                                                // Check if we are part of a recursive loop
-                                               if (context->status & MONO_RELATIONS_EVALUATION_IS_RECURSIVE) {
+                                               if (*status & MONO_RELATIONS_EVALUATION_IS_RECURSIVE) {
                                                        if (TRACE_ABC_REMOVAL) {
                                                                printf ("Recursivity detected for variable %d (target variable %d), status ", variable, target_variable);
-                                                               print_evaluation_context_status (context->status);
+                                                               print_evaluation_context_status (*status);
                                                        }
                                                        
                                                        // If we are, check if the evaluation of the related variable is complete
-                                                       if (related_context->status == MONO_RELATIONS_EVALUATION_COMPLETED) {
+                                                       if (related_status == MONO_RELATIONS_EVALUATION_COMPLETED) {
                                                                // If it is complete, we are part of a recursive definition.
                                                                // Since it is a *definition* (and definitions are evaluated *before*
                                                                // conditions because they are first in the list), intersection is not
@@ -739,7 +737,7 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
                                                                context->ranges = related_context->ranges;
                                                                /* Delta has already been checked for over/under-flow when evaluating values */
                                                                MONO_ADD_DELTA_SAFELY_TO_RANGES (context->ranges, relation->related_value.value.variable.delta);
-                                                               context->status = MONO_RELATIONS_EVALUATION_COMPLETED;
+                                                               *status = MONO_RELATIONS_EVALUATION_COMPLETED;
                                                                if (TRACE_ABC_REMOVAL) {
                                                                        printf (", ranges already computed, result: \n");
                                                                        print_evaluation_context_ranges (&(context->ranges));
@@ -777,25 +775,25 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
                                        evaluate_relation_with_target_variable (area, phi_alternative, target_variable, context);
                                        
                                        // This means we are part of a recursive loop
-                                       if (context->status & MONO_RELATIONS_EVALUATION_IS_RECURSIVE) {
+                                       if (*status & MONO_RELATIONS_EVALUATION_IS_RECURSIVE) {
                                                if (TRACE_ABC_REMOVAL) {
                                                        printf ("Recursivity detected for variable %d (target variable %d), status ", variable, target_variable);
-                                                       print_evaluation_context_status (context->status);
+                                                       print_evaluation_context_status (*status);
                                                        printf ("\n");
                                                }
-                                               if (context->status & MONO_RELATIONS_EVALUATION_IS_RECURSIVELY_ASCENDING) {
+                                               if (*status & MONO_RELATIONS_EVALUATION_IS_RECURSIVELY_ASCENDING) {
                                                        is_ascending = TRUE;
                                                }
-                                               if (context->status & MONO_RELATIONS_EVALUATION_IS_RECURSIVELY_DESCENDING) {
+                                               if (*status & MONO_RELATIONS_EVALUATION_IS_RECURSIVELY_DESCENDING) {
                                                        is_descending = TRUE;
                                                }
-                                               if (context->status & MONO_RELATIONS_EVALUATION_IS_RECURSIVELY_INDEFINITE) {
+                                               if (*status & MONO_RELATIONS_EVALUATION_IS_RECURSIVELY_INDEFINITE) {
                                                        is_ascending = TRUE;
                                                        is_descending = TRUE;
                                                }
                                                
                                                // Clear "recursivity" bits in the status (recursion has been handled)
-                                               context->status = MONO_RELATIONS_EVALUATION_IN_PROGRESS;
+                                               *status = MONO_RELATIONS_EVALUATION_IN_PROGRESS;
                                        } else {
                                                MONO_RELATIONS_EVALUATION_RANGES_UNION (phi_ranges, area->contexts [phi_alternative].ranges);
                                        }
@@ -824,16 +822,16 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
                }
                
                // Check if any recursivity bits are still in the status, and in any case clear them
-               if (context->status & MONO_RELATIONS_EVALUATION_IS_RECURSIVE) {
+               if (*status & MONO_RELATIONS_EVALUATION_IS_RECURSIVE) {
                        if (TRACE_ABC_REMOVAL) {
                                printf ("Recursivity for variable %d (target variable %d) discards computation, status ", variable, target_variable);
-                               print_evaluation_context_status (context->status);
+                               print_evaluation_context_status (*status);
                                printf ("\n");
                        }
                        // If yes, we did not have enough information (most likely we were evaluated inside a PHI, but we also
                        // depended on the same PHI, which was still in evaluation...), so clear the status to "NOT_STARTED"
                        // (if we will be evaluated again, the PHI will be already done, so our evaluation will succeed)
-                       context->status = MONO_RELATIONS_EVALUATION_NOT_STARTED;
+                       *status = MONO_RELATIONS_EVALUATION_NOT_STARTED;
                } else {
                        if (TRACE_ABC_REMOVAL) {
                                printf ("Ranges for variable %d (target variable %d) computed: ", variable, target_variable);
@@ -841,7 +839,7 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
                                printf ("\n");
                        }
                        // If not (the common case) the evaluation is complete, and the result is in the context
-                       context->status = MONO_RELATIONS_EVALUATION_COMPLETED;
+                       *status = MONO_RELATIONS_EVALUATION_COMPLETED;
                }
                break;
        }
@@ -855,7 +853,7 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
                
                if (TRACE_ABC_REMOVAL) {
                        printf ("Evaluation of variable %d (target variable %d) already in progress\n", variable, target_variable);
-                       print_evaluation_context (context);
+                       print_evaluation_context (context, *status);
                        print_summarized_value_relation (context->current_relation);
                        printf ("\n");
                }
@@ -905,7 +903,9 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
                        
                        current_context = father_context;
                        while (current_context != last_context) {
-                               current_context->status = (MonoRelationsEvaluationStatus)(current_context->status | recursive_status);
+                               int index = father_context - area->contexts;
+                               MonoRelationsEvaluationStatus *current_status = &(area->statuses [index]);
+                               *current_status = (MonoRelationsEvaluationStatus)(*current_status | recursive_status);
                                current_context = current_context->father;
                        }
                } else {
@@ -921,7 +921,7 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are
        default:
                if (TRACE_ABC_REMOVAL) {
                        printf ("Variable %d (target variable %d) already in a recursive ring, skipping\n", variable, target_variable);
-                       print_evaluation_context (context);
+                       print_evaluation_context (context, *status);
                        print_summarized_value_relation (context->current_relation);
                        printf ("\n");
                }
@@ -986,7 +986,7 @@ remove_abc_from_inst (MonoInst *ins, MonoVariableRelationsEvaluationArea *area)
        MonoRelationsEvaluationContext *array_context = &(area->contexts [array_variable]);
        MonoRelationsEvaluationContext *index_context = &(area->contexts [index_variable]);
                                
-       clean_contexts (area->contexts, area->cfg->next_vreg);
+       clean_contexts (area, area->cfg->next_vreg);
                                
        evaluate_relation_with_target_variable (area, index_variable, array_variable, NULL);
        evaluate_relation_with_target_variable (area, array_variable, array_variable, NULL);
@@ -1017,7 +1017,7 @@ eval_non_null (MonoVariableRelationsEvaluationArea *area, int reg)
 {
        MonoRelationsEvaluationContext *context = &(area->contexts [reg]);
 
-       clean_contexts (area->contexts, area->cfg->next_vreg);
+       clean_contexts (area, area->cfg->next_vreg);
        evaluate_relation_with_target_variable (area, reg, reg, NULL);
                                
        return context->ranges.zero.lower > 0;
@@ -1271,8 +1271,13 @@ mono_perform_abc_removal (MonoCompile *cfg)
        area.cfg = cfg;
        area.relations = (MonoSummarizedValueRelation *)
                mono_mempool_alloc (cfg->mempool, sizeof (MonoSummarizedValueRelation) * (cfg->next_vreg) * 2);
+
        area.contexts = (MonoRelationsEvaluationContext *)
-               mono_mempool_alloc (cfg->mempool, sizeof (MonoRelationsEvaluationContext) * (cfg->next_vreg));
+               mono_mempool_alloc0 (cfg->mempool, sizeof (MonoRelationsEvaluationContext) * (cfg->next_vreg));
+
+       area.statuses = (MonoRelationsEvaluationStatus *)
+               mono_mempool_alloc0 (cfg->mempool, sizeof (MonoRelationsEvaluationStatus) * (cfg->next_vreg));
+
        area.variable_value_kind = (MonoIntegerValueKind *)
                mono_mempool_alloc (cfg->mempool, sizeof (MonoIntegerValueKind) * (cfg->next_vreg));
        area.defs = (MonoInst **)mono_mempool_alloc (cfg->mempool, sizeof (MonoInst*) * cfg->next_vreg);
index c9896af4033ae3dd77561f1becc54b1b45fc327c..0d00454a9da7304b4425afd9eea2ff14c40c1cc5 100644 (file)
@@ -179,14 +179,12 @@ typedef struct MonoRelationsEvaluationRanges {
 
 /**
  * The context of a variable evaluation.
- * status: the evaluation status
  * current_relation: the relation that is currently evaluated.
  * ranges: the result of the evaluation.
  * father: the context of the evaluation that invoked this one (used to
  *         perform the backtracking when loops are detected.
  */
 typedef struct MonoRelationsEvaluationContext {
-       MonoRelationsEvaluationStatus status;
        MonoSummarizedValueRelation *current_relation;
        MonoRelationsEvaluationRanges ranges;
        struct MonoRelationsEvaluationContext *father;
@@ -308,7 +306,17 @@ typedef struct MonoRelationsEvaluationContext {
 typedef struct MonoVariableRelationsEvaluationArea {
        MonoCompile *cfg;
        MonoSummarizedValueRelation *relations;
+
+/**
+ * statuses and contexts are parallel arrays. A given index into each refers to
+ * the same context. This is a performance optimization. Clean_context was
+ * coming to dominate the running time of abcremoval. By
+ * storing the statuses together, we can memset the entire
+ * region.
+ */ 
+       MonoRelationsEvaluationStatus *statuses;
        MonoRelationsEvaluationContext *contexts;
+
        MonoIntegerValueKind *variable_value_kind;
        MonoInst **defs;
 } MonoVariableRelationsEvaluationArea;
index f40070aeb38b9f2212c5f674aa1f346923938158..ebab8ae4b25519a818acf6fc04a10b53de9004c8 100644 (file)
@@ -226,7 +226,7 @@ handle_instruction:
                                        }
                                }
                                break;
-
+                       //FIXME missing storei1_membase_imm and storei2_membase_imm
                        case OP_STORE_MEMBASE_IMM:
                        case OP_STOREI4_MEMBASE_IMM:
                        case OP_STOREI8_MEMBASE_IMM:
index 95dc216d70e1be5c4068e4bbf0d600834c85e294..04e779766c77145293d5287c544e0aeeb2cd238a 100644 (file)
@@ -51,6 +51,7 @@
 #include <mono/utils/mono-compiler.h>
 #include <mono/utils/mono-time.h>
 #include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-rand.h>
 #include <mono/utils/json.h>
 #include <mono/utils/mono-threads-coop.h>
 
@@ -113,8 +114,8 @@ typedef struct MonoAotOptions {
        gboolean soft_debug;
        gboolean log_generics;
        gboolean log_instances;
-       gboolean gen_seq_points_file;
-       char *gen_seq_points_file_path;
+       gboolean gen_msym_dir;
+       char *gen_msym_dir_path;
        gboolean direct_pinvoke;
        gboolean direct_icalls;
        gboolean no_direct_calls;
@@ -902,7 +903,10 @@ arch_init (MonoAotCompile *acfg)
        if (acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "darwin")) {
                g_string_append (acfg->llc_args, "-mattr=+v6");
        } else {
-#ifdef ARM_FPU_VFP
+#if defined(ARM_FPU_VFP_HARD)
+               g_string_append (acfg->llc_args, " -mattr=+vfp2,-neon,+d16 -float-abi=hard");
+               g_string_append (acfg->as_args, " -mfpu=vfp3");
+#elif defined(ARM_FPU_VFP)
                g_string_append (acfg->llc_args, " -mattr=+vfp2,-neon,+d16");
                g_string_append (acfg->as_args, " -mfpu=vfp3");
 #else
@@ -2725,7 +2729,10 @@ find_typespec_for_class (MonoAotCompile *acfg, MonoClass *klass)
                        MonoError error;
                        int typespec = MONO_TOKEN_TYPE_SPEC | (i + 1);
                        MonoClass *klass_key = mono_class_get_and_inflate_typespec_checked (acfg->image, typespec, NULL, &error);
-                       g_assert (mono_error_ok (&error)); /* FIXME error handling */
+                       if (!is_ok (&error)) {
+                               mono_error_cleanup (&error);
+                               continue;
+                       }
                        g_hash_table_insert (acfg->typespec_classes, klass_key, GINT_TO_POINTER (typespec));
                }
        }
@@ -3097,7 +3104,6 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
                        encode_klass_ref (acfg, info->d.proxy.klass, p, &p);
                        break;
                }
-               case MONO_WRAPPER_LDFLD_REMOTE:
                case MONO_WRAPPER_STFLD_REMOTE:
                        break;
                case MONO_WRAPPER_ALLOC: {
@@ -3583,7 +3589,9 @@ get_runtime_invoke_sig (MonoMethodSignature *sig)
 
        mb = mono_mb_new (mono_defaults.object_class, "FOO", MONO_WRAPPER_NONE);
        m = mono_mb_create_method (mb, sig, 16);
-       return mono_marshal_get_runtime_invoke (m, FALSE);
+       MonoMethod *invoke = mono_marshal_get_runtime_invoke (m, FALSE);
+       mono_mb_free (mb);
+       return invoke;
 }
 
 static MonoMethod*
@@ -4055,7 +4063,7 @@ add_wrappers (MonoAotCompile *acfg)
                        continue;
                }
 
-               if (!acfg->aot_opts.llvm_only && klass->rank && MONO_TYPE_IS_PRIMITIVE (&klass->element_class->byval_arg)) {
+               if (klass->rank && MONO_TYPE_IS_PRIMITIVE (&klass->element_class->byval_arg)) {
                        MonoMethod *m, *wrapper;
 
                        /* Add runtime-invoke wrappers too */
@@ -4064,13 +4072,15 @@ add_wrappers (MonoAotCompile *acfg)
                        g_assert (m);
                        wrapper = mono_marshal_get_array_accessor_wrapper (m);
                        add_extra_method (acfg, wrapper);
-                       add_extra_method (acfg, get_runtime_invoke (acfg, wrapper, FALSE));
+                       if (!acfg->aot_opts.llvm_only)
+                               add_extra_method (acfg, get_runtime_invoke (acfg, wrapper, FALSE));
 
                        m = mono_class_get_method_from_name (klass, "Set", -1);
                        g_assert (m);
                        wrapper = mono_marshal_get_array_accessor_wrapper (m);
                        add_extra_method (acfg, wrapper);
-                       add_extra_method (acfg, get_runtime_invoke (acfg, wrapper, FALSE));
+                       if (!acfg->aot_opts.llvm_only)
+                               add_extra_method (acfg, get_runtime_invoke (acfg, wrapper, FALSE));
                }
        }
 
@@ -4229,6 +4239,7 @@ add_wrappers (MonoAotCompile *acfg)
                                if (export_name)
                                        g_hash_table_insert (acfg->export_names, wrapper, export_name);
                        }
+                       g_free (cattr);
                }
 
                if ((method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
@@ -4653,9 +4664,11 @@ add_types_from_method_header (MonoAotCompile *acfg, MonoMethod *method)
                for (j = 0; j < header->num_locals; ++j)
                        if (header->locals [j]->type == MONO_TYPE_GENERICINST)
                                add_generic_class_with_depth (acfg, mono_class_from_mono_type (header->locals [j]), depth + 1, "local");
+               mono_metadata_free_mh (header);
        } else {
                mono_error_cleanup (&error); /* FIXME report the error */
        }
+
 }
 
 /*
@@ -4940,23 +4953,23 @@ add_generic_instances (MonoAotCompile *acfg)
                }
 
                /* object[] accessor wrappers. */
-               {
-                       MonoClass *obj_array_class = mono_array_class_get (mono_defaults.object_class, 1);
+               for (i = 1; i < 4; ++i) {
+                       MonoClass *obj_array_class = mono_array_class_get (mono_defaults.object_class, i);
                        MonoMethod *m;
 
-                       m = mono_class_get_method_from_name (obj_array_class, "Get", 1);
+                       m = mono_class_get_method_from_name (obj_array_class, "Get", i);
                        g_assert (m);
 
                        m = mono_marshal_get_array_accessor_wrapper (m);
                        add_extra_method (acfg, m);
 
-                       m = mono_class_get_method_from_name (obj_array_class, "Address", 1);
+                       m = mono_class_get_method_from_name (obj_array_class, "Address", i);
                        g_assert (m);
 
                        m = mono_marshal_get_array_accessor_wrapper (m);
                        add_extra_method (acfg, m);
 
-                       m = mono_class_get_method_from_name (obj_array_class, "Set", 2);
+                       m = mono_class_get_method_from_name (obj_array_class, "Set", i + 1);
                        g_assert (m);
 
                        m = mono_marshal_get_array_accessor_wrapper (m);
@@ -5391,6 +5404,7 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
                }
        }
 
+       g_ptr_array_free (patches, TRUE);
        g_free (locs);
 }
 
@@ -5886,6 +5900,8 @@ emit_method_info (MonoAotCompile *acfg, MonoCompile *cfg)
 
        encode_patch_list (acfg, patches, n_patches, cfg->compile_llvm, first_got_offset, p, &p);
 
+       g_ptr_array_free (patches, TRUE);
+
        acfg->stats.info_size += p - buf;
 
        g_assert (p - buf < buf_size);
@@ -5972,6 +5988,8 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg, gboolean stor
 
                unwind_desc = get_unwind_info_offset (acfg, encoded, encoded_len);
                encode_value (unwind_desc, p, &p);
+
+               g_free (encoded);
        } else {
                encode_value (jinfo->unwind_info, p, &p);
        }
@@ -6510,6 +6528,7 @@ emit_trampoline_full (MonoAotCompile *acfg, int got_offset, MonoTrampInfo *info,
 
        encode_patch_list (acfg, patches, patches->len, FALSE, got_offset, p, &p);
        g_assert (p - buf < buf_size);
+       g_ptr_array_free (patches, TRUE);
 
        sprintf (symbol, "%s%s_p", acfg->user_symbol_prefix, name);
 
@@ -6547,6 +6566,8 @@ emit_trampoline_full (MonoAotCompile *acfg, int got_offset, MonoTrampInfo *info,
                if (acfg->dwarf)
                        mono_dwarf_writer_emit_trampoline (acfg->dwarf, symbol, symbol2, NULL, NULL, code_size, unwind_ops);
        }
+
+       g_free (buf);
 }
 
 static G_GNUC_UNUSED void
@@ -6646,10 +6667,12 @@ emit_trampolines (MonoAotCompile *acfg)
                        offset = MONO_RGCTX_SLOT_MAKE_RGCTX (i);
                        mono_arch_create_rgctx_lazy_fetch_trampoline (offset, &info, TRUE);
                        emit_trampoline (acfg, acfg->got_offset, info);
+                       g_free (info);
 
                        offset = MONO_RGCTX_SLOT_MAKE_MRGCTX (i);
                        mono_arch_create_rgctx_lazy_fetch_trampoline (offset, &info, TRUE);
                        emit_trampoline (acfg, acfg->got_offset, info);
+                       g_free (info);
                }
 
 #ifdef MONO_ARCH_HAVE_GENERAL_RGCTX_LAZY_FETCH_TRAMPOLINE
@@ -7043,12 +7066,13 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
                } else if (str_begins_with (arg, "soft-debug")) {
                        opts->soft_debug = TRUE;
                } else if (str_begins_with (arg, "gen-seq-points-file=")) {
-                       debug_options.gen_seq_points_compact_data = TRUE;
-                       opts->gen_seq_points_file = TRUE;
-                       opts->gen_seq_points_file_path = g_strdup (arg + strlen ("gen-seq-points-file="));;
+                       fprintf (stderr, "Mono Warning: aot option gen-seq-points-file= is deprecated.\n");
                } else if (str_begins_with (arg, "gen-seq-points-file")) {
-                       debug_options.gen_seq_points_compact_data = TRUE;
-                       opts->gen_seq_points_file = TRUE;
+                       fprintf (stderr, "Mono Warning: aot option gen-seq-points-file is deprecated.\n");
+               } else if (str_begins_with (arg, "msym-dir=")) {
+                       debug_options.no_seq_points_compact_data = FALSE;
+                       opts->gen_msym_dir = TRUE;
+                       opts->gen_msym_dir_path = g_strdup (arg + strlen ("msym_dir="));;
                } else if (str_begins_with (arg, "direct-pinvoke")) {
                        opts->direct_pinvoke = TRUE;
                } else if (str_begins_with (arg, "direct-icalls")) {
@@ -7116,7 +7140,7 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
                        printf ("    tool-prefix=\n");
                        printf ("    readonly-value=\n");
                        printf ("    soft-debug\n");
-                       printf ("    gen-seq-points-file\n");
+                       printf ("    msym-dir=\n");
                        printf ("    gc-maps\n");
                        printf ("    print-skipped\n");
                        printf ("    no-instances\n");
@@ -7180,7 +7204,6 @@ can_encode_method (MonoAotCompile *acfg, MonoMethod *method)
                        case MONO_WRAPPER_STFLD:
                        case MONO_WRAPPER_LDFLD:
                        case MONO_WRAPPER_LDFLDA:
-                       case MONO_WRAPPER_LDFLD_REMOTE:
                        case MONO_WRAPPER_STFLD_REMOTE:
                        case MONO_WRAPPER_STELEMREF:
                        case MONO_WRAPPER_ISINST:
@@ -7463,7 +7486,6 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                if (acfg->aot_opts.print_skipped_methods)
                        printf ("Skip (disabled): %s\n", mono_method_get_full_name (method));
                InterlockedIncrement (&acfg->stats.ocount);
-               mono_destroy_compile (cfg);
                return;
        }
        cfg->method_index = index;
@@ -7506,7 +7528,6 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                if (acfg->aot_opts.print_skipped_methods)
                        printf ("Skip (abs call): %s\n", mono_method_get_full_name (method));
                InterlockedIncrement (&acfg->stats.abscount);
-               mono_destroy_compile (cfg);
                return;
        }
 
@@ -7535,7 +7556,6 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                if (acfg->aot_opts.print_skipped_methods)
                        printf ("Skip (patches): %s\n", mono_method_get_full_name (method));
                acfg->stats.ocount++;
-               mono_destroy_compile (cfg);
                mono_acfg_unlock (acfg);
                return;
        }
@@ -7712,20 +7732,12 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                        locals [i] = (MonoInst *)mono_mempool_alloc (acfg->mempool, sizeof (MonoInst));
                        memcpy (locals [i], cfg->locals [i], sizeof (MonoInst));
                }
+               mono_metadata_free_mh (header);
                cfg->locals = locals;
        }
 
        /* Free some fields used by cfg to conserve memory */
-       mono_mempool_destroy (cfg->mempool);
-       cfg->mempool = NULL;
-       g_free (cfg->varinfo);
-       cfg->varinfo = NULL;
-       g_free (cfg->vars);
-       cfg->vars = NULL;
-       if (cfg->rs) {
-               mono_regstate_free (cfg->rs);
-               cfg->rs = NULL;
-       }
+       mono_empty_compile (cfg);
 
        //printf ("Compile:           %s\n", mono_method_full_name (method, TRUE));
 
@@ -8816,6 +8828,7 @@ emit_extra_methods (MonoAotCompile *acfg)
                        g_ptr_array_add (table, new_entry);
                }
        }
+       g_free (chain_lengths);
 
        //printf ("MAX: %d\n", max_chain_length);
 
@@ -8845,6 +8858,8 @@ emit_extra_methods (MonoAotCompile *acfg)
        /* Emit the table */
        emit_aot_data (acfg, MONO_AOT_TABLE_EXTRA_METHOD_TABLE, "extra_method_table", buf, p - buf);
 
+       g_free (buf);
+
        /* 
         * Emit a table reverse mapping method indexes to their index in extra_method_info.
         * This is used by mono_aot_find_jit_info ().
@@ -8859,8 +8874,27 @@ emit_extra_methods (MonoAotCompile *acfg)
                encode_int (info_offsets [i], p, &p);
        }
        emit_aot_data (acfg, MONO_AOT_TABLE_EXTRA_METHOD_INFO_OFFSETS, "extra_method_info_offsets", buf, p - buf);
+
+       g_free (buf);
+       g_free (info_offsets);
+       g_ptr_array_free (table, TRUE);
 }      
 
+static void
+generate_aotid (guint8* aotid)
+{
+       gpointer *rand_handle;
+       MonoError error;
+
+       mono_rand_open ();
+       rand_handle = mono_rand_init (NULL, 0);
+
+       mono_rand_try_get_bytes (rand_handle, aotid, 16, &error);
+       mono_error_assert_ok (&error);
+
+       mono_rand_close (rand_handle);
+}
+
 static void
 emit_exception_info (MonoAotCompile *acfg)
 {
@@ -8876,7 +8910,7 @@ emit_exception_info (MonoAotCompile *acfg)
 
                        // By design aot-runtime decode_exception_debug_info is not able to load sequence point debug data from a file.
                        // As it is not possible to load debug data from a file its is also not possible to store it in a file.
-                       gboolean method_seq_points_to_file = acfg->aot_opts.gen_seq_points_file &&
+                       gboolean method_seq_points_to_file = acfg->aot_opts.gen_msym_dir &&
                                cfg->gen_seq_points && !cfg->gen_sdb_seq_points;
                        gboolean method_seq_points_to_binary = cfg->gen_seq_points && !method_seq_points_to_file;
                        
@@ -8896,11 +8930,25 @@ emit_exception_info (MonoAotCompile *acfg)
        }
 
        if (seq_points_to_file) {
-               char *seq_points_aot_file = acfg->aot_opts.gen_seq_points_file_path ? acfg->aot_opts.gen_seq_points_file_path
-                       : g_strdup_printf("%s%s", acfg->image->name, SEQ_POINT_AOT_EXT);
-               mono_seq_point_data_write (&sp_data, seq_points_aot_file);
+               char *aotid = mono_guid_to_string_minimal (acfg->image->aotid);
+               char *dir = g_build_filename (acfg->aot_opts.gen_msym_dir_path, aotid, NULL);
+               char *image_basename = g_path_get_basename (acfg->image->name);
+               char *aot_file = g_strdup_printf("%s%s", image_basename, SEQ_POINT_AOT_EXT);
+               char *aot_file_path = g_build_filename (dir, aot_file, NULL);
+
+               if (g_ensure_directory_exists (aot_file_path) == FALSE) {
+                       fprintf (stderr, "AOT : failed to create msym directory: %s\n", aot_file_path);
+                       exit (1);
+               }
+
+               mono_seq_point_data_write (&sp_data, aot_file_path);
                mono_seq_point_data_free (&sp_data);
-               g_free (seq_points_aot_file);
+
+               g_free (aotid);
+               g_free (dir);
+               g_free (image_basename);
+               g_free (aot_file);
+               g_free (aot_file_path);
        }
 
        acfg->stats.offsets_size += emit_offset_table (acfg, "ex_info_offsets", MONO_AOT_TABLE_EX_INFO_OFFSETS, acfg->nmethods, 10, offsets);
@@ -9035,10 +9083,14 @@ emit_class_name_table (MonoAotCompile *acfg)
                        else
                                encode_int16 (0, p, &p);
                }
+               g_free (entry);
        }
        g_assert (p - buf <= buf_size);
+       g_ptr_array_free (table, TRUE);
 
        emit_aot_data (acfg, MONO_AOT_TABLE_CLASS_NAME, "class_name_table", buf, p - buf);
+
+       g_free (buf);
 }
 
 static void
@@ -9354,6 +9406,8 @@ init_aot_file_info (MonoAotCompile *acfg, MonoAotFileInfo *info)
        info->nshared_got_entries = acfg->nshared_got_entries;
        for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
                info->tramp_page_code_offsets [i] = acfg->tramp_page_code_offsets [i];
+
+       memcpy(&info->aotid, acfg->image->aotid, 16);
 }
 
 static void
@@ -9486,6 +9540,8 @@ emit_aot_file_info (MonoAotCompile *acfg, MonoAotFileInfo *info)
        for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
                emit_int32 (acfg, info->tramp_page_code_offsets [i]);
 
+       emit_bytes (acfg, info->aotid, 16);
+
        if (acfg->aot_opts.static_link) {
                emit_global_inner (acfg, acfg->static_linking_symbol, FALSE);
                emit_alignment (acfg, sizeof (gpointer));
@@ -9715,6 +9771,7 @@ compile_methods (MonoAotCompile *acfg)
                HANDLE handle;
                gpointer *user_data;
                MonoMethod **methods;
+               MonoThreadParm tp;
 
                methods_len = acfg->methods->len;
 
@@ -9745,7 +9802,10 @@ compile_methods (MonoAotCompile *acfg)
                        user_data [1] = acfg;
                        user_data [2] = frag;
                        
-                       handle = mono_threads_create_thread ((LPTHREAD_START_ROUTINE)compile_thread_main, user_data, 0, 0, NULL);
+                       tp.priority = 0;
+                       tp.stack_size = 0;
+                       tp.creation_flags = 0;
+                       handle = mono_threads_create_thread ((LPTHREAD_START_ROUTINE)compile_thread_main, user_data, &tp, NULL);
                        g_ptr_array_add (threads, handle);
                }
                g_free (methods);
@@ -9926,7 +9986,7 @@ compile_asm (MonoAotCompile *acfg)
         * gas generates 'mapping symbols' each time code and data is mixed, which 
         * happens a lot in emit_and_reloc_code (), so we need to get rid of them.
         */
-       command = g_strdup_printf ("\"%sstrip\" --strip-symbol=\\$a --strip-symbol=\\$d %s", tool_prefix, tmp_outfile_name);
+       command = g_strdup_printf ("\"%sstrip\" --strip-symbol=\\$a --strip-symbol=\\$d %s", wrap_path(tool_prefix), wrap_path(tmp_outfile_name));
        aot_printf (acfg, "Stripping the binary: %s\n", command);
        if (execute_system (command) != 0) {
                g_free (tmp_outfile_name);
@@ -10041,8 +10101,10 @@ acfg_free (MonoAotCompile *acfg)
        mono_img_writer_destroy (acfg->w);
        for (i = 0; i < acfg->nmethods; ++i)
                if (acfg->cfgs [i])
-                       g_free (acfg->cfgs [i]);
+                       mono_destroy_compile (acfg->cfgs [i]);
+
        g_free (acfg->cfgs);
+
        g_free (acfg->static_linking_symbol);
        g_free (acfg->got_symbol);
        g_free (acfg->plt_symbol);
@@ -10373,6 +10435,12 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
 
        aot_printf (acfg, "Mono Ahead of Time compiler - compiling assembly %s\n", image->name);
 
+       generate_aotid ((guint8*) &acfg->image->aotid);
+
+       char *aotid = mono_guid_to_string (acfg->image->aotid);
+       aot_printf (acfg, "AOTID %s\n", aotid);
+       g_free (aotid);
+
 #ifndef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
        if (mono_aot_mode_is_full (&acfg->aot_opts)) {
                aot_printerrf (acfg, "--aot=full is not supported on this platform.\n");
index a92b19ef8944350cff944f3e0243664ad8af2ccf..14fcfbabc056fbde074805348a4d92c75fdb1133 100644 (file)
@@ -922,9 +922,6 @@ decode_method_ref_with_target (MonoAotModule *module, MethodRef *ref, MonoMethod
                        }
                        break;
                }
-               case MONO_WRAPPER_LDFLD_REMOTE:
-                       ref->method = mono_marshal_get_ldfld_remote_wrapper (NULL);
-                       break;
                case MONO_WRAPPER_STFLD_REMOTE:
                        ref->method = mono_marshal_get_stfld_remote_wrapper (NULL);
                        break;
@@ -1785,17 +1782,6 @@ check_usable (MonoAssembly *assembly, MonoAotFileInfo *info, guint8 *blob, char
                msg = g_strdup_printf ("not compiled with --aot=llvmonly");
                usable = FALSE;
        }
-#ifdef TARGET_ARM
-       /* mono_arch_find_imt_method () requires this */
-       if ((info->flags & MONO_AOT_FILE_FLAG_WITH_LLVM) && !mono_use_llvm) {
-               msg = g_strdup_printf ("compiled against LLVM");
-               usable = FALSE;
-       }
-       if (!(info->flags & MONO_AOT_FILE_FLAG_WITH_LLVM) && mono_use_llvm) {
-               msg = g_strdup_printf ("not compiled against LLVM");
-               usable = FALSE;
-       }
-#endif
        if (mini_get_debug_options ()->mdb_optimizations && !(info->flags & MONO_AOT_FILE_FLAG_DEBUG) && !full_aot) {
                msg = g_strdup_printf ("not compiled for debugging");
                usable = FALSE;
@@ -2016,6 +2002,9 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                find_symbol (sofile, globals, "mono_aot_file_info", (gpointer*)&info);
        }
 
+       // Copy aotid to MonoImage
+       memcpy(&assembly->image->aotid, info->aotid, 16);
+
        if (version_symbol) {
                /* Old file format */
                version = atoi (version_symbol);
@@ -4523,7 +4512,15 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
                        if (info->subtype == WRAPPER_SUBTYPE_ARRAY_ACCESSOR) {
                                MonoMethod *array_method = info->d.array_accessor.method;
                                if (MONO_TYPE_IS_REFERENCE (&array_method->klass->element_class->byval_arg)) {
-                                       MonoClass *obj_array_class = mono_array_class_get (mono_defaults.object_class, 1);
+                                       int rank;
+
+                                       if (!strcmp (array_method->name, "Set"))
+                                               rank = mono_method_signature (array_method)->param_count - 1;
+                                       else if (!strcmp (array_method->name, "Get") || !strcmp (array_method->name, "Address"))
+                                               rank = mono_method_signature (array_method)->param_count;
+                                       else
+                                               g_assert_not_reached ();
+                                       MonoClass *obj_array_class = mono_array_class_get (mono_defaults.object_class, rank);
                                        MonoMethod *m = mono_class_get_method_from_name (obj_array_class, array_method->name, mono_method_signature (array_method)->param_count);
                                        g_assert (m);
 
@@ -5837,7 +5834,7 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method)
 
 gpointer
 mono_aot_get_method_checked (MonoDomain *domain,
-                                                        MonoMethod *method, MonoError *error);
+                                                        MonoMethod *method, MonoError *error)
 {
        mono_error_init (error);
        return NULL;
index ca8289b81c8313619b3f5c3e5fec193c4a503298..cab90f84d3de89b717e58beaf13e98419f440afa 100644 (file)
@@ -209,9 +209,11 @@ mono_replace_ins (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, MonoInst
 
                /* Multiple BBs */
 
-               /* Set region */
-               for (tmp = first_bb; tmp; tmp = tmp->next_bb)
+               /* Set region/real_offset */
+               for (tmp = first_bb; tmp; tmp = tmp->next_bb) {
                        tmp->region = bb->region;
+                       tmp->real_offset = bb->real_offset;
+               }
 
                /* Split the original bb */
                if (ins->next)
index 01219b452680de3f456877078820114f54b48f73..3eeae0fc0da1a42d346b733da64fe69f0d1e048b 100755 (executable)
@@ -792,3 +792,4 @@ gc_spill_slot_liveness_def: len:0
 gc_param_slot_liveness_def: len:0
 
 generic_class_init: src1:A len:32 clob:c
+get_last_error: dest:i len:32
index e567ed30fa797879ff151a594832f666603638f2..9b569ffc9c72fa8ca23ff029f10199efeb9745cd 100644 (file)
@@ -1627,7 +1627,12 @@ stop_debugger_thread (void)
 static void
 start_debugger_thread (void)
 {
-       debugger_thread_handle = mono_threads_create_thread (debugger_thread, NULL, 0, 0, NULL);
+       MonoThreadParm tp;
+
+       tp.priority = 0;
+       tp.stack_size = 0;
+       tp.creation_flags = 0;
+       debugger_thread_handle = mono_threads_create_thread (debugger_thread, NULL, &tp, NULL);
        g_assert (debugger_thread_handle);
 }
 
@@ -5320,7 +5325,8 @@ ss_start (SingleStepReq *ss_req, MonoMethod *method, SeqPoint* sp, MonoSeqPointI
                                                found_sp = mono_find_next_seq_point_for_native_offset (frame->domain, frame->method, (char*)ei->handler_start - (char*)jinfo->code_start, NULL, &local_sp);
                                                sp = (found_sp)? &local_sp : NULL;
 
-                                               ss_bp_add_one (ss_req, &ss_req_bp_count, &ss_req_bp_cache, frame->method, sp->il_offset);
+                                               if (found_sp)
+                                                       ss_bp_add_one (ss_req, &ss_req_bp_count, &ss_req_bp_cache, frame->method, sp->il_offset);
                                        }
                                }
                        }
@@ -8377,11 +8383,15 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint
        case CMD_TYPE_GET_METHODS_BY_NAME_FLAGS: {
                char *name = decode_string (p, &p, end);
                int i, flags = decode_int (p, &p, end);
-               MonoException *ex = NULL;
-               GPtrArray *array = mono_class_get_methods_by_name (klass, name, flags & ~BINDING_FLAGS_IGNORE_CASE, (flags & BINDING_FLAGS_IGNORE_CASE) != 0, TRUE, &ex);
+               MonoError error;
+               GPtrArray *array;
 
-               if (!array)
+               mono_error_init (&error);
+               array = mono_class_get_methods_by_name (klass, name, flags & ~BINDING_FLAGS_IGNORE_CASE, (flags & BINDING_FLAGS_IGNORE_CASE) != 0, TRUE, &error);
+               if (!is_ok (&error)) {
+                       mono_error_cleanup (&error);
                        return ERR_LOADER_ERROR;
+               }
                buffer_add_int (buf, array->len);
                for (i = 0; i < array->len; ++i) {
                        MonoMethod *method = (MonoMethod *)g_ptr_array_index (array, i);
index 9835ccc6f08b2245239554a00de8408dd45c412f..aba82d5ffcb99b4112210194768ec78050379d33 100644 (file)
@@ -1029,11 +1029,7 @@ mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[
                MonoObject *exc = NULL;
                int res;
 
-               res = mono_runtime_try_run_main (method, argc, argv, &exc, &error);
-               if (exc == NULL && !is_ok (&error))
-                       exc = (MonoObject*) mono_error_convert_to_exception (&error);
-               else
-                       mono_error_cleanup (&error);
+               res = mono_runtime_try_run_main (method, argc, argv, &exc);
                if (exc) {
                        mono_unhandled_exception (exc);
                        mono_invoke_unhandled_exception_hook (exc);
@@ -1042,7 +1038,11 @@ mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[
                return res;
        } else {
                int res = mono_runtime_run_main_checked (method, argc, argv, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
+               if (!is_ok (&error)) {
+                       MonoException *ex = mono_error_convert_to_exception (&error);
+                       if (ex)
+                               mono_unhandled_exception ((MonoObject*)ex);
+               }
                return res;
        }
 }
index b0118726438e63ec8da7b970286721328efe0808..919682acca6a9c5fb1d2d38456f16fabb01a9227 100644 (file)
@@ -1152,13 +1152,15 @@ mono_tasklets_arch_restore (void)
        amd64_movsl (code);
 
        /* now restore the registers from the LMF */
-       NOT_IMPLEMENTED;
        amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, lmf), 8);
+       amd64_mov_reg_membase (code, AMD64_RBP, AMD64_RCX, MONO_STRUCT_OFFSET (MonoLMF, rbp), 8);
        amd64_mov_reg_membase (code, AMD64_RSP, AMD64_RCX, MONO_STRUCT_OFFSET (MonoLMF, rsp), 8);
 
-       /* restore the lmf chain */
-       /*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4);
-       x86_mov_membase_reg (code, X86_ECX, 0, X86_EDX, 4);*/
+#ifdef WIN32
+       amd64_mov_reg_reg (code, AMD64_R14, AMD64_ARG_REG3, 8);
+#else
+       amd64_mov_reg_reg (code, AMD64_R12, AMD64_ARG_REG3, 8);
+#endif
 
        /* state is already in rax */
        amd64_jump_membase (code, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, return_ip));
index 5811210cabeb51ef59b2ab5c8c7de078de06e1ac..d737bc7f7f0768ab51457bf6008fda554de519d0 100644 (file)
@@ -1145,8 +1145,10 @@ mono_tasklets_arch_restore (void)
        /* the signature is: restore (MonoContinuation *cont, int state, MonoLMF **lmf_addr) */
        /* put cont in edx */
        x86_mov_reg_membase (code, X86_EDX, X86_ESP, 4, 4);
-        /* state in eax, so it's setup as the return value */
-        x86_mov_reg_membase (code, X86_EAX, X86_ESP, 8, 4);
+       /* state in eax, so it's setup as the return value */
+       x86_mov_reg_membase (code, X86_EAX, X86_ESP, 8, 4);
+       /* lmf_addr in ebx */
+       x86_mov_reg_membase(code, X86_EBX, X86_ESP, 0x0C, 4);
 
        /* setup the copy of the stack */
        x86_mov_reg_membase (code, X86_ECX, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, stack_used_size), 4);
@@ -1159,10 +1161,8 @@ mono_tasklets_arch_restore (void)
 
        /* now restore the registers from the LMF */
        x86_mov_reg_membase (code, X86_ECX, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, lmf), 4);
-       x86_mov_reg_membase (code, X86_EBX, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, ebx), 4);
        x86_mov_reg_membase (code, X86_EBP, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, ebp), 4);
-       x86_mov_reg_membase (code, X86_ESI, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, esi), 4);
-       x86_mov_reg_membase (code, X86_EDI, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, edi), 4);
+       x86_mov_reg_membase (code, X86_ESP, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, esp), 4);
 
        /* restore the lmf chain */
        /*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4);
index 1284cb292ae733f3f58dc8b78c5a07d72d31e488..80638b5048e6edf80854c7509ee3b7d18292cd5c 100644 (file)
@@ -898,6 +898,7 @@ class Tests
        }
 
        [Category ("!FULLAOT")]
+       [Category ("!BITCODE")]
        public static int test_0_regress_668095_synchronized_gshared () {
                return DoSomething (new DefaultRetriever ());
        }
index 8651aa25ec497c574a6d492e6ae6e9b324be8e14..d7c6d9a232fe63bbbf3731b6bd6567f2caf676eb 100644 (file)
@@ -1630,6 +1630,9 @@ resolve_vcall (MonoVTable *vt, int slot, MonoMethod *imt_method, gpointer *out_a
                        need_unbox_tramp = TRUE;
        }
 
+       if (m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
+               m = mono_marshal_get_synchronized_wrapper (m);
+
        // FIXME: This can throw exceptions
        addr = compiled_method = mono_compile_method_checked (m, error);
        mono_error_assert_ok (error);
@@ -1751,9 +1754,11 @@ mono_resolve_generic_virtual_iface_call (MonoVTable *vt, int imt_slot, MonoMetho
        if (vt->klass->valuetype)
                need_unbox_tramp = TRUE;
 
-       // FIXME: This can throw exceptions
+       if (m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
+               m = mono_marshal_get_synchronized_wrapper (m);
+
        addr = compiled_method = mono_compile_method_checked (m, &error);
-       mono_error_assert_ok (&error);
+       mono_error_raise_exception (&error);
        g_assert (addr);
 
        addr = mini_add_method_wrappers_llvmonly (m, addr, FALSE, need_unbox_tramp, &arg);
@@ -1816,12 +1821,16 @@ mono_llvmonly_init_delegate (MonoDelegate *del)
         * but we don't have a a structure which could own its memory.
         */
        if (G_UNLIKELY (!ftndesc)) {
-               gpointer addr = mono_compile_method_checked (del->method, &error);
+               MonoMethod *m = del->method;
+               if (m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
+                       m = mono_marshal_get_synchronized_wrapper (m);
+
+               gpointer addr = mono_compile_method_checked (m, &error);
                if (mono_error_set_pending_exception (&error))
                        return;
 
-               if (del->method->klass->valuetype && mono_method_signature (del->method)->hasthis)
-                   addr = mono_aot_get_unbox_trampoline (del->method);
+               if (m->klass->valuetype && mono_method_signature (m)->hasthis)
+                   addr = mono_aot_get_unbox_trampoline (m);
 
                gpointer arg = mini_get_delegate_arg (del->method, addr);
 
@@ -1842,6 +1851,9 @@ mono_llvmonly_init_delegate_virtual (MonoDelegate *del, MonoObject *target, Mono
 
        method = mono_object_get_virtual_method (target, method);
 
+       if (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
+               method = mono_marshal_get_synchronized_wrapper (method);
+
        del->method = method;
        del->method_ptr = mono_compile_method_checked (method, &error);
        if (mono_error_set_pending_exception (&error))
index 6ee1e0ff7929ef8118525e4280d15b911eb029c9..287022daad738c08857273cf5d686eb060edc1eb 100644 (file)
@@ -81,9 +81,11 @@ mono_linear_scan (MonoCompile *cfg, GList *vars, GList *regs, regmask_t *used_ma
        gboolean cost_driven;
 
        if (!cfg->disable_reuse_registers && vars && (((MonoMethodVar*)vars->data)->interval != NULL)) {
-               mono_linear_scan2 (cfg, vars, regs, used_mask);
-               return;
-       }
+               mono_linear_scan2 (cfg, vars, regs, used_mask);
+               g_list_free (regs);
+               g_list_free (vars);
+               return;
+       }
 
        cost_driven = TRUE;
 
index 7fef6b85cb9741b955d701ae1082822fea5cca66..2011fddafaf2b67bb34877c797008a9705e0fc4e 100644 (file)
@@ -34,6 +34,8 @@
 #include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h"
 #include "llvm/ExecutionEngine/Orc/OrcArchitectureSupport.h"
 
+#include <cstdlib>
+
 extern "C" {
 #include <mono/utils/mono-dl.h>
 }
@@ -64,6 +66,58 @@ void bzero (void *to, size_t count) { memset (to, 0, count); }
 
 #endif
 
+static AllocCodeMemoryCb *alloc_code_mem_cb;
+
+class MonoJitMemoryManager : public RTDyldMemoryManager
+{
+public:
+       ~MonoJitMemoryManager() override;
+
+       uint8_t *allocateDataSection(uintptr_t Size,
+                                                                unsigned Alignment,
+                                                                unsigned SectionID,
+                                                                StringRef SectionName,
+                                                                bool IsReadOnly) override;
+
+       uint8_t *allocateCodeSection(uintptr_t Size,
+                                                                unsigned Alignment,
+                                                                unsigned SectionID,
+                                                                StringRef SectionName) override;
+
+       bool finalizeMemory(std::string *ErrMsg = nullptr) override;
+};
+
+MonoJitMemoryManager::~MonoJitMemoryManager()
+{
+}
+
+uint8_t *
+MonoJitMemoryManager::allocateDataSection(uintptr_t Size,
+                                                                                 unsigned Alignment,
+                                                                                 unsigned SectionID,
+                                                                                 StringRef SectionName,
+                                                                                 bool IsReadOnly) {
+       uint8_t *res = (uint8_t*)malloc (Size);
+       assert (res);
+       memset (res, 0, Size);
+       return res;
+}
+
+uint8_t *
+MonoJitMemoryManager::allocateCodeSection(uintptr_t Size,
+                                                                                 unsigned Alignment,
+                                                                                 unsigned SectionID,
+                                                                                 StringRef SectionName)
+{
+       return alloc_code_mem_cb (NULL, Size);
+}
+
+bool
+MonoJitMemoryManager::finalizeMemory(std::string *ErrMsg)
+{
+       return false;
+}
+
 class MonoLLVMJIT {
 public:
        /* We use our own trampoline infrastructure instead of the Orc one */
@@ -105,7 +159,7 @@ public:
                                          } );
 
                return CompileLayer.addModuleSet(singletonSet(M),
-                                                                                 make_unique<SectionMemoryManager>(),
+                                                                                 make_unique<MonoJitMemoryManager>(),
                                                                                  std::move(Resolver));
        }
 
@@ -166,6 +220,8 @@ static MonoLLVMJIT *jit;
 MonoEERef
 mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, FunctionEmittedCb *emitted_cb, ExceptionTableCb *exception_cb, DlSymCb *dlsym_cb, LLVMExecutionEngineRef *ee)
 {
+       alloc_code_mem_cb = alloc_cb;
+
        InitializeNativeTarget ();
        InitializeNativeTargetAsmPrinter();
 
@@ -760,6 +816,13 @@ mono_llvm_optimize_method (MonoEERef eeref, LLVMValueRef method)
        g_assert_not_reached ();
 }
 
+gpointer
+mono_llvm_compile_method (MonoEERef mono_ee, LLVMValueRef method, int nvars, LLVMValueRef *callee_vars, gpointer *callee_addrs, gpointer *eh_frame)
+{
+       g_assert_not_reached ();
+       return NULL;
+}
+
 void
 mono_llvm_dispose_ee (MonoEERef *eeref)
 {
index 276f7952fba6624a64c7ac93449080c14aa9876f..241e6f57e59772d39287fe0b22cb5c2326ce0925 100644 (file)
@@ -52,7 +52,7 @@ probe_embedded (const char *program, int *ref_argc, char **ref_argv [])
        int fd = open (program, O_RDONLY);
        if (fd == -1)
                return FALSE;
-       if ((sigstart = lseek (fd, -(16+sizeof(uint64_t)), SEEK_END)) == -1)
+       if ((sigstart = lseek (fd, -24, SEEK_END)) == -1)
                goto doclose;
        if (read (fd, sigbuffer, sizeof (sigbuffer)) == -1)
                goto doclose;
index b0ca01954dd0902a91f25a02e4eda756f68fef2d..59ad7712d378ca86cb80f6a09ca87b3b8ace7559 100644 (file)
@@ -661,6 +661,24 @@ mono_find_block_region (MonoCompile *cfg, int offset)
        return -1;
 }
 
+static gboolean
+ip_in_finally_clause (MonoCompile *cfg, int offset)
+{
+       MonoMethodHeader *header = cfg->header;
+       MonoExceptionClause *clause;
+       int i;
+
+       for (i = 0; i < header->num_clauses; ++i) {
+               clause = &header->clauses [i];
+               if (clause->flags != MONO_EXCEPTION_CLAUSE_FINALLY && clause->flags != MONO_EXCEPTION_CLAUSE_FAULT)
+                       continue;
+
+               if (MONO_OFFSET_IN_HANDLER (clause, offset))
+                       return TRUE;
+       }
+       return FALSE;
+}
+
 static GList*
 mono_find_final_block (MonoCompile *cfg, unsigned char *ip, unsigned char *target, int type)
 {
@@ -2197,7 +2215,6 @@ target_type_is_incompatible (MonoCompile *cfg, MonoType *target, MonoInst *arg)
        if (target->byref) {
                /* FIXME: check that the pointed to types match */
                if (arg->type == STACK_MP) {
-                       if (cfg->verbose_level) printf ("ok\n");
                        /* This is needed to handle gshared types + ldaddr. We lower the types so we can handle enums and other typedef-like types. */
                        MonoClass *target_class_lowered = mono_class_from_mono_type (mini_get_underlying_type (&mono_class_from_mono_type (target)->byval_arg));
                        MonoClass *source_class_lowered = mono_class_from_mono_type (mini_get_underlying_type (&arg->klass->byval_arg));
@@ -4034,7 +4051,8 @@ handle_unbox_nullable (MonoCompile* cfg, MonoInst* val, MonoClass* klass, int co
                   RGCTX. */
                addr = emit_get_rgctx_method (cfg, context_used, method,
                                                                          MONO_RGCTX_INFO_GENERIC_METHOD_CODE);
-               if (cfg->llvm_only && cfg->gsharedvt) {
+               if (cfg->llvm_only) {
+                       cfg->signatures = g_slist_prepend_mempool (cfg->mempool, cfg->signatures, mono_method_signature (method));
                        return emit_llvmonly_calli (cfg, mono_method_signature (method), &val, addr);
                } else {
                        rgctx = emit_get_rgctx (cfg, cfg->current_method, context_used);
@@ -4470,14 +4488,19 @@ icall_is_direct_callable (MonoCompile *cfg, MonoMethod *cmethod)
 
 #define is_complex_isinst(klass) ((klass->flags & TYPE_ATTRIBUTE_INTERFACE) || klass->rank || mono_class_is_nullable (klass) || mono_class_is_marshalbyref (klass) || (klass->flags & TYPE_ATTRIBUTE_SEALED) || klass->byval_arg.type == MONO_TYPE_VAR || klass->byval_arg.type == MONO_TYPE_MVAR)
 
+static MonoInst*
+emit_isinst_with_cache (MonoCompile *cfg, MonoClass *klass, MonoInst **args)
+{
+       MonoMethod *mono_isinst = mono_marshal_get_isinst_with_cache ();
+       return mono_emit_method_call (cfg, mono_isinst, args, NULL);
+}
+
 static MonoInst*
 emit_castclass_with_cache (MonoCompile *cfg, MonoClass *klass, MonoInst **args)
 {
-       MonoMethod *mono_castclass;
+       MonoMethod *mono_castclass = mono_marshal_get_castclass_with_cache ();
        MonoInst *res;
 
-       mono_castclass = mono_marshal_get_castclass_with_cache ();
-
        save_cast_details (cfg, klass, args [0]->dreg, TRUE);
        res = mono_emit_method_call (cfg, mono_castclass, args, NULL);
        reset_cast_details (cfg);
@@ -4493,6 +4516,22 @@ get_castclass_cache_idx (MonoCompile *cfg)
        return (cfg->method_index << 16) | cfg->castclass_cache_index;
 }
 
+
+static MonoInst*
+emit_isinst_with_cache_nonshared (MonoCompile *cfg, MonoInst *obj, MonoClass *klass)
+{
+       MonoInst *args [3];
+       int idx;
+
+       args [0] = obj; /* obj */
+       EMIT_NEW_CLASSCONST (cfg, args [1], klass); /* klass */
+
+       idx = get_castclass_cache_idx (cfg); /* inline cache*/
+       args [2] = emit_runtime_constant (cfg, MONO_PATCH_INFO_CASTCLASS_CACHE, GINT_TO_POINTER (idx));
+
+       return emit_isinst_with_cache (cfg, klass, args);
+}
+
 static MonoInst*
 emit_castclass_with_cache_nonshared (MonoCompile *cfg, MonoInst *obj, MonoClass *klass)
 {
@@ -4517,45 +4556,16 @@ emit_castclass_with_cache_nonshared (MonoCompile *cfg, MonoInst *obj, MonoClass
  * Returns NULL and set the cfg exception on error.
  */
 static MonoInst*
-handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip, int *inline_costs)
+handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_used)
 {
        MonoBasicBlock *is_null_bb;
        int obj_reg = src->dreg;
        int vtable_reg = alloc_preg (cfg);
-       int context_used;
-       MonoInst *klass_inst = NULL, *res;
+       MonoInst *klass_inst = NULL;
 
        if (src->opcode == OP_PCONST && src->inst_p0 == 0)
                return src;
 
-       context_used = mini_class_check_context_used (cfg, klass);
-
-       if (!context_used && mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
-               res = emit_castclass_with_cache_nonshared (cfg, src, klass);
-               (*inline_costs) += 2;
-               return res;
-       } else if (!context_used && (mono_class_is_marshalbyref (klass) || klass->flags & TYPE_ATTRIBUTE_INTERFACE)) {
-               MonoMethod *mono_castclass;
-               MonoInst *iargs [1];
-               int costs;
-
-               mono_castclass = mono_marshal_get_castclass (klass); 
-               iargs [0] = src;
-                               
-               save_cast_details (cfg, klass, src->dreg, TRUE);
-               costs = inline_method (cfg, mono_castclass, mono_method_signature (mono_castclass), 
-                                                          iargs, ip, cfg->real_offset, TRUE);
-               reset_cast_details (cfg);
-               CHECK_CFG_EXCEPTION;
-               g_assert (costs > 0);
-                               
-               cfg->real_offset += 5;
-
-               (*inline_costs) += costs;
-
-               return src;
-       }
-
        if (context_used) {
                MonoInst *args [3];
 
@@ -4620,9 +4630,6 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip,
        reset_cast_details (cfg);
 
        return src;
-
-exception_exit:
-       return NULL;
 }
 
 /*
@@ -4642,21 +4649,15 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
                MonoInst *args [3];
 
                if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
-                       MonoMethod *mono_isinst = mono_marshal_get_isinst_with_cache ();
-                       MonoInst *cache_ins;
-
-                       cache_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_CAST_CACHE);
+                       MonoInst *cache_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_CAST_CACHE);
 
-                       /* obj */
-                       args [0] = src;
+                       args [0] = src; /* obj */
 
                        /* klass - it's the second element of the cache entry*/
                        EMIT_NEW_LOAD_MEMBASE (cfg, args [1], OP_LOAD_MEMBASE, alloc_preg (cfg), cache_ins->dreg, sizeof (gpointer));
 
-                       /* cache */
-                       args [2] = cache_ins;
-
-                       return mono_emit_method_call (cfg, mono_isinst, args, NULL);
+                       args [2] = cache_ins; /* cache */
+                       return emit_isinst_with_cache (cfg, klass, args);
                }
 
                klass_inst = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
@@ -5903,7 +5904,7 @@ llvm_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                if (opcode && fsig->param_count == 1) {
                        MONO_INST_NEW (cfg, ins, opcode);
                        ins->type = STACK_R8;
-                       ins->dreg = mono_alloc_freg (cfg);
+                       ins->dreg = mono_alloc_dreg (cfg, ins->type);
                        ins->sreg1 = args [0]->dreg;
                        MONO_ADD_INS (cfg->cbb, ins);
                }
@@ -5934,7 +5935,7 @@ llvm_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                if (opcode && fsig->param_count == 2) {
                        MONO_INST_NEW (cfg, ins, opcode);
                        ins->type = fsig->params [0]->type == MONO_TYPE_I4 ? STACK_I4 : STACK_I8;
-                       ins->dreg = mono_alloc_ireg (cfg);
+                       ins->dreg = mono_alloc_dreg (cfg, ins->type);
                        ins->sreg1 = args [0]->dreg;
                        ins->sreg2 = args [1]->dreg;
                        MONO_ADD_INS (cfg->cbb, ins);
@@ -6797,23 +6798,19 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                    !strcmp (cmethod->klass->image->assembly->aname.name, "monotouch")) &&
                                !strcmp (cmethod->klass->name_space, "XamCore.ObjCRuntime") &&
                                !strcmp (cmethod->klass->name, "Selector")) ||
-                          (!strcmp (cmethod->klass->image->assembly->aname.name, "Xamarin.iOS") &&
+                          ((!strcmp (cmethod->klass->image->assembly->aname.name, "Xamarin.iOS") ||
+                                !strcmp (cmethod->klass->image->assembly->aname.name, "Xamarin.Mac")) &&
                                !strcmp (cmethod->klass->name_space, "ObjCRuntime") &&
                                !strcmp (cmethod->klass->name, "Selector"))
                           ) {
-               if (cfg->backend->have_objc_get_selector &&
+               if ((cfg->backend->have_objc_get_selector || cfg->compile_llvm) &&
                        !strcmp (cmethod->name, "GetHandle") && fsig->param_count == 1 &&
                    (args [0]->opcode == OP_GOT_ENTRY || args [0]->opcode == OP_AOTCONST) &&
-                   cfg->compile_aot && !cfg->llvm_only) {
+                   cfg->compile_aot) {
                        MonoInst *pi;
                        MonoJumpInfoToken *ji;
                        char *s;
 
-                       // FIXME: llvmonly
-
-                       cfg->exception_message = g_strdup ("GetHandle");
-                       cfg->disable_llvm = TRUE;
-
                        if (args [0]->opcode == OP_GOT_ENTRY) {
                                pi = (MonoInst *)args [0]->inst_p1;
                                g_assert (pi->opcode == OP_PATCH_INFO);
@@ -8194,7 +8191,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
        if (!header) {
                mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
                goto exception_exit;
+       } else {
+               cfg->headers_to_free = g_slist_prepend_mempool (cfg->mempool, cfg->headers_to_free, header);
        }
+
        generic_container = mono_method_get_generic_container (method);
        sig = mono_method_signature (method);
        num_args = sig->hasthis + sig->param_count;
@@ -9053,6 +9053,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                for (i = 0; i < n; ++i)
                                        EMIT_NEW_ARGLOAD (cfg, call->args [i], i);
 
+                               if (mini_type_is_vtype (mini_get_underlying_type (call->signature->ret)))
+                                       call->vret_var = cfg->vret_addr;
+
                                mono_arch_emit_call (cfg, call);
                                cfg->param_area = MAX(cfg->param_area, call->stack_usage);
                                MONO_ADD_INS (cfg->cbb, (MonoInst*)call);
@@ -9745,6 +9748,20 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        inline_costs += 10 * num_calls++;
 
+                       /*
+                        * Synchronized wrappers.
+                        * Its hard to determine where to replace a method with its synchronized
+                        * wrapper without causing an infinite recursion. The current solution is
+                        * to add the synchronized wrapper in the trampolines, and to
+                        * change the called method to a dummy wrapper, and resolve that wrapper
+                        * to the real method in mono_jit_compile_method ().
+                        */
+                       if (cfg->method->wrapper_type == MONO_WRAPPER_SYNCHRONIZED) {
+                               MonoMethod *orig = mono_marshal_method_from_wrapper (cfg->method);
+                               if (cmethod == orig || (cmethod->is_inflated && mono_method_get_declaring_generic_method (cmethod) == orig))
+                                       cmethod = mono_marshal_get_synchronized_inner_wrapper (cmethod);
+                       }
+
                        /*
                         * Making generic calls out of gsharedvt methods.
                         * This needs to be used for all generic calls, not just ones with a gsharedvt signature, to avoid
@@ -9964,20 +9981,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                }
                        }
 
-                       /* 
-                        * Synchronized wrappers.
-                        * Its hard to determine where to replace a method with its synchronized
-                        * wrapper without causing an infinite recursion. The current solution is
-                        * to add the synchronized wrapper in the trampolines, and to
-                        * change the called method to a dummy wrapper, and resolve that wrapper
-                        * to the real method in mono_jit_compile_method ().
-                        */
-                       if (cfg->method->wrapper_type == MONO_WRAPPER_SYNCHRONIZED) {
-                               MonoMethod *orig = mono_marshal_method_from_wrapper (cfg->method);
-                               if (cmethod == orig || (cmethod->is_inflated && mono_method_get_declaring_generic_method (cmethod) == orig))
-                                       cmethod = mono_marshal_get_synchronized_inner_wrapper (cmethod);
-                       }
-
                        /*
                         * Virtual calls in llvm-only mode.
                         */
@@ -10958,21 +10961,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        break;
                }
                case CEE_CASTCLASS:
-                       CHECK_STACK (1);
-                       --sp;
-                       CHECK_OPSIZE (5);
-                       token = read32 (ip + 1);
-                       klass = mini_get_class (method, token, generic_context);
-                       CHECK_TYPELOAD (klass);
-                       if (sp [0]->type != STACK_OBJ)
-                               UNVERIFIED;
-
-                       ins = handle_castclass (cfg, klass, *sp, ip, &inline_costs);
-                       CHECK_CFG_EXCEPTION;
-
-                       *sp ++ = ins;
-                       ip += 5;
-                       break;
                case CEE_ISINST: {
                        CHECK_STACK (1);
                        --sp;
@@ -10982,53 +10970,19 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        CHECK_TYPELOAD (klass);
                        if (sp [0]->type != STACK_OBJ)
                                UNVERIFIED;
-                       context_used = mini_class_check_context_used (cfg, klass);
-
-                       if (!context_used && mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
-                               MonoMethod *mono_isinst = mono_marshal_get_isinst_with_cache ();
-                               MonoInst *args [3];
-                               int idx;
-
-                               /* obj */
-                               args [0] = *sp;
-
-                               /* klass */
-                               EMIT_NEW_CLASSCONST (cfg, args [1], klass);
-
-                               /* inline cache*/
-                               idx = get_castclass_cache_idx (cfg);
-                               args [2] = emit_runtime_constant (cfg, MONO_PATCH_INFO_CASTCLASS_CACHE, GINT_TO_POINTER (idx));
-
-                               *sp++ = mono_emit_method_call (cfg, mono_isinst, args, NULL);
-                               ip += 5;
-                               inline_costs += 2;
-                       } else if (!context_used && (mono_class_is_marshalbyref (klass) || klass->flags & TYPE_ATTRIBUTE_INTERFACE)) {
-                               MonoMethod *mono_isinst;
-                               MonoInst *iargs [1];
-                               int costs;
 
-                               mono_isinst = mono_marshal_get_isinst (klass); 
-                               iargs [0] = sp [0];
-
-                               costs = inline_method (cfg, mono_isinst, mono_method_signature (mono_isinst), 
-                                                                          iargs, ip, cfg->real_offset, TRUE);
-                               CHECK_CFG_EXCEPTION;
-                               g_assert (costs > 0);
-                               
-                               ip += 5;
-                               cfg->real_offset += 5;
+                       MONO_INST_NEW (cfg, ins, *ip == CEE_ISINST ? OP_ISINST : OP_CASTCLASS);
+                       ins->dreg = alloc_preg (cfg);
+                       ins->sreg1 = (*sp)->dreg;
+                       ins->klass = klass;
+                       ins->type = STACK_OBJ;
+                       MONO_ADD_INS (cfg->cbb, ins);
 
-                               *sp++= iargs [0];
+                       CHECK_CFG_EXCEPTION;
+                       *sp++ = ins;
+                       ip += 5;
 
-                               inline_costs += costs;
-                       }
-                       else {
-                               ins = handle_isinst (cfg, klass, *sp, context_used);
-                               CHECK_CFG_EXCEPTION;
-                               *sp ++ = ins;
-                               ip += 5;
-                       }
+                       cfg->flags |= MONO_CFG_HAS_TYPE_CHECK;
                        break;
                }
                case CEE_UNBOX_ANY: {
@@ -11049,8 +11003,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                res = handle_unbox_gsharedvt (cfg, klass, *sp);
                                inline_costs += 2;
                        } else if (generic_class_is_reference_type (cfg, klass)) {
-                               res = handle_castclass (cfg, klass, *sp, ip, &inline_costs);
-                               CHECK_CFG_EXCEPTION;
+                               MONO_INST_NEW (cfg, res, OP_CASTCLASS);
+                               res->dreg = alloc_preg (cfg);
+                               res->sreg1 = (*sp)->dreg;
+                               res->klass = klass;
+                               res->type = STACK_OBJ;
+                               MONO_ADD_INS (cfg->cbb, res);
+                               cfg->flags |= MONO_CFG_HAS_TYPE_CHECK;
                        } else if (mono_class_is_nullable (klass)) {
                                res = handle_unbox_nullable (cfg, *sp, klass, context_used);
                        } else {
@@ -11374,6 +11333,11 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                        MONO_EMIT_NULL_CHECK (cfg, sp [0]->dreg);
 
+                                       if (ins_flag & MONO_INST_VOLATILE) {
+                                               /* Volatile stores have release semantics, see 12.6.7 in Ecma 335 */
+                                               emit_memory_barrier (cfg, MONO_MEMORY_BARRIER_REL);
+                                       }
+
                                        if (mini_is_gsharedvt_klass (klass)) {
                                                MonoInst *offset_ins;
 
@@ -12333,6 +12297,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                INLINE_FAILURE ("throw");
                        break;
                case CEE_ENDFINALLY:
+                       if (!ip_in_finally_clause (cfg, ip - header->code))
+                               UNVERIFIED;
                        /* mono_save_seq_point_info () depends on this */
                        if (sp != stack_start)
                                emit_seq_point (cfg, method, ip, FALSE, FALSE);
@@ -12991,6 +12957,18 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        case CEE_MONO_LDDOMAIN:
                                CHECK_STACK_OVF (1);
                                EMIT_NEW_PCONST (cfg, ins, cfg->compile_aot ? NULL : cfg->domain);
+                               ip += 2;
+                               *sp++ = ins;
+                               break;
+                       case CEE_MONO_GET_LAST_ERROR:
+                               CHECK_OPSIZE (2);
+                               CHECK_STACK_OVF (1);
+
+                               MONO_INST_NEW (cfg, ins, OP_GET_LAST_ERROR);
+                               ins->dreg = alloc_dreg (cfg, STACK_I4);
+                               ins->type = STACK_I4;
+                               MONO_ADD_INS (cfg->cbb, ins);
+
                                ip += 2;
                                *sp++ = ins;
                                break;
@@ -13293,8 +13271,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ip += 4;
                                inline_costs += 1;
                                break;
-                       case CEE_LOCALLOC:
+                       case CEE_LOCALLOC: {
                                CHECK_STACK (1);
+                               MonoBasicBlock *non_zero_bb, *end_bb;
+                               int alloc_ptr = alloc_preg (cfg);
                                --sp;
                                if (sp != stack_start) 
                                        UNVERIFIED;
@@ -13306,8 +13286,20 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                         */
                                        INLINE_FAILURE("localloc");
 
+                               NEW_BBLOCK (cfg, non_zero_bb);
+                               NEW_BBLOCK (cfg, end_bb);
+
+                               /* if size != zero */
+                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, sp [0]->dreg, 0);
+                               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, non_zero_bb);
+
+                               //size is zero, so result is NULL
+                               MONO_EMIT_NEW_PCONST (cfg, alloc_ptr, NULL);
+                               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+                               MONO_START_BB (cfg, non_zero_bb);
                                MONO_INST_NEW (cfg, ins, OP_LOCALLOC);
-                               ins->dreg = alloc_preg (cfg);
+                               ins->dreg = alloc_ptr;
                                ins->sreg1 = sp [0]->dreg;
                                ins->type = STACK_PTR;
                                MONO_ADD_INS (cfg->cbb, ins);
@@ -13316,9 +13308,14 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                if (init_locals)
                                        ins->flags |= MONO_INST_INIT;
 
+                               MONO_START_BB (cfg, end_bb);
+                               EMIT_NEW_UNALU (cfg, ins, OP_MOVE, alloc_preg (cfg), alloc_ptr);
+                               ins->type = STACK_PTR;
+
                                *sp++ = ins;
                                ip += 2;
                                break;
+                       }
                        case CEE_ENDFILTER: {
                                MonoExceptionClause *clause, *nearest;
                                int cc;
@@ -13698,7 +13695,6 @@ mono_error_exit:
        g_slist_free (class_inits);
        mono_basic_block_free (original_bb);
        cfg->dont_inline = g_list_remove (cfg->dont_inline, method);
-       cfg->headers_to_free = g_slist_prepend_mempool (cfg->mempool, cfg->headers_to_free, header);
        if (cfg->exception_type)
                return -1;
        else
@@ -15052,6 +15048,74 @@ mono_spill_global_vars (MonoCompile *cfg, gboolean *need_local_opts)
        g_free (live_range_end_bb);
 }
 
+static void
+mono_decompose_typecheck (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins)
+{
+       MonoInst *ret, *move, *source;
+       MonoClass *klass = ins->klass;
+       int context_used = mini_class_check_context_used (cfg, klass);
+       int is_isinst = ins->opcode == OP_ISINST;
+       g_assert (is_isinst || ins->opcode == OP_CASTCLASS);
+       source = get_vreg_to_inst (cfg, ins->sreg1);
+       if (!source || source == (MonoInst *) -1)
+               source = mono_compile_create_var_for_vreg (cfg, &mono_defaults.object_class->byval_arg, OP_LOCAL, ins->sreg1);
+       g_assert (source && source != (MonoInst *) -1);
+
+       MonoBasicBlock *first_bb;
+       NEW_BBLOCK (cfg, first_bb);
+       cfg->cbb = first_bb;
+
+       if (!context_used && mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
+               if (is_isinst)
+                       ret = emit_isinst_with_cache_nonshared (cfg, source, klass);
+               else
+                       ret = emit_castclass_with_cache_nonshared (cfg, source, klass);
+       } else if (!context_used && (mono_class_is_marshalbyref (klass) || klass->flags & TYPE_ATTRIBUTE_INTERFACE)) {
+               MonoInst *iargs [1];
+               int costs;
+
+               iargs [0] = source;
+               if (is_isinst) {
+                       MonoMethod *wrapper = mono_marshal_get_isinst (klass);
+                       costs = inline_method (cfg, wrapper, mono_method_signature (wrapper), iargs, 0, 0, TRUE);
+               } else {
+                       MonoMethod *wrapper = mono_marshal_get_castclass (klass);
+                       save_cast_details (cfg, klass, source->dreg, TRUE);
+                       costs = inline_method (cfg, wrapper, mono_method_signature (wrapper), iargs, 0, 0, TRUE);
+                       reset_cast_details (cfg);
+               }
+               g_assert (costs > 0);
+               ret = iargs [0];
+       } else {
+               if (is_isinst)
+                       ret = handle_isinst (cfg, klass, source, context_used);
+               else
+                       ret = handle_castclass (cfg, klass, source, context_used);
+       }
+       EMIT_NEW_UNALU (cfg, move, OP_MOVE, ins->dreg, ret->dreg);
+
+       g_assert (cfg->cbb->code || first_bb->code);
+       MonoInst *prev = ins->prev;
+       mono_replace_ins (cfg, bb, ins, &prev, first_bb, cfg->cbb);
+}
+
+void
+mono_decompose_typechecks (MonoCompile *cfg)
+{
+       for (MonoBasicBlock *bb = cfg->bb_entry; bb; bb = bb->next_bb) {
+               MonoInst *ins;
+               MONO_BB_FOR_EACH_INS (bb, ins) {
+                       switch (ins->opcode) {
+                       case OP_ISINST:
+                       case OP_CASTCLASS:
+                               mono_decompose_typecheck (cfg, bb, ins);
+                               break;
+                       }
+               }
+       }
+}
+
+
 /**
  * FIXME:
  * - use 'iadd' instead of 'int_add'
index ddf699c58caf5878afcec17bdb707222e4820d97..591ebafb228ea3bb025e6e4290e77c5f3743bf80 100644 (file)
@@ -49,6 +49,7 @@ storage_name (ArgStorage st)
        case ArgOnStack: return "ArgOnStack";
        case ArgValuetypeInReg: return "ArgValuetypeInReg";
        case ArgValuetypeAddrInIReg: return "ArgValuetypeAddrInIReg";
+       case ArgValuetypeAddrOnStack: return "ArgValuetypeAddrOnStack";
        case ArgGSharedVtInReg: return "ArgGSharedVtInReg";
        case ArgGSharedVtOnStack: return "ArgGSharedVtOnStack";
        case ArgNone: return "ArgNone";
@@ -167,6 +168,18 @@ get_arg_slots (ArgInfo *ainfo, int **out_slots, gboolean is_source_argument)
                src = g_malloc (nsrc * sizeof (int));
                src [0] = map_freg (sreg);
                break;
+       case ArgValuetypeAddrInIReg:
+               nsrc = 1;
+               src = g_malloc (nsrc * sizeof (int));
+               src [0] = map_reg (ainfo->pair_regs [0]);
+               break;
+       case ArgValuetypeAddrOnStack:
+               nsrc = 1;
+               src = g_malloc (nsrc * sizeof (int));
+               // is_source_argument adds 2 because we're skipping over the old BBP and the return address
+               // XXX this is a very fragile setup as changes in alignment for the caller reg array can cause the magic number be 3
+               src [0] = map_stack_slot (sslot + (is_source_argument ? 2 : 0));
+               break;
        default:
                NOT_IMPLEMENTED;
                break;
@@ -196,6 +209,11 @@ handle_marshal_when_src_gsharedvt (ArgInfo *dst_info, int *arg_marshal, int *arg
                        *arg_marshal = GSHAREDVT_ARG_BYREF_TO_BYVAL;
                        *arg_slots = dst_info->nregs;
                        break;
+               case ArgValuetypeAddrInIReg:
+               case ArgValuetypeAddrOnStack:
+                       *arg_marshal = GSHAREDVT_ARG_NONE;
+                       *arg_slots = dst_info->nregs;
+                       break;
                default:
                        NOT_IMPLEMENTED; // Inappropriate value: if dst and src are gsharedvt at once, we shouldn't be here
                        break;
@@ -214,6 +232,10 @@ handle_marshal_when_dst_gsharedvt (ArgInfo *src_info, int *arg_marshal)
                case ArgOnStack:
                        *arg_marshal = GSHAREDVT_ARG_BYVAL_TO_BYREF;
                        break;
+               case ArgValuetypeAddrInIReg:
+               case ArgValuetypeAddrOnStack:
+                       *arg_marshal = GSHAREDVT_ARG_NONE;
+                       break;
                default:
                        NOT_IMPLEMENTED; // See above
                        break;
@@ -325,6 +347,10 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
                        handle_marshal_when_src_gsharedvt (dst_info, &arg_marshal, &arg_slots);
                        handle_map_when_gsharedvt_on_stack (src_info, &nsrc, &src, TRUE);
                        break;
+               case ArgValuetypeAddrInIReg:
+               case ArgValuetypeAddrOnStack:
+                       nsrc = get_arg_slots (src_info, &src, TRUE);
+                       break;
                default:
                        g_error ("Gsharedvt can't handle source arg type %d", (int)src_info->storage); // Inappropriate value: ArgValuetypeAddrInIReg is for returns only
                }
@@ -345,6 +371,10 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
                        handle_marshal_when_dst_gsharedvt (src_info, &arg_marshal);
                        handle_map_when_gsharedvt_on_stack (dst_info, &ndst, &dst, FALSE);
                        break;
+               case ArgValuetypeAddrInIReg:
+               case ArgValuetypeAddrOnStack:
+                       ndst = get_arg_slots (dst_info, &dst, FALSE);
+                       break;
                default:
                        g_error ("Gsharedvt can't handle dest arg type %d", (int)dst_info->storage); // See above
                }
index 3e59c9da16d42fd0f6aae2165428f3ff2ba3d523..26e1905823b15c711c13b0d9652de21d8b59e8d0 100644 (file)
@@ -8,6 +8,7 @@
  *   Dietmar Maurer (dietmar@ximian.com)
  *   Patrik Torstensson
  *   Zoltan Varga (vargaz@gmail.com)
+ *   Johan Lorensson (lateralusx.github@gmail.com)
  *
  * (C) 2003 Ximian, Inc.
  * Copyright 2003-2011 Novell, Inc (http://www.novell.com)
@@ -339,231 +340,296 @@ merge_argument_class_from_type (MonoType *type, ArgumentClass class1)
 }
 
 static int
-count_fields_nested (MonoClass *klass)
+count_fields_nested (MonoClass *klass, gboolean pinvoke)
 {
        MonoMarshalType *info;
        int i, count;
 
-       info = mono_marshal_load_type_info (klass);
-       g_assert(info);
        count = 0;
-       for (i = 0; i < info->num_fields; ++i) {
-               if (MONO_TYPE_ISSTRUCT (info->fields [i].field->type))
-                       count += count_fields_nested (mono_class_from_mono_type (info->fields [i].field->type));
-               else
-                       count ++;
+       if (pinvoke) {
+               info = mono_marshal_load_type_info (klass);
+               g_assert(info);
+               for (i = 0; i < info->num_fields; ++i) {
+                       if (MONO_TYPE_ISSTRUCT (info->fields [i].field->type))
+                               count += count_fields_nested (mono_class_from_mono_type (info->fields [i].field->type), pinvoke);
+                       else
+                               count ++;
+               }
+       } else {
+               gpointer iter;
+               MonoClassField *field;
+
+               iter = NULL;
+               while ((field = mono_class_get_fields (klass, &iter))) {
+                       if (field->type->attrs & FIELD_ATTRIBUTE_STATIC)
+                               continue;
+                       if (MONO_TYPE_ISSTRUCT (field->type))
+                               count += count_fields_nested (mono_class_from_mono_type (field->type), pinvoke);
+                       else
+                               count ++;
+               }
        }
        return count;
 }
 
+typedef struct {
+       MonoType *type;
+       int size, offset;
+} StructFieldInfo;
+
+/*
+ * collect_field_info_nested:
+ *
+ *   Collect field info from KLASS recursively into FIELDS.
+ */
 static int
-collect_field_info_nested (MonoClass *klass, MonoMarshalField *fields, int index, int offset)
+collect_field_info_nested (MonoClass *klass, StructFieldInfo *fields, int index, int offset, gboolean pinvoke, gboolean unicode)
 {
        MonoMarshalType *info;
        int i;
 
-       info = mono_marshal_load_type_info (klass);
-       g_assert(info);
-       for (i = 0; i < info->num_fields; ++i) {
-               if (MONO_TYPE_ISSTRUCT (info->fields [i].field->type)) {
-                       index = collect_field_info_nested (mono_class_from_mono_type (info->fields [i].field->type), fields, index, info->fields [i].offset);
-               } else {
-                       memcpy (&fields [index], &info->fields [i], sizeof (MonoMarshalField));
-                       fields [index].offset += offset;
-                       index ++;
+       if (pinvoke) {
+               info = mono_marshal_load_type_info (klass);
+               g_assert(info);
+               for (i = 0; i < info->num_fields; ++i) {
+                       if (MONO_TYPE_ISSTRUCT (info->fields [i].field->type)) {
+                               index = collect_field_info_nested (mono_class_from_mono_type (info->fields [i].field->type), fields, index, info->fields [i].offset, pinvoke, unicode);
+                       } else {
+                               guint32 align;
+
+                               fields [index].type = info->fields [i].field->type;
+                               fields [index].size = mono_marshal_type_size (info->fields [i].field->type,
+                                                                                                                          info->fields [i].mspec,
+                                                                                                                          &align, TRUE, unicode);
+                               fields [index].offset = offset + info->fields [i].offset;
+                               index ++;
+                       }
+               }
+       } else {
+               gpointer iter;
+               MonoClassField *field;
+
+               iter = NULL;
+               while ((field = mono_class_get_fields (klass, &iter))) {
+                       if (field->type->attrs & FIELD_ATTRIBUTE_STATIC)
+                               continue;
+                       if (MONO_TYPE_ISSTRUCT (field->type)) {
+                               index = collect_field_info_nested (mono_class_from_mono_type (field->type), fields, index, field->offset - sizeof (MonoObject), pinvoke, unicode);
+                       } else {
+                               int align;
+
+                               fields [index].type = field->type;
+                               fields [index].size = mono_type_size (field->type, &align);
+                               fields [index].offset = field->offset - sizeof (MonoObject) + offset;
+                               index ++;
+                       }
                }
        }
        return index;
 }
 
 #ifdef TARGET_WIN32
-static void
-add_valuetype_win64 (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
-                                        gboolean is_return,
-                                        guint32 *gr, guint32 *fr, guint32 *stack_size)
+
+/* Windows x64 ABI can pass/return value types in register of size 1,2,4,8 bytes. */
+#define MONO_WIN64_VALUE_TYPE_FITS_REG(arg_size) (arg_size <= SIZEOF_REGISTER && (arg_size == 1 || arg_size == 2 || arg_size == 4 || arg_size == 8))
+
+static gboolean
+allocate_register_for_valuetype_win64 (ArgInfo *arg_info, ArgumentClass arg_class, guint32 arg_size, AMD64_Reg_No int_regs [], int int_reg_count, AMD64_Reg_No float_regs [], int float_reg_count, guint32 *current_int_reg, guint32 *current_float_reg)
 {
-       guint32 size, i, nfields;
-       guint32 argsize = 8;
-       ArgumentClass arg_class;
-       MonoMarshalType *info = NULL;
-       MonoMarshalField *fields = NULL;
-       MonoClass *klass;
-       gboolean pass_on_stack = FALSE;
+       gboolean result = FALSE;
 
-       klass = mono_class_from_mono_type (type);
-       size = mini_type_stack_size_full (&klass->byval_arg, NULL, sig->pinvoke);
-       if (!sig->pinvoke)
-               pass_on_stack = TRUE;
+       assert (arg_info != NULL && int_regs != NULL && float_regs != NULL && current_int_reg != NULL && current_float_reg != NULL);
+       assert (arg_info->storage == ArgValuetypeInReg || arg_info->storage == ArgValuetypeAddrInIReg);
 
-       /* If this struct can't be split up naturally into 8-byte */
-       /* chunks (registers), pass it on the stack.              */
-       if (sig->pinvoke && !pass_on_stack) {
-               guint32 align;
-               guint32 field_size;
+       arg_info->pair_storage [0] = arg_info->pair_storage [1] = ArgNone;
+       arg_info->pair_regs [0] = arg_info->pair_regs [1] = ArgNone;
+       arg_info->pair_size [0] = 0;
+       arg_info->pair_size [1] = 0;
+       arg_info->nregs = 0;
 
-               info = mono_marshal_load_type_info (klass);
-               g_assert (info);
+       if (arg_class == ARG_CLASS_INTEGER && *current_int_reg < int_reg_count) {
+               /* Pass parameter in integer register. */
+               arg_info->pair_storage [0] = ArgInIReg;
+               arg_info->pair_regs [0] = int_regs [*current_int_reg];
+               (*current_int_reg) ++;
+               result = TRUE;
+       } else if (arg_class == ARG_CLASS_SSE && *current_float_reg < float_reg_count) {
+               /* Pass parameter in float register. */
+               arg_info->pair_storage [0] = (arg_size <= sizeof (gfloat)) ? ArgInFloatSSEReg : ArgInDoubleSSEReg;
+               arg_info->pair_regs [0] = float_regs [*current_float_reg];
+               (*current_float_reg) ++;
+               result = TRUE;
+       }
 
-               /*
-                * Collect field information recursively to be able to
-                * handle nested structures.
-                */
-               nfields = count_fields_nested (klass);
-               fields = g_new0 (MonoMarshalField, nfields);
-               collect_field_info_nested (klass, fields, 0, 0);
-
-               for (i = 0; i < nfields; ++i) {
-                       field_size = mono_marshal_type_size (fields [i].field->type,
-                                                          fields [i].mspec,
-                                                          &align, TRUE, klass->unicode);
-                       if ((fields [i].offset < 8) && (fields [i].offset + field_size) > 8) {
-                               pass_on_stack = TRUE;
-                               break;
-                       }
-               }
+       if (result == TRUE) {
+               arg_info->pair_size [0] = arg_size;
+               arg_info->nregs = 1;
        }
 
-       if (pass_on_stack) {
-               /* Allways pass in memory */
-               ainfo->offset = *stack_size;
-               *stack_size += ALIGN_TO (size, 8);
-               ainfo->storage = is_return ? ArgValuetypeAddrInIReg : ArgOnStack;
-               if (!is_return)
-                       ainfo->arg_size = ALIGN_TO (size, 8);
+       return result;
+}
 
-               g_free (fields);
-               return;
-       }
+inline gboolean
+allocate_parameter_register_for_valuetype_win64 (ArgInfo *arg_info, ArgumentClass arg_class, guint32 arg_size, guint32 *current_int_reg, guint32 *current_float_reg)
+{
+       return allocate_register_for_valuetype_win64 (arg_info, arg_class, arg_size, param_regs, PARAM_REGS, float_param_regs, FLOAT_PARAM_REGS, current_int_reg, current_float_reg);
+}
 
-       if (!sig->pinvoke) {
-               int n = mono_class_value_size (klass, NULL);
+inline gboolean
+allocate_return_register_for_valuetype_win64 (ArgInfo *arg_info, ArgumentClass arg_class, guint32 arg_size, guint32 *current_int_reg, guint32 *current_float_reg)
+{
+       return allocate_register_for_valuetype_win64 (arg_info, arg_class, arg_size, return_regs, RETURN_REGS, float_return_regs, FLOAT_RETURN_REGS, current_int_reg, current_float_reg);
+}
 
-               argsize = n;
+static void
+allocate_storage_for_valuetype_win64 (ArgInfo *arg_info, MonoType *type, gboolean is_return, ArgumentClass arg_class,
+                                                                         guint32 arg_size, guint32 *current_int_reg, guint32 *current_float_reg, guint32 *stack_size)
+{
+       /* Windows x64 value type ABI.
+       *
+       * Parameters: https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
+       *
+       * Integer/Float types smaller than or equals to 8 bytes or porperly sized struct/union (1,2,4,8)
+       *    Try pass in register using ArgValuetypeInReg/(ArgInIReg|ArgInFloatSSEReg|ArgInDoubleSSEReg) as storage and size of parameter(1,2,4,8), if no more registers, pass on stack using ArgOnStack as storage and size of parameter(1,2,4,8).
+       * Integer/Float types bigger than 8 bytes or struct/unions larger than 8 bytes or (3,5,6,7).
+       *    Try to pass pointer in register using ArgValuetypeAddrInIReg, if no more registers, pass pointer on stack using ArgValuetypeAddrOnStack as storage and parameter size of register (8 bytes).
+       *
+       * Return values:  https://msdn.microsoft.com/en-us/library/7572ztz4.aspx.
+       *
+       * Integers/Float types smaller than or equal to 8 bytes
+       *    Return in corresponding register RAX/XMM0 using ArgValuetypeInReg/(ArgInIReg|ArgInFloatSSEReg|ArgInDoubleSSEReg) as storage and size of parameter(1,2,4,8).
+       * Properly sized struct/unions (1,2,4,8)
+       *    Return in register RAX using ArgValuetypeInReg as storage and size of parameter(1,2,4,8).
+       * Types bigger than 8 bytes or struct/unions larger than 8 bytes or (3,5,6,7).
+       *    Return pointer to allocated stack space (allocated by caller) using ArgValuetypeAddrInIReg as storage and parameter size.
+       */
 
-               if (n > 8)
-                       arg_class = ARG_CLASS_MEMORY;
-               else
-                       /* Always pass in 1 integer register */
-                       arg_class = ARG_CLASS_INTEGER;
-       } else {
-               g_assert (info);
+       assert (arg_info != NULL && type != NULL && current_int_reg != NULL && current_float_reg != NULL && stack_size != NULL);
 
-               if (!fields) {
-                       ainfo->storage = ArgValuetypeInReg;
-                       ainfo->pair_storage [0] = ainfo->pair_storage [1] = ArgNone;
-                       return;
-               }
+       if (!is_return) {
 
-               switch (info->native_size) {
-               case 1: case 2: case 4: case 8:
-                       break;
-               default:
-                       if (is_return) {
-                               ainfo->storage = ArgValuetypeAddrInIReg;
-                               ainfo->offset = *stack_size;
-                               *stack_size += ALIGN_TO (info->native_size, 8);
-                       }
-                       else {
-                               ainfo->storage = ArgValuetypeAddrInIReg;
+               /* Parameter cases. */
+               if (arg_class != ARG_CLASS_MEMORY && MONO_WIN64_VALUE_TYPE_FITS_REG (arg_size)) {
+                       assert (arg_size == 1 || arg_size == 2 || arg_size == 4 || arg_size == 8);
 
-                               if (*gr < PARAM_REGS) {
-                                       ainfo->pair_storage [0] = ArgInIReg;
-                                       ainfo->pair_regs [0] = param_regs [*gr];
-                                       (*gr) ++;
-                               }
-                               else {
-                                       ainfo->pair_storage [0] = ArgOnStack;
-                                       ainfo->offset = *stack_size;
-                                       ainfo->arg_size = sizeof (mgreg_t);
-                                       *stack_size += 8;
-                               }
+                       /* First, try to use registers for parameter. If type is struct it can only be passed by value in integer register. */
+                       arg_info->storage = ArgValuetypeInReg;
+                       if (!allocate_parameter_register_for_valuetype_win64 (arg_info, !MONO_TYPE_ISSTRUCT (type) ? arg_class : ARG_CLASS_INTEGER, arg_size, current_int_reg, current_float_reg)) {
+                               /* No more registers, fallback passing parameter on stack as value. */
+                               assert (arg_info->pair_storage [0] == ArgNone && arg_info->pair_storage [1] == ArgNone && arg_info->pair_size [0] == 0 && arg_info->pair_size [1] == 0 && arg_info->nregs == 0);
+                               
+                               /* Passing value directly on stack, so use size of value. */
+                               arg_info->storage = ArgOnStack;
+                               arg_size = ALIGN_TO (arg_size, sizeof (mgreg_t));
+                               arg_info->offset = *stack_size;
+                               arg_info->arg_size = arg_size;
+                               *stack_size += arg_size;
+                       }
+               } else {
+                       /* Fallback to stack, try to pass address to parameter in register. Always use integer register to represent stack address. */
+                       arg_info->storage = ArgValuetypeAddrInIReg;
+                       if (!allocate_parameter_register_for_valuetype_win64 (arg_info, ARG_CLASS_INTEGER, arg_size, current_int_reg, current_float_reg)) {
+                               /* No more registers, fallback passing address to parameter on stack. */
+                               assert (arg_info->pair_storage [0] == ArgNone && arg_info->pair_storage [1] == ArgNone && arg_info->pair_size [0] == 0 && arg_info->pair_size [1] == 0 && arg_info->nregs == 0);
+                                                               
+                               /* Passing an address to value on stack, so use size of register as argument size. */
+                               arg_info->storage = ArgValuetypeAddrOnStack;
+                               arg_size = sizeof (mgreg_t);
+                               arg_info->offset = *stack_size;
+                               arg_info->arg_size = arg_size;
+                               *stack_size += arg_size;
                        }
-
-                       g_free (fields);
-                       return;
                }
+       } else {
+               /* Return value cases. */
+               if (arg_class != ARG_CLASS_MEMORY && MONO_WIN64_VALUE_TYPE_FITS_REG (arg_size)) {
+                       assert (arg_size == 1 || arg_size == 2 || arg_size == 4 || arg_size == 8);
 
-               int size;
-               guint32 align;
-               ArgumentClass class1;
+                       /* Return value fits into return registers. If type is struct it can only be returned by value in integer register. */
+                       arg_info->storage = ArgValuetypeInReg;
+                       allocate_return_register_for_valuetype_win64 (arg_info, !MONO_TYPE_ISSTRUCT (type) ? arg_class : ARG_CLASS_INTEGER, arg_size, current_int_reg, current_float_reg);
 
-               if (nfields == 0)
-                       class1 = ARG_CLASS_MEMORY;
-               else
-                       class1 = ARG_CLASS_NO_CLASS;
-               for (i = 0; i < nfields; ++i) {
-                       size = mono_marshal_type_size (fields [i].field->type,
-                                                                                  fields [i].mspec,
-                                                                                  &align, TRUE, klass->unicode);
-                       /* How far into this quad this data extends.*/
-                       /* (8 is size of quad) */
-                       argsize = fields [i].offset + size;
+                       /* Only RAX/XMM0 should be used to return valuetype. */
+                       assert ((arg_info->pair_regs[0] == AMD64_RAX && arg_info->pair_regs[1] == ArgNone) || (arg_info->pair_regs[0] == AMD64_XMM0 && arg_info->pair_regs[1] == ArgNone));
+               } else {
+                       /* Return value doesn't fit into return register, return address to allocated stack space (allocated by caller and passed as input). */
+                       arg_info->storage = ArgValuetypeAddrInIReg;
+                       allocate_return_register_for_valuetype_win64 (arg_info, ARG_CLASS_INTEGER, arg_size, current_int_reg, current_float_reg);
+
+                       /* Only RAX should be used to return valuetype address. */
+                       assert (arg_info->pair_regs[0] == AMD64_RAX && arg_info->pair_regs[1] == ArgNone);
 
-                       class1 = merge_argument_class_from_type (fields [i].field->type, class1);
+                       arg_size = ALIGN_TO (arg_size, sizeof (mgreg_t));
+                       arg_info->offset = *stack_size;
+                       *stack_size += arg_size;
                }
-               g_assert (class1 != ARG_CLASS_NO_CLASS);
-               arg_class = class1;
        }
+}
 
-       g_free (fields);
+static void
+get_valuetype_size_win64 (MonoClass *klass, gboolean pinvoke, ArgInfo *arg_info, MonoType *type, ArgumentClass *arg_class, guint32 *arg_size)
+{
+       *arg_size = 0;
+       *arg_class = ARG_CLASS_NO_CLASS;
 
-       /* Allocate registers */
-       {
-               int orig_gr = *gr;
-               int orig_fr = *fr;
+       assert (klass != NULL && arg_info != NULL && type != NULL && arg_class != NULL && arg_size != NULL);
+       
+       if (pinvoke) {
+               /* Calculate argument class type and size of marshalled type. */
+               MonoMarshalType *info = mono_marshal_load_type_info (klass);
+               *arg_size = info->native_size;
+       } else {
+               /* Calculate argument class type and size of managed type. */
+               *arg_size = mono_class_value_size (klass, NULL);
+       }
+               
+       if (!MONO_WIN64_VALUE_TYPE_FITS_REG (*arg_size)) {
+               /* Value type has a size that doesn't seem to fit register according to ABI. Try to used full stack size of type. */
+               *arg_size = mini_type_stack_size_full (&klass->byval_arg, NULL, pinvoke);
+       }
 
-               while (argsize != 1 && argsize != 2 && argsize != 4 && argsize != 8)
-                       argsize ++;
+       /* Windows ABI only handle value types on stack or passed in integer register (if it fits register size). */
+       *arg_class = (*arg_size > SIZEOF_REGISTER) ? ARG_CLASS_MEMORY : ARG_CLASS_INTEGER;
 
-               ainfo->storage = ArgValuetypeInReg;
-               ainfo->pair_storage [0] = ainfo->pair_storage [1] = ArgNone;
-               ainfo->pair_size [0] = argsize;
-               ainfo->pair_size [1] = 0;
-               ainfo->nregs = 1;
-               switch (arg_class) {
-               case ARG_CLASS_INTEGER:
-                       if (*gr >= PARAM_REGS)
-                               arg_class = ARG_CLASS_MEMORY;
-                       else {
-                               ainfo->pair_storage [0] = ArgInIReg;
-                               if (is_return)
-                                       ainfo->pair_regs [0] = return_regs [*gr];
-                               else
-                                       ainfo->pair_regs [0] = param_regs [*gr];
-                               (*gr) ++;
-                       }
-                       break;
-               case ARG_CLASS_SSE:
-                       if (*fr >= FLOAT_PARAM_REGS)
-                               arg_class = ARG_CLASS_MEMORY;
-                       else {
-                               if (argsize <= 4)
-                                       ainfo->pair_storage [0] = ArgInFloatSSEReg;
-                               else
-                                       ainfo->pair_storage [0] = ArgInDoubleSSEReg;
-                               ainfo->pair_regs [0] = *fr;
-                               (*fr) ++;
-                       }
-                       break;
-               case ARG_CLASS_MEMORY:
-                       break;
-               default:
-                       g_assert_not_reached ();
-               }
+       /*
+       * Standard C and C++ doesn't allow empty structs, empty structs will always have a size of 1 byte.
+       * GCC have an extension to allow empty structs, https://gcc.gnu.org/onlinedocs/gcc/Empty-Structures.html.
+       * This cause a little dilemma since runtime build using none GCC compiler will not be compatible with
+       * GCC build C libraries and the other way around. On platforms where empty structs has size of 1 byte
+       * it must be represented in call and cannot be dropped.
+       */
+       if (*arg_size == 0 && MONO_TYPE_ISSTRUCT (type)) {
+               arg_info->pass_empty_struct = TRUE;
+               *arg_size = SIZEOF_REGISTER;
+               *arg_class = ARG_CLASS_INTEGER;
+       }
 
-               if (arg_class == ARG_CLASS_MEMORY) {
-                       /* Revert possible register assignments */
-                       *gr = orig_gr;
-                       *fr = orig_fr;
+       assert (*arg_class != ARG_CLASS_NO_CLASS);
+}
 
-                       ainfo->offset = *stack_size;
-                       *stack_size += sizeof (mgreg_t);
-                       ainfo->storage = is_return ? ArgValuetypeAddrInIReg : ArgOnStack;
-                       if (!is_return)
-                               ainfo->arg_size = sizeof (mgreg_t);
-               }
+static void
+add_valuetype_win64 (MonoMethodSignature *signature, ArgInfo *arg_info, MonoType *type,
+                                               gboolean is_return, guint32 *current_int_reg, guint32 *current_float_reg, guint32 *stack_size)
+{
+       guint32 arg_size = SIZEOF_REGISTER;
+       MonoClass *klass = NULL;
+       ArgumentClass arg_class;
+       
+       assert (signature != NULL && arg_info != NULL && type != NULL && current_int_reg != NULL && current_float_reg != NULL && stack_size != NULL);
+
+       klass = mono_class_from_mono_type (type);
+       get_valuetype_size_win64 (klass, signature->pinvoke, arg_info, type, &arg_class, &arg_size);
+
+       /* Only drop value type if its not an empty struct as input that must be represented in call */
+       if ((arg_size == 0 && !arg_info->pass_empty_struct) || (arg_size == 0 && arg_info->pass_empty_struct && is_return)) {
+               arg_info->storage = ArgValuetypeInReg;
+               arg_info->pair_storage [0] = arg_info->pair_storage [1] = ArgNone;
+       } else {
+               /* Alocate storage for value type. */
+               allocate_storage_for_valuetype_win64 (arg_info, type, is_return, arg_class, arg_size, current_int_reg, current_float_reg, stack_size);
        }
 }
+
 #endif /* TARGET_WIN32 */
 
 static void
@@ -579,13 +645,14 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
        /* use the right size when copying args/return vars.  */
        guint32 quadsize [2] = {8, 8};
        ArgumentClass args [2];
-       MonoMarshalType *info = NULL;
-       MonoMarshalField *fields = NULL;
+       StructFieldInfo *fields = NULL;
        MonoClass *klass;
        gboolean pass_on_stack = FALSE;
+       int struct_size;
 
        klass = mono_class_from_mono_type (type);
        size = mini_type_stack_size_full (&klass->byval_arg, NULL, sig->pinvoke);
+
        if (!sig->pinvoke && ((is_return && (size == 8)) || (!is_return && (size <= 16)))) {
                /* We pass and return vtypes of size 8 in a register */
        } else if (!sig->pinvoke || (size == 0) || (size > 16)) {
@@ -594,29 +661,25 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
 
        /* If this struct can't be split up naturally into 8-byte */
        /* chunks (registers), pass it on the stack.              */
-       if (sig->pinvoke && !pass_on_stack) {
-               guint32 align;
-               guint32 field_size;
-
-               info = mono_marshal_load_type_info (klass);
+       if (sig->pinvoke) {
+               MonoMarshalType *info = mono_marshal_load_type_info (klass);
                g_assert (info);
+               struct_size = info->native_size;
+       } else {
+               struct_size = mono_class_value_size (klass, NULL);
+       }
+       /*
+        * Collect field information recursively to be able to
+        * handle nested structures.
+        */
+       nfields = count_fields_nested (klass, sig->pinvoke);
+       fields = g_new0 (StructFieldInfo, nfields);
+       collect_field_info_nested (klass, fields, 0, 0, sig->pinvoke, klass->unicode);
 
-               /*
-                * Collect field information recursively to be able to
-                * handle nested structures.
-                */
-               nfields = count_fields_nested (klass);
-               fields = g_new0 (MonoMarshalField, nfields);
-               collect_field_info_nested (klass, fields, 0, 0);
-
-               for (i = 0; i < nfields; ++i) {
-                       field_size = mono_marshal_type_size (fields [i].field->type,
-                                                          fields [i].mspec,
-                                                          &align, TRUE, klass->unicode);
-                       if ((fields [i].offset < 8) && (fields [i].offset + field_size) > 8) {
-                               pass_on_stack = TRUE;
-                               break;
-                       }
+       for (i = 0; i < nfields; ++i) {
+               if ((fields [i].offset < 8) && (fields [i].offset + fields [i].size) > 8) {
+                       pass_on_stack = TRUE;
+                       break;
                }
        }
 
@@ -663,20 +726,18 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
                 * The X87 and SSEUP stuff is left out since there are no such types in
                 * the CLR.
                 */
-               g_assert (info);
-
-               if (!fields) {
+               if (!nfields) {
                        ainfo->storage = ArgValuetypeInReg;
                        ainfo->pair_storage [0] = ainfo->pair_storage [1] = ArgNone;
                        return;
                }
 
-               if (info->native_size > 16) {
+               if (struct_size > 16) {
                        ainfo->offset = *stack_size;
-                       *stack_size += ALIGN_TO (info->native_size, 8);
+                       *stack_size += ALIGN_TO (struct_size, 8);
                        ainfo->storage = is_return ? ArgValuetypeAddrInIReg : ArgOnStack;
                        if (!is_return)
-                               ainfo->arg_size = ALIGN_TO (info->native_size, 8);
+                               ainfo->arg_size = ALIGN_TO (struct_size, 8);
 
                        g_free (fields);
                        return;
@@ -685,8 +746,6 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
                args [0] = ARG_CLASS_NO_CLASS;
                args [1] = ARG_CLASS_NO_CLASS;
                for (quad = 0; quad < nquads; ++quad) {
-                       int size;
-                       guint32 align;
                        ArgumentClass class1;
 
                        if (nfields == 0)
@@ -694,10 +753,7 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
                        else
                                class1 = ARG_CLASS_NO_CLASS;
                        for (i = 0; i < nfields; ++i) {
-                               size = mono_marshal_type_size (fields [i].field->type,
-                                                                                          fields [i].mspec,
-                                                                                          &align, TRUE, klass->unicode);
-                               if ((fields [i].offset < 8) && (fields [i].offset + size) > 8) {
+                               if ((fields [i].offset < 8) && (fields [i].offset + fields [i].size) > 8) {
                                        /* Unaligned field */
                                        NOT_IMPLEMENTED;
                                }
@@ -710,11 +766,13 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
 
                                /* How far into this quad this data extends.*/
                                /* (8 is size of quad) */
-                               quadsize [quad] = fields [i].offset + size - (quad * 8);
+                               quadsize [quad] = fields [i].offset + fields [i].size - (quad * 8);
 
-                               class1 = merge_argument_class_from_type (fields [i].field->type, class1);
+                               class1 = merge_argument_class_from_type (fields [i].type, class1);
                        }
-                       g_assert (class1 != ARG_CLASS_NO_CLASS);
+                       /* Empty structs have a nonzero size, causing this assert to be hit */
+                       if (sig->pinvoke)
+                               g_assert (class1 != ARG_CLASS_NO_CLASS);
                        args [quad] = class1;
                }
        }
@@ -769,6 +827,8 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
                                break;
                        case ARG_CLASS_MEMORY:
                                break;
+                       case ARG_CLASS_NO_CLASS:
+                               break;
                        default:
                                g_assert_not_reached ();
                        }
@@ -782,7 +842,7 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
 
                        ainfo->offset = *stack_size;
                        if (sig->pinvoke)
-                               arg_size = ALIGN_TO (info->native_size, 8);
+                               arg_size = ALIGN_TO (struct_size, 8);
                        else
                                arg_size = nquads * sizeof(mgreg_t);
                        *stack_size += arg_size;
@@ -998,7 +1058,7 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
                        /* fall through */
                case MONO_TYPE_VALUETYPE:
                case MONO_TYPE_TYPEDBYREF:
-                       add_valuetype (sig, ainfo, sig->params [i], FALSE, &gr, &fr, &stack_size);
+                       add_valuetype (sig, ainfo, ptype, FALSE, &gr, &fr, &stack_size);
                        break;
                case MONO_TYPE_U8:
 
@@ -1167,6 +1227,15 @@ mono_arch_cpu_optimizations (guint32 *exclude_mask)
                *exclude_mask |= MONO_OPT_CMOV;
        }
 
+#ifdef TARGET_WIN32
+       /* The current SIMD doesn't support the argument used by a LD_ADDR to be of type OP_VTARG_ADDR. */
+       /* This will now be used for value types > 8 or of size 3,5,6,7 as dictated by windows x64 value type ABI. */
+       /* Since OP_VTARG_ADDR needs to be resolved in mono_spill_global_vars and the SIMD implementation optimize */
+       /* away the LD_ADDR in load_simd_vreg, that will cause an error in mono_spill_global_vars since incorrect opcode */
+       /* will now have a reference to an argument that won't be fully decomposed. */
+       *exclude_mask |= MONO_OPT_SIMD;
+#endif
+
        return opts;
 }
 
@@ -1290,7 +1359,7 @@ mono_arch_compute_omit_fp (MonoCompile *cfg)
        for (i = 0; i < sig->param_count + sig->hasthis; ++i) {
                ArgInfo *ainfo = &cinfo->args [i];
 
-               if (ainfo->storage == ArgOnStack) {
+               if (ainfo->storage == ArgOnStack || ainfo->storage == ArgValuetypeAddrInIReg || ainfo->storage == ArgValuetypeAddrOnStack) {
                        /* 
                         * The stack offset can only be determined when the frame
                         * size is known.
@@ -1530,9 +1599,11 @@ mono_arch_allocate_vars (MonoCompile *cfg)
        }
 
        cfg->arch.saved_iregs = cfg->used_int_regs;
-       if (cfg->method->save_lmf)
-               /* Save all callee-saved registers normally, and restore them when unwinding through an LMF */
-               cfg->arch.saved_iregs |= (1 << AMD64_RBX) | (1 << AMD64_R12) | (1 << AMD64_R13) | (1 << AMD64_R14) | (1 << AMD64_R15);
+       if (cfg->method->save_lmf) {
+               /* Save all callee-saved registers normally (except RBP, if not already used), and restore them when unwinding through an LMF */
+               guint32 iregs_to_save = AMD64_CALLEE_SAVED_REGS & ~(1<<AMD64_RBP);
+               cfg->arch.saved_iregs |= iregs_to_save;
+       }
 
        if (cfg->arch.omit_fp)
                cfg->arch.reg_save_area_offset = offset;
@@ -1667,11 +1738,13 @@ mono_arch_allocate_vars (MonoCompile *cfg)
                                break;
                        case ArgValuetypeInReg:
                                break;
-                       case ArgValuetypeAddrInIReg: {
+                       case ArgValuetypeAddrInIReg:
+                       case ArgValuetypeAddrOnStack: {
                                MonoInst *indir;
                                g_assert (!cfg->arch.omit_fp);
-                               
+                               g_assert (ainfo->storage == ArgValuetypeAddrInIReg || (ainfo->storage == ArgValuetypeAddrOnStack && ainfo->pair_storage [0] == ArgNone));
                                MONO_INST_NEW (cfg, indir, 0);
+
                                indir->opcode = OP_REGOFFSET;
                                if (ainfo->pair_storage [0] == ArgInIReg) {
                                        indir->inst_basereg = cfg->frame_reg;
@@ -1693,7 +1766,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
                                NOT_IMPLEMENTED;
                        }
 
-                       if (!inreg && (ainfo->storage != ArgOnStack) && (ainfo->storage != ArgValuetypeAddrInIReg) && (ainfo->storage != ArgGSharedVtOnStack)) {
+                       if (!inreg && (ainfo->storage != ArgOnStack) && (ainfo->storage != ArgValuetypeAddrInIReg) && (ainfo->storage != ArgValuetypeAddrOnStack) && (ainfo->storage != ArgGSharedVtOnStack)) {
                                ins->opcode = OP_REGOFFSET;
                                ins->inst_basereg = cfg->frame_reg;
                                /* These arguments are saved to the stack in the prolog */
@@ -1937,6 +2010,7 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
                        t = sig->params [i - sig->hasthis];
                else
                        t = &mono_defaults.int_class->byval_arg;
+               t = mini_type_get_underlying_type (t);
 
                linfo->args [i].storage = LLVMArgNone;
 
@@ -2078,6 +2152,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                case ArgOnStack:
                case ArgValuetypeInReg:
                case ArgValuetypeAddrInIReg:
+               case ArgValuetypeAddrOnStack:
                case ArgGSharedVtInReg:
                case ArgGSharedVtOnStack: {
                        if (ainfo->storage == ArgOnStack && !MONO_TYPE_ISSTRUCT (t) && !call->tail_call)
@@ -2112,7 +2187,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                                /* Continue normally */
                        }
 
-                       if (size > 0) {
+                       if (size > 0 || ainfo->pass_empty_struct) {
                                MONO_INST_NEW (cfg, arg, OP_OUTARG_VT);
                                arg->sreg1 = in->dreg;
                                arg->klass = mono_class_from_mono_type (t);
@@ -2210,29 +2285,40 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
                        if (ainfo->pair_storage [part] == ArgNone)
                                continue;
 
-                       MONO_INST_NEW (cfg, load, arg_storage_to_load_membase (ainfo->pair_storage [part]));
-                       load->inst_basereg = src->dreg;
-                       load->inst_offset = part * sizeof(mgreg_t);
+                       if (ainfo->pass_empty_struct) {
+                               //Pass empty struct value as 0 on platforms representing empty structs as 1 byte.
+                               NEW_ICONST (cfg, load, 0);
+                       }
+                       else {
+                               MONO_INST_NEW (cfg, load, arg_storage_to_load_membase (ainfo->pair_storage [part]));
+                               load->inst_basereg = src->dreg;
+                               load->inst_offset = part * sizeof(mgreg_t);
 
-                       switch (ainfo->pair_storage [part]) {
-                       case ArgInIReg:
-                               load->dreg = mono_alloc_ireg (cfg);
-                               break;
-                       case ArgInDoubleSSEReg:
-                       case ArgInFloatSSEReg:
-                               load->dreg = mono_alloc_freg (cfg);
-                               break;
-                       default:
-                               g_assert_not_reached ();
+                               switch (ainfo->pair_storage [part]) {
+                               case ArgInIReg:
+                                       load->dreg = mono_alloc_ireg (cfg);
+                                       break;
+                               case ArgInDoubleSSEReg:
+                               case ArgInFloatSSEReg:
+                                       load->dreg = mono_alloc_freg (cfg);
+                                       break;
+                               default:
+                                       g_assert_not_reached ();
+                               }
                        }
+
                        MONO_ADD_INS (cfg->cbb, load);
 
                        add_outarg_reg (cfg, call, ainfo->pair_storage [part], ainfo->pair_regs [part], load);
                }
                break;
        }
-       case ArgValuetypeAddrInIReg: {
+       case ArgValuetypeAddrInIReg:
+       case ArgValuetypeAddrOnStack: {
                MonoInst *vtaddr, *load;
+
+               g_assert (ainfo->storage == ArgValuetypeAddrInIReg || (ainfo->storage == ArgValuetypeAddrOnStack && ainfo->pair_storage [0] == ArgNone));
+               
                vtaddr = mono_compile_create_var (cfg, &ins->klass->byval_arg, OP_LOCAL);
                
                MONO_INST_NEW (cfg, load, OP_LDADDR);
@@ -2333,16 +2419,8 @@ dyn_call_supported (MonoMethodSignature *sig, CallInfo *cinfo)
        case ArgInFloatSSEReg:
        case ArgInDoubleSSEReg:
        case ArgValuetypeAddrInIReg:
+       case ArgValuetypeInReg:
                break;
-       case ArgValuetypeInReg: {
-               ArgInfo *ainfo = &cinfo->ret;
-
-               if (ainfo->pair_storage [0] != ArgNone && ainfo->pair_storage [0] != ArgInIReg)
-                       return FALSE;
-               if (ainfo->pair_storage [1] != ArgNone && ainfo->pair_storage [1] != ArgInIReg)
-                       return FALSE;
-               break;
-       }
        default:
                return FALSE;
        }
@@ -2353,12 +2431,7 @@ dyn_call_supported (MonoMethodSignature *sig, CallInfo *cinfo)
                case ArgInIReg:
                case ArgInFloatSSEReg:
                case ArgInDoubleSSEReg:
-                       break;
                case ArgValuetypeInReg:
-                       if (ainfo->pair_storage [0] != ArgNone && ainfo->pair_storage [0] != ArgInIReg)
-                               return FALSE;
-                       if (ainfo->pair_storage [1] != ArgNone && ainfo->pair_storage [1] != ArgInIReg)
-                               return FALSE;
                        break;
                case ArgOnStack:
                        if (!(ainfo->offset + (ainfo->arg_size / 8) <= DYN_CALL_STACK_ARGS))
@@ -2564,15 +2637,22 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
                case MONO_TYPE_VALUETYPE: {
                        switch (ainfo->storage) {
                        case ArgValuetypeInReg:
-                               if (ainfo->pair_storage [0] != ArgNone) {
-                                       slot = param_reg_to_index [ainfo->pair_regs [0]];
-                                       g_assert (ainfo->pair_storage [0] == ArgInIReg);
-                                       p->regs [slot] = ((mgreg_t*)(arg))[0];
-                               }
-                               if (ainfo->pair_storage [1] != ArgNone) {
-                                       slot = param_reg_to_index [ainfo->pair_regs [1]];
-                                       g_assert (ainfo->pair_storage [1] == ArgInIReg);
-                                       p->regs [slot] = ((mgreg_t*)(arg))[1];
+                               for (i = 0; i < 2; ++i) {
+                                       switch (ainfo->pair_storage [i]) {
+                                       case ArgNone:
+                                               break;
+                                       case ArgInIReg:
+                                               slot = param_reg_to_index [ainfo->pair_regs [i]];
+                                               p->regs [slot] = ((mgreg_t*)(arg))[i];
+                                               break;
+                                       case ArgInDoubleSSEReg:
+                                               p->has_fp = 1;
+                                               p->fregs [ainfo->pair_regs [i]] = ((double*)(arg))[i];
+                                               break;
+                                       default:
+                                               g_assert_not_reached ();
+                                               break;
+                                       }
                                }
                                break;
                        case ArgOnStack:
@@ -2609,6 +2689,7 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
        guint8 *ret = dargs->ret;
        mgreg_t res = dargs->res;
        MonoType *sig_ret = mini_get_underlying_type (sig->ret);
+       int i;
 
        switch (sig_ret->type) {
        case MONO_TYPE_VOID:
@@ -2669,12 +2750,21 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
 
                        g_assert (ainfo->storage == ArgValuetypeInReg);
 
-                       if (ainfo->pair_storage [0] != ArgNone) {
-                               g_assert (ainfo->pair_storage [0] == ArgInIReg);
-                               ((mgreg_t*)ret)[0] = res;
+                       for (i = 0; i < 2; ++i) {
+                               switch (ainfo->pair_storage [0]) {
+                               case ArgInIReg:
+                                       ((mgreg_t*)ret)[i] = res;
+                                       break;
+                               case ArgInDoubleSSEReg:
+                                       ((double*)ret)[i] = dargs->fregs [i];
+                                       break;
+                               case ArgNone:
+                                       break;
+                               default:
+                                       g_assert_not_reached ();
+                                       break;
+                               }
                        }
-
-                       g_assert (ainfo->pair_storage [1] == ArgNone);
                }
                break;
        default:
@@ -3647,6 +3737,30 @@ emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offse
        return code;
 }
 
+#ifdef TARGET_WIN32
+
+#define TEB_LAST_ERROR_OFFSET 0x068
+
+static guint8*
+emit_get_last_error (guint8* code, int dreg)
+{
+       /* Threads last error value is located in TEB_LAST_ERROR_OFFSET. */
+       x86_prefix (code, X86_GS_PREFIX);
+       amd64_mov_reg_membase (code, dreg, TEB_LAST_ERROR_OFFSET, 0, sizeof (guint32));
+
+       return code;
+}
+
+#else
+
+static guint8*
+emit_get_last_error (guint8* code, int dreg)
+{
+       g_assert_not_reached ();
+}
+
+#endif
+
 /* benchmark and set based on cpu */
 #define LOOP_ALIGNMENT 8
 #define bb_is_loop_start(bb) ((bb)->loop_body_start && (bb)->nesting)
@@ -4736,6 +4850,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        amd64_mov_reg_membase (code, AMD64_R11, var->inst_basereg, var->inst_offset, 8);
                        amd64_mov_membase_reg (code, AMD64_R11, MONO_STRUCT_OFFSET (DynCallArgs, res), AMD64_RAX, 8);
                        amd64_sse_movsd_membase_reg (code, AMD64_R11, MONO_STRUCT_OFFSET (DynCallArgs, fregs), AMD64_XMM0);
+                       amd64_sse_movsd_membase_reg (code, AMD64_R11, MONO_STRUCT_OFFSET (DynCallArgs, fregs) + sizeof (double), AMD64_XMM1);
                        break;
                }
                case OP_AMD64_SAVE_SP_TO_LMF: {
@@ -6482,6 +6597,9 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        ins->backend.pc_offset = code - cfg->native_code;
                        bb->spill_slot_defs = g_slist_prepend_mempool (cfg->mempool, bb->spill_slot_defs, ins);
                        break;
+               case OP_GET_LAST_ERROR:
+                       emit_get_last_error(code, ins->dreg);
+                       break;
                default:
                        g_warning ("unknown opcode %s in %s()\n", mono_inst_name (ins->opcode), __FUNCTION__);
                        g_assert_not_reached ();
@@ -6680,7 +6798,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 #if defined(TARGET_WIN32) || defined(MONO_ARCH_SIGSEGV_ON_ALTSTACK)
                guint32 remaining_size = alloc_size;
                /*FIXME handle unbounded code expansion, we should use a loop in case of more than X interactions*/
-               guint32 required_code_size = ((remaining_size / 0x1000) + 1) * 10; /*10 is the max size of amd64_alu_reg_imm + amd64_test_membase_reg*/
+               guint32 required_code_size = ((remaining_size / 0x1000) + 1) * 11; /*11 is the max size of amd64_alu_reg_imm + amd64_test_membase_reg*/
                guint32 offset = code - cfg->native_code;
                if (G_UNLIKELY (required_code_size >= (cfg->code_size - offset))) {
                        while (required_code_size >= (cfg->code_size - offset))
@@ -6910,6 +7028,8 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                if (ainfo->pair_storage [0] == ArgInIReg)
                                        amd64_mov_membase_reg (code, ins->inst_left->inst_basereg, ins->inst_left->inst_offset, ainfo->pair_regs [0],  sizeof (gpointer));
                                break;
+                       case ArgValuetypeAddrOnStack:
+                               break;
                        case ArgGSharedVtInReg:
                                amd64_mov_membase_reg (code, ins->inst_basereg, ins->inst_offset, ainfo->reg, 8);
                                break;
@@ -7120,7 +7240,12 @@ mono_arch_emit_epilog (MonoCompile *cfg)
        for (i = 0; i < AMD64_NREG; ++i) {
                if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->arch.saved_iregs & (1 << i))) {
                        /* Restore only used_int_regs, not arch.saved_iregs */
-                       if (cfg->used_int_regs & (1 << i)) {
+#if defined(MONO_SUPPORT_TASKLETS)
+                       int restore_reg=1;
+#else
+                       int restore_reg=(cfg->used_int_regs & (1 << i));
+#endif
+                       if (restore_reg) {
                                amd64_mov_reg_membase (code, i, cfg->frame_reg, save_area_offset, 8);
                                mono_emit_unwind_op_same_value (cfg, code, i);
                                async_exc_point (code);
index 68aaf3925464c1d3b7d4b27adef32eafa586d2df..51b8225e51ee87572d64a47c42429719ca649538 100644 (file)
@@ -188,12 +188,20 @@ typedef struct MonoCompileArch {
 } MonoCompileArch;
 
 #ifdef TARGET_WIN32
-#define PARAM_REGS 4
-#define FLOAT_PARAM_REGS 4
 
 static AMD64_Reg_No param_regs [] = { AMD64_RCX, AMD64_RDX, AMD64_R8, AMD64_R9 };
 
-static AMD64_Reg_No return_regs [] = { AMD64_RAX, AMD64_RDX };
+static AMD64_Reg_No float_param_regs [] = { AMD64_XMM0, AMD64_XMM1, AMD64_XMM2, AMD64_XMM3 };
+
+static AMD64_Reg_No return_regs [] = { AMD64_RAX };
+
+static AMD64_Reg_No float_return_regs [] = { AMD64_XMM0 };
+
+#define PARAM_REGS G_N_ELEMENTS(param_regs)
+#define FLOAT_PARAM_REGS G_N_ELEMENTS(float_param_regs)
+#define RETURN_REGS G_N_ELEMENTS(return_regs)
+#define FLOAT_RETURN_REGS G_N_ELEMENTS(float_return_regs)
+
 #else
 #define PARAM_REGS 6
 #define FLOAT_PARAM_REGS 8
@@ -248,6 +256,7 @@ typedef enum {
        ArgOnStack,
        ArgValuetypeInReg,
        ArgValuetypeAddrInIReg,
+       ArgValuetypeAddrOnStack,
        /* gsharedvt argument passed by addr */
        ArgGSharedVtInReg,
        ArgGSharedVtOnStack,
@@ -269,6 +278,7 @@ typedef struct {
        int nregs;
        /* Only if storage == ArgOnStack */
        int arg_size; // Bytes, will always be rounded up/aligned to 8 byte boundary
+       guint8 pass_empty_struct : 1; // Set in scenarios when empty structs needs to be represented as argument.
 } ArgInfo;
 
 typedef struct {
index 9cf772bad0815ae9571b4417e494ba63e5de439b..57a7a38deef9f7845a8aaf94024d58955698e06e 100644 (file)
@@ -535,6 +535,10 @@ mono_print_ins_index_strbuf (int i, MonoInst *ins)
                case OP_GSHAREDVT_ARG_REGOFFSET:
                        g_string_append_printf (sbuf, " + 0x%lx", (long)ins->inst_offset);
                        break;
+               case OP_ISINST:
+               case OP_CASTCLASS:
+                       g_string_append_printf (sbuf, " %s", ins->klass->name);
+                       break;
                default:
                        break;
                }
index b64f4e24e1711001f7198928b5ac0ea442c78a22..0094c976487fa062220d33ac1a8ea15534e1bd3d 100644 (file)
@@ -2930,6 +2930,7 @@ throw_exception (MonoObject *ex, gboolean rethrow)
                mono_error_assert_ok (&error);
                mono_ex = mono_get_exception_runtime_wrapped_checked (ex, &error);
                mono_error_assert_ok (&error);
+               jit_tls->thrown_non_exc = mono_gchandle_new (ex, FALSE);
        }
        else
                mono_ex = (MonoException*)ex;
@@ -3009,7 +3010,7 @@ mono_llvm_resume_exception (void)
 MonoObject *
 mono_llvm_load_exception (void)
 {
-               MonoError error;
+       MonoError error;
        MonoJitTlsData *jit_tls = mono_get_jit_tls ();
 
        MonoException *mono_ex = (MonoException*)mono_gchandle_get_target (jit_tls->thrown_exc);
@@ -3061,6 +3062,9 @@ mono_llvm_clear_exception (void)
        MonoJitTlsData *jit_tls = mono_get_jit_tls ();
        mono_gchandle_free (jit_tls->thrown_exc);
        jit_tls->thrown_exc = 0;
+       if (jit_tls->thrown_non_exc)
+               mono_gchandle_free (jit_tls->thrown_non_exc);
+       jit_tls->thrown_non_exc = 0;
 
        mono_memory_barrier ();
 }
@@ -3074,13 +3078,22 @@ mono_llvm_clear_exception (void)
 gint32
 mono_llvm_match_exception (MonoJitInfo *jinfo, guint32 region_start, guint32 region_end, gpointer rgctx, MonoObject *this_obj)
 {
-                       MonoError error;
+       MonoError error;
        MonoJitTlsData *jit_tls = mono_get_jit_tls ();
        MonoObject *exc;
        gint32 index = -1;
 
        g_assert (jit_tls->thrown_exc);
        exc = mono_gchandle_get_target (jit_tls->thrown_exc);
+       if (jit_tls->thrown_non_exc) {
+               /*
+                * Have to unwrap RuntimeWrappedExceptions if the
+                * method's assembly doesn't have a RuntimeCompatibilityAttribute.
+                */
+               if (!wrap_non_exception_throws (jinfo_get_method (jinfo)))
+                       exc = mono_gchandle_get_target (jit_tls->thrown_non_exc);
+       }
+
        for (int i = 0; i < jinfo->num_clauses; i++) {
                MonoJitExceptionInfo *ei = &jinfo->clauses [i];
                MonoClass *catch_class;
@@ -3089,7 +3102,7 @@ mono_llvm_match_exception (MonoJitInfo *jinfo, guint32 region_start, guint32 reg
                        continue;
 
                catch_class = ei->data.catch_class;
-               if (catch_class->byval_arg.type == MONO_TYPE_VAR || catch_class->byval_arg.type == MONO_TYPE_MVAR || catch_class->byval_arg.type == MONO_TYPE_GENERICINST) {
+               if (mono_class_is_open_constructed_type (&catch_class->byval_arg)) {
                        MonoGenericContext context;
                        MonoType *inflated_type;
 
index e1e2eb19b430c0040972a551caad3acf31f757a0..aca368c9dba9e1ad8ef382fa8e7532a93981ffe5 100644 (file)
@@ -607,6 +607,7 @@ inflate_info (MonoRuntimeGenericContextInfoTemplate *oti, MonoGenericContext *co
                MonoMethod *inflated_method;
                MonoType *inflated_type = mono_class_inflate_generic_type_checked (&method->klass->byval_arg, context, &error);
                mono_error_assert_ok (&error); /* FIXME don't swallow the error */
+               WrapperInfo *winfo = NULL;
 
                MonoClass *inflated_class = mono_class_from_mono_type (inflated_type);
                MonoJumpInfoGSharedVtCall *res;
@@ -620,7 +621,13 @@ inflate_info (MonoRuntimeGenericContextInfoTemplate *oti, MonoGenericContext *co
 
                mono_class_init (inflated_class);
 
-               g_assert (!method->wrapper_type);
+               if (method->wrapper_type) {
+                       winfo = mono_marshal_get_wrapper_info (method);
+
+                       g_assert (winfo);
+                       g_assert (winfo->subtype == WRAPPER_SUBTYPE_SYNCHRONIZED_INNER);
+                       method = winfo->d.synchronized_inner.method;
+               }
 
                if (inflated_class->byval_arg.type == MONO_TYPE_ARRAY ||
                                inflated_class->byval_arg.type == MONO_TYPE_SZARRAY) {
@@ -633,6 +640,12 @@ inflate_info (MonoRuntimeGenericContextInfoTemplate *oti, MonoGenericContext *co
                }
                mono_class_init (inflated_method->klass);
                g_assert (inflated_method->klass == inflated_class);
+
+               if (winfo) {
+                       g_assert (winfo->subtype == WRAPPER_SUBTYPE_SYNCHRONIZED_INNER);
+                       inflated_method = mono_marshal_get_synchronized_inner_wrapper (inflated_method);
+               }
+
                res->method = inflated_method;
 
                return res;
@@ -1758,6 +1771,9 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
 
                g_assert (method->is_inflated);
 
+               if (mono_llvm_only && (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED))
+                       method = mono_marshal_get_synchronized_wrapper (method);
+
                if (!virtual_) {
                        addr = mono_compile_method_checked (method, error);
                        return_val_if_nok (error, NULL);
index e3219686ae2cf5beb7eb8ea5adb7fc9987e51d86..4753f66ca6d882ec24a1110495a0ee5cbc5c5589 100644 (file)
@@ -54,10 +54,20 @@ mono_llvm_build_alloca (LLVMBuilderRef builder, LLVMTypeRef Ty,
 
 LLVMValueRef 
 mono_llvm_build_load (LLVMBuilderRef builder, LLVMValueRef PointerVal,
-                                         const char *Name, gboolean is_volatile, BarrierKind barrier)
+                                         const char *Name, gboolean is_volatile)
 {
        LoadInst *ins = unwrap(builder)->CreateLoad(unwrap(PointerVal), is_volatile, Name);
 
+       return wrap(ins);
+}
+
+LLVMValueRef
+mono_llvm_build_atomic_load (LLVMBuilderRef builder, LLVMValueRef PointerVal,
+                                                        const char *Name, gboolean is_volatile, int alignment, BarrierKind barrier)
+{
+       LoadInst *ins = unwrap(builder)->CreateLoad(unwrap(PointerVal), is_volatile, Name);
+
+       ins->setAlignment (alignment);
        switch (barrier) {
        case LLVM_BARRIER_NONE:
                break;
@@ -236,16 +246,21 @@ mono_llvm_di_create_compile_unit (void *di_builder, const char *cu_name, const c
 }
 
 void*
-mono_llvm_di_create_function (void *di_builder, void *cu, const char *name, const char *mangled_name, const char *dir, const char *file, int line)
+mono_llvm_di_create_function (void *di_builder, void *cu, LLVMValueRef func, const char *name, const char *mangled_name, const char *dir, const char *file, int line)
 {
        DIBuilder *builder = (DIBuilder*)di_builder;
        DIFile *di_file;
        DISubroutineType *type;
+       DISubprogram *di_func;
 
        // FIXME: Share DIFile
        di_file = builder->createFile (file, dir);
        type = builder->createSubroutineType (builder->getOrCreateTypeArray (ArrayRef<Metadata*> ()));
-       return builder->createFunction (di_file, name, mangled_name, di_file, line, type, true, true, 0);
+       di_func = builder->createFunction (di_file, name, mangled_name, di_file, line, type, true, true, 0);
+
+       unwrap<Function>(func)->setMetadata ("dbg", di_func);
+
+       return di_func;
 }
 
 void*
index 06858713f4eaa99ab63cacd0d6449007fb203876..50e89e858eac7599384ee9a87b9561f61c354884 100644 (file)
@@ -44,9 +44,13 @@ mono_llvm_build_alloca (LLVMBuilderRef builder, LLVMTypeRef Ty,
 
 LLVMValueRef 
 mono_llvm_build_load (LLVMBuilderRef builder, LLVMValueRef PointerVal,
-                                         const char *Name, gboolean is_volatile, BarrierKind barrier);
+                                         const char *Name, gboolean is_volatile);
 
 LLVMValueRef 
+mono_llvm_build_atomic_load (LLVMBuilderRef builder, LLVMValueRef PointerVal,
+                                                        const char *Name, gboolean is_volatile, int alignment, BarrierKind barrier);
+
+LLVMValueRef
 mono_llvm_build_aligned_load (LLVMBuilderRef builder, LLVMValueRef PointerVal,
                                                          const char *Name, gboolean is_volatile, int alignment);
 
@@ -96,7 +100,7 @@ void*
 mono_llvm_create_di_builder (LLVMModuleRef module);
 
 void*
-mono_llvm_di_create_function (void *di_builder, void *cu, const char *name, const char *mangled_name, const char *dir, const char *file, int line);
+mono_llvm_di_create_function (void *di_builder, void *cu, LLVMValueRef func, const char *name, const char *mangled_name, const char *dir, const char *file, int line);
 
 void*
 mono_llvm_di_create_compile_unit (void *di_builder, const char *cu_name, const char *dir, const char *producer);
index 93dee86723df1fe88855b0770b1e2cc1100141e9..9af6360a09b94d13952c603cea9496106dbedc1b 100644 (file)
@@ -72,6 +72,7 @@ typedef struct {
        gboolean external_symbols;
        gboolean emit_dwarf;
        int max_got_offset;
+       LLVMValueRef personality;
 
        /* For AOT */
        MonoAssembly *assembly;
@@ -94,6 +95,7 @@ typedef struct {
        LLVMContextRef context;
        LLVMValueRef sentinel_exception;
        void *di_builder, *cu;
+       GHashTable *objc_selector_to_var;
 } MonoLLVMModule;
 
 /*
@@ -811,14 +813,6 @@ simd_op_to_intrins (int opcode)
                return "llvm.x86.sse2.min.pd";
        case OP_MINPS:
                return "llvm.x86.sse.min.ps";
-       case OP_PMIND_UN:
-               return "llvm.x86.sse41.pminud";
-       case OP_PMINW_UN:
-               return "llvm.x86.sse41.pminuw";
-       case OP_PMINB_UN:
-               return "llvm.x86.sse2.pminu.b";
-       case OP_PMINW:
-               return "llvm.x86.sse2.pmins.w";
        case OP_MAXPD:
                return "llvm.x86.sse2.max.pd";
        case OP_MAXPS:
@@ -831,12 +825,6 @@ simd_op_to_intrins (int opcode)
                return "llvm.x86.sse3.hsub.pd";
        case OP_HSUBPS:
                return "llvm.x86.sse3.hsub.ps";
-       case OP_PMAXD_UN:
-               return "llvm.x86.sse41.pmaxud";
-       case OP_PMAXW_UN:
-               return "llvm.x86.sse41.pmaxuw";
-       case OP_PMAXB_UN:
-               return "llvm.x86.sse2.pmaxu.b";
        case OP_ADDSUBPS:
                return "llvm.x86.sse3.addsub.ps";
        case OP_ADDSUBPD:
@@ -911,10 +899,6 @@ simd_op_to_intrins (int opcode)
                return "llvm.x86.sse2.cvttpd2dq";
        case OP_CVTTPS2DQ:
                return "llvm.x86.sse2.cvttps2dq";
-       case OP_COMPPS:
-               return "llvm.x86.sse.cmp.ps";
-       case OP_COMPPD:
-               return "llvm.x86.sse2.cmp.pd";
        case OP_PACKW:
                return "llvm.x86.sse2.packsswb.128";
        case OP_PACKD:
@@ -1588,18 +1572,17 @@ get_aotconst_typed (EmitContext *ctx, MonoJumpInfoType type, gconstpointer data,
        MonoCompile *cfg;
        guint32 got_offset;
        LLVMValueRef indexes [2];
-       MonoJumpInfo *ji;
        LLVMValueRef got_entry_addr, load;
        LLVMBuilderRef builder = ctx->builder;
        char *name = NULL;
 
        cfg = ctx->cfg;
 
-       ji = g_new0 (MonoJumpInfo, 1);
-       ji->type = type;
-       ji->data.target = data;
+       MonoJumpInfo tmp_ji;
+       tmp_ji.type = type;
+       tmp_ji.data.target = data;
 
-       ji = mono_aot_patch_info_dup (ji);
+       MonoJumpInfo *ji = mono_aot_patch_info_dup (&tmp_ji);
 
        ji->next = cfg->patch_info;
        cfg->patch_info = ji;
@@ -1872,7 +1855,7 @@ emit_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, LL
 }
 
 static LLVMValueRef
-emit_load_general (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, int size, LLVMValueRef addr, const char *name, gboolean is_faulting, BarrierKind barrier)
+emit_load_general (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, int size, LLVMValueRef addr, LLVMValueRef base, const char *name, gboolean is_faulting, BarrierKind barrier)
 {
        const char *intrins_name;
        LLVMValueRef args [16], res;
@@ -1882,7 +1865,9 @@ emit_load_general (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder
 #if LLVM_API_VERSION > 100
        if (is_faulting && bb->region != -1 && !ctx->cfg->llvm_only) {
                /* The llvm.mono.load/store intrinsics are not supported by this llvm version, emit an explicit null check instead */
-               LLVMValueRef cmp = LLVMBuildICmp (*builder_ref, LLVMIntEQ, addr, LLVMConstNull (LLVMTypeOf (addr)), "");
+               LLVMValueRef cmp;
+
+               cmp = LLVMBuildICmp (*builder_ref, LLVMIntEQ, base, LLVMConstNull (LLVMTypeOf (base)), "");
                emit_cond_system_exception (ctx, bb, "NullReferenceException", cmp);
                *builder_ref = ctx->builder;
                use_intrinsics = FALSE;
@@ -1954,26 +1939,29 @@ emit_load_general (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder
                 * LLVM will generate invalid code when encountering a load from a
                 * NULL address.
                 */
-                res = mono_llvm_build_load (*builder_ref, addr, name, is_faulting, barrier);
+               if (barrier != LLVM_BARRIER_NONE)
+                       res = mono_llvm_build_atomic_load (*builder_ref, addr, name, is_faulting, size, barrier);
+               else
+                       res = mono_llvm_build_load (*builder_ref, addr, name, is_faulting);
 
-                /* Mark it with a custom metadata */
-                /*
-                if (is_faulting)
-                        set_metadata_flag (res, "mono.faulting.load");
-                */
+               /* Mark it with a custom metadata */
+               /*
+                 if (is_faulting)
+                 set_metadata_flag (res, "mono.faulting.load");
+               */
 
-                return res;
+               return res;
        }
 }
 
 static LLVMValueRef
 emit_load (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, int size, LLVMValueRef addr, const char *name, gboolean is_faulting)
 {
-       return emit_load_general (ctx, bb, builder_ref, size, addr, name, is_faulting, LLVM_BARRIER_NONE);
+       return emit_load_general (ctx, bb, builder_ref, size, addr, addr, name, is_faulting, LLVM_BARRIER_NONE);
 }
 
 static void
-emit_store_general (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, int size, LLVMValueRef value, LLVMValueRef addr, gboolean is_faulting, BarrierKind barrier)
+emit_store_general (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, int size, LLVMValueRef value, LLVMValueRef addr, LLVMValueRef base, gboolean is_faulting, BarrierKind barrier)
 {
        const char *intrins_name;
        LLVMValueRef args [16];
@@ -1982,7 +1970,7 @@ emit_store_general (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builde
 #if LLVM_API_VERSION > 100
        if (is_faulting && bb->region != -1 && !ctx->cfg->llvm_only) {
                /* The llvm.mono.load/store intrinsics are not supported by this llvm version, emit an explicit null check instead */
-               LLVMValueRef cmp = LLVMBuildICmp (*builder_ref, LLVMIntEQ, addr, LLVMConstNull (LLVMTypeOf (addr)), "");
+               LLVMValueRef cmp = LLVMBuildICmp (*builder_ref, LLVMIntEQ, base, LLVMConstNull (LLVMTypeOf (base)), "");
                emit_cond_system_exception (ctx, bb, "NullReferenceException", cmp);
                *builder_ref = ctx->builder;
                use_intrinsics = FALSE;
@@ -2044,9 +2032,9 @@ emit_store_general (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builde
 }
 
 static void
-emit_store (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, int size, LLVMValueRef value, LLVMValueRef addr, gboolean is_faulting)
+emit_store (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, int size, LLVMValueRef value, LLVMValueRef addr, LLVMValueRef base, gboolean is_faulting)
 {
-       emit_store_general (ctx, bb, builder_ref, size, value, addr, is_faulting, LLVM_BARRIER_NONE);
+       emit_store_general (ctx, bb, builder_ref, size, value, addr, base, is_faulting, LLVM_BARRIER_NONE);
 }
 
 /*
@@ -2416,7 +2404,7 @@ emit_get_method (MonoLLVMModule *module)
        LLVMBasicBlockRef entry_bb, fail_bb, bb, code_start_bb, code_end_bb;
        LLVMBasicBlockRef *bbs;
        LLVMTypeRef rtype;
-       LLVMBuilderRef builder;
+       LLVMBuilderRef builder = LLVMCreateBuilder ();
        char *name;
        int i;
 
@@ -2442,14 +2430,12 @@ emit_get_method (MonoLLVMModule *module)
        name = g_strdup_printf ("BB_CODE_START");
        code_start_bb = LLVMAppendBasicBlock (func, name);
        g_free (name);
-       builder = LLVMCreateBuilder ();
        LLVMPositionBuilderAtEnd (builder, code_start_bb);
        LLVMBuildRet (builder, LLVMBuildBitCast (builder, module->code_start, rtype, ""));
 
        name = g_strdup_printf ("BB_CODE_END");
        code_end_bb = LLVMAppendBasicBlock (func, name);
        g_free (name);
-       builder = LLVMCreateBuilder ();
        LLVMPositionBuilderAtEnd (builder, code_end_bb);
        LLVMBuildRet (builder, LLVMBuildBitCast (builder, module->code_end, rtype, ""));
 
@@ -2460,7 +2446,6 @@ emit_get_method (MonoLLVMModule *module)
                g_free (name);
                bbs [i] = bb;
 
-               builder = LLVMCreateBuilder ();
                LLVMPositionBuilderAtEnd (builder, bb);
 
                m = (LLVMValueRef)g_hash_table_lookup (module->idx_to_lmethod, GINT_TO_POINTER (i));
@@ -2471,11 +2456,9 @@ emit_get_method (MonoLLVMModule *module)
        }
 
        fail_bb = LLVMAppendBasicBlock (func, "FAIL");
-       builder = LLVMCreateBuilder ();
        LLVMPositionBuilderAtEnd (builder, fail_bb);
        LLVMBuildRet (builder, LLVMConstNull (rtype));
 
-       builder = LLVMCreateBuilder ();
        LLVMPositionBuilderAtEnd (builder, entry_bb);
 
        switch_ins = LLVMBuildSwitch (builder, LLVMGetParam (func, 0), fail_bb, 0);
@@ -2486,6 +2469,8 @@ emit_get_method (MonoLLVMModule *module)
        }
 
        mark_as_used (module, func);
+
+       LLVMDisposeBuilder (builder);
 }
 
 /*
@@ -2501,7 +2486,7 @@ emit_get_unbox_tramp (MonoLLVMModule *module)
        LLVMBasicBlockRef entry_bb, fail_bb, bb;
        LLVMBasicBlockRef *bbs;
        LLVMTypeRef rtype;
-       LLVMBuilderRef builder;
+       LLVMBuilderRef builder = LLVMCreateBuilder ();
        char *name;
        int i;
 
@@ -2527,18 +2512,15 @@ emit_get_unbox_tramp (MonoLLVMModule *module)
                g_free (name);
                bbs [i] = bb;
 
-               builder = LLVMCreateBuilder ();
                LLVMPositionBuilderAtEnd (builder, bb);
 
                LLVMBuildRet (builder, LLVMBuildBitCast (builder, m, rtype, ""));
        }
 
        fail_bb = LLVMAppendBasicBlock (func, "FAIL");
-       builder = LLVMCreateBuilder ();
        LLVMPositionBuilderAtEnd (builder, fail_bb);
        LLVMBuildRet (builder, LLVMConstNull (rtype));
 
-       builder = LLVMCreateBuilder ();
        LLVMPositionBuilderAtEnd (builder, entry_bb);
 
        switch_ins = LLVMBuildSwitch (builder, LLVMGetParam (func, 0), fail_bb, 0);
@@ -2551,6 +2533,7 @@ emit_get_unbox_tramp (MonoLLVMModule *module)
        }
 
        mark_as_used (module, func);
+       LLVMDisposeBuilder (builder);
 }
 
 /* Add a function to mark the beginning of LLVM code */
@@ -2570,6 +2553,7 @@ emit_llvm_code_start (MonoLLVMModule *module)
        builder = LLVMCreateBuilder ();
        LLVMPositionBuilderAtEnd (builder, entry_bb);
        LLVMBuildRetVoid (builder);
+       LLVMDisposeBuilder (builder);
 }
 
 static LLVMValueRef
@@ -2643,6 +2627,7 @@ emit_init_icall_wrapper (MonoLLVMModule *module, const char *name, const char *i
        LLVMBuildRetVoid (builder);
 
        LLVMVerifyFunction(func, LLVMAbortProcessAction);
+       LLVMDisposeBuilder (builder);
        return func;
 }
 
@@ -2676,6 +2661,7 @@ emit_llvm_code_end (MonoLLVMModule *module)
        builder = LLVMCreateBuilder ();
        LLVMPositionBuilderAtEnd (builder, entry_bb);
        LLVMBuildRetVoid (builder);
+       LLVMDisposeBuilder (builder);
 }
 
 static void
@@ -2866,6 +2852,7 @@ emit_unbox_tramp (EmitContext *ctx, const char *method_name, LLVMTypeRef method_
                LLVMBuildRet (builder, call);
 
        g_hash_table_insert (ctx->module->idx_to_unbox_tramp, GINT_TO_POINTER (method_index), tramp);
+       LLVMDisposeBuilder (builder);
 }
 
 /*
@@ -3360,7 +3347,7 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
                if (!ctx->imt_rgctx_loc)
                        ctx->imt_rgctx_loc = build_alloca_llvm_type (ctx, ctx->module->ptr_type, sizeof (gpointer));
                LLVMBuildStore (builder, convert (ctx, ctx->values [call->rgctx_arg_reg], ctx->module->ptr_type), ctx->imt_rgctx_loc);
-               args [cinfo->rgctx_arg_pindex] = mono_llvm_build_load (builder, ctx->imt_rgctx_loc, "", TRUE, LLVM_BARRIER_NONE);
+               args [cinfo->rgctx_arg_pindex] = mono_llvm_build_load (builder, ctx->imt_rgctx_loc, "", TRUE);
 #else
                args [cinfo->rgctx_arg_pindex] = convert (ctx, values [call->rgctx_arg_reg], ctx->module->ptr_type);
 #endif
@@ -3373,7 +3360,7 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
                if (!ctx->imt_rgctx_loc)
                        ctx->imt_rgctx_loc = build_alloca_llvm_type (ctx, ctx->module->ptr_type, sizeof (gpointer));
                LLVMBuildStore (builder, convert (ctx, ctx->values [call->imt_arg_reg], ctx->module->ptr_type), ctx->imt_rgctx_loc);
-               args [cinfo->imt_arg_pindex] = mono_llvm_build_load (builder, ctx->imt_rgctx_loc, "", TRUE, LLVM_BARRIER_NONE);
+               args [cinfo->imt_arg_pindex] = mono_llvm_build_load (builder, ctx->imt_rgctx_loc, "", TRUE);
 #else
                args [cinfo->imt_arg_pindex] = convert (ctx, values [call->imt_arg_reg], ctx->module->ptr_type);
 #endif
@@ -3969,13 +3956,18 @@ emit_handler_start (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef builder
                g_assert (personality);
        } else {
 #if LLVM_API_VERSION > 100
-               LLVMTypeRef personality_type = LLVMFunctionType (LLVMInt32Type (), NULL, 0, TRUE);
-               personality = LLVMAddFunction (ctx->lmodule, "mono_personality", personality_type);
-               LLVMAddFunctionAttr (personality, LLVMNoUnwindAttribute);
-               LLVMBasicBlockRef entry_bb = LLVMAppendBasicBlock (personality, "ENTRY");
-               LLVMBuilderRef builder2 = LLVMCreateBuilder ();
-               LLVMPositionBuilderAtEnd (builder2, entry_bb);
-               LLVMBuildRet (builder2, LLVMConstInt (LLVMInt32Type (), 0, FALSE));
+               personality = ctx->module->personality;
+               if (!personality) {
+                       LLVMTypeRef personality_type = LLVMFunctionType (LLVMInt32Type (), NULL, 0, TRUE);
+                       personality = LLVMAddFunction (ctx->lmodule, "mono_personality", personality_type);
+                       LLVMAddFunctionAttr (personality, LLVMNoUnwindAttribute);
+                       LLVMBasicBlockRef entry_bb = LLVMAppendBasicBlock (personality, "ENTRY");
+                       LLVMBuilderRef builder2 = LLVMCreateBuilder ();
+                       LLVMPositionBuilderAtEnd (builder2, entry_bb);
+                       LLVMBuildRet (builder2, LLVMConstInt (LLVMInt32Type (), 0, FALSE));
+                       ctx->module->personality = personality;
+                       LLVMDisposeBuilder (builder2);
+               }
 #else
                static gint32 mapping_inited;
 
@@ -5097,6 +5089,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
 
                        if ((ins->opcode == OP_LOADI8_MEM) || (ins->opcode == OP_LOAD_MEM) || (ins->opcode == OP_LOADI4_MEM) || (ins->opcode == OP_LOADU4_MEM) || (ins->opcode == OP_LOADU1_MEM) || (ins->opcode == OP_LOADU2_MEM)) {
                                addr = LLVMConstInt (IntPtrType (), ins->inst_imm, FALSE);
+                               base = addr;
                        } else {
                                /* _MEMBASE */
                                base = lhs;
@@ -5115,7 +5108,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
 
                        addr = convert (ctx, addr, LLVMPointerType (t, 0));
 
-                       values [ins->dreg] = emit_load (ctx, bb, &builder, size, addr, dname, is_volatile);
+                       values [ins->dreg] = emit_load_general (ctx, bb, &builder, size, addr, base, dname, is_volatile, LLVM_BARRIER_NONE);
 
                        if (!is_volatile && (ins->flags & MONO_INST_INVARIANT_LOAD)) {
                                /*
@@ -5145,7 +5138,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                case OP_STORER8_MEMBASE_REG:
                case OP_STORE_MEMBASE_REG: {
                        int size = 8;
-                       LLVMValueRef index, addr;
+                       LLVMValueRef index, addr, base;
                        LLVMTypeRef t;
                        gboolean sext = FALSE, zext = FALSE;
                        gboolean is_volatile = (ins->flags & MONO_INST_FAULT);
@@ -5157,15 +5150,16 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
 
                        t = load_store_to_llvm_type (ins->opcode, &size, &sext, &zext);
 
+                       base = values [ins->inst_destbasereg];
                        if (ins->inst_offset % size != 0) {
                                /* Unaligned store */
                                index = LLVMConstInt (LLVMInt32Type (), ins->inst_offset, FALSE);
-                               addr = LLVMBuildGEP (builder, convert (ctx, values [ins->inst_destbasereg], LLVMPointerType (LLVMInt8Type (), 0)), &index, 1, "");
+                               addr = LLVMBuildGEP (builder, convert (ctx, base, LLVMPointerType (LLVMInt8Type (), 0)), &index, 1, "");
                        } else {
                                index = LLVMConstInt (LLVMInt32Type (), ins->inst_offset / size, FALSE);                                
-                               addr = LLVMBuildGEP (builder, convert (ctx, values [ins->inst_destbasereg], LLVMPointerType (t, 0)), &index, 1, "");
+                               addr = LLVMBuildGEP (builder, convert (ctx, base, LLVMPointerType (t, 0)), &index, 1, "");
                        }
-                       emit_store (ctx, bb, &builder, size, convert (ctx, values [ins->sreg1], t), convert (ctx, addr, LLVMPointerType (t, 0)), is_volatile);
+                       emit_store (ctx, bb, &builder, size, convert (ctx, values [ins->sreg1], t), convert (ctx, addr, LLVMPointerType (t, 0)), base, is_volatile);
                        break;
                }
 
@@ -5175,27 +5169,28 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                case OP_STOREI8_MEMBASE_IMM:
                case OP_STORE_MEMBASE_IMM: {
                        int size = 8;
-                       LLVMValueRef index, addr;
+                       LLVMValueRef index, addr, base;
                        LLVMTypeRef t;
                        gboolean sext = FALSE, zext = FALSE;
                        gboolean is_volatile = (ins->flags & MONO_INST_FAULT);
 
                        t = load_store_to_llvm_type (ins->opcode, &size, &sext, &zext);
 
+                       base = values [ins->inst_destbasereg];
                        if (ins->inst_offset % size != 0) {
                                /* Unaligned store */
                                index = LLVMConstInt (LLVMInt32Type (), ins->inst_offset, FALSE);
-                               addr = LLVMBuildGEP (builder, convert (ctx, values [ins->inst_destbasereg], LLVMPointerType (LLVMInt8Type (), 0)), &index, 1, "");
+                               addr = LLVMBuildGEP (builder, convert (ctx, base, LLVMPointerType (LLVMInt8Type (), 0)), &index, 1, "");
                        } else {
                                index = LLVMConstInt (LLVMInt32Type (), ins->inst_offset / size, FALSE);                                
-                               addr = LLVMBuildGEP (builder, convert (ctx, values [ins->inst_destbasereg], LLVMPointerType (t, 0)), &index, 1, "");
+                               addr = LLVMBuildGEP (builder, convert (ctx, base, LLVMPointerType (t, 0)), &index, 1, "");
                        }
-                       emit_store (ctx, bb, &builder, size, convert (ctx, LLVMConstInt (IntPtrType (), ins->inst_imm, FALSE), t), convert (ctx, addr, LLVMPointerType (t, 0)), is_volatile);
+                       emit_store (ctx, bb, &builder, size, convert (ctx, LLVMConstInt (IntPtrType (), ins->inst_imm, FALSE), t), convert (ctx, addr, LLVMPointerType (t, 0)), base, is_volatile);
                        break;
                }
 
                case OP_CHECK_THIS:
-                       emit_load (ctx, bb, &builder, sizeof (gpointer), convert (ctx, lhs, LLVMPointerType (IntPtrType (), 0)), "", TRUE);
+                       emit_load_general (ctx, bb, &builder, sizeof (gpointer), convert (ctx, lhs, LLVMPointerType (IntPtrType (), 0)), lhs, "", TRUE, LLVM_BARRIER_NONE);
                        break;
                case OP_OUTARG_VTRETADDR:
                        break;
@@ -5438,9 +5433,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                case OP_ATOMIC_LOAD_U8:
                case OP_ATOMIC_LOAD_R4:
                case OP_ATOMIC_LOAD_R8: {
-                       set_failure (ctx, "atomic mono.load intrinsic");
-                       break;
-#if 0
+#if LLVM_API_VERSION > 100
                        int size;
                        gboolean sext, zext;
                        LLVMTypeRef t;
@@ -5462,13 +5455,16 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
 
                        addr = convert (ctx, addr, LLVMPointerType (t, 0));
 
-                       values [ins->dreg] = emit_load_general (ctx, bb, &builder, size, addr, dname, is_volatile, barrier);
+                       values [ins->dreg] = emit_load_general (ctx, bb, &builder, size, addr, lhs, dname, is_volatile, barrier);
 
                        if (sext)
                                values [ins->dreg] = LLVMBuildSExt (builder, values [ins->dreg], LLVMInt32Type (), dname);
                        else if (zext)
                                values [ins->dreg] = LLVMBuildZExt (builder, values [ins->dreg], LLVMInt32Type (), dname);
                        break;
+#else
+                       set_failure (ctx, "atomic mono.load intrinsic");
+                       break;
 #endif
                }
                case OP_ATOMIC_STORE_I1:
@@ -5486,12 +5482,14 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                        LLVMTypeRef t;
                        gboolean is_volatile = (ins->flags & MONO_INST_FAULT);
                        BarrierKind barrier = (BarrierKind) ins->backend.memory_barrier_kind;
-                       LLVMValueRef index, addr, value;
+                       LLVMValueRef index, addr, value, base;
 
+#if LLVM_API_VERSION < 100
                        if (!cfg->llvm_only) {
                                set_failure (ctx, "atomic mono.store intrinsic");
                                break;
                        }
+#endif
 
                        if (!values [ins->inst_destbasereg]) {
                            set_failure (ctx, "inst_destbasereg");
@@ -5500,11 +5498,12 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
 
                        t = load_store_to_llvm_type (ins->opcode, &size, &sext, &zext);
 
+                       base = values [ins->inst_destbasereg];
                        index = LLVMConstInt (LLVMInt32Type (), ins->inst_offset / size, FALSE);
-                       addr = LLVMBuildGEP (builder, convert (ctx, values [ins->inst_destbasereg], LLVMPointerType (t, 0)), &index, 1, "");
+                       addr = LLVMBuildGEP (builder, convert (ctx, base, LLVMPointerType (t, 0)), &index, 1, "");
                        value = convert (ctx, values [ins->sreg1], t);
 
-                       emit_store_general (ctx, bb, &builder, size, value, addr, is_volatile, barrier);
+                       emit_store_general (ctx, bb, &builder, size, value, addr, base, is_volatile, barrier);
                        break;
                }
                case OP_RELAXED_NOP: {
@@ -5541,7 +5540,11 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                        break;
                }
                case OP_TLS_GET_REG: {
-#if defined(TARGET_AMD64) && defined(TARGET_OSX)
+#if defined(TARGET_AMD64) && defined(__linux__)
+                       // 257 == FS segment register
+                       LLVMTypeRef ptrtype = LLVMPointerType (IntPtrType (), 257);
+                       values [ins->dreg] = LLVMBuildLoad (builder, LLVMBuildIntToPtr (builder, convert (ctx, lhs, LLVMInt64Type ()), ptrtype, ""), "");
+#elif defined(TARGET_AMD64) && defined(TARGET_OSX)
                        /* See emit_tls_get_reg () */
                        // 256 == GS segment register
                        LLVMTypeRef ptrtype = LLVMPointerType (IntPtrType (), 256);
@@ -5579,7 +5582,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                         *   mono_threads_state_poll ();
                         * FIXME: Use a preserveall wrapper
                         */
-                       val = mono_llvm_build_load (builder, convert (ctx, lhs, LLVMPointerType (IntPtrType (), 0)), "", TRUE, LLVM_BARRIER_NONE);
+                       val = mono_llvm_build_load (builder, convert (ctx, lhs, LLVMPointerType (IntPtrType (), 0)), "", TRUE);
                        cmp = LLVMBuildICmp (builder, LLVMIntEQ, val, LLVMConstNull (LLVMTypeOf (val)), "");
                        poll_bb = gen_bb (ctx, "POLL_BB");
                        cont_bb = gen_bb (ctx, "CONT_BB");
@@ -5767,6 +5770,38 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                        }
                        break;
                }
+               case OP_OBJC_GET_SELECTOR: {
+                       const char *name = (const char*)ins->inst_p0;
+                       LLVMValueRef var;
+
+                       if (!ctx->module->objc_selector_to_var)
+                               ctx->module->objc_selector_to_var = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+                       var = g_hash_table_lookup (ctx->module->objc_selector_to_var, name);
+                       if (!var) {
+                               LLVMValueRef indexes [16];
+
+                               LLVMValueRef name_var = LLVMAddGlobal (ctx->lmodule, LLVMArrayType (LLVMInt8Type (), strlen (name) + 1), "@OBJC_METH_VAR_NAME");
+                               LLVMSetInitializer (name_var, mono_llvm_create_constant_data_array ((const uint8_t*)name, strlen (name) + 1));
+                               LLVMSetLinkage (name_var, LLVMPrivateLinkage);
+                               LLVMSetSection (name_var, "__TEXT,__objc_methname,cstring_literals");
+
+                               LLVMValueRef ref_var = LLVMAddGlobal (ctx->lmodule, LLVMPointerType (LLVMInt8Type (), 0), "@OBJC_SELECTOR_REFERENCES");
+
+                               indexes [0] = LLVMConstInt (LLVMInt32Type (), 0, 0);
+                               indexes [1] = LLVMConstInt (LLVMInt32Type (), 0, 0);
+                               LLVMSetInitializer (ref_var, LLVMConstGEP (name_var, indexes, 2));
+                               LLVMSetLinkage (ref_var, LLVMPrivateLinkage);
+                               LLVMSetExternallyInitialized (ref_var, TRUE);
+                               LLVMSetSection (ref_var, "__DATA, __objc_selrefs, literal_pointers, no_dead_strip");
+                               LLVMSetAlignment (ref_var, sizeof (mgreg_t));
+
+                               g_hash_table_insert (ctx->module->objc_selector_to_var, g_strdup (name), ref_var);
+                               var = ref_var;
+                       }
+
+                       values [ins->dreg] = LLVMBuildLoad (builder, var, "");
+                       break;
+               }
 
                        /* 
                         * SIMD
@@ -5888,19 +5923,31 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                        values [ins->dreg] = LLVMBuildBitCast (builder, v, rt, "");
                        break;
                }
+               case OP_PMIND_UN:
+               case OP_PMINW_UN:
+               case OP_PMINB_UN: {
+                       LLVMValueRef cmp = LLVMBuildICmp (builder, LLVMIntULT, lhs, rhs, "");
+                       values [ins->dreg] = LLVMBuildSelect (builder, cmp, lhs, rhs, "");
+                       break;
+               }
+               case OP_PMAXD_UN:
+               case OP_PMAXW_UN:
+               case OP_PMAXB_UN: {
+                       LLVMValueRef cmp = LLVMBuildICmp (builder, LLVMIntUGT, lhs, rhs, "");
+                       values [ins->dreg] = LLVMBuildSelect (builder, cmp, lhs, rhs, "");
+                       break;
+               }
+               case OP_PMINW: {
+                       LLVMValueRef cmp = LLVMBuildICmp (builder, LLVMIntSLT, lhs, rhs, "");
+                       values [ins->dreg] = LLVMBuildSelect (builder, cmp, lhs, rhs, "");
+                       break;
+               }
                case OP_MINPD:
                case OP_MINPS:
                case OP_MAXPD:
                case OP_MAXPS:
                case OP_ADDSUBPD:
                case OP_ADDSUBPS:
-               case OP_PMIND_UN:
-               case OP_PMINW_UN:
-               case OP_PMINB_UN:
-               case OP_PMINW:
-               case OP_PMAXD_UN:
-               case OP_PMAXW_UN:
-               case OP_PMAXB_UN:
                case OP_HADDPD:
                case OP_HADDPS:
                case OP_HSUBPD:
@@ -6016,6 +6063,33 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                        values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMDoubleType ()), LLVMConstInt (LLVMInt32Type (), ins->inst_c0, FALSE), dname);
                        break;
 
+#if 0
+                       // Requires a later llvm version
+               case OP_CVTDQ2PD: {
+                       LLVMValueRef indexes [16];
+
+                       indexes [0] = LLVMConstInt (LLVMInt32Type (), 0, FALSE);
+                       indexes [1] = LLVMConstInt (LLVMInt32Type (), 1, FALSE);
+                       LLVMValueRef mask = LLVMConstVector (indexes, 2);
+                       LLVMValueRef shuffle = LLVMBuildShuffleVector (builder, lhs, LLVMConstNull (LLVMTypeOf (lhs)), mask, "");
+                       values [ins->dreg] = LLVMBuildSIToFP (builder, shuffle, LLVMVectorType (LLVMDoubleType (), 2), dname);
+                       break;
+               }
+               case OP_CVTPS2PD: {
+                       LLVMValueRef indexes [16];
+
+                       indexes [0] = LLVMConstInt (LLVMInt32Type (), 0, FALSE);
+                       indexes [1] = LLVMConstInt (LLVMInt32Type (), 1, FALSE);
+                       LLVMValueRef mask = LLVMConstVector (indexes, 2);
+                       LLVMValueRef shuffle = LLVMBuildShuffleVector (builder, lhs, LLVMConstNull (LLVMTypeOf (lhs)), mask, "");
+                       values [ins->dreg] = LLVMBuildFPExt (builder, shuffle, LLVMVectorType (LLVMDoubleType (), 2), dname);
+                       break;
+               }
+               case OP_CVTTPS2DQ:
+                       values [ins->dreg] = LLVMBuildFPToSI (builder, lhs, LLVMVectorType (LLVMInt32Type (), 4), dname);
+                       break;
+#endif
+
                case OP_CVTDQ2PD:
                case OP_CVTDQ2PS:
                case OP_CVTPD2DQ:
@@ -6036,19 +6110,46 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                        values [ins->dreg] = LLVMBuildCall (builder, get_intrinsic (ctx, simd_op_to_intrins (ins->opcode)), &v, 1, dname);
                        break;
                }
-
                case OP_COMPPS:
                case OP_COMPPD: {
-                       LLVMValueRef args [3];
+                       LLVMRealPredicate op;
 
-                       args [0] = lhs;
-                       args [1] = rhs;
-                       args [2] = LLVMConstInt (LLVMInt8Type (), ins->inst_c0, FALSE);
+                       switch (ins->inst_c0) {
+                       case SIMD_COMP_EQ:
+                               op = LLVMRealOEQ;
+                               break;
+                       case SIMD_COMP_LT:
+                               op = LLVMRealOLT;
+                               break;
+                       case SIMD_COMP_LE:
+                               op = LLVMRealOLE;
+                               break;
+                       case SIMD_COMP_UNORD:
+                               op = LLVMRealUNO;
+                               break;
+                       case SIMD_COMP_NEQ:
+                               op = LLVMRealUNE;
+                               break;
+                       case SIMD_COMP_NLT:
+                               op = LLVMRealUGE;
+                               break;
+                       case SIMD_COMP_NLE:
+                               op = LLVMRealUGT;
+                               break;
+                       case SIMD_COMP_ORD:
+                               op = LLVMRealORD;
+                               break;
+                       default:
+                               g_assert_not_reached ();
+                       }
 
-                       values [ins->dreg] = LLVMBuildCall (builder, get_intrinsic (ctx, simd_op_to_intrins (ins->opcode)), args, 3, dname);
+                       LLVMValueRef cmp = LLVMBuildFCmp (builder, op, lhs, rhs, "");
+                       if (ins->opcode == OP_COMPPD)
+                               values [ins->dreg] = LLVMBuildBitCast (builder, LLVMBuildSExt (builder, cmp, LLVMVectorType (LLVMInt64Type (), 2), ""), LLVMTypeOf (lhs), "");
+                       else
+                               values [ins->dreg] = LLVMBuildBitCast (builder, LLVMBuildSExt (builder, cmp, LLVMVectorType (LLVMInt32Type (), 4), ""), LLVMTypeOf (lhs), "");
                        break;
                }
-
                case OP_ICONV_TO_X:
                        /* This is only used for implementing shifts by non-immediate */
                        values [ins->dreg] = lhs;
@@ -6564,6 +6665,14 @@ free_ctx (EmitContext *ctx)
        g_hash_table_destroy (ctx->region_to_handler);
        g_hash_table_destroy (ctx->clause_to_handler);
        g_hash_table_destroy (ctx->jit_callees);
+
+       GHashTableIter iter;
+       g_hash_table_iter_init (&iter, ctx->method_to_callers);
+       while (g_hash_table_iter_next (&iter, NULL, (gpointer)&l))
+               g_slist_free (l);
+
+       g_hash_table_destroy (ctx->method_to_callers);
+
        g_free (ctx->method_name);
        g_ptr_array_free (ctx->bblock_list, TRUE);
 
@@ -6657,7 +6766,10 @@ mono_llvm_emit_method (MonoCompile *cfg)
        ctx->is_linkonce = is_linkonce;
 
 #if LLVM_API_VERSION > 100
-       ctx->lmodule = LLVMModuleCreateWithName ("jit-module");
+       if (cfg->compile_aot)
+               ctx->lmodule = ctx->module->lmodule;
+       else
+               ctx->lmodule = LLVMModuleCreateWithName ("jit-module");
 #else
        ctx->lmodule = ctx->module->lmodule;
 #endif
@@ -6830,6 +6942,7 @@ emit_method_inner (EmitContext *ctx)
        names = g_new (char *, sig->param_count);
        mono_method_get_param_names (cfg->method, (const char **) names);
 
+       /* Set parameter names/attributes */
        for (i = 0; i < sig->param_count; ++i) {
                LLVMArgInfo *ainfo = &linfo->args [i + sig->hasthis];
                char *name;
@@ -6842,6 +6955,9 @@ emit_method_inner (EmitContext *ctx)
                        g_free (name);
                }
 
+               if (ainfo->storage == LLVMArgVtypeInReg && ainfo->pair_storage [0] == LLVMArgNone && ainfo->pair_storage [1] == LLVMArgNone)
+                       continue;
+
                values [cfg->args [i + sig->hasthis]->dreg] = LLVMGetParam (method, pindex);
                if (ainfo->storage == LLVMArgGsharedvtFixed || ainfo->storage == LLVMArgGsharedvtFixedVtype) {
                        if (names [i] && names [i][0] != '\0')
@@ -7152,12 +7268,15 @@ emit_method_inner (EmitContext *ctx)
        if (cfg->compile_aot && !cfg->llvm_only)
                mark_as_used (ctx->module, method);
 
-       if (cfg->compile_aot && !cfg->llvm_only) {
+       if (!cfg->llvm_only) {
                LLVMValueRef md_args [16];
                LLVMValueRef md_node;
                int method_index;
 
-               method_index = mono_aot_get_method_index (cfg->orig_method);
+               if (cfg->compile_aot)
+                       method_index = mono_aot_get_method_index (cfg->orig_method);
+               else
+                       method_index = 1;
                md_args [0] = LLVMMDString (ctx->method_name, strlen (ctx->method_name));
                md_args [1] = LLVMConstInt (LLVMInt32Type (), method_index, FALSE);
                md_node = LLVMMDNode (md_args, 2);
@@ -7504,11 +7623,12 @@ decode_llvm_eh_info (EmitContext *ctx, gpointer eh_frame)
        p += 4;
        table = (gint32*)p;
 
-       g_assert (fde_count == 1);
+       g_assert (fde_count <= 2);
 
-       /* The only table entry */
+       /* The first entry is the real method */
+       g_assert (table [0] == 1);
        fde_offset = table [1];
-       table += 2;
+       table += fde_count * 2;
        /* Extra entry */
        cfg->code_len = table [0];
        fde_len = table [1] - fde_offset;
@@ -7649,11 +7769,6 @@ typedef enum {
        INTRINS_SSE_HADDPD,
        INTRINS_SSE_HSUBPD,
        INTRINS_SSE_ADDSUBPD,
-       INTRINS_SSE_PMINUD,
-       INTRINS_SSE_PMAXUD,
-       INTRINS_SSE_PMINUW,
-       INTRINS_SSE_PMINSW,
-       INTRINS_SSE_PMAXUW,
        INTRINS_SSE_PADDSW,
        INTRINS_SSE_PSUBSW,
        INTRINS_SSE_PADDUSW,
@@ -7661,8 +7776,6 @@ typedef enum {
        INTRINS_SSE_PAVGW,
        INTRINS_SSE_PMULHW,
        INTRINS_SSE_PMULHU,
-       INTRINS_SSE_PMINUB,
-       INTRINS_SSE_PMAXUB,
        INTRINS_SE_PADDSB,
        INTRINS_SSE_PSUBSB,
        INTRINS_SSE_PADDUSB,
@@ -7738,11 +7851,6 @@ static IntrinsicDesc intrinsics[] = {
        {INTRINS_SSE_HADDPD, "llvm.x86.sse3.hadd.pd"},
        {INTRINS_SSE_HSUBPD, "llvm.x86.sse3.hsub.pd"},
        {INTRINS_SSE_ADDSUBPD, "llvm.x86.sse3.addsub.pd"},
-       {INTRINS_SSE_PMINUD, "llvm.x86.sse41.pminud"},
-       {INTRINS_SSE_PMAXUD, "llvm.x86.sse41.pmaxud"},
-       {INTRINS_SSE_PMINUW, "llvm.x86.sse41.pminuw"},
-       {INTRINS_SSE_PMINSW, "llvm.x86.sse2.pmins.w"},
-       {INTRINS_SSE_PMAXUW, "llvm.x86.sse41.pmaxuw"},
        {INTRINS_SSE_PADDSW, "llvm.x86.sse2.padds.w"},
        {INTRINS_SSE_PSUBSW, "llvm.x86.sse2.psubs.w"},
        {INTRINS_SSE_PADDUSW, "llvm.x86.sse2.paddus.w"},
@@ -7750,8 +7858,6 @@ static IntrinsicDesc intrinsics[] = {
        {INTRINS_SSE_PAVGW, "llvm.x86.sse2.pavg.w"},
        {INTRINS_SSE_PMULHW, "llvm.x86.sse2.pmulh.w"},
        {INTRINS_SSE_PMULHU, "llvm.x86.sse2.pmulhu.w"},
-       {INTRINS_SSE_PMINUB, "llvm.x86.sse2.pminu.b"},
-       {INTRINS_SSE_PMAXUB, "llvm.x86.sse2.pmaxu.b"},
        {INTRINS_SE_PADDSB, "llvm.x86.sse2.padds.b"},
        {INTRINS_SSE_PSUBSB, "llvm.x86.sse2.psubs.b"},
        {INTRINS_SSE_PADDUSB, "llvm.x86.sse2.paddus.b"},
@@ -7957,13 +8063,6 @@ add_intrinsic (LLVMModuleRef module, int id)
                AddFunc (module, name, ret_type, arg_types, 2);
                break;
                /* SSE Binary ops */
-       case INTRINS_SSE_PMINUD:
-       case INTRINS_SSE_PMAXUD:
-               add_sse_binary (module, name, MONO_TYPE_I4);
-               break;
-       case INTRINS_SSE_PMINUW:
-       case INTRINS_SSE_PMINSW:
-       case INTRINS_SSE_PMAXUW:
        case INTRINS_SSE_PADDSW:
        case INTRINS_SSE_PSUBSW:
        case INTRINS_SSE_PADDUSW:
@@ -7987,8 +8086,6 @@ add_intrinsic (LLVMModuleRef module, int id)
        case INTRINS_SSE_ADDSUBPD:
                add_sse_binary (module, name, MONO_TYPE_R8);
                break;
-       case INTRINS_SSE_PMINUB:
-       case INTRINS_SSE_PMAXUB:
        case INTRINS_SE_PADDSB:
        case INTRINS_SSE_PSUBSB:
        case INTRINS_SSE_PADDUSB:
@@ -8061,11 +8158,6 @@ add_intrinsics (LLVMModuleRef module)
                AddFunc (module, "llvm_resume_unwind_trampoline", LLVMVoidType (), NULL, 0);
        }
 
-       /* SSE intrinsics */
-#if defined(TARGET_X86) || defined(TARGET_AMD64)
-
-#endif
-
        /* Load/Store intrinsics */
        {
                LLVMTypeRef arg_types [5];
@@ -8233,10 +8325,6 @@ mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix,
                /* clang ignores our debug info because it has an invalid version */
                module->emit_dwarf = FALSE;
 
-#if LLVM_API_VERSION > 100
-       module->emit_dwarf = FALSE;
-#endif
-
        add_intrinsics (module->lmodule);
        add_types (module);
 
@@ -8324,6 +8412,19 @@ llvm_array_from_uints (LLVMTypeRef el_type, guint32 *values, int nvalues)
        return res;
 }
 
+static LLVMValueRef
+llvm_array_from_bytes (guint8 *values, int nvalues)
+{
+       int i;
+       LLVMValueRef res, *vals;
+
+       vals = g_new0 (LLVMValueRef, nvalues);
+       for (i = 0; i < nvalues; ++i)
+               vals [i] = LLVMConstInt (LLVMInt8Type (), values [i], FALSE);
+       res = LLVMConstArray (LLVMInt8Type (), vals, nvalues);
+       g_free (vals);
+       return res;
+}
 /*
  * mono_llvm_emit_aot_file_info:
  *
@@ -8387,7 +8488,7 @@ emit_aot_file_info (MonoLLVMModule *module)
        info = &module->aot_info;
 
        /* Create an LLVM type to represent MonoAotFileInfo */
-       nfields = 2 + MONO_AOT_FILE_INFO_NUM_SYMBOLS + 15 + 5;
+       nfields = 2 + MONO_AOT_FILE_INFO_NUM_SYMBOLS + 16 + 5;
        eltypes = g_new (LLVMTypeRef, nfields);
        tindex = 0;
        eltypes [tindex ++] = LLVMInt32Type ();
@@ -8402,6 +8503,7 @@ emit_aot_file_info (MonoLLVMModule *module)
        eltypes [tindex ++] = LLVMArrayType (LLVMInt32Type (), MONO_AOT_TABLE_NUM);
        for (i = 0; i < 4; ++i)
                eltypes [tindex ++] = LLVMArrayType (LLVMInt32Type (), MONO_AOT_TRAMP_NUM);
+       eltypes [tindex ++] = LLVMArrayType (LLVMInt8Type (), 16);
        g_assert (tindex == nfields);
        file_info_type = LLVMStructCreateNamed (module->context, "MonoAotFileInfo");
        LLVMStructSetBody (file_info_type, eltypes, nfields, FALSE);
@@ -8524,6 +8626,8 @@ emit_aot_file_info (MonoLLVMModule *module)
        fields [tindex ++] = llvm_array_from_uints (LLVMInt32Type (), info->trampoline_got_offset_base, MONO_AOT_TRAMP_NUM);
        fields [tindex ++] = llvm_array_from_uints (LLVMInt32Type (), info->trampoline_size, MONO_AOT_TRAMP_NUM);
        fields [tindex ++] = llvm_array_from_uints (LLVMInt32Type (), info->tramp_page_code_offsets, MONO_AOT_TRAMP_NUM);
+
+       fields [tindex ++] = llvm_array_from_bytes (info->aotid, 16);
        g_assert (tindex == nfields);
 
        LLVMSetInitializer (info_var, LLVMConstNamedStruct (file_info_type, fields, nfields));
@@ -8615,6 +8719,9 @@ mono_llvm_emit_aot_module (const char *filename, const char *cu_name)
                while (g_hash_table_iter_next (&iter, (void**)&method, (void**)&callers)) {
                        LLVMValueRef lmethod;
 
+                       if (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
+                               continue;
+
                        lmethod = (LLVMValueRef)g_hash_table_lookup (module->method_to_lmethod, method);
                        if (lmethod) {
                                for (l = callers; l; l = l->next) {
@@ -8652,6 +8759,7 @@ mono_llvm_emit_aot_module (const char *filename, const char *cu_name)
                char *verifier_err;
 
                if (LLVMVerifyModule (module->lmodule, LLVMReturnStatusAction, &verifier_err)) {
+                       printf ("%s\n", verifier_err);
                        g_assert_not_reached ();
                }
        }
@@ -8794,7 +8902,7 @@ emit_dbg_subprogram (EmitContext *ctx, MonoCompile *cfg, LLVMValueRef method, co
        filename = g_path_get_basename (source_file);
 
 #if LLVM_API_VERSION > 100
-       return mono_llvm_di_create_function (module->di_builder, module->cu, cfg->method->name, name, dir, filename, n_seq_points ? sym_seq_points [0].line : 1);
+       return mono_llvm_di_create_function (module->di_builder, module->cu, method, cfg->method->name, name, dir, filename, n_seq_points ? sym_seq_points [0].line : 1);
 #endif
 
        ctx_args [0] = LLVMConstInt (LLVMInt32Type (), 0x29, FALSE);
index 883fc1af323b2eab7427b492160bef2dda2e8411..07dd0a435376575104bed2e5da8a9ffa6a8bc099 100644 (file)
@@ -706,6 +706,9 @@ MINI_OP(OP_STRLEN, "strlen", IREG, IREG, NONE)
 MINI_OP(OP_NEWARR, "newarr", IREG, IREG, NONE)
 MINI_OP(OP_LDLEN, "ldlen", IREG, IREG, NONE)
 MINI_OP(OP_BOUNDS_CHECK, "bounds_check", NONE, IREG, IREG)
+/* type checks */
+MINI_OP(OP_ISINST, "isinst", IREG, IREG, NONE)
+MINI_OP(OP_CASTCLASS, "castclass", IREG, IREG, NONE)
 /* get adress of element in a 2D array */
 MINI_OP(OP_LDELEMA2D, "getldelema2", NONE, NONE, NONE)
 /* inlined small memcpy with constant length */
@@ -1397,3 +1400,4 @@ MINI_OP(OP_OBJC_GET_SELECTOR, "objc_get_selector", IREG, NONE, NONE)
 MINI_OP(OP_GET_SP, "get_sp", IREG, NONE, NONE)
 MINI_OP(OP_SET_SP, "set_sp", NONE, IREG, NONE)
 
+MINI_OP(OP_GET_LAST_ERROR, "get_last_error", IREG, NONE, NONE)
index 6f4082905c5687bf4679fffe2550815663475880..861ab5cf437789a04e5926d4b14a3b4680fef364 100644 (file)
@@ -1810,6 +1810,10 @@ mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoError *er
 
        mono_error_init (error);
 
+       if (mono_llvm_only)
+               /* Should be handled by the caller */
+               g_assert (!(method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED));
+
        /*
         * ICALL wrappers are handled specially, since there is only one copy of them
         * shared by all appdomains.
@@ -2158,7 +2162,10 @@ create_runtime_invoke_info (MonoDomain *domain, MonoMethod *method, gpointer com
 
        info = g_new0 (RuntimeInvokeInfo, 1);
        info->compiled_method = compiled_method;
-       info->sig = mono_method_signature (method);
+       if (mono_llvm_only && method->string_ctor)
+               info->sig = mono_marshal_get_string_ctor_signature (method);
+       else
+               info->sig = mono_method_signature (method);
 
        invoke = mono_marshal_get_runtime_invoke (method, FALSE);
        info->vtable = mono_class_vtable_full (domain, method->klass, error);
@@ -2166,7 +2173,7 @@ create_runtime_invoke_info (MonoDomain *domain, MonoMethod *method, gpointer com
                return NULL;
        g_assert (info->vtable);
 
-       MonoMethodSignature *sig = mono_method_signature (method);
+       MonoMethodSignature *sig = info->sig;
        MonoType *ret_type;
 
        /*
@@ -2348,8 +2355,10 @@ mono_llvmonly_runtime_invoke (MonoMethod *method, RuntimeInvokeInfo *info, void
        runtime_invoke = (MonoObject *(*)(MonoObject *, void **, MonoObject **, void *))info->runtime_invoke;
 
        runtime_invoke (NULL, args, exc, info->compiled_method);
-       if (exc && *exc)
+       if (exc && *exc) {
                mono_error_set_exception_instance (error, (MonoException*) *exc);
+               return NULL;
+       }
 
        if (sig->ret->type != MONO_TYPE_VOID && info->ret_box_class)
                return mono_value_box_checked (domain, info->ret_box_class, retval, error);
@@ -2521,11 +2530,13 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
                mono_arch_start_dyn_call (info->dyn_call_info, (gpointer**)args, retval, buf, sizeof (buf));
 
                dyn_runtime_invoke (buf, exc, info->compiled_method);
-               if (catchExcInMonoError && *exc != NULL)
-                       mono_error_set_exception_instance (error, (MonoException*) *exc);
-
                mono_arch_finish_dyn_call (info->dyn_call_info, buf);
 
+               if (catchExcInMonoError && *exc != NULL) {
+                       mono_error_set_exception_instance (error, (MonoException*) *exc);
+                       return NULL;
+               }
+
                if (info->ret_box_class)
                        return mono_value_box_checked (domain, info->ret_box_class, retval, error);
                else
@@ -3146,7 +3157,9 @@ mini_parse_debug_option (const char *option)
        else if (!strcmp (option, "gen-seq-points"))
                debug_options.gen_sdb_seq_points = TRUE;
        else if (!strcmp (option, "gen-compact-seq-points"))
-               debug_options.gen_seq_points_compact_data = TRUE;
+               fprintf (stderr, "Mono Warning: option gen-compact-seq-points is deprecated.\n");
+       else if (!strcmp (option, "no-compact-seq-points"))
+               debug_options.no_seq_points_compact_data = TRUE;
        else if (!strcmp (option, "single-imm-size"))
                debug_options.single_imm_size = TRUE;
        else if (!strcmp (option, "init-stacks"))
@@ -3191,7 +3204,7 @@ mini_parse_debug_options (void)
 
                if (!mini_parse_debug_option (arg)) {
                        fprintf (stderr, "Invalid option for the MONO_DEBUG env variable: %s\n", arg);
-                       fprintf (stderr, "Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'suspend-on-sigsegv', 'suspend-on-exception', 'suspend-on-unhandled', 'dont-free-domains', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'gen-seq-points', 'gen-compact-seq-points', 'single-imm-size', 'init-stacks', 'casts', 'soft-breakpoints', 'check-pinvoke-callconv', 'arm-use-fallback-tls', 'debug-domain-unload', 'partial-sharing', 'align-small-structs', 'native-debugger-break'\n");
+                       fprintf (stderr, "Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'suspend-on-sigsegv', 'suspend-on-exception', 'suspend-on-unhandled', 'dont-free-domains', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'gen-seq-points', 'no-compact-seq-points', 'single-imm-size', 'init-stacks', 'casts', 'soft-breakpoints', 'check-pinvoke-callconv', 'arm-use-fallback-tls', 'debug-domain-unload', 'partial-sharing', 'align-small-structs', 'native-debugger-break'\n");
                        exit (1);
                }
        }
@@ -3254,6 +3267,7 @@ register_jit_stats (void)
        mono_counters_register ("JIT/liveness_handle_exception_clauses (sec)", MONO_COUNTER_JIT | MONO_COUNTER_DOUBLE, &mono_jit_stats.jit_liveness_handle_exception_clauses);
        mono_counters_register ("JIT/handle_out_of_line_bblock (sec)", MONO_COUNTER_JIT | MONO_COUNTER_DOUBLE, &mono_jit_stats.jit_handle_out_of_line_bblock);
        mono_counters_register ("JIT/decompose_long_opts (sec)", MONO_COUNTER_JIT | MONO_COUNTER_DOUBLE, &mono_jit_stats.jit_decompose_long_opts);
+       mono_counters_register ("JIT/decompose_typechecks (sec)", MONO_COUNTER_JIT | MONO_COUNTER_DOUBLE, &mono_jit_stats.jit_decompose_typechecks);
        mono_counters_register ("JIT/local_cprop (sec)", MONO_COUNTER_JIT | MONO_COUNTER_DOUBLE, &mono_jit_stats.jit_local_cprop);
        mono_counters_register ("JIT/local_emulate_ops (sec)", MONO_COUNTER_JIT | MONO_COUNTER_DOUBLE, &mono_jit_stats.jit_local_emulate_ops);
        mono_counters_register ("JIT/optimize_branches (sec)", MONO_COUNTER_JIT | MONO_COUNTER_DOUBLE, &mono_jit_stats.jit_optimize_branches);
@@ -3756,7 +3770,6 @@ register_icalls (void)
        register_icall (mono_thread_interruption_checkpoint, "mono_thread_interruption_checkpoint", "object", FALSE);
        register_icall (mono_thread_force_interruption_checkpoint_noraise, "mono_thread_force_interruption_checkpoint_noraise", "object", FALSE);
 #ifndef DISABLE_REMOTING
-       register_icall (mono_load_remote_field_new_icall, "mono_load_remote_field_new_icall", "object object ptr ptr", FALSE);
        register_icall (mono_store_remote_field_new_icall, "mono_store_remote_field_new_icall", "void object ptr ptr object", FALSE);
 #endif
 
@@ -3936,8 +3949,8 @@ register_icalls (void)
        register_icall (mono_object_castclass_with_cache, "mono_object_castclass_with_cache", "object object ptr ptr", FALSE);
        register_icall (mono_object_isinst_with_cache, "mono_object_isinst_with_cache", "object object ptr ptr", FALSE);
        register_icall (mono_generic_class_init, "mono_generic_class_init", "void ptr", FALSE);
-       register_icall (mono_fill_class_rgctx, "mono_class_fill_rgctx", "ptr ptr int", FALSE);
-       register_icall (mono_fill_method_rgctx, "mono_method_fill_rgctx", "ptr ptr int", FALSE);
+       register_icall (mono_fill_class_rgctx, "mono_fill_class_rgctx", "ptr ptr int", FALSE);
+       register_icall (mono_fill_method_rgctx, "mono_fill_method_rgctx", "ptr ptr int", FALSE);
 
        register_icall (mono_debugger_agent_user_break, "mono_debugger_agent_user_break", "void", FALSE);
 
index 27820c19f9fa6c19c7af17e34955d16675120698..fbc9674fb52702f0c2a3cc0100b36a9d93f35393 100644 (file)
@@ -799,7 +799,11 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, MonoVTable *
                                 */
                                no_patch = TRUE;
                        }
-
+#if LLVM_API_VERSION > 100
+                       /* LLVM code doesn't make direct calls */
+                       if (ji && ji->from_llvm)
+                               no_patch = TRUE;
+#endif
                        if (!no_patch && mono_method_same_domain (ji, target_ji))
                                mono_arch_patch_callsite ((guint8 *)ji->code_start, code, (guint8 *)addr);
                }
@@ -1505,13 +1509,16 @@ mono_create_jit_trampoline (MonoDomain *domain, MonoMethod *method, MonoError *e
        mono_error_init (error);
 
        if (mono_aot_only) {
+               if (mono_llvm_only && method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
+                       method = mono_marshal_get_synchronized_wrapper (method);
+
                /* Avoid creating trampolines if possible */
                gpointer code = mono_jit_find_compiled_method (domain, method);
                
                if (code)
                        return code;
                if (mono_llvm_only) {
-                       if (method->wrapper_type == MONO_WRAPPER_PROXY_ISINST || method->wrapper_type == MONO_WRAPPER_LDFLD_REMOTE ||
+                       if (method->wrapper_type == MONO_WRAPPER_PROXY_ISINST ||
                                method->wrapper_type == MONO_WRAPPER_STFLD_REMOTE)
                                /* These wrappers are not generated */
                                return method_not_found;
index badf12b33b3bf1d72f1466b48e8c8a0aeb517e88..8fc2c8b54236716d92170f1159820ade47d33718 100644 (file)
@@ -231,19 +231,49 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
        klass = mono_class_from_mono_type (type);
        size = mini_type_stack_size_full (&klass->byval_arg, NULL, sig->pinvoke);
 
+#if defined(TARGET_WIN32)
+       /*
+       * Standard C and C++ doesn't allow empty structs, empty structs will always have a size of 1 byte.
+       * GCC have an extension to allow empty structs, https://gcc.gnu.org/onlinedocs/gcc/Empty-Structures.html.
+       * This cause a little dilemma since runtime build using none GCC compiler will not be compatible with
+       * GCC build C libraries and the other way around. On platforms where empty structs has size of 1 byte
+       * it must be represented in call and cannot be dropped.
+       */
+       if (size == 0 && MONO_TYPE_ISSTRUCT (type) && sig->pinvoke) {
+               /* Empty structs (1 byte size) needs to be represented in a stack slot */
+               ainfo->pass_empty_struct = TRUE;
+               size = 1;
+       }
+#endif
+
 #ifdef SMALL_STRUCTS_IN_REGS
        if (sig->pinvoke && is_return) {
                MonoMarshalType *info;
 
-               /*
-                * the exact rules are not very well documented, the code below seems to work with the 
-                * code generated by gcc 3.3.3 -mno-cygwin.
-                */
                info = mono_marshal_load_type_info (klass);
                g_assert (info);
 
                ainfo->pair_storage [0] = ainfo->pair_storage [1] = ArgNone;
 
+               /* Ignore empty struct return value, if used. */
+               if (info->num_fields == 0 && ainfo->pass_empty_struct) {
+                       ainfo->storage = ArgValuetypeInReg;
+                       return;
+               }
+
+               /*
+               * Windows x86 ABI for returning structs of size 4 or 8 bytes (regardless of type) dictates that
+               * values are passed in EDX:EAX register pairs, https://msdn.microsoft.com/en-us/library/984x0h58.aspx.
+               * This is different compared to for example float or double return types (not in struct) that will be returned
+               * in ST(0), https://msdn.microsoft.com/en-us/library/ha59cbfz.aspx.
+               *
+               * Apples OSX x86 ABI for returning structs of size 4 or 8 bytes uses a slightly different approach.
+               * If a struct includes only one scalar value, it will be handled with the same rules as scalar values.
+               * This means that structs with one float or double will be returned in ST(0). For more details,
+               * https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/LowLevelABI/130-IA-32_Function_Calling_Conventions/IA32.html.
+               */
+#if !defined(TARGET_WIN32)
+
                /* Special case structs with only a float member */
                if (info->num_fields == 1) {
                        int ftype = mini_get_underlying_type (info->fields [0].field->type)->type;
@@ -258,6 +288,8 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
                                return;
                        }
                }
+#endif
+
                if ((info->native_size == 1) || (info->native_size == 2) || (info->native_size == 4) || (info->native_size == 8)) {
                        ainfo->storage = ArgValuetypeInReg;
                        ainfo->pair_storage [0] = ArgInIReg;
@@ -292,7 +324,7 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
  * For x86 ELF, see the "System V Application Binary Interface Intel386 
  * Architecture Processor Supplment, Fourth Edition" document for more
  * information.
- * For x86 win32, see ???.
+ * For x86 win32, see https://msdn.microsoft.com/en-us/library/984x0h58.aspx.
  */
 static CallInfo*
 get_call_info_internal (CallInfo *cinfo, MonoMethodSignature *sig)
@@ -1355,7 +1387,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                sentinelpos = sig->sentinelpos + (sig->hasthis ? 1 : 0);
 
        if (sig_ret && MONO_TYPE_ISSTRUCT (sig_ret)) {
-               if (cinfo->ret.storage == ArgValuetypeInReg) {
+               if (cinfo->ret.storage == ArgValuetypeInReg && cinfo->ret.pair_storage[0] != ArgNone ) {
                        /*
                         * Tell the JIT to use a more efficient calling convention: call using
                         * OP_CALL, compute the result location after the call, and save the 
@@ -1437,7 +1469,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                                size = mini_type_stack_size_full (&in->klass->byval_arg, &align, sig->pinvoke);
                        }
 
-                       if (size > 0) {
+                       if (size > 0 || ainfo->pass_empty_struct) {
                                arg->opcode = OP_OUTARG_VT;
                                arg->sreg1 = in->dreg;
                                arg->klass = in->klass;
@@ -1568,7 +1600,12 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
                        MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, ainfo->offset, src->dreg);
                } else if (size <= 4) {
                        int dreg = mono_alloc_ireg (cfg);
-                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, src->dreg, 0);
+                       if (ainfo->pass_empty_struct) {
+                               //Pass empty struct value as 0 on platforms representing empty structs as 1 byte.
+                               MONO_EMIT_NEW_ICONST (cfg, dreg, 0);
+                       } else {
+                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, src->dreg, 0);
+                       }
                        MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, ainfo->offset, dreg);
                } else if (size <= 20) {
                        mini_emit_memcpy (cfg, X86_ESP, ainfo->offset, src->dreg, 0, size, 4);
index 4150cdf60d0aed1d2527748e11d940407bec8b7a..b70d836c2aa07fd9758bf632c62cb5cd404582a1 100644 (file)
@@ -315,6 +315,7 @@ typedef struct {
        /* Only if storage == ArgValuetypeInReg */
        ArgStorage pair_storage [2];
        gint8 pair_regs [2];
+       guint8 pass_empty_struct : 1; // Set in scenarios when empty structs needs to be represented as argument.
 } ArgInfo;
 
 typedef struct {
index af779644801d323dcd3ca945e6abe73c0aba5ef4..fff5ece8d5512e319ffe7c3a70bbaf25e5ba2b24 100644 (file)
@@ -1169,7 +1169,7 @@ mono_allocate_stack_slots2 (MonoCompile *cfg, gboolean backward, guint32 *stack_
                vars = g_list_prepend (vars, vmv);
        }
 
-       vars = g_list_sort (g_list_copy (vars), compare_by_interval_start_pos_func);
+       vars = g_list_sort (vars, compare_by_interval_start_pos_func);
 
        /* Sanity check */
        /*
@@ -1886,28 +1886,59 @@ mono_verify_cfg (MonoCompile *cfg)
                mono_verify_bblock (bb);
 }
 
+// This will free many fields in cfg to save
+// memory. Note that this must be safe to call
+// multiple times. It must be idempotent. 
+void
+mono_empty_compile (MonoCompile *cfg)
+{
+       mono_free_loop_info (cfg);
+
+       // These live in the mempool, and so must be freed
+       // first
+       for (GSList *l = cfg->headers_to_free; l; l = l->next) {
+               mono_metadata_free_mh ((MonoMethodHeader *)l->data);
+       }
+       cfg->headers_to_free = NULL;
+
+       if (cfg->mempool) {
+       //mono_mempool_stats (cfg->mempool);
+               mono_mempool_destroy (cfg->mempool);
+               cfg->mempool = NULL;
+       }
+
+       g_free (cfg->varinfo);
+       cfg->varinfo = NULL;
+
+       g_free (cfg->vars);
+       cfg->vars = NULL;
+
+       if (cfg->rs) {
+               mono_regstate_free (cfg->rs);
+               cfg->rs = NULL;
+       }
+}
+
 void
 mono_destroy_compile (MonoCompile *cfg)
 {
-       GSList *l;
+       mono_empty_compile (cfg);
 
        if (cfg->header)
                mono_metadata_free_mh (cfg->header);
-       //mono_mempool_stats (cfg->mempool);
-       mono_free_loop_info (cfg);
-       if (cfg->rs)
-               mono_regstate_free (cfg->rs);
+
        if (cfg->spvars)
                g_hash_table_destroy (cfg->spvars);
        if (cfg->exvars)
                g_hash_table_destroy (cfg->exvars);
-       for (l = cfg->headers_to_free; l; l = l->next)
-               mono_metadata_free_mh ((MonoMethodHeader *)l->data);
+
        g_list_free (cfg->ldstr_list);
-       g_hash_table_destroy (cfg->token_info_hash);
+
+       if (cfg->token_info_hash)
+               g_hash_table_destroy (cfg->token_info_hash);
+
        if (cfg->abs_patches)
                g_hash_table_destroy (cfg->abs_patches);
-       mono_mempool_destroy (cfg->mempool);
 
        mono_debug_free_method (cfg);
 
@@ -2896,6 +2927,17 @@ is_open_method (MonoMethod *method)
        return FALSE;
 }
 
+static void mono_insert_nop_in_empty_bb (MonoCompile *cfg)
+{
+       MonoBasicBlock *bb;
+       for (bb = cfg->bb_entry; bb; bb = bb->next_bb) {
+               if (bb->code)
+                       continue;
+               MonoInst *nop;
+               MONO_INST_NEW (cfg, nop, OP_NOP);
+               MONO_ADD_INS (bb, nop);
+       }
+}
 static void
 mono_create_gc_safepoint (MonoCompile *cfg, MonoBasicBlock *bblock)
 {
@@ -3230,7 +3272,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
        cfg->disable_omit_fp = debug_options.disable_omit_fp;
        cfg->skip_visibility = method->skip_visibility;
        cfg->orig_method = method;
-       cfg->gen_seq_points = debug_options.gen_seq_points_compact_data || debug_options.gen_sdb_seq_points;
+       cfg->gen_seq_points = !debug_options.no_seq_points_compact_data || debug_options.gen_sdb_seq_points;
        cfg->gen_sdb_seq_points = debug_options.gen_sdb_seq_points;
        cfg->llvm_only = (flags & JIT_FLAG_LLVM_ONLY) != 0;
        cfg->backend = current_backend;
@@ -3242,6 +3284,11 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
                cfg->gen_sdb_seq_points = FALSE;
        }
 #endif
+       if (cfg->method->wrapper_type == MONO_WRAPPER_ALLOC) {
+               /* We can't have seq points inside gc critical regions */
+               cfg->gen_seq_points = FALSE;
+               cfg->gen_sdb_seq_points = FALSE;
+       }
        /* coop / nacl requires loop detection to happen */
 #if defined(__native_client_codegen__)
        cfg->opt |= MONO_OPT_LOOP;
@@ -3352,6 +3399,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
                                        //g_free (nm);
                                }
                                if (cfg->llvm_only) {
+                                       g_free (cfg->exception_message);
                                        cfg->disable_aot = TRUE;
                                        return cfg;
                                }
@@ -3499,6 +3547,12 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
        MONO_TIME_TRACK (mono_jit_stats.jit_method_to_ir, i = mono_method_to_ir (cfg, method_to_compile, NULL, NULL, NULL, NULL, 0, FALSE));
        mono_cfg_dump_ir (cfg, "method-to-ir");
 
+       if (cfg->gdump_ctx != NULL) {
+               /* workaround for graph visualization, as it doesn't handle empty basic blocks properly */
+               mono_insert_nop_in_empty_bb (cfg);
+               mono_cfg_dump_ir (cfg, "mono_insert_nop_in_empty_bb");
+       }
+
        if (i < 0) {
                if (try_generic_shared && cfg->exception_type == MONO_EXCEPTION_GENERIC_SHARING_FAILED) {
                        if (compile_aot) {
@@ -3577,6 +3631,15 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
                mono_cfg_dump_ir (cfg, "local_cprop");
        }
 
+       if (cfg->flags & MONO_CFG_HAS_TYPE_CHECK) {
+               MONO_TIME_TRACK (mono_jit_stats.jit_decompose_typechecks, mono_decompose_typechecks (cfg));
+               if (cfg->gdump_ctx != NULL) {
+                       /* workaround for graph visualization, as it doesn't handle empty basic blocks properly */
+                       mono_insert_nop_in_empty_bb (cfg);
+               }
+               mono_cfg_dump_ir (cfg, "decompose_typechecks");
+       }
+
        /*
         * Should be done after cprop which can do strength reduction on
         * some of these ops, after propagating immediates.
@@ -4166,13 +4229,9 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in
 
        if (mono_aot_only) {
                char *fullname = mono_method_full_name (method, TRUE);
-               char *msg = g_strdup_printf ("Attempting to JIT compile method '%s' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.\n", fullname);
-
-               ex = mono_get_exception_execution_engine (msg);
-               mono_error_set_exception_instance (error, ex);
+               mono_error_set_execution_engine (error, "Attempting to JIT compile method '%s' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.\n", fullname);
                g_free (fullname);
-               g_free (msg);
-               
+
                return NULL;
        }
 
index 48729fc2eeeac4601b3a06e59a30d06c120fabf4..d27b17f540325b985c999551131890c073851eea 100644 (file)
 #define MINI_DEBUG(level,limit,code) do {if (G_UNLIKELY ((level) >= (limit))) code} while (0)
 #endif
 
-#if !defined(DISABLE_TASKLETS) && defined(MONO_ARCH_SUPPORT_TASKLETS) && defined(__GNUC__)
+#if !defined(DISABLE_TASKLETS) && defined(MONO_ARCH_SUPPORT_TASKLETS)
+#if defined(__GNUC__)
 #define MONO_SUPPORT_TASKLETS 1
+#elif defined(HOST_WIN32)
+#define MONO_SUPPORT_TASKLETS 1
+// Replace some gnu intrinsics needed for tasklets with MSVC equivalents.
+#define __builtin_extract_return_addr(x) x
+#define __builtin_return_address(x) _ReturnAddress()
+#define __builtin_frame_address(x) _AddressOfReturnAddress()
+#endif
 #endif
 
 #if ENABLE_LLVM
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 133
+#define MONO_AOT_FILE_VERSION 135
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
@@ -307,6 +315,8 @@ typedef struct MonoAotFileInfo
        guint32 trampoline_size [MONO_AOT_TRAMP_NUM];
        /* The offset where the trampolines begin on a trampoline page */
        guint32 tramp_page_code_offsets [MONO_AOT_TRAMP_NUM];
+       /* GUID of aot compilation */
+       guint8 aotid[16];
 } MonoAotFileInfo;
 
 /* Number of symbols in the MonoAotFileInfo structure */
@@ -478,7 +488,7 @@ enum {
 
 #define MONO_IS_COND_EXC(ins) ((((ins)->opcode >= OP_COND_EXC_EQ) && ((ins)->opcode <= OP_COND_EXC_LT_UN)) || (((ins)->opcode >= OP_COND_EXC_IEQ) && ((ins)->opcode <= OP_COND_EXC_ILT_UN)))
 
-#define MONO_IS_SETCC(ins) ((((ins)->opcode >= OP_CEQ) && ((ins)->opcode <= OP_CLT_UN)) || (((ins)->opcode >= OP_ICEQ) && ((ins)->opcode <= OP_ICLT_UN)) || (((ins)->opcode >= OP_LCEQ) && ((ins)->opcode <= OP_LCLT_UN)) || (((ins)->opcode >= OP_FCEQ) && ((ins)->opcode <= OP_FCLT_UN)))
+#define MONO_IS_SETCC(ins) ((((ins)->opcode >= OP_CEQ) && ((ins)->opcode <= OP_CLT_UN)) || (((ins)->opcode >= OP_ICEQ) && ((ins)->opcode <= OP_ICLE_UN)) || (((ins)->opcode >= OP_LCEQ) && ((ins)->opcode <= OP_LCLT_UN)) || (((ins)->opcode >= OP_FCEQ) && ((ins)->opcode <= OP_FCLT_UN)))
 
 
 #define MONO_IS_LOAD_MEMBASE(ins) (((ins)->opcode >= OP_LOAD_MEMBASE && (ins)->opcode <= OP_LOADV_MEMBASE) || ((ins)->opcode >= OP_ATOMIC_LOAD_I1 && (ins)->opcode <= OP_ATOMIC_LOAD_R8))
@@ -1164,6 +1174,11 @@ typedef struct {
         * The current exception in flight
         */
        guint32 thrown_exc;
+       /*
+        * If the current exception is not a subclass of Exception,
+        * the original exception.
+        */
+       guint32 thrown_non_exc;
 
        /*
         * The calling assembly in llvmonly mode.
@@ -1869,7 +1884,8 @@ typedef enum {
        MONO_CFG_HAS_FPOUT    = 1 << 5, /* there are fp values passed in int registers */
        MONO_CFG_HAS_SPILLUP  = 1 << 6, /* spill var slots are allocated from bottom to top */
        MONO_CFG_HAS_CHECK_THIS  = 1 << 7,
-       MONO_CFG_HAS_ARRAY_ACCESS = 1 << 8
+       MONO_CFG_HAS_ARRAY_ACCESS = 1 << 8,
+       MONO_CFG_HAS_TYPE_CHECK = 1 << 9
 } MonoCompileFlags;
 
 typedef struct {
@@ -1903,6 +1919,7 @@ typedef struct {
        double jit_liveness_handle_exception_clauses;
        double jit_handle_out_of_line_bblock;
        double jit_decompose_long_opts;
+       double jit_decompose_typechecks;
        double jit_local_cprop;
        double jit_local_emulate_ops;
        double jit_optimize_branches;
@@ -2104,7 +2121,7 @@ typedef struct {
         * Next sequence points and flags are required by the debugger agent.
         */
        gboolean gen_sdb_seq_points;
-       gboolean gen_seq_points_compact_data;
+       gboolean no_seq_points_compact_data;
        /*
         * Setting single_imm_size should guarantee that each time managed code is compiled
         * the same instructions and registers are used, regardless of the size of used values.
@@ -2411,6 +2428,7 @@ void      mono_global_regalloc              (MonoCompile *cfg);
 void      mono_create_jump_table            (MonoCompile *cfg, MonoInst *label, MonoBasicBlock **bbs, int num_blocks);
 MonoCompile *mini_method_compile            (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFlags flags, int parts, int aot_method_index);
 void      mono_destroy_compile              (MonoCompile *cfg);
+void      mono_empty_compile              (MonoCompile *cfg);
 MonoJitICallInfo *mono_find_jit_opcode_emulation (int opcode);
 void     mono_print_ins_index (int i, MonoInst *ins);
 void     mono_print_ins (MonoInst *ins);
@@ -2855,6 +2873,7 @@ typedef void  (*MonoUnhandledExceptionFunc)         (MonoObject *exc, gpointer u
 MONO_API void mono_install_unhandled_exception_hook (MonoUnhandledExceptionFunc func, gpointer user_data);
 void          mono_invoke_unhandled_exception_hook  (MonoObject *exc);
 
+void mono_decompose_typechecks (MonoCompile *cfg);
 /* Dominator/SSA methods */
 void        mono_compile_dominator_info         (MonoCompile *cfg, int dom_flags);
 void        mono_compute_natural_loops          (MonoCompile *cfg);
index 9457633bafc1b81e5dcf27980522e6702e214274..08deb0c00f2913bf8c8fdccf4173ec7d5e8d768f 100644 (file)
@@ -54,6 +54,7 @@ continuation_mark_frame (MonoContinuation *cont)
 
        /* get to the frame that called Mark () */
        memset (&rji, 0, sizeof (rji));
+       memset (&ctx, 0, sizeof (ctx));
        do {
                ji = mono_find_jit_info (cont->domain, jit_tls, &rji, NULL, &ctx, &new_ctx, NULL, &lmf, NULL, NULL);
                if (!ji || ji == (gpointer)-1) {
index 45d32b99c05e54b64969afac9b9c51d6047a07b8..b89cc887ff15f21a57f676bad55f3ca7e51c5d79 100755 (executable)
@@ -49,16 +49,16 @@ get_method () {
 diff_methods () {
        TMP_FILE1=$(tmp_file)
        TMP_FILE2=$(tmp_file)
-       echo "$(MONO_DEBUG=single-imm-size get_methods $1 $2 $3 $4)" >$TMP_FILE1
-       echo "$(MONO_DEBUG=gen-compact-seq-points,single-imm-size get_methods $1 $2 $3 $4)" >$TMP_FILE2
+       echo "$(MONO_DEBUG=no-compact-seq-points,single-imm-size get_methods $1 $2 $3 $4)" >$TMP_FILE1
+       echo "$(MONO_DEBUG=single-imm-size get_methods $1 $2 $3 $4)" >$TMP_FILE2
        diff $TMP_FILE1 $TMP_FILE2
 }
 
 diff_method () {
        TMP_FILE1=$(tmp_file)
        TMP_FILE2=$(tmp_file)
-       echo "$(MONO_DEBUG=single-imm-size get_method $1 $2 $3 $4 $5)" >$TMP_FILE1
-       echo "$(MONO_DEBUG=gen-compact-seq-points,single-imm-size get_method $1 $2 $3 $4 $5 | grep -Ev il_seq_point)" >$TMP_FILE2
+       echo "$(MONO_DEBUG=no-compact-seq-points,single-imm-size get_method $1 $2 $3 $4 $5)" >$TMP_FILE1
+       echo "$(MONO_DEBUG=single-imm-size get_method $1 $2 $3 $4 $5 | grep -Ev il_seq_point)" >$TMP_FILE2
        sdiff -w 150 $TMP_FILE1 $TMP_FILE2
 }
 
index ef3c65a7f225790813dfa5ab71f9a5e11b8c8ed4..a2824292404979c4f6e76691edaf2ce99a723575 100644 (file)
@@ -375,13 +375,15 @@ mono_unwind_ops_encode_full (GSList *unwind_ops, guint32 *out_len, gboolean enab
                while (op->when > loc) {
                        if (op->when - loc > 65536) {
                                *p ++ = DW_CFA_advance_loc4;
-                               *(guint32*)p = (guint32)(op->when - loc);
+                               guint32 v = (guint32)(op->when - loc);
+                               memcpy (p, &v, 4);
                                g_assert (read32 (p) == (guint32)(op->when - loc));
                                p += 4;
                                loc = op->when;
                        } else if (op->when - loc > 256) {
                                *p ++ = DW_CFA_advance_loc2;
-                               *(guint16*)p = (guint16)(op->when - loc);
+                               guint16 v = (guint16)(op->when - loc);
+                               memcpy (p, &v, 2);
                                g_assert (read16 (p) == (guint32)(op->when - loc));
                                p += 2;
                                loc = op->when;
index b215a3091c3c87d3da5aee213d6421f9fc3ac585..3d7eb62e4004b07a10c4644c3086e9eedf21b66a 100644 (file)
@@ -14,34 +14,29 @@ if !DISABLE_LIBRARIES
 if !DISABLE_PROFILER
 bin_PROGRAMS = mprof-report
 
-if !BITCODE
-prof_shlibs = \
-       libmono-profiler-aot.la \
-       libmono-profiler-iomap.la \
-       libmono-profiler-log.la
-endif
-
 if HAVE_VTUNE
-vtune_stlibs = libmono-profiler-vtune-static.la
-if !BITCODE
-vtune_shlibs = libmono-profiler-vtune.la
-endif
+vtune_libs = libmono-profiler-vtune.la libmono-profiler-vtune-static.la
 endif
 
 lib_LTLIBRARIES = \
-       $(prof_shlibs) \
+       libmono-profiler-aot.la \
        libmono-profiler-aot-static.la \
+       libmono-profiler-iomap.la \
        libmono-profiler-iomap-static.la \
+       libmono-profiler-log.la \
        libmono-profiler-log-static.la \
-       $(vtune_shlibs) \
-       $(vtune_stlibs)
+       $(vtune_libs)
 
 suppressiondir = $(datadir)/mono-$(API_VER)/mono/profiler
 suppression_DATA = mono-profiler-log.suppression
 
 if PLATFORM_DARWIN
+if BITCODE
+prof_ldflags = -no-undefined
+else
 prof_ldflags = -Wl,-undefined -Wl,suppress -Wl,-flat_namespace
 endif
+endif
 
 if PLATFORM_ANDROID
 prof_ldflags = -avoid-version
@@ -58,6 +53,8 @@ endif
 endif
 endif
 
+monodir=$(top_builddir)
+
 # The log profiler uses eglib functions, so it needs to be linked against
 # libeglib in shared mode, but not in static mode, since that would
 # leads to duplicate symbols when it is linked into an app which
@@ -65,19 +62,19 @@ endif
 # functionality, so create a separate static version of the library.
 
 libmono_profiler_aot_la_SOURCES = mono-profiler-aot.c
-libmono_profiler_aot_la_LIBADD = $(GLIB_LIBS) $(LIBICONV)
+libmono_profiler_aot_la_LIBADD =  $(monodir)/mono/mini/$(LIBMONO_LA) $(GLIB_LIBS) $(LIBICONV)
 libmono_profiler_aot_la_LDFLAGS = $(prof_ldflags)
 libmono_profiler_aot_static_la_SOURCES = mono-profiler-aot.c
 libmono_profiler_aot_static_la_LDFLAGS = -static
 
 libmono_profiler_iomap_la_SOURCES = mono-profiler-iomap.c
-libmono_profiler_iomap_la_LIBADD = $(GLIB_LIBS) $(LIBICONV)
+libmono_profiler_iomap_la_LIBADD = $(monodir)/mono/mini/$(LIBMONO_LA) $(GLIB_LIBS) $(LIBICONV)
 libmono_profiler_iomap_la_LDFLAGS = $(prof_ldflags)
 libmono_profiler_iomap_static_la_SOURCES = mono-profiler-iomap.c
 libmono_profiler_iomap_static_la_LDFLAGS = -static
 
 libmono_profiler_log_la_SOURCES = proflog.c
-libmono_profiler_log_la_LIBADD = $(GLIB_LIBS) $(Z_LIBS)
+libmono_profiler_log_la_LIBADD = $(monodir)/mono/mini/$(LIBMONO_LA) $(GLIB_LIBS) $(Z_LIBS)
 libmono_profiler_log_la_LDFLAGS = $(prof_ldflags)
 libmono_profiler_log_static_la_SOURCES = proflog.c
 libmono_profiler_log_static_la_LDFLAGS = -static
@@ -85,7 +82,7 @@ libmono_profiler_log_static_la_LDFLAGS = -static
 if HAVE_VTUNE
 libmono_profiler_vtune_la_SOURCES = mono-profiler-vtune.c
 libmono_profiler_vtune_la_CFLAGS = $(VTUNE_CFLAGS)
-libmono_profiler_vtune_la_LIBADD = $(VTUNE_LIBS) $(GLIB_LIBS) $(LIBICONV)
+libmono_profiler_vtune_la_LIBADD = $(VTUNE_LIBS) $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
 libmono_profiler_vtune_la_LDFLAGS = $(prof_ldflags)
 libmono_profiler_vtune_static_la_SOURCES = mono-profiler-vtune.c
 libmono_profiler_vtune_static_la_LDFLAGS = -static
index dcf977c06e1b736e4f46ad3ec4ea9a0d760eb2af..2e9f4666d21675f5a13596ee5bb8d14ecd26c68d 100644 (file)
@@ -96,7 +96,7 @@ alloc_degraded (GCVTable vtable, size_t size, gboolean for_mature)
                sgen_ensure_free_space (size, GENERATION_OLD);
        } else {
                if (sgen_need_major_collection (size))
-                       sgen_perform_collection (size, GENERATION_OLD, "mature allocation failure", !for_mature);
+                       sgen_perform_collection (size, GENERATION_OLD, "mature allocation failure", !for_mature, TRUE);
        }
 
 
@@ -164,7 +164,7 @@ sgen_alloc_obj_nolock (GCVTable vtable, size_t size)
 
                if (collect_before_allocs) {
                        if (((current_alloc % collect_before_allocs) == 0) && nursery_section) {
-                               sgen_perform_collection (0, GENERATION_NURSERY, "collect-before-alloc-triggered", TRUE);
+                               sgen_perform_collection (0, GENERATION_NURSERY, "collect-before-alloc-triggered", TRUE, TRUE);
                                if (!degraded_mode && sgen_can_alloc_size (size) && real_size <= SGEN_MAX_SMALL_OBJ_SIZE) {
                                        // FIXME:
                                        g_assert_not_reached ();
@@ -424,7 +424,7 @@ sgen_alloc_obj (GCVTable vtable, size_t size)
                if (collect_before_allocs) {
                        if (((current_alloc % collect_before_allocs) == 0) && nursery_section) {
                                LOCK_GC;
-                               sgen_perform_collection (0, GENERATION_NURSERY, "collect-before-alloc-triggered", TRUE);
+                               sgen_perform_collection (0, GENERATION_NURSERY, "collect-before-alloc-triggered", TRUE, TRUE);
                                UNLOCK_GC;
                        }
                }
index 75699b7563f5a5152f9d1757d5ed924cb2c0266f..3dac1df3d8dfb82cc4c835eba8d0b59c4c5ad603 100644 (file)
@@ -2226,14 +2226,14 @@ sgen_ensure_free_space (size_t size, int generation)
 
        if (generation_to_collect == -1)
                return;
-       sgen_perform_collection (size, generation_to_collect, reason, FALSE);
+       sgen_perform_collection (size, generation_to_collect, reason, FALSE, TRUE);
 }
 
 /*
  * LOCKING: Assumes the GC lock is held.
  */
 void
-sgen_perform_collection (size_t requested_size, int generation_to_collect, const char *reason, gboolean wait_to_finish)
+sgen_perform_collection (size_t requested_size, int generation_to_collect, const char *reason, gboolean wait_to_finish, gboolean stw)
 {
        TV_DECLARE (gc_total_start);
        TV_DECLARE (gc_total_end);
@@ -2246,7 +2246,11 @@ sgen_perform_collection (size_t requested_size, int generation_to_collect, const
 
        SGEN_ASSERT (0, generation_to_collect == GENERATION_NURSERY || generation_to_collect == GENERATION_OLD, "What generation is this?");
 
-       sgen_stop_world (generation_to_collect);
+       if (stw)
+               sgen_stop_world (generation_to_collect);
+       else
+               SGEN_ASSERT (0, sgen_is_world_stopped (), "We can only collect if the world is stopped");
+               
 
        TV_GETTIME (gc_total_start);
 
@@ -2306,7 +2310,8 @@ sgen_perform_collection (size_t requested_size, int generation_to_collect, const
        TV_GETTIME (gc_total_end);
        time_max = MAX (time_max, TV_ELAPSED (gc_total_start, gc_total_end));
 
-       sgen_restart_world (oldest_generation_collected);
+       if (stw)
+               sgen_restart_world (oldest_generation_collected);
 }
 
 /*
@@ -2676,7 +2681,7 @@ sgen_gc_collect (int generation)
        LOCK_GC;
        if (generation > 1)
                generation = 1;
-       sgen_perform_collection (0, generation, "user request", TRUE);
+       sgen_perform_collection (0, generation, "user request", TRUE, TRUE);
        UNLOCK_GC;
 }
 
@@ -2914,7 +2919,7 @@ sgen_gc_init (void)
                                double val;
                                opt = strchr (opt, '=') + 1;
                                if (parse_double_in_interval (MONO_GC_PARAMS_NAME, "default-allowance-ratio", opt,
-                                               SGEN_MIN_ALLOWANCE_NURSERY_SIZE_RATIO, SGEN_MIN_ALLOWANCE_NURSERY_SIZE_RATIO, &val)) {
+                                               SGEN_MIN_ALLOWANCE_NURSERY_SIZE_RATIO, SGEN_MAX_ALLOWANCE_NURSERY_SIZE_RATIO, &val)) {
                                        allowance_ratio = val;
                                }
                                continue;
@@ -3138,6 +3143,14 @@ sgen_gc_init (void)
        sgen_register_root (NULL, 0, sgen_make_user_root_descriptor (sgen_mark_normal_gc_handles), ROOT_TYPE_NORMAL, MONO_ROOT_SOURCE_GC_HANDLE, "normal gc handles");
 
        gc_initialized = 1;
+
+       sgen_init_bridge ();
+}
+
+gboolean
+sgen_gc_initialized ()
+{
+       return gc_initialized > 0;
 }
 
 NurseryClearPolicy
index 9ebd40c0d315c92101c79aea2fa95c00c3c7fbb5..003c3a5fa1dfe4de3f53d3534c7473505c0e9df9 100644 (file)
@@ -116,16 +116,40 @@ extern guint64 stat_objects_copied_major;
                g_error (__VA_ARGS__);  \
 } } while (0)
 
+#ifndef HOST_WIN32
+# define LOG_TIMESTAMP  \
+       do {    \
+               time_t t;                                                                       \
+               struct tm tod;                                                                  \
+               time(&t);                                                                       \
+               localtime_r(&t, &tod);                                                          \
+               strftime(logTime, sizeof(logTime), "%Y-%m-%d %H:%M:%S", &tod);                  \
+       } while (0)
+#else
+# define LOG_TIMESTAMP  \
+       do {    \
+               time_t t;                                                                       \
+               struct tm *tod;                                                                 \
+               time(&t);                                                                       \
+               tod = localtime(&t);                                                            \
+               strftime(logTime, sizeof(logTime), "%F %T", tod);                               \
+       } while (0)
+#endif
 
 #define SGEN_LOG(level, format, ...) do {      \
        if (G_UNLIKELY ((level) <= SGEN_MAX_DEBUG_LEVEL && (level) <= gc_debug_level)) {        \
-               mono_gc_printf (gc_debug_file, format "\n", ##__VA_ARGS__);     \
+               char logTime[80];                                                               \
+               LOG_TIMESTAMP;                                                                  \
+               mono_gc_printf (gc_debug_file, "%s " format "\n", logTime, ##__VA_ARGS__);      \
 } } while (0)
 
 #define SGEN_COND_LOG(level, cond, format, ...) do {   \
-       if (G_UNLIKELY ((level) <= SGEN_MAX_DEBUG_LEVEL && (level) <= gc_debug_level)) {        \
-               if (cond)       \
-                       mono_gc_printf (gc_debug_file, format "\n", ##__VA_ARGS__);     \
+       if (G_UNLIKELY ((level) <= SGEN_MAX_DEBUG_LEVEL && (level) <= gc_debug_level)) {                \
+               if (cond) {                                                                             \
+                       char logTime[80];                                                               \
+                       LOG_TIMESTAMP;                                                                  \
+                       mono_gc_printf (gc_debug_file, "%s " format "\n", logTime, ##__VA_ARGS__);      \
+               }                                                                                       \
 } } while (0)
 
 extern int gc_debug_level;
@@ -263,6 +287,7 @@ sgen_get_nursery_end (void)
 List of what each bit on of the vtable gc bits means. 
 */
 enum {
+       // When the Java bridge has determined an object is "bridged", it uses these two bits to cache that information.
        SGEN_GC_BIT_BRIDGE_OBJECT = 1,
        SGEN_GC_BIT_BRIDGE_OPAQUE_OBJECT = 2,
        SGEN_GC_BIT_FINALIZER_AWARE = 4,
@@ -278,6 +303,8 @@ void sgen_check_section_scan_starts (GCMemSection *section);
 
 void sgen_conservatively_pin_objects_from (void **start, void **end, void *start_nursery, void *end_nursery, int pin_type);
 
+gboolean sgen_gc_initialized (void);
+
 /* Keep in sync with description_for_type() in sgen-internal.c! */
 enum {
        INTERNAL_MEM_PIN_QUEUE,
@@ -806,7 +833,7 @@ void sgen_set_pinned_from_failed_allocation (mword objsize);
 
 void sgen_ensure_free_space (size_t size, int generation);
 void sgen_gc_collect (int generation);
-void sgen_perform_collection (size_t requested_size, int generation_to_collect, const char *reason, gboolean wait_to_finish);
+void sgen_perform_collection (size_t requested_size, int generation_to_collect, const char *reason, gboolean wait_to_finish, gboolean stw);
 
 int sgen_gc_collection_count (int generation);
 /* FIXME: what exactly does this return? */
index ccff562737ab4deac9515b83c266f95147ebf36d..12ace19a3e904e4782f5bdc8febd21709cb3e78d 100644 (file)
@@ -96,8 +96,10 @@ sgen_register_fixed_internal_mem_type (int type, size_t size)
 
        if (fixed_type_allocator_indexes [type] == -1)
                fixed_type_allocator_indexes [type] = slot;
-       else
-               g_assert (fixed_type_allocator_indexes [type] == slot);
+       else {
+               if (fixed_type_allocator_indexes [type] != slot)
+                       g_error ("Invalid double registration of type %d old slot %d new slot %d", type, fixed_type_allocator_indexes [type], slot);
+       }
 }
 
 static const char*
index f2c646b3952f678b513bd74b6f7667f110ca4a24..8b4f3cb612dd4370c6f96a04798abf26ec1cc6cb 100644 (file)
@@ -713,7 +713,7 @@ major_alloc_small_pinned_obj (GCVTable vtable, size_t size, gboolean has_referen
          *as pinned alloc is requested by the runtime.
          */
         if (!res) {
-               sgen_perform_collection (0, GENERATION_OLD, "pinned alloc failure", TRUE);
+               sgen_perform_collection (0, GENERATION_OLD, "pinned alloc failure", TRUE, TRUE);
                res = alloc_obj (vtable, size, TRUE, has_references);
         }
         return (GCObject *)res;
@@ -1850,7 +1850,7 @@ sgen_evacuation_freelist_blocks (MSBlockInfo * volatile *block_list, int size_in
 
        SGEN_ASSERT (0, num_blocks == index, "Why did the freelist change ?");
 
-       qsort (evacuated_blocks, num_blocks, sizeof (gpointer), block_usage_comparer);
+       sgen_qsort (evacuated_blocks, num_blocks, sizeof (gpointer), block_usage_comparer);
 
        /*
         * Form a new freelist with the fullest blocks. These blocks will also be
index b3b5c34c0fd7a4ffd9d3425114d7f759ffa2d8f1..2bd8f5dff12e5266fa7c39893d1b5e7fdb1fec29 100644 (file)
@@ -22,6 +22,12 @@ JITTEST_PROG_RUN = MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode
 
 RUNTIME_ARGS=--config tests-config --optimize=all --debug
 
+if HOST_WIN32
+TEST_RUNNER_ARGS=--config tests-config --runtime $(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),mono)
+else
+TEST_RUNNER_ARGS=--config tests-config --runtime $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),mono)
+endif
+
 CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
 
 with_mono_path = MONO_PATH=$(CLASS)
@@ -436,7 +442,8 @@ BASE_TEST_CS_SRC=           \
        pinvoke_ppci.cs \
        pinvoke_ppcf.cs \
        pinvoke_ppcd.cs \
-       bug-29585.cs
+       bug-29585.cs    \
+       priority.cs
 
 TEST_CS_SRC_DIST=      \
        $(BASE_TEST_CS_SRC)     \
@@ -867,11 +874,11 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
 
 runtest-managed: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
        @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
-       $(RUNTIME) --debug ./test-runner.exe -j a --testsuite-name "runtime" --timeout 300 --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
+       $(RUNTIME) --debug ./test-runner.exe $(TEST_RUNNER_ARGS) -j a --testsuite-name "runtime" --timeout 300 --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 runtest-managed-serial: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
        @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
-       $(RUNTIME) --debug ./test-runner.exe -j 1 --testsuite-name "runtime" --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
+       $(RUNTIME) --debug ./test-runner.exe $(TEST_RUNNER_ARGS) -j 1 --testsuite-name "runtime" --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 testjit:
        @if test x$(M) != x0; then $(MAKE) runtest-managed; else $(MAKE) runtest; fi
@@ -990,21 +997,21 @@ sgen-regular-tests: $(SGEN_REGULAR_TESTS)
        $(MAKE) sgen-regular-tests-ms-split-clear-at-gc
 
 sgen-regular-tests-plain: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc-split: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc,minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc,minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-split: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-split-95: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="minor=split,alloc-ratio=95" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="minor=split,alloc-ratio=95" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-plain-clear-at-gc: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc-clear-at-gc: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-split-clear-at-gc: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
 
 SGEN_TOGGLEREF_TESTS=  \
        sgen-toggleref.exe
@@ -1020,21 +1027,21 @@ sgen-toggleref-tests: $(SGEN_TOGGLEREF_TESTS)
        $(MAKE) sgen-toggleref-tests-ms-split-clear-at-gc
 
 sgen-toggleref-tests-plain: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-conc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-conc-split: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc,minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc,minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-split: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-split-95: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,minor=split,alloc-ratio=95" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test,minor=split,alloc-ratio=95" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-plain-clear-at-gc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-conc-clear-at-gc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test,major=marksweep-conc" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 sgen-toggleref-tests-ms-split-clear-at-gc: $(SGEN_TOGGLEREF_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test,minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="toggleref-test,minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 
 SGEN_BRIDGE_TESTS=     \
        sgen-bridge.exe \
@@ -1051,21 +1058,21 @@ sgen-bridge-tests: $(SGEN_BRIDGE_TESTS)
        $(MAKE) sgen-bridge-tests-ms-split-tarjan-bridge
 
 sgen-bridge-tests-plain: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-conc: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-split: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-plain-new-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-conc-new-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new,major=marksweep-conc" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new,major=marksweep-conc" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-split-new-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new,minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=new,minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-plain-tarjan-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
 sgen-bridge-tests-ms-split-tarjan-bridge: $(SGEN_BRIDGE_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan,minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan,minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
 
 SGEN_BRIDGE2_TESTS=    \
        sgen-bridge-xref.exe
@@ -1081,21 +1088,21 @@ sgen-bridge2-tests: $(SGEN_BRIDGE2_TESTS)
        $(MAKE) sgen-bridge2-tests-ms-split-tarjan-bridge
 
 sgen-bridge2-tests-plain: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-conc: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-split: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-plain-new-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-conc-new-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new,major=marksweep-conc" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new,major=marksweep-conc" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-split-new-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new,minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=new,minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-plain-tarjan-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
 sgen-bridge2-tests-ms-split-tarjan-bridge: $(SGEN_BRIDGE2_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan,minor=split" $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="bridge-implementation=tarjan,minor=split" $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
 
 
 SGEN_BRIDGE3_TESTS=    \
@@ -1350,7 +1357,7 @@ test-generic-sharing-normal: $(GSHARED_TESTS)
        done
 
 test-generic-sharing-managed: test-runner.exe $(GSHARED_TESTS)
-       @$(RUNTIME) ./test-runner.exe -j a --testsuite-name "gshared" --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(GSHARED_TESTS)
+       @$(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) -j a --testsuite-name "gshared" --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(GSHARED_TESTS)
 
 if NACL_CODEGEN
 test-generic-sharing:
@@ -1427,13 +1434,13 @@ test-unhandled-exception-2: $(UNHANDLED_EXCEPTION_1_TESTS) $(UNHANDLED_EXCEPTION
        $(MAKE) test-unhandled-exception-2-255-without-managed-handler
 
 test-unhandled-exception-2-1-with-managed-handler: $(UNHANDLED_EXCEPTION_1_TESTS) test-runner.exe
-       $(RUNTIME) ./test-runner.exe -j a --testsuite-name $@ --expected-exit-code 1 $(UNHANDLED_EXCEPTION_1_TESTS)
+       $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --expected-exit-code 1 $(UNHANDLED_EXCEPTION_1_TESTS)
 test-unhandled-exception-2-1-without-managed-handler: $(UNHANDLED_EXCEPTION_1_TESTS) test-runner.exe
-       TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(RUNTIME) ./test-runner.exe -j a --testsuite-name $@ --expected-exit-code 1 $(UNHANDLED_EXCEPTION_1_TESTS)
+       TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --expected-exit-code 1 $(UNHANDLED_EXCEPTION_1_TESTS)
 test-unhandled-exception-2-255-with-managed-handler: $(UNHANDLED_EXCEPTION_255_TESTS) test-runner.exe
-       $(RUNTIME) ./test-runner.exe -j a --testsuite-name $@ --expected-exit-code 255 $(UNHANDLED_EXCEPTION_255_TESTS)
+       $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --expected-exit-code 255 $(UNHANDLED_EXCEPTION_255_TESTS)
 test-unhandled-exception-2-255-without-managed-handler: $(UNHANDLED_EXCEPTION_255_TESTS) test-runner.exe
-       TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(RUNTIME) ./test-runner.exe -j a --testsuite-name $@ --expected-exit-code 255 $(UNHANDLED_EXCEPTION_255_TESTS)
+       TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) -j a --testsuite-name $@ --expected-exit-code 255 $(UNHANDLED_EXCEPTION_255_TESTS)
 
 endif
 
@@ -1458,7 +1465,7 @@ PROCESS_STRESS_TESTS=     \
                process-leak.exe
 
 test-process-stress: $(PROCESS_STRESS_TESTS) test-runner.exe
-       $(RUNTIME) ./test-runner.exe --testsuite-name $@ --timeout 600 $(PROCESS_STRESS_TESTS)
+       $(RUNTIME) ./test-runner.exe $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 600 $(PROCESS_STRESS_TESTS)
 
 coreclr-gcstress:
        $(MAKE) -C $(mono_build_root)/acceptance-tests coreclr-gcstress
index 80c985b0a1121e6b89f92d01c68a721b78251826..9fc03ba6ff7e1321b30f782bda7ca2cf02a6fb10 100644 (file)
@@ -18,7 +18,7 @@ class Program
        static void ProbeCorlib ()
        {
                Type good = System.Type.GetType("System.Nullable`1[[System.Int32, mscorlib]]"); 
-               Type bad = System.Type.GetType("System.Nullable`1[[System.IO.Pipes.PipeOptions, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]");
+               Type bad = System.Type.GetType("System.Nullable`1[[System.IO.MemoryMappedFiles.MemoryMappedFile, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]");
 
                if (good.Assembly.FullName.Split (',') [0] != "mscorlib")
                        throw new Exception ("Wrong assembly name");
index 8f1e492c0e97bf83d09db8c33f9a95c5ae83bf8e..7f3de465449669d4485a34230f94ff97877a6a43 100644 (file)
@@ -1,4 +1,5 @@
 using System;
+using System.Linq;
 
 class C
 {
@@ -17,6 +18,10 @@ class C
        {
                        string fullTrace = ex.StackTrace;
                        string[] frames = fullTrace.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
+
+                       // Ignore metadata
+                       frames = frames.Where (l => !l.StartsWith ("[")).ToArray ();
+
                        return frames.Length;
        }
 
index 650e7716e583d8af4318a59a900c7ad8b742780c..8f1cef273f40075165310ad858c344b9fb71324f 100644 (file)
@@ -889,12 +889,12 @@ mono_test_marshal_return_delegate (SimpleDelegate delegate)
        return delegate;
 }
 
-typedef int DelegateByrefDelegate (void *);
+typedef int (STDCALL *DelegateByrefDelegate) (void *);
 
 LIBTEST_API int STDCALL
 mono_test_marshal_delegate_ref_delegate (DelegateByrefDelegate del)
 {
-       int (*ptr) (int i);
+       int (STDCALL *ptr) (int i);
 
        del (&ptr);
 
@@ -1228,14 +1228,29 @@ mono_test_marshal_stringbuilder_ref (char **s)
        return 0;
 }
 
+#ifdef __GNUC__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wc++-compat"
+#endif
+
+/*
+* Standard C and C++ doesn't allow empty structs, empty structs will always have a size of 1 byte.
+* GCC have an extension to allow empty structs, https://gcc.gnu.org/onlinedocs/gcc/Empty-Structures.html.
+* This cause a little dilemma since runtime build using none GCC compiler will not be compatible with
+* GCC build C libraries and the other way around. On platforms where empty structs has size of 1 byte
+* it must be represented in call and cannot be dropped. On Windows x64 structs will always be represented in the call
+* meaning that an empty struct must have a representation in the callee in order to correctly follow the ABI used by the
+* C/C++ standard and the runtime.
+*/
 typedef struct {
-#ifndef __GNUC__
+#if !defined(__GNUC__) || defined(TARGET_WIN32)
     char a;
 #endif
 } EmptyStruct;
+
+#ifdef __GNUC__
 #pragma GCC diagnostic pop
+#endif
 
 LIBTEST_API int STDCALL 
 mono_test_marshal_empty_string_array (char **array)
diff --git a/mono/tests/priority.cs b/mono/tests/priority.cs
new file mode 100644 (file)
index 0000000..67591dd
--- /dev/null
@@ -0,0 +1,88 @@
+using System;
+using System.Threading;
+using System.Runtime;
+using System.Text;
+
+public class Tests
+{
+       public static int Main ()
+       {
+               return TestDriver.RunTests (typeof (Tests));
+       }
+
+       public static void TestMethod()
+       {
+               Console.WriteLine("{0} with {1} priority",
+                       Thread.CurrentThread.Name, 
+                       Thread.CurrentThread.Priority.ToString());
+               Thread.Sleep(6000);
+               Console.WriteLine("{0} with {1} priority",
+                       Thread.CurrentThread.Name, 
+                       Thread.CurrentThread.Priority.ToString());
+       }
+       
+       public static int test_0_thread_priority () 
+       {
+               int res = 0;
+
+               Thread Me = Thread.CurrentThread;
+               Thread TestThread = new Thread(new ThreadStart(TestMethod));
+
+               Console.WriteLine("Starting test thread with priority to AboveNormal");  
+               ThreadPriority before = TestThread.Priority;
+               TestThread.Priority = ThreadPriority.AboveNormal;
+               TestThread.Name = "TestMethod";
+               TestThread.Start();
+               ThreadPriority after = TestThread.Priority;
+               Console.WriteLine("Priority: {0} {1}",before,after);
+               if (before != ThreadPriority.Normal)
+                       res = 1;
+               else if (after != ThreadPriority.AboveNormal)
+                       res = 2;
+               else {
+                       TestThread.Priority = ThreadPriority.Normal;
+                       after = TestThread.Priority;
+                       Console.WriteLine("Setting test thread priority to Normal");     
+                       Thread.Sleep(1000);
+                       Console.WriteLine("Priority: {0} {1}",before,after);
+
+                       if (after != ThreadPriority.Normal) 
+                               res = 3;
+                       else {
+                               Console.WriteLine("Setting test thread priority to AboveNormal");        
+                               before = after;
+                               TestThread.Priority=ThreadPriority.AboveNormal;
+                               after = TestThread.Priority;
+                               Thread.Sleep(1000);
+                               Console.WriteLine("Priority: {0} {1}",before,after);
+
+                               if (after != ThreadPriority.AboveNormal) 
+                                       res = 4;
+                               else {
+                                       before = after;
+                                       Console.WriteLine("Setting test thread priority to BelowNormal"); 
+                                       TestThread.Priority=ThreadPriority.BelowNormal;
+                                       after = TestThread.Priority;
+                                       Console.WriteLine("Priority: {0} {1}",before,after);
+                                       Thread.Sleep(1000);
+                                       
+                                       if (after != ThreadPriority.BelowNormal)
+                                               res = 5;
+                                       else {
+                                               before = after;
+                                               Console.WriteLine("Setting test thread priority back to Normal");        
+                                               TestThread.Priority=ThreadPriority.Normal;
+                                               after = TestThread.Priority;
+                                               Console.WriteLine("Priority: {0} {1}",before,after);
+                                               Thread.Sleep(1000);
+
+                                               if (after != ThreadPriority.Normal)
+                                                       res = 6;
+                                       }
+                               }
+                       }
+               }
+               TestThread.Join();
+               return(res);
+       }
+}
index 143f4ece3e51bdbe7028275c719c75b002f22880..69a2ecf43341d8da6b5e9f3acfb59093e6157cb1 100644 (file)
@@ -27,7 +27,7 @@ namespace ToManyOpenHandles
 
                private static void RunStuffMode()
                {
-                       for (int i = 0; i < 1000; i++)
+                       for (int i = 0; i < 100; i++)
                        {
                                Execute(Assembly.GetExecutingAssembly().Location, i.ToString());
                        }
index 6cc184c7939d73b4cbd72e61ef0c3887223cd573..68fc0a5d0603301897fe4cbad95de05495156d25 100644 (file)
@@ -198,6 +198,7 @@ class Driver {
                t.Join ();
 
                for (int i = 0; i < 5; ++i) {
+                       Console.WriteLine("-GC {0}/5-", i);
                        GC.Collect ();
                        GC.WaitForPendingFinalizers ();
                }
index dfc88b5c3407e183fc82e4d033cc84dcf38fa8b1..0d2110898cc8c9cc4ea139451f7d3837ad8ec701 100644 (file)
@@ -22,7 +22,7 @@ public class Tests
                Thread.Sleep (1000);
                finished = true;
                sw.Stop ();
-               if (sw.ElapsedMilliseconds > 1500) {
+               if (sw.ElapsedMilliseconds > 2000) {
                        Console.WriteLine (sw.ElapsedMilliseconds);
                        return 1;
                } else {
index baf0609a3bfe3a23963411bd055ca82f2887e6dd..8a0d2a96a05a3a5671d84819c2ec813ecf23e1ea 100644 (file)
@@ -50,6 +50,7 @@ public class TestRunner
 
                string disabled_tests = null;
                string runtime = "mono";
+               string config = null;
                var opt_sets = new List<string> ();
 
                // Process options
@@ -87,6 +88,13 @@ public class TestRunner
                                        }
                                        runtime = args [i + 1];
                                        i += 2;
+                               } else if (args [i] == "--config") {
+                                       if (i + 1 >= args.Length) {
+                                               Console.WriteLine ("Missing argument to --config command line option.");
+                                               return 1;
+                                       }
+                                       config = args [i + 1];
+                                       i += 2;
                                } else if (args [i] == "--opt-sets") {
                                        if (i + 1 >= args.Length) {
                                                Console.WriteLine ("Missing argument to --opt-sets command line option.");
@@ -207,6 +215,8 @@ public class TestRunner
                                        info.RedirectStandardOutput = true;
                                        info.RedirectStandardError = true;
                                        info.EnvironmentVariables[ENV_TIMEOUT] = timeout.ToString();
+                                       if (config != null)
+                                               info.EnvironmentVariables["MONO_CONFIG"] = config;
                                        Process p = new Process ();
                                        p.StartInfo = info;
 
index 2c86105e9a0d2d48c1c8dd866fc915bc2cc295e3..d67011313f8c0fc0320329460480ceec4e373104 100644 (file)
@@ -1,5 +1,7 @@
 <configuration>
        <dllmap dll="cygwin1.dll" target="@LIBC@" />
        <dllmap dll="libc" target="@LIBC@" />
+       <dllmap os="windows" cpu="x86" dll="libtest" target="../../msvc/build/sgen/Win32/bin/Release/libtest.dll" />
+       <dllmap os="windows" cpu="x86-64" dll="libtest" target="../../msvc/build/sgen/x64/bin/Release/libtest.dll" />
 </configuration>
 
index b62633307b46f43e5547e6957ca6d5d6c404b0fd..7db91094593e6c34716b2602b8f027c05f52fb3c 100644 (file)
@@ -27,6 +27,9 @@ monoutils_sources = \
        mono-dl-darwin.c        \
        mono-dl-posix.c         \
        mono-dl.h               \
+       mono-log-windows.c      \
+       mono-log-common.c       \
+       mono-log-posix.c        \
        mono-internal-hash.c    \
        mono-internal-hash.h    \
        mono-io-portability.c   \
@@ -148,7 +151,9 @@ monoutils_sources = \
        parse.c \
        parse.h \
        checked-build.c \
-       checked-build.h
+       checked-build.h \
+       w32handle.c \
+       w32handle.h
 
 arch_sources = 
 
index 3be8342a49873dbc9e2796d44a76a81d5a9302e3..d103ef6aa333eeb96a920d8e62ef0af79db5ecb2 100644 (file)
@@ -477,8 +477,18 @@ mono_lock_free_free (gpointer ptr, size_t block_size)
                g_assert (old_anchor.data.state != STATE_EMPTY);
 
                if (InterlockedCompareExchangePointer ((gpointer * volatile)&heap->active, NULL, desc) == desc) {
-                       /* We own it, so we free it. */
-                       desc_retire (desc);
+                       /*
+                        * We own desc, check if it's still empty, in which case we retire it.
+                        * If it's partial we need to put it back either on the active slot or
+                        * on the partial list.
+                        */
+                       if (desc->anchor.data.state == STATE_EMPTY) {
+                               desc_retire (desc);
+                       } else if (desc->anchor.data.state == STATE_PARTIAL) {
+                               if (InterlockedCompareExchangePointer ((gpointer * volatile)&heap->active, desc, NULL) != NULL)
+                                       heap_put_partial (desc);
+
+                       }
                } else {
                        /*
                         * Somebody else must free it, so we do some
index 6cf8065d06a43e421bfb59737800ff73536d3f86..d5621323f9f64289ae8e3396cb5f7aaf99f48d23 100644 (file)
@@ -28,6 +28,9 @@
 #include <sys/sysctl.h>
 #include <sys/types.h>
 #else
+#if defined (HAVE_SYS_UTSNAME_H)
+#include <sys/utsname.h>
+#endif
 #include <stdio.h>
 #endif
 
@@ -105,6 +108,50 @@ mono_hwcap_arch_init (void)
         * hit this path if the target doesn't have sys/auxv.h.
         */
 
+#if defined (HAVE_SYS_UTSNAME_H)
+       struct utsname name;
+
+       /* Only fails if `name` is invalid (it isn't). */
+       g_assert (!uname (&name));
+
+       if (!strncmp (name.machine, "aarch64", 7) || !strncmp (name.machine, "armv8", 5)) {
+               /*
+                * We're a 32-bit program running on an ARMv8 system.
+                * Whether the system is actually 32-bit or 64-bit
+                * doesn't matter to us. The important thing is that
+                * all 3 of ARMv8's execution states (A64, A32, T32)
+                * are guaranteed to have all of the features that
+                * we want to detect and use.
+                *
+                * We do this ARMv8 detection via uname () because
+                * in the early days of ARMv8 on Linux, the
+                * /proc/cpuinfo format was a disaster and there
+                * were multiple (merged into mainline) attempts at
+                * cleaning it up (read: breaking applications that
+                * tried to rely on it). So now multiple ARMv8
+                * systems in the wild have different /proc/cpuinfo
+                * output, some of which are downright useless.
+                *
+                * So, when it comes to detecting ARMv8 in a 32-bit
+                * program, it's better to just avoid /proc/cpuinfo
+                * entirely. Maybe in a decade or two, we won't
+                * have to worry about this mess that the Linux ARM
+                * maintainers created. One can hope.
+                */
+
+               mono_hwcap_arm_is_v5 = TRUE;
+               mono_hwcap_arm_is_v6 = TRUE;
+               mono_hwcap_arm_is_v7 = TRUE;
+
+               mono_hwcap_arm_has_vfp = TRUE;
+               mono_hwcap_arm_has_vfp3 = TRUE;
+               mono_hwcap_arm_has_vfp3_d16 = TRUE;
+
+               mono_hwcap_arm_has_thumb = TRUE;
+               mono_hwcap_arm_has_thumb2 = TRUE;
+       }
+#endif
+
        char buf [512];
        char *line;
 
diff --git a/mono/utils/mono-log-common.c b/mono/utils/mono-log-common.c
new file mode 100644 (file)
index 0000000..fa11aab
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * mono-log-common.c: Platform-independent interface to the logger
+ *
+ * This module contains the POSIX syslog logger interface
+ *
+ * Author:
+ *    Neale Ferguson <neale@sinenomine.net>
+ *
+ */
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <glib.h>
+#include <errno.h>
+#include <time.h>
+#ifndef HOST_WIN32
+#include <sys/time.h>
+#else
+#include <process.h>
+#endif
+#include "mono-logger.h"
+
+static FILE *logFile = NULL;
+static void *logUserData = NULL;
+
+/**
+ * mapSyslogLevel:
+ *     
+ *     @level - GLogLevelFlags value
+ *     @returns The equivalent character identifier
+ */
+static inline char 
+mapLogFileLevel(GLogLevelFlags level) 
+{
+       if (level & G_LOG_LEVEL_ERROR)
+               return ('E');
+       if (level & G_LOG_LEVEL_CRITICAL)
+               return ('C');
+       if (level & G_LOG_LEVEL_WARNING)
+               return ('W');
+       if (level & G_LOG_LEVEL_MESSAGE)
+               return ('N');
+       if (level & G_LOG_LEVEL_INFO)
+               return ('I');
+       if (level & G_LOG_LEVEL_DEBUG)
+               return ('D');
+       return ('I');
+}
+
+/**
+ * mono_log_open_logfile
+ *     
+ *     Open the logfile. If the path is not specified default to stdout. If the
+ *     open fails issue a warning and use stdout as the log file destination.
+ *
+ *     @path - Path for log file
+ *     @userData - Not used
+ */
+void
+mono_log_open_logfile(const char *path, void *userData)
+{
+       if (path == NULL) {
+               logFile = stdout;
+       } else {
+#ifndef HOST_WIN32
+               logFile = fopen(path, "w");
+#else
+               gunichar2 *wPath = g_utf8_to_utf16(path, -1, 0, 0, 0);
+               if (wPath != NULL) {
+                       logFile = _wfopen((wchar_t *) wPath, L"w");
+                       g_free (wPath);
+               }
+#endif
+               if (logFile == NULL) {
+                       g_warning("opening of log file %s failed with %s - defaulting to stdout", 
+                                 path, strerror(errno));
+                       logFile = stdout;
+               }
+       }
+       logUserData = userData;
+}
+
+/**
+ * mono_log_write_logfile
+ *     
+ *     Write data to the log file.
+ *
+ *     @domain - Identifier string
+ *     @level - Logging level flags
+ *     @format - Printf format string
+ *     @vargs - Variable argument list
+ */
+void
+mono_log_write_logfile(const char *domain, GLogLevelFlags level, mono_bool hdr, const char *format, va_list args)
+{
+       time_t t;
+       char logTime[80],       
+            logMessage[512];
+       pid_t pid;
+       int iLog = 0;
+       size_t nLog;
+
+       if (logFile == NULL)
+               logFile = stdout;
+
+       if (hdr) {
+#ifndef HOST_WIN32
+               struct tm tod;
+               time(&t);
+               localtime_r(&t, &tod);
+               pid = getpid();
+               strftime(logTime, sizeof(logTime), "%Y-%m-%d %H:%M:%S", &tod);
+#else
+               struct tm *tod;
+               time(&t);
+               tod = localtime(&t);
+               pid = _getpid();
+               strftime(logTime, sizeof(logTime), "%F %T", tod);
+#endif
+               iLog = sprintf(logMessage, "%s level[%c] mono[%d]: ",
+                              logTime,mapLogFileLevel(level),pid);
+       }
+       nLog = sizeof(logMessage) - iLog - 2;
+       vsnprintf(logMessage+iLog, nLog, format, args);
+       iLog = strlen(logMessage);
+       logMessage[iLog++] = '\n';
+       logMessage[iLog++] = '\0';
+       fputs(logMessage, logFile);
+       fflush(logFile);
+
+       if (level == G_LOG_FLAG_FATAL)
+               abort();
+}
+
+/**
+ * mono_log_close_logfile
+ *
+ *     Close the log file
+ */
+void
+mono_log_close_logfile()
+{
+       if (logFile) {
+               if (logFile != stdout)
+                       fclose(logFile);
+               logFile = NULL;
+       }
+}
diff --git a/mono/utils/mono-log-posix.c b/mono/utils/mono-log-posix.c
new file mode 100644 (file)
index 0000000..1ce111c
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * mono-log-posix.c: POSIX interface to the logger
+ *
+ * This module contains the POSIX syslog logger routines
+ *
+ * Author:
+ *    Neale Ferguson <neale@sinenomine.net>
+ *
+ */
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if defined(_POSIX_VERSION) 
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <glib.h>
+#include <syslog.h>
+#include <stdarg.h>
+#include <errno.h>
+#include <time.h>
+#include <sys/time.h>
+#include "mono-logger.h"
+
+static void *logUserData = NULL;
+
+/**
+ * mapSyslogLevel:
+ *     
+ *     @level - GLogLevelFlags value
+ *     @returns The equivalent syslog priority value
+ */
+static __inline__ int
+mapSyslogLevel(GLogLevelFlags level) 
+{
+       if (level & G_LOG_LEVEL_ERROR)
+               return (LOG_ERR);
+       if (level & G_LOG_LEVEL_CRITICAL)
+               return (LOG_CRIT);
+       if (level & G_LOG_LEVEL_WARNING)
+               return (LOG_WARNING);
+       if (level & G_LOG_LEVEL_MESSAGE)
+               return (LOG_NOTICE);
+       if (level & G_LOG_LEVEL_INFO)
+               return (LOG_INFO);
+       if (level & G_LOG_LEVEL_DEBUG)
+               return (LOG_DEBUG);
+       return (LOG_INFO);
+}
+
+/**
+ * mono_log_open_logfile
+ *     
+ *     Open the syslog interface specifying that we want our PID recorded 
+ *     and that we're using the LOG_USER facility.
+ *
+ *     @ident - Identifier: ignored
+ *     @userData - Not used
+ */
+void
+mono_log_open_syslog(const char *ident, void *userData)
+{
+       openlog("mono", LOG_PID, LOG_USER);
+       logUserData = userData;
+}
+
+/**
+ * mono_log_write_logfile
+ *     
+ *     Write data to the log file.
+ *
+ *     @domain - Identifier string
+ *     @level - Logging level flags
+ *     @format - Printf format string
+ *     @vargs - Variable argument list
+ */
+void
+mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, const char *format, va_list args)
+{
+       vsyslog(mapSyslogLevel(level), format, args);
+
+       if (level == G_LOG_FLAG_FATAL)
+               abort();
+}
+
+/**
+ * mono_log_close_logfile
+ *
+ *     Close the log file
+ */
+void
+mono_log_close_syslog()
+{
+       closelog();
+}
+#endif
diff --git a/mono/utils/mono-log-windows.c b/mono/utils/mono-log-windows.c
new file mode 100644 (file)
index 0000000..1746128
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * mono-log-windows.c: Simplistic simulation of a syslog logger for Windows
+ *
+ * This module contains the Windows syslog logger interface
+ *
+ * Author:
+ *    Neale Ferguson <neale@sinenomine.net>
+ *
+ */
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HOST_WIN32
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <glib.h>
+#include <errno.h>
+#include <time.h>
+#include <process.h>
+#include "mono-logger.h"
+
+static FILE *logFile = NULL;
+static void *logUserData = NULL;
+static wchar_t *logFileName = L".//mono.log";
+
+/**
+ * mapSyslogLevel:
+ *     
+ *     @level - GLogLevelFlags value
+ *     @returns The equivalent character identifier
+ */
+static inline char 
+mapLogFileLevel(GLogLevelFlags level) 
+{
+       if (level & G_LOG_LEVEL_ERROR)
+               return ('E');
+       if (level & G_LOG_LEVEL_CRITICAL)
+               return ('C');
+       if (level & G_LOG_LEVEL_WARNING)
+               return ('W');
+       if (level & G_LOG_LEVEL_MESSAGE)
+               return ('N');
+       if (level & G_LOG_LEVEL_INFO)
+               return ('I');
+       if (level & G_LOG_LEVEL_DEBUG)
+               return ('D');
+       return ('I');
+}
+
+/**
+ * mono_log_open_syslog
+ *     
+ *     Open the syslog file. If the open fails issue a warning and 
+ *     use stdout as the log file destination.
+ *
+ *     @ident - Identifier: ignored
+ *     @userData - Not used
+ */
+void
+mono_log_open_syslog(const char *ident, void *userData)
+{
+       logFile = _wfopen(logFileName, L"w");
+       if (logFile == NULL) {
+               g_warning("opening of log file %s failed with %s",
+                         strerror(errno));
+               logFile = stdout;
+       }
+       logUserData = userData;
+}
+
+/**
+ * mono_log_write_syslog
+ *     
+ *     Write data to the syslog file.
+ *
+ *     @domain - Identifier string
+ *     @level - Logging level flags
+ *     @format - Printf format string
+ *     @vargs - Variable argument list
+ */
+void
+mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, const char *format, va_list args)
+{
+       time_t t;
+       struct tm *tod;
+       char logTime[80],
+             logMessage[512];
+       pid_t pid;
+       int iLog = 0;
+       size_t nLog;
+
+       if (logFile == NULL)
+               mono_log_open_syslog(NULL, NULL);
+
+       time(&t);
+       tod = localtime(&t);
+       pid = _getpid();
+       strftime(logTime, sizeof(logTime), "%Y-%m-%d %H:%M:%S", tod);
+       iLog = sprintf(logMessage, "%s level[%c] mono[%d]: ",
+                      logTime,mapLogFileLevel(level),pid);
+       nLog = sizeof(logMessage) - iLog - 2;
+       vsnprintf(logMessage+iLog, nLog, format, args);
+       iLog = strlen(logMessage);
+       logMessage[iLog++] = '\n';
+       logMessage[iLog++] = 0;
+       fputs(logMessage, logFile);
+       fflush(logFile);
+
+       if (level == G_LOG_FLAG_FATAL)
+               abort();
+}
+
+/**
+ * mono_log_close_syslog
+ *
+ *     Close the syslog file
+ */
+void
+mono_log_close_syslog()
+{
+       if (logFile) {
+               fclose(logFile);
+               logFile = NULL;
+       }
+}
+#endif
index 89e9a01023ab32bf0a3738271aa6141b5a397f72..f32a25e306d75f5a64ddd70ef84aaea354a290e2 100644 (file)
@@ -17,6 +17,7 @@ typedef enum {
        MONO_TRACE_THREADPOOL           = (1<<7),
        MONO_TRACE_IO_THREADPOOL        = (1<<8),
        MONO_TRACE_IO_LAYER             = (1<<9),
+       MONO_TRACE_W32HANDLE    = (1<<10),
        MONO_TRACE_ALL                  = MONO_TRACE_ASSEMBLY |
                                          MONO_TRACE_TYPE |
                                          MONO_TRACE_DLLIMPORT |
@@ -26,7 +27,8 @@ typedef enum {
                                          MONO_TRACE_SECURITY |
                                          MONO_TRACE_THREADPOOL |
                                          MONO_TRACE_IO_THREADPOOL |
-                                         MONO_TRACE_IO_LAYER
+                                         MONO_TRACE_IO_LAYER |
+                                         MONO_TRACE_W32HANDLE
 } MonoTraceMask;
 
 extern GLogLevelFlags mono_internal_current_level;
index 7d0c9ce12a4f811d33e6d5a3bca405b2f564da03..8c6c5aa5512662c6825742cdea87985d042f3d00 100644 (file)
@@ -11,13 +11,26 @@ typedef struct {
        MonoTraceMask   mask;
 } MonoLogLevelEntry;
 
-GLogLevelFlags mono_internal_current_level             = INT_MAX;
-MonoTraceMask  mono_internal_current_mask              = MONO_TRACE_ALL;
+GLogLevelFlags mono_internal_current_level     = INT_MAX;
+MonoTraceMask  mono_internal_current_mask      = MONO_TRACE_ALL;
+gboolean mono_trace_log_header                 = FALSE;
 
 static GQueue          *level_stack            = NULL;
 static const char      *mono_log_domain        = "Mono";
 static MonoPrintCallback print_callback, printerr_callback;
 
+static MonoLogCallParm logCallback = {
+       .opener = NULL,
+       .writer = NULL,
+       .closer = NULL,
+       .header = FALSE
+};
+
+typedef struct {
+   MonoLogCallback legacy_callback;
+   gpointer user_data;
+} legacyLoggerUserData;
+
 /**
  * mono_trace_init:
  *
@@ -32,6 +45,8 @@ mono_trace_init (void)
 
                mono_trace_set_mask_string(g_getenv("MONO_LOG_MASK"));
                mono_trace_set_level_string(g_getenv("MONO_LOG_LEVEL"));
+               mono_trace_set_logheader_string(g_getenv("MONO_LOG_HEADER"));
+               mono_trace_set_logdest_string(g_getenv("MONO_LOG_DEST"));
        }
 }
 
@@ -48,6 +63,7 @@ mono_trace_cleanup (void)
                        g_free (g_queue_pop_head (level_stack));
                }
 
+               logCallback.closer();
                g_queue_free (level_stack);
                level_stack = NULL;
        }
@@ -71,7 +87,13 @@ mono_tracev_inner (GLogLevelFlags level, MonoTraceMask mask, const char *format,
                        return;
        }
 
-       g_logv (mono_log_domain, level, format, args);
+       if (logCallback.opener == NULL) {
+               logCallback.opener = mono_log_open_logfile;
+               logCallback.writer = mono_log_write_logfile;
+               logCallback.closer = mono_log_close_logfile;
+               logCallback.opener(NULL, NULL);
+       }
+       logCallback.writer(mono_log_domain, level, logCallback.header, format, args);
 }
 
 /**
@@ -107,7 +129,55 @@ mono_trace_set_mask (MonoTraceMask mask)
        if(level_stack == NULL)
                mono_trace_init();
 
-       mono_internal_current_mask      = mask;
+       mono_internal_current_mask = mask;
+}
+
+/**
+ * mono_trace_set_logdest:
+ *
+ *     @dest: Destination for logging
+ *
+ * Sets the current logging destination. This can be a file or, if supported,
+ * syslog.
+ */
+void 
+mono_trace_set_logdest_string (const char *dest)
+{
+       MonoLogCallParm logger;
+
+       if(level_stack == NULL)
+               mono_trace_init();
+
+       if ((dest == NULL) || (strcmp("syslog", dest) != 0)) {
+               logger.opener = mono_log_open_logfile;
+               logger.writer = mono_log_write_logfile;
+               logger.closer = mono_log_close_logfile;
+               logger.dest   = (char *) dest;
+               mono_trace_set_log_handler_internal(&logger, NULL);
+       } else {
+               logger.opener = mono_log_open_syslog;
+               logger.writer = mono_log_write_syslog;
+               logger.closer = mono_log_close_syslog;
+               logger.dest   = (char *) dest;
+               mono_trace_set_log_handler_internal(&logger, NULL);
+       }
+}
+
+/**
+ * mono_trace_set_logheader:
+ *
+ *     @head: Whether we want pid/date/time header on log messages
+ *
+ * Sets the current logging header option.
+ */
+void 
+mono_trace_set_logheader_string(const char *head)
+{
+       if (head == NULL) {
+               mono_trace_log_header = FALSE;
+       } else {
+               mono_trace_log_header = TRUE;
+       }
 }
 
 /**
@@ -193,10 +263,11 @@ mono_trace_set_mask_string (const char *value)
        const char *tok;
        guint32 flags = 0;
 
-       const char *valid_flags[] = {"asm", "type", "dll", "gc", "cfg", "aot", "security", "threadpool", "io-threadpool", "io-layer", "all", NULL};
+       const char *valid_flags[] = {"asm", "type", "dll", "gc", "cfg", "aot", "security", "threadpool", "io-threadpool", "io-layer", "w32handle", "all", NULL};
        const MonoTraceMask     valid_masks[] = {MONO_TRACE_ASSEMBLY, MONO_TRACE_TYPE, MONO_TRACE_DLLIMPORT,
                                                 MONO_TRACE_GC, MONO_TRACE_CONFIG, MONO_TRACE_AOT, MONO_TRACE_SECURITY,
-                                                MONO_TRACE_THREADPOOL, MONO_TRACE_IO_THREADPOOL, MONO_TRACE_IO_LAYER, MONO_TRACE_ALL };
+                                                MONO_TRACE_THREADPOOL, MONO_TRACE_IO_THREADPOOL, MONO_TRACE_IO_LAYER,
+                                                MONO_TRACE_W32HANDLE, MONO_TRACE_ALL };
 
        if(!value)
                return;
@@ -236,30 +307,105 @@ mono_trace_is_traced (GLogLevelFlags level, MonoTraceMask mask)
        return (level <= mono_internal_current_level && mask & mono_internal_current_mask);
 }
 
-static MonoLogCallback log_callback;
-
-static const char*
+/**
+ * log_level_get_name
+ * @log_level severity level
+ *
+ * Convert log level into a string for legacy log handlers
+ */
+static const char *
 log_level_get_name (GLogLevelFlags log_level)
 {
-       switch (log_level & G_LOG_LEVEL_MASK) {
-       case G_LOG_LEVEL_ERROR: return "error";
-       case G_LOG_LEVEL_CRITICAL: return "critical";
-       case G_LOG_LEVEL_WARNING: return "warning";
-       case G_LOG_LEVEL_MESSAGE: return "message";
-       case G_LOG_LEVEL_INFO: return "info";
-       case G_LOG_LEVEL_DEBUG: return "debug";
-       default: return "unknown";
-       }
+        switch (log_level & G_LOG_LEVEL_MASK) {
+        case G_LOG_LEVEL_ERROR: return "error";
+        case G_LOG_LEVEL_CRITICAL: return "critical";
+        case G_LOG_LEVEL_WARNING: return "warning";
+        case G_LOG_LEVEL_MESSAGE: return "message";
+        case G_LOG_LEVEL_INFO: return "info";
+        case G_LOG_LEVEL_DEBUG: return "debug";
+        default: return "unknown";
+        }
 }
 
+/**
+ * callback_adapter
+ * 
+ *  @log_domain Message prefix
+ *  @log_level Severity
+ *  @message Message to be written
+ *  @fatal Fatal flag - write then abort
+ *  @user_data Argument passed to @callback
+ *
+ * This adapts the old callback writer exposed by MonoCallback to the newer method of
+ * logging. We ignore the header request as legacy handlers never had headers.
+ */
+static void
+callback_adapter(const char *domain, GLogLevelFlags level, mono_bool fatal, const char *fmt, va_list args)
+{
+       legacyLoggerUserData *ll = (legacyLoggerUserData *) logCallback.user_data;
+       const char *msg = g_strdup_vprintf (fmt, args);
+
+       ll->legacy_callback (domain, log_level_get_name(level), msg, fatal, ll->user_data);
+       g_free ((void *) msg);
+}
+
+/**
+ * legacy_opener
+ *
+ * Dummy routine for older style loggers
+ */
 static void
-log_adapter (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
+legacy_opener(const char *path, void *user_data)
 {
-       log_callback (log_domain, log_level_get_name (log_level), message, log_level & G_LOG_LEVEL_ERROR, user_data);
+  /* nothing to do */
 }
 
 /**
- * mono_trace_set_log_handler:
+ * legacy_closer
+ *
+ * Cleanup routine for older style loggers
+ */
+static void
+legacy_closer()
+{
+       if (logCallback.user_data != NULL) {
+               g_free (logCallback.user_data); /* This is a LegacyLoggerUserData struct */
+               logCallback.opener = NULL;      
+               logCallback.writer = NULL;
+               logCallback.closer = NULL;
+               logCallback.user_data = NULL;
+               logCallback.header = FALSE;
+       }
+}
+
+/**
+ *   mono_trace_set_log_handler:
+ *  
+ *  @callback The callback that will replace the default logging handler
+ *  @user_data Argument passed to @callback
+ * 
+ * The log handler replaces the default runtime logger. All logging requests with be routed to it.
+ * If the fatal argument in the callback is true, the callback must abort the current process. The runtime expects that
+ * execution will not resume after a fatal error. This is for "old-style" or legacy log handers.
+ */
+void
+mono_trace_set_log_handler (MonoLogCallback callback, void *user_data)
+{
+        g_assert (callback);
+       if (logCallback.closer != NULL)
+               logCallback.closer();
+       legacyLoggerUserData *ll = g_malloc (sizeof (legacyLoggerUserData));
+       ll->legacy_callback = callback;
+       ll->user_data = user_data;
+       logCallback.opener = legacy_opener;
+       logCallback.writer = callback_adapter;
+       logCallback.closer = legacy_closer;
+       logCallback.user_data = ll;
+       logCallback.dest = NULL;
+}
+
+/**
+ * mono_trace_set_log_handler_internal:
  *
  *  @callback The callback that will replace the default logging handler
  *  @user_data Argument passed to @callback
@@ -269,11 +415,17 @@ log_adapter (const gchar *log_domain, GLogLevelFlags log_level, const gchar *mes
  * execution will not resume after a fatal error.
  */
 void
-mono_trace_set_log_handler (MonoLogCallback callback, void *user_data)
+mono_trace_set_log_handler_internal (MonoLogCallParm *callback, void *user_data)
 {
        g_assert (callback);
-       log_callback = callback;
-       g_log_set_default_handler (log_adapter, user_data);
+       if (logCallback.closer != NULL)
+               logCallback.closer();
+       logCallback.opener = callback->opener;
+       logCallback.writer = callback->writer;
+       logCallback.closer = callback->closer;
+       logCallback.header = mono_trace_log_header;
+       logCallback.dest   = callback->dest;
+       logCallback.opener(logCallback.dest, user_data);
 }
 
 static void
index 36f7714f2ed2dd946058e3c28a0b52c21e90e8f9..073daf1c87a16260f452584f96026e771eff8167 100644 (file)
@@ -10,8 +10,31 @@ mono_trace_set_level_string (const char *value);
 MONO_API void 
 mono_trace_set_mask_string (const char *value);
 
-typedef void (*MonoLogCallback) (const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data);
+MONO_API void 
+mono_trace_set_logdest_string (const char *value);
+
+MONO_API void 
+mono_trace_set_logheader_string (const char *value);
+
 typedef void (*MonoPrintCallback) (const char *string, mono_bool is_stdout);
+typedef void (*MonoLogCallback) (const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data);
+
+
+typedef void (*MonoLoggerOpen) (const char *, void *);
+typedef void (*MonoLoggerWrite) (const char *, GLogLevelFlags, mono_bool, const char *, va_list);
+typedef void (*MonoLoggerClose) (void);
+
+typedef struct _MonoLogCallParm_ {
+       MonoLoggerOpen  opener;         /* Routine to open logging */
+       MonoLoggerWrite writer;         /* Routine to write log data */
+       MonoLoggerClose closer;         /* Routine to close logging */
+       char            *dest;          /* Log destination */
+       void            *user_data;     /* User data from legacy handler */
+       mono_bool       header;         /* Whether we want pid/time/date in log message */
+} MonoLogCallParm;
+
+void
+mono_trace_set_log_handler_internal (MonoLogCallParm *callback, void *user_data);
 
 MONO_API void
 mono_trace_set_log_handler (MonoLogCallback callback, void *user_data);
@@ -22,6 +45,23 @@ mono_trace_set_print_handler (MonoPrintCallback callback);
 MONO_API void
 mono_trace_set_printerr_handler (MonoPrintCallback callback);
 
+MONO_API void
+mono_log_open_syslog(const char *, void *);
+
+MONO_API void
+mono_log_write_syslog(const char *, GLogLevelFlags, mono_bool, const char *, va_list);
+
+MONO_API void
+mono_log_close_syslog(void);
+
+MONO_API void
+mono_log_open_logfile(const char *, void *);
+
+MONO_API void
+mono_log_write_logfile(const char *, GLogLevelFlags, mono_bool, const char *, va_list);
+
+MONO_API void
+mono_log_close_logfile(void);
 
 MONO_END_DECLS
 
index 70271a57f8f7d48bb7f1ee69c1fc5c73f094a405..927a933d54bb50dde98dfd235926ea0e741ed918 100644 (file)
@@ -8,3 +8,21 @@ mono_free (void *ptr)
        g_free (ptr);
 }
 
+
+/**
+ * mono_set_allocator_vtable
+ *
+ * Make the runtime use the functions in @vtable for allocating memory.
+ * The provided functions must have the same semantics of their libc's equivalents.
+ *
+ * @return TRUE is the vtable was installed. FALSE if the version is incompatible.
+ */
+mono_bool
+mono_set_allocator_vtable (MonoAllocatorVTable* vtable)
+{
+       if (vtable->version != MONO_ALLOCATOR_VTABLE_VERSION)
+               return FALSE;
+       GMemVTable g_mem_vtable = { vtable->malloc, vtable->realloc, vtable->free, vtable->calloc};
+       g_mem_set_vtable (&g_mem_vtable);
+       return TRUE;
+}
index 53d4aa3ea7f4bed28874b023c70f33b9fd9cd490..89d4fb68b7590a565057dd42d4ca1844ac571340 100644 (file)
@@ -53,6 +53,8 @@ typedef unsigned __int64      uint64_t;
 
 #endif /* end of compiler-specific stuff */
 
+#include <stdlib.h>
+
 #if defined(MONO_DLL_EXPORT)
        #define MONO_API MONO_API_EXPORT
 #elif defined(MONO_DLL_IMPORT)
@@ -71,6 +73,20 @@ typedef void (*MonoHFunc)    (void* key, void* value, void* user_data);
 
 MONO_API void mono_free (void *);
 
+#define MONO_ALLOCATOR_VTABLE_VERSION 1
+
+typedef struct {
+       int version;
+       void *(*malloc)      (size_t size);
+       void *(*realloc)     (void *mem, size_t count);
+       void (*free)        (void *mem);
+       void *(*calloc)      (size_t count, size_t size);
+} MonoAllocatorVTable;
+
+MONO_API mono_bool
+mono_set_allocator_vtable (MonoAllocatorVTable* vtable);
+
+
 #define MONO_CONST_RETURN const
 
 /*
index ddc3c6ebbe231b49371e86760e198272c3d08191..cd5d703a04a1095ffca4c1edbc2388f43a80b69f 100644 (file)
@@ -145,11 +145,14 @@ mono_threads_state_poll_with_info (MonoThreadInfo *info)
        }
 }
 
-static void *
-return_stack_ptr ()
+static volatile gpointer* dummy_global;
+
+static MONO_NEVER_INLINE
+void*
+return_stack_ptr (gpointer *i)
 {
-       gpointer i;
-       return &i;
+       dummy_global = i;
+       return i;
 }
 
 static void
@@ -157,7 +160,8 @@ copy_stack_data (MonoThreadInfo *info, gpointer *stackdata_begin)
 {
        MonoThreadUnwindState *state;
        int stackdata_size;
-       void* stackdata_end = return_stack_ptr ();
+       gpointer dummy;
+       void* stackdata_end = return_stack_ptr (&dummy);
 
        SAVE_REGS_ON_STACK;
 
index 0111d5fd9086a939033748796442d08902d2a8d6..adf14f22eaf802f541bcabef1e24cba8fb8f1d99 100644 (file)
@@ -41,6 +41,7 @@ typedef struct {
        void *(*start_routine)(void*);
        void *arg;
        int flags;
+       gint32 priority;
        MonoCoopSem registered;
        HANDLE handle;
 } StartInfo;
@@ -71,6 +72,8 @@ inner_start_thread (void *arg)
        info->runtime_thread = TRUE;
        info->handle = handle;
 
+       wapi_init_thread_info_priority(handle, start_info->priority);
+
        if (flags & CREATE_SUSPENDED) {
                info->create_suspended = TRUE;
                mono_coop_sem_init (&info->create_suspended_sem, 0);
@@ -96,17 +99,20 @@ inner_start_thread (void *arg)
 }
 
 HANDLE
-mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start_routine, gpointer arg, guint32 stack_size, guint32 creation_flags, MonoNativeThreadId *out_tid)
+mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start_routine, gpointer arg, MonoThreadParm *tp, MonoNativeThreadId *out_tid)
 {
        pthread_attr_t attr;
        int res;
        pthread_t thread;
        StartInfo start_info;
+       guint32 stack_size;
+       int policy;
+       struct sched_param sp;
 
        res = pthread_attr_init (&attr);
        g_assert (!res);
 
-       if (stack_size == 0) {
+       if (tp->stack_size == 0) {
 #if HAVE_VALGRIND_MEMCHECK_H
                if (RUNNING_ON_VALGRIND)
                        stack_size = 1 << 20;
@@ -115,7 +121,8 @@ mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start_routine, gpointer
 #else
                stack_size = (SIZEOF_VOID_P / 4) * 1024 * 1024;
 #endif
-       }
+       } else
+               stack_size = tp->stack_size;
 
 #ifdef PTHREAD_STACK_MIN
        if (stack_size < PTHREAD_STACK_MIN)
@@ -127,10 +134,20 @@ mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start_routine, gpointer
        g_assert (!res);
 #endif
 
+       /*
+        * For policies that respect priorities set the prirority for the new thread
+        */ 
+       pthread_getschedparam(pthread_self(), &policy, &sp);
+       if ((policy == SCHED_FIFO) || (policy == SCHED_RR)) {
+               sp.sched_priority = wapi_thread_priority_to_posix_priority (tp->priority, policy);
+               res = pthread_attr_setschedparam (&attr, &sp);
+       }
+
        memset (&start_info, 0, sizeof (StartInfo));
        start_info.start_routine = (void *(*)(void *)) start_routine;
        start_info.arg = arg;
-       start_info.flags = creation_flags;
+       start_info.flags = tp->creation_flags;
+       start_info.priority = tp->priority;
        mono_coop_sem_init (&(start_info.registered), 0);
 
        /* Actually start the thread */
index 2ec53e35bc2380a018e381b7c459a5198593285c..1b9dd43daf1f9350fc5aac916c862b8ae42c7451 100644 (file)
@@ -172,11 +172,12 @@ inner_start_thread (LPVOID arg)
 }
 
 HANDLE
-mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start_routine, gpointer arg, guint32 stack_size, guint32 creation_flags, MonoNativeThreadId *out_tid)
+mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start_routine, gpointer arg, MonoThreadParm *tp, MonoNativeThreadId *out_tid)
 {
        ThreadStartInfo *start_info;
        HANDLE result;
        DWORD thread_id;
+       guint32 creation_flags = tp->creation_flags;
        int res;
 
        start_info = g_malloc0 (sizeof (ThreadStartInfo));
@@ -193,7 +194,7 @@ mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start_routine, gpointer
                        return NULL;
        }
 
-       result = CreateThread (NULL, stack_size, inner_start_thread, start_info, creation_flags, &thread_id);
+       result = CreateThread (NULL, tp->stack_size, inner_start_thread, start_info, creation_flags, &thread_id);
        if (result) {
                res = mono_coop_sem_wait (&(start_info->registered), MONO_SEM_FLAGS_NONE);
                g_assert (res != -1);
index a92d250b290448698ece831e6809b4c99a8f3cdd..5b4eaba983b9c1720349f420546c179d4f56f408 100644 (file)
@@ -80,6 +80,9 @@ static gboolean unified_suspend_enabled;
 /*abort at 1 sec*/
 #define SLEEP_DURATION_BEFORE_ABORT 200
 
+static long sleepWarnDuration = SLEEP_DURATION_BEFORE_WARNING,
+           sleepAbortDuration = SLEEP_DURATION_BEFORE_ABORT;
+
 static int suspend_posts, resume_posts, abort_posts, waits_done, pending_ops;
 
 void
@@ -235,14 +238,14 @@ mono_threads_wait_pending_operations (void)
                for (i = 0; i < pending_suspends; ++i) {
                        THREADS_SUSPEND_DEBUG ("[INITIATOR-WAIT-WAITING]\n");
                        InterlockedIncrement (&waits_done);
-                       if (!mono_os_sem_timedwait (&suspend_semaphore, SLEEP_DURATION_BEFORE_ABORT, MONO_SEM_FLAGS_NONE))
+                       if (!mono_os_sem_timedwait (&suspend_semaphore, sleepAbortDuration, MONO_SEM_FLAGS_NONE))
                                continue;
                        mono_stopwatch_stop (&suspension_time);
 
                        dump_threads ();
 
                        MOSTLY_ASYNC_SAFE_PRINTF ("WAITING for %d threads, got %d suspended\n", (int)pending_suspends, i);
-                       g_error ("suspend_thread suspend took %d ms, which is more than the allowed %d ms", (int)mono_stopwatch_elapsed_ms (&suspension_time), SLEEP_DURATION_BEFORE_ABORT);
+                       g_error ("suspend_thread suspend took %d ms, which is more than the allowed %d ms", (int)mono_stopwatch_elapsed_ms (&suspension_time), sleepAbortDuration);
                }
                mono_stopwatch_stop (&suspension_time);
                THREADS_SUSPEND_DEBUG ("Suspending %d threads took %d ms.\n", (int)pending_suspends, (int)mono_stopwatch_elapsed_ms (&suspension_time));
@@ -639,6 +642,7 @@ mono_threads_init (MonoThreadInfoCallbacks *callbacks, size_t info_size)
        gboolean res;
        threads_callbacks = *callbacks;
        thread_info_size = info_size;
+       const char *sleepLimit;
 #ifdef HOST_WIN32
        res = mono_native_tls_alloc (&thread_info_key, NULL);
        res = mono_native_tls_alloc (&thread_exited_key, NULL);
@@ -655,6 +659,15 @@ mono_threads_init (MonoThreadInfoCallbacks *callbacks, size_t info_size)
        g_assert (res);
 
        unified_suspend_enabled = g_getenv ("MONO_ENABLE_UNIFIED_SUSPEND") != NULL || mono_threads_is_coop_enabled ();
+       
+       if ((sleepLimit = g_getenv ("MONO_SLEEP_ABORT_LIMIT")) != NULL) {
+               long threshold = strtol(sleepLimit, NULL, 10);
+               if ((errno == 0) && (threshold >= 40))  {
+                       sleepAbortDuration = threshold;
+                       sleepWarnDuration = threshold / 20;
+               } else
+                       g_warning("MONO_SLEEP_ABORT_LIMIT must be a number >= 40");
+       }
 
        mono_os_sem_init (&global_suspend_semaphore, 1);
        mono_os_sem_init (&suspend_semaphore, 0);
@@ -1111,9 +1124,9 @@ mono_thread_info_is_async_context (void)
  * Returns: a windows or io-layer handle for the thread.
  */
 HANDLE
-mono_threads_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, guint32 stack_size, guint32 creation_flags, MonoNativeThreadId *out_tid)
+mono_threads_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, MonoThreadParm *tp, MonoNativeThreadId *out_tid)
 {
-       return mono_threads_core_create_thread (start, arg, stack_size, creation_flags, out_tid);
+       return mono_threads_core_create_thread (start, arg, tp, out_tid);
 }
 
 /*
index 7f304295fcd4c42e86fb15374e443921c29381b4..eaab83591e53a1fbc9fdf8f6341b82976155ade6 100644 (file)
@@ -280,6 +280,15 @@ typedef enum {
 
 typedef SuspendThreadResult (*MonoSuspendThreadCallback) (THREAD_INFO_TYPE *info, gpointer user_data);
 
+/*
+ * Parameters to pass for thread creation
+ */
+typedef struct {
+       int priority;
+       guint32 creation_flags; 
+       guint32 stack_size;             
+} MonoThreadParm;
+
 static inline gboolean
 mono_threads_filter_tools_threads (THREAD_INFO_TYPE *info)
 {
@@ -444,7 +453,7 @@ gboolean
 mono_thread_info_is_live (THREAD_INFO_TYPE *info);
 
 HANDLE
-mono_threads_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, guint32 stack_size, guint32 creation_flags, MonoNativeThreadId *out_tid);
+mono_threads_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, MonoThreadParm *tp, MonoNativeThreadId *out_tid);
 
 int
 mono_threads_get_max_stack_size (void);
@@ -509,7 +518,7 @@ void mono_threads_platform_register (THREAD_INFO_TYPE *info); //ok
 void mono_threads_platform_free (THREAD_INFO_TYPE *info);
 void mono_threads_core_abort_syscall (THREAD_INFO_TYPE *info);
 gboolean mono_threads_core_needs_abort_syscall (void);
-HANDLE mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, guint32 stack_size, guint32 creation_flags, MonoNativeThreadId *out_tid);
+HANDLE mono_threads_core_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, MonoThreadParm *, MonoNativeThreadId *out_tid);
 void mono_threads_core_resume_created (THREAD_INFO_TYPE *info, MonoNativeThreadId tid);
 void mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize);
 gboolean mono_threads_core_yield (void);
index 5cc82fccb55e082f6ecd6b198f1321eed06eda95..06f9f217b88cf6ce3a51b9fe65182ae38f182995 100644 (file)
@@ -142,7 +142,16 @@ gint64
 mono_100ns_ticks (void)
 {
        struct timeval tv;
-#ifdef CLOCK_MONOTONIC
+#if defined(PLATFORM_MACOSX)
+       /* http://developer.apple.com/library/mac/#qa/qa1398/_index.html */
+       static mach_timebase_info_data_t timebase;
+       guint64 now = mach_absolute_time ();
+       if (timebase.denom == 0) {
+               mach_timebase_info (&timebase);
+               timebase.denom *= 100; /* we return 100ns ticks */
+       }
+       return now * timebase.numer / timebase.denom;
+#elif defined(CLOCK_MONOTONIC)
        struct timespec tspec;
        static struct timespec tspec_freq = {0};
        static int can_use_clock = 0;
@@ -156,16 +165,6 @@ mono_100ns_ticks (void)
                        return ((gint64)tspec.tv_sec * MTICKS_PER_SEC + tspec.tv_nsec / 100);
                }
        }
-       
-#elif defined(PLATFORM_MACOSX)
-       /* http://developer.apple.com/library/mac/#qa/qa1398/_index.html */
-       static mach_timebase_info_data_t timebase;
-       guint64 now = mach_absolute_time ();
-       if (timebase.denom == 0) {
-               mach_timebase_info (&timebase);
-               timebase.denom *= 100; /* we return 100ns ticks */
-       }
-       return now * timebase.numer / timebase.denom;
 #endif
        if (gettimeofday (&tv, NULL) == 0)
                return ((gint64)tv.tv_sec * 1000000 + tv.tv_usec) * 10;
diff --git a/mono/utils/w32handle.c b/mono/utils/w32handle.c
new file mode 100644 (file)
index 0000000..d8a34dc
--- /dev/null
@@ -0,0 +1,1198 @@
+/*
+ * w32handle.c:  Generic and internal operations on handles
+ *
+ * Author:
+ *     Dick Porter (dick@ximian.com)
+ *     Ludovic Henry (luhenry@microsoft.com)
+ *
+ * (C) 2002-2011 Novell, Inc.
+ * Copyright 2011 Xamarin Inc
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+
+#include <config.h>
+
+#if !defined(HOST_WIN32)
+
+#include <glib.h>
+#include <pthread.h>
+#include <errno.h>
+#include <unistd.h>
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#include <string.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#  include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_UN_H
+#  include <sys/un.h>
+#endif
+#ifdef HAVE_SYS_MMAN_H
+#  include <sys/mman.h>
+#endif
+#ifdef HAVE_DIRENT_H
+#  include <dirent.h>
+#endif
+#include <sys/stat.h>
+#ifdef HAVE_SYS_RESOURCE_H
+#  include <sys/resource.h>
+#endif
+
+#include "w32handle.h"
+
+#include "atomic.h"
+#include "mono-logger-internals.h"
+#include "mono-os-mutex.h"
+#include "mono-proclib.h"
+#include "mono-threads.h"
+
+#undef DEBUG_REFS
+
+#define SLOT_MAX               (1024 * 16)
+
+/* must be a power of 2 */
+#define HANDLE_PER_SLOT        (256)
+
+typedef struct {
+       MonoW32HandleType type;
+       guint ref;
+       gboolean signalled;
+       mono_mutex_t signal_mutex;
+       mono_cond_t signal_cond;
+       gpointer specific;
+} MonoW32HandleBase;
+
+static MonoW32HandleCapability handle_caps [MONO_W32HANDLE_COUNT];
+static MonoW32HandleOps *handle_ops [MONO_W32HANDLE_COUNT];
+
+/*
+ * We can hold SLOT_MAX * HANDLE_PER_SLOT handles.
+ * If 4M handles are not enough... Oh, well... we will crash.
+ */
+#define SLOT_INDEX(x)  (x / HANDLE_PER_SLOT)
+#define SLOT_OFFSET(x) (x % HANDLE_PER_SLOT)
+
+static MonoW32HandleBase *private_handles [SLOT_MAX];
+static guint32 private_handles_count = 0;
+static guint32 private_handles_slots_count = 0;
+
+guint32 mono_w32handle_fd_reserve;
+
+/*
+ * This is an internal handle which is used for handling waiting for multiple handles.
+ * Threads which wait for multiple handles wait on this one handle, and when a handle
+ * is signalled, this handle is signalled too.
+ */
+static mono_mutex_t global_signal_mutex;
+static mono_cond_t global_signal_cond;
+
+static mono_mutex_t scan_mutex;
+
+static gboolean shutting_down = FALSE;
+
+static gboolean
+type_is_fd (MonoW32HandleType type)
+{
+       switch (type) {
+       case MONO_W32HANDLE_FILE:
+       case MONO_W32HANDLE_CONSOLE:
+       case MONO_W32HANDLE_SOCKET:
+       case MONO_W32HANDLE_PIPE:
+               return TRUE;
+       default:
+               return FALSE;
+       }
+}
+
+static gboolean
+mono_w32handle_lookup_data (gpointer handle, MonoW32HandleBase **handle_data)
+{
+       gsize index, offset;
+
+       g_assert (handle_data);
+
+       index = SLOT_INDEX ((gsize) handle);
+       if (index >= SLOT_MAX)
+               return FALSE;
+       if (!private_handles [index])
+               return FALSE;
+
+       offset = SLOT_OFFSET ((gsize) handle);
+       if (private_handles [index][offset].type == MONO_W32HANDLE_UNUSED)
+               return FALSE;
+
+       *handle_data = &private_handles [index][offset];
+       return TRUE;
+}
+
+MonoW32HandleType
+mono_w32handle_get_type (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data))
+               return MONO_W32HANDLE_UNUSED;   /* An impossible type */
+
+       return handle_data->type;
+}
+
+void
+mono_w32handle_set_signal_state (gpointer handle, gboolean state, gboolean broadcast)
+{
+       MonoW32HandleBase *handle_data;
+       int thr_ret;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return;
+       }
+
+#ifdef DEBUG
+       g_message ("%s: setting state of %p to %s (broadcast %s)", __func__,
+                  handle, state?"TRUE":"FALSE", broadcast?"TRUE":"FALSE");
+#endif
+
+       if (state == TRUE) {
+               /* Tell everyone blocking on a single handle */
+
+               /* The condition the global signal cond is waiting on is the signalling of
+                * _any_ handle. So lock it before setting the signalled state.
+                */
+               thr_ret = mono_os_mutex_lock (&global_signal_mutex);
+               if (thr_ret != 0)
+                       g_warning ("Bad call to mono_os_mutex_lock result %d for global signal mutex", thr_ret);
+               g_assert (thr_ret == 0);
+
+               /* This function _must_ be called with
+                * handle->signal_mutex locked
+                */
+               handle_data->signalled=state;
+
+               if (broadcast == TRUE) {
+                       thr_ret = mono_os_cond_broadcast (&handle_data->signal_cond);
+                       if (thr_ret != 0)
+                               g_warning ("Bad call to mono_os_cond_broadcast result %d for handle %p", thr_ret, handle);
+                       g_assert (thr_ret == 0);
+               } else {
+                       thr_ret = mono_os_cond_signal (&handle_data->signal_cond);
+                       if (thr_ret != 0)
+                               g_warning ("Bad call to mono_os_cond_signal result %d for handle %p", thr_ret, handle);
+                       g_assert (thr_ret == 0);
+               }
+
+               /* Tell everyone blocking on multiple handles that something
+                * was signalled
+                */
+               thr_ret = mono_os_cond_broadcast (&global_signal_cond);
+               if (thr_ret != 0)
+                       g_warning ("Bad call to mono_os_cond_broadcast result %d for handle %p", thr_ret, handle);
+               g_assert (thr_ret == 0);
+
+               thr_ret = mono_os_mutex_unlock (&global_signal_mutex);
+               if (thr_ret != 0)
+                       g_warning ("Bad call to mono_os_mutex_unlock result %d for global signal mutex", thr_ret);
+               g_assert (thr_ret == 0);
+       } else {
+               handle_data->signalled=state;
+       }
+}
+
+gboolean
+mono_w32handle_issignalled (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(FALSE);
+       }
+
+       return handle_data->signalled;
+}
+
+int
+mono_w32handle_lock_signal_mutex (void)
+{
+#ifdef DEBUG
+       g_message ("%s: lock global signal mutex", __func__);
+#endif
+
+       return(mono_os_mutex_lock (&global_signal_mutex));
+}
+
+int
+mono_w32handle_unlock_signal_mutex (void)
+{
+#ifdef DEBUG
+       g_message ("%s: unlock global signal mutex", __func__);
+#endif
+
+       return(mono_os_mutex_unlock (&global_signal_mutex));
+}
+
+int
+mono_w32handle_lock_handle (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+
+#ifdef DEBUG
+       g_message ("%s: locking handle %p", __func__, handle);
+#endif
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(0);
+       }
+
+       mono_w32handle_ref (handle);
+
+       return(mono_os_mutex_lock (&handle_data->signal_mutex));
+}
+
+int
+mono_w32handle_trylock_handle (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+       int ret;
+
+#ifdef DEBUG
+       g_message ("%s: locking handle %p", __func__, handle);
+#endif
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(0);
+       }
+
+       mono_w32handle_ref (handle);
+
+       ret = mono_os_mutex_trylock (&handle_data->signal_mutex);
+       if (ret != 0) {
+               mono_w32handle_unref (handle);
+       }
+
+       return(ret);
+}
+
+int
+mono_w32handle_unlock_handle (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+       int ret;
+
+#ifdef DEBUG
+       g_message ("%s: unlocking handle %p", __func__, handle);
+#endif
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(0);
+       }
+
+       ret = mono_os_mutex_unlock (&handle_data->signal_mutex);
+
+       mono_w32handle_unref (handle);
+
+       return(ret);
+}
+
+/*
+ * wapi_init:
+ *
+ *   Initialize the io-layer.
+ */
+void
+mono_w32handle_init (void)
+{
+       g_assert ((sizeof (handle_ops) / sizeof (handle_ops[0]))
+                 == MONO_W32HANDLE_COUNT);
+
+       /* This is needed by the code in mono_w32handle_new_internal */
+       mono_w32handle_fd_reserve = (eg_getdtablesize () + (HANDLE_PER_SLOT - 1)) & ~(HANDLE_PER_SLOT - 1);
+
+       do {
+               /*
+                * The entries in private_handles reserved for fds are allocated lazily to
+                * save memory.
+                */
+
+               private_handles_count += HANDLE_PER_SLOT;
+               private_handles_slots_count ++;
+       } while(mono_w32handle_fd_reserve > private_handles_count);
+
+       mono_os_mutex_init (&scan_mutex);
+
+       mono_os_cond_init (&global_signal_cond);
+       mono_os_mutex_init (&global_signal_mutex);
+}
+
+static void mono_w32handle_unref_full (gpointer handle, gboolean ignore_private_busy_handles);
+
+void
+mono_w32handle_cleanup (void)
+{
+       int i, j, k;
+
+       g_assert (!shutting_down);
+       shutting_down = TRUE;
+
+       /* Every shared handle we were using ought really to be closed
+        * by now, but to make sure just blow them all away.  The
+        * exiting finalizer thread in particular races us to the
+        * program exit and doesn't always win, so it can be left
+        * cluttering up the shared file.  Anything else left over is
+        * really a bug.
+        */
+       for(i = SLOT_INDEX (0); private_handles[i] != NULL; i++) {
+               for(j = SLOT_OFFSET (0); j < HANDLE_PER_SLOT; j++) {
+                       MonoW32HandleBase *handle_data = &private_handles[i][j];
+                       gpointer handle = GINT_TO_POINTER (i*HANDLE_PER_SLOT+j);
+
+                       for(k = handle_data->ref; k > 0; k--) {
+                               mono_w32handle_unref_full (handle, TRUE);
+                       }
+               }
+       }
+
+       for (i = 0; i < SLOT_MAX; ++i)
+               g_free (private_handles [i]);
+}
+
+static void mono_w32handle_init_handle (MonoW32HandleBase *handle,
+                              MonoW32HandleType type, gpointer handle_specific)
+{
+       int thr_ret;
+       
+       g_assert (!shutting_down);
+       
+       handle->type = type;
+       handle->signalled = FALSE;
+       handle->ref = 1;
+
+       thr_ret = mono_os_cond_init (&handle->signal_cond);
+       g_assert (thr_ret == 0);
+
+       thr_ret = mono_os_mutex_init (&handle->signal_mutex);
+       g_assert (thr_ret == 0);
+
+       if (handle_specific)
+               handle->specific = g_memdup (handle_specific, mono_w32handle_ops_typesize (type));
+}
+
+/*
+ * mono_w32handle_new_internal:
+ * @type: Init handle to this type
+ *
+ * Search for a free handle and initialize it. Return the handle on
+ * success and 0 on failure.  This is only called from
+ * mono_w32handle_new, and scan_mutex must be held.
+ */
+static guint32 mono_w32handle_new_internal (MonoW32HandleType type,
+                                         gpointer handle_specific)
+{
+       guint32 i, k, count;
+       static guint32 last = 0;
+       gboolean retry = FALSE;
+       
+       g_assert (!shutting_down);
+       
+       /* A linear scan should be fast enough.  Start from the last
+        * allocation, assuming that handles are allocated more often
+        * than they're freed. Leave the space reserved for file
+        * descriptors
+        */
+
+       if (last < mono_w32handle_fd_reserve) {
+               last = mono_w32handle_fd_reserve;
+       } else {
+               retry = TRUE;
+       }
+
+again:
+       count = last;
+       for(i = SLOT_INDEX (count); i < private_handles_slots_count; i++) {
+               if (private_handles [i]) {
+                       for (k = SLOT_OFFSET (count); k < HANDLE_PER_SLOT; k++) {
+                               MonoW32HandleBase *handle = &private_handles [i][k];
+
+                               if(handle->type == MONO_W32HANDLE_UNUSED) {
+                                       last = count + 1;
+
+                                       mono_w32handle_init_handle (handle, type, handle_specific);
+                                       return (count);
+                               }
+                               count++;
+                       }
+               }
+       }
+
+       if(retry && last > mono_w32handle_fd_reserve) {
+               /* Try again from the beginning */
+               last = mono_w32handle_fd_reserve;
+               goto again;
+       }
+
+       /* Will need to expand the array.  The caller will sort it out */
+
+       return(0);
+}
+
+gpointer
+mono_w32handle_new (MonoW32HandleType type, gpointer handle_specific)
+{
+       guint32 handle_idx = 0;
+       gpointer handle;
+       int thr_ret;
+
+       g_assert (!shutting_down);
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Creating new handle of type %s", __func__,
+                  mono_w32handle_ops_typename (type));
+
+       g_assert(!type_is_fd(type));
+
+       thr_ret = mono_os_mutex_lock (&scan_mutex);
+       g_assert (thr_ret == 0);
+
+       while ((handle_idx = mono_w32handle_new_internal (type, handle_specific)) == 0) {
+               /* Try and expand the array, and have another go */
+               int idx = SLOT_INDEX (private_handles_count);
+               if (idx >= SLOT_MAX) {
+                       break;
+               }
+
+               private_handles [idx] = g_new0 (MonoW32HandleBase, HANDLE_PER_SLOT);
+
+               private_handles_count += HANDLE_PER_SLOT;
+               private_handles_slots_count ++;
+       }
+
+       thr_ret = mono_os_mutex_unlock (&scan_mutex);
+       g_assert (thr_ret == 0);
+
+       if (handle_idx == 0) {
+               /* We ran out of slots */
+               handle = INVALID_HANDLE_VALUE;
+               goto done;
+       }
+
+       /* Make sure we left the space for fd mappings */
+       g_assert (handle_idx >= mono_w32handle_fd_reserve);
+
+       handle = GUINT_TO_POINTER (handle_idx);
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Allocated new handle %p", __func__, handle);
+
+done:
+       return(handle);
+}
+
+gpointer mono_w32handle_new_fd (MonoW32HandleType type, int fd,
+                             gpointer handle_specific)
+{
+       MonoW32HandleBase *handle_data;
+       int fd_index, fd_offset;
+       int thr_ret;
+
+       g_assert (!shutting_down);
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Creating new handle of type %s", __func__,
+                  mono_w32handle_ops_typename (type));
+
+       g_assert(type_is_fd(type));
+
+       if (fd >= mono_w32handle_fd_reserve) {
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: fd %d is too big", __func__, fd);
+
+               return(GUINT_TO_POINTER (INVALID_HANDLE_VALUE));
+       }
+
+       fd_index = SLOT_INDEX (fd);
+       fd_offset = SLOT_OFFSET (fd);
+
+       /* Initialize the array entries on demand */
+       if (!private_handles [fd_index]) {
+               thr_ret = mono_os_mutex_lock (&scan_mutex);
+               g_assert (thr_ret == 0);
+
+               if (!private_handles [fd_index])
+                       private_handles [fd_index] = g_new0 (MonoW32HandleBase, HANDLE_PER_SLOT);
+
+               thr_ret = mono_os_mutex_unlock (&scan_mutex);
+               g_assert (thr_ret == 0);
+       }
+
+       handle_data = &private_handles [fd_index][fd_offset];
+
+       if (handle_data->type != MONO_W32HANDLE_UNUSED) {
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: fd %d is already in use!", __func__, fd);
+               /* FIXME: clean up this handle?  We can't do anything
+                * with the fd, cos thats the new one
+                */
+       }
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Assigning new fd handle %p", __func__, (gpointer)(gsize)fd);
+
+       mono_w32handle_init_handle (handle_data, type, handle_specific);
+
+       return(GUINT_TO_POINTER(fd));
+}
+
+gboolean
+mono_w32handle_lookup (gpointer handle, MonoW32HandleType type,
+                             gpointer *handle_specific)
+{
+       MonoW32HandleBase *handle_data;
+
+       g_assert (handle_specific);
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(FALSE);
+       }
+
+       if (handle_data->type != type) {
+               return(FALSE);
+       }
+
+       *handle_specific = handle_data->specific;
+
+       return(TRUE);
+}
+
+void
+mono_w32handle_foreach (gboolean (*on_each)(gpointer handle, gpointer data, gpointer user_data), gpointer user_data)
+{
+       MonoW32HandleBase *handle_data = NULL;
+       gpointer handle;
+       guint32 i, k;
+       int thr_ret;
+
+       thr_ret = mono_os_mutex_lock (&scan_mutex);
+       g_assert (thr_ret == 0);
+
+       for (i = SLOT_INDEX (0); i < private_handles_slots_count; i++) {
+               if (private_handles [i]) {
+                       for (k = SLOT_OFFSET (0); k < HANDLE_PER_SLOT; k++) {
+                               handle_data = &private_handles [i][k];
+                               if (handle_data->type == MONO_W32HANDLE_UNUSED)
+                                       continue;
+                               handle = GUINT_TO_POINTER (i * HANDLE_PER_SLOT + k);
+                               if (on_each (handle, handle_data->specific, user_data) == TRUE)
+                                       goto done;
+                       }
+               }
+       }
+
+done:
+       thr_ret = mono_os_mutex_unlock (&scan_mutex);
+       g_assert (thr_ret == 0);
+}
+
+/* This might list some shared handles twice if they are already
+ * opened by this process, and the check function returns FALSE the
+ * first time.  Shared handles that are created during the search are
+ * unreffed if the check function returns FALSE, so callers must not
+ * rely on the handle persisting (unless the check function returns
+ * TRUE)
+ * The caller owns the returned handle.
+ */
+gpointer mono_w32handle_search (MonoW32HandleType type,
+                             gboolean (*check)(gpointer test, gpointer user),
+                             gpointer user_data,
+                             gpointer *handle_specific,
+                             gboolean search_shared)
+{
+       MonoW32HandleBase *handle_data = NULL;
+       gpointer ret = NULL;
+       guint32 i, k;
+       gboolean found = FALSE;
+       int thr_ret;
+
+       thr_ret = mono_os_mutex_lock (&scan_mutex);
+       g_assert (thr_ret == 0);
+
+       for (i = SLOT_INDEX (0); !found && i < private_handles_slots_count; i++) {
+               if (private_handles [i]) {
+                       for (k = SLOT_OFFSET (0); k < HANDLE_PER_SLOT; k++) {
+                               handle_data = &private_handles [i][k];
+
+                               if (handle_data->type == type) {
+                                       ret = GUINT_TO_POINTER (i * HANDLE_PER_SLOT + k);
+                                       if (check (ret, user_data) == TRUE) {
+                                               mono_w32handle_ref (ret);
+                                               found = TRUE;
+                                               break;
+                                       }
+                               }
+                       }
+               }
+       }
+
+       thr_ret = mono_os_mutex_unlock (&scan_mutex);
+       g_assert (thr_ret == 0);
+
+       if (!found) {
+               ret = NULL;
+               goto done;
+       }
+
+       if(handle_specific != NULL) {
+               *handle_specific = handle_data->specific;
+       }
+
+done:
+       return(ret);
+}
+
+void mono_w32handle_ref (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Attempting to ref invalid private handle %p", __func__, handle);
+               return;
+       }
+
+       InterlockedIncrement ((gint32 *)&handle_data->ref);
+
+#ifdef DEBUG_REFS
+       g_message ("%s: %s handle %p ref now %d",
+               __func__, mono_w32handle_ops_typename (handle_data->type), handle, handle_data->ref);
+#endif
+}
+
+static void (*_wapi_handle_ops_get_close_func (MonoW32HandleType type))(gpointer, gpointer);
+
+/* The handle must not be locked on entry to this function */
+static void mono_w32handle_unref_full (gpointer handle, gboolean ignore_private_busy_handles)
+{
+       MonoW32HandleBase *handle_data;
+       gboolean destroy = FALSE, early_exit = FALSE;
+       int thr_ret;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Attempting to unref invalid private handle %p",
+                       __func__, handle);
+               return;
+       }
+
+       /* Possible race condition here if another thread refs the
+        * handle between here and setting the type to UNUSED.  I
+        * could lock a mutex, but I'm not sure that allowing a handle
+        * reference to reach 0 isn't an application bug anyway.
+        */
+       destroy = (InterlockedDecrement ((gint32 *)&handle_data->ref) ==0);
+
+#ifdef DEBUG_REFS
+       g_message ("%s: %s handle %p ref now %d (destroy %s)",
+               __func__, mono_w32handle_ops_typename (handle_data->type), handle, handle_data->ref, destroy?"TRUE":"FALSE");
+#endif
+
+       if(destroy==TRUE) {
+               /* Need to copy the handle info, reset the slot in the
+                * array, and _only then_ call the close function to
+                * avoid race conditions (eg file descriptors being
+                * closed, and another file being opened getting the
+                * same fd racing the memset())
+                */
+               MonoW32HandleType type;
+               gpointer handle_specific;
+               void (*close_func)(gpointer, gpointer);
+
+               type = handle_data->type;
+               handle_specific = handle_data->specific;
+
+               thr_ret = mono_os_mutex_lock (&scan_mutex);
+               g_assert (thr_ret == 0);
+
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Destroying handle %p", __func__, handle);
+
+               /* Destroy the mutex and cond var.  We hope nobody
+                * tried to grab them between the handle unlock and
+                * now, but pthreads doesn't have a
+                * "unlock_and_destroy" atomic function.
+                */
+               thr_ret = mono_os_mutex_destroy (&handle_data->signal_mutex);
+               /*WARNING gross hack to make cleanup not crash when exiting without the whole runtime teardown.*/
+               if (thr_ret == EBUSY && ignore_private_busy_handles) {
+                       early_exit = TRUE;
+               } else {
+                       if (thr_ret != 0)
+                               g_error ("Error destroying handle %p mutex due to %d\n", handle, thr_ret);
+
+                       thr_ret = mono_os_cond_destroy (&handle_data->signal_cond);
+                       if (thr_ret == EBUSY && ignore_private_busy_handles)
+                               early_exit = TRUE;
+                       else if (thr_ret != 0)
+                               g_error ("Error destroying handle %p cond var due to %d\n", handle, thr_ret);
+               }
+
+               memset (handle_data, 0, sizeof (MonoW32HandleBase));
+
+               thr_ret = mono_os_mutex_unlock (&scan_mutex);
+               g_assert (thr_ret == 0);
+
+               if (early_exit)
+                       return;
+
+               close_func = _wapi_handle_ops_get_close_func (type);
+               if (close_func != NULL) {
+                       close_func (handle, handle_specific);
+               }
+
+               g_free (handle_specific);
+       }
+}
+
+void mono_w32handle_unref (gpointer handle)
+{
+       mono_w32handle_unref_full (handle, FALSE);
+}
+
+void
+mono_w32handle_register_ops (MonoW32HandleType type, MonoW32HandleOps *ops)
+{
+       handle_ops [type] = ops;
+}
+
+void mono_w32handle_register_capabilities (MonoW32HandleType type,
+                                        MonoW32HandleCapability caps)
+{
+       handle_caps[type] = caps;
+}
+
+gboolean mono_w32handle_test_capabilities (gpointer handle,
+                                        MonoW32HandleCapability caps)
+{
+       MonoW32HandleBase *handle_data;
+       MonoW32HandleType type;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(FALSE);
+       }
+
+       type = handle_data->type;
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: testing 0x%x against 0x%x (%d)", __func__,
+                  handle_caps[type], caps, handle_caps[type] & caps);
+
+       return((handle_caps[type] & caps) != 0);
+}
+
+static void (*_wapi_handle_ops_get_close_func (MonoW32HandleType type))(gpointer, gpointer)
+{
+       if (handle_ops[type] != NULL &&
+           handle_ops[type]->close != NULL) {
+               return (handle_ops[type]->close);
+       }
+
+       return (NULL);
+}
+
+void mono_w32handle_ops_close (gpointer handle, gpointer data)
+{
+       MonoW32HandleBase *handle_data;
+       MonoW32HandleType type;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return;
+       }
+
+       type = handle_data->type;
+
+       if (handle_ops[type] != NULL &&
+           handle_ops[type]->close != NULL) {
+               handle_ops[type]->close (handle, data);
+       }
+}
+
+void mono_w32handle_ops_details (MonoW32HandleType type, gpointer data)
+{
+       if (handle_ops[type] != NULL &&
+           handle_ops[type]->details != NULL) {
+               handle_ops[type]->details (data);
+       }
+}
+
+const gchar* mono_w32handle_ops_typename (MonoW32HandleType type)
+{
+       g_assert (handle_ops [type]);
+       g_assert (handle_ops [type]->typename);
+       return handle_ops [type]->typename ();
+}
+
+gsize mono_w32handle_ops_typesize (MonoW32HandleType type)
+{
+       g_assert (handle_ops [type]);
+       g_assert (handle_ops [type]->typesize);
+       return handle_ops [type]->typesize ();
+}
+
+void mono_w32handle_ops_signal (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+       MonoW32HandleType type;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return;
+       }
+
+       type = handle_data->type;
+
+       if (handle_ops[type] != NULL && handle_ops[type]->signal != NULL) {
+               handle_ops[type]->signal (handle);
+       }
+}
+
+gboolean mono_w32handle_ops_own (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+       MonoW32HandleType type;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(FALSE);
+       }
+
+       type = handle_data->type;
+
+       if (handle_ops[type] != NULL && handle_ops[type]->own_handle != NULL) {
+               return(handle_ops[type]->own_handle (handle));
+       } else {
+               return(FALSE);
+       }
+}
+
+gboolean mono_w32handle_ops_isowned (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+       MonoW32HandleType type;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(FALSE);
+       }
+
+       type = handle_data->type;
+
+       if (handle_ops[type] != NULL && handle_ops[type]->is_owned != NULL) {
+               return(handle_ops[type]->is_owned (handle));
+       } else {
+               return(FALSE);
+       }
+}
+
+guint32 mono_w32handle_ops_specialwait (gpointer handle, guint32 timeout, gboolean alertable)
+{
+       MonoW32HandleBase *handle_data;
+       MonoW32HandleType type;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return(WAIT_FAILED);
+       }
+
+       type = handle_data->type;
+
+       if (handle_ops[type] != NULL &&
+           handle_ops[type]->special_wait != NULL) {
+               return(handle_ops[type]->special_wait (handle, timeout, alertable));
+       } else {
+               return(WAIT_FAILED);
+       }
+}
+
+void mono_w32handle_ops_prewait (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+       MonoW32HandleType type;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
+               return;
+       }
+
+       type = handle_data->type;
+
+       if (handle_ops[type] != NULL &&
+           handle_ops[type]->prewait != NULL) {
+               handle_ops[type]->prewait (handle);
+       }
+}
+
+static void
+spin (guint32 ms)
+{
+       struct timespec sleepytime;
+
+       g_assert (ms < 1000);
+
+       sleepytime.tv_sec = 0;
+       sleepytime.tv_nsec = ms * 1000000;
+       nanosleep (&sleepytime, NULL);
+}
+
+gboolean
+mono_w32handle_count_signalled_handles (guint32 numhandles, gpointer *handles,
+       gboolean waitall, guint32 *retcount, guint32 *lowest)
+{
+       guint32 count, i, iter=0;
+       gboolean ret;
+       int thr_ret;
+
+       /* Lock all the handles, with backoff */
+again:
+       for(i=0; i<numhandles; i++) {
+               gpointer handle = handles[i];
+
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: attempting to lock %p", __func__, handle);
+
+               thr_ret = mono_w32handle_trylock_handle (handle);
+
+               if (thr_ret != 0) {
+                       /* Bummer */
+
+                       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: attempt failed for %p: %s", __func__,
+                                  handle, strerror (thr_ret));
+
+                       while (i--) {
+                               handle = handles[i];
+
+                               thr_ret = mono_w32handle_unlock_handle (handle);
+                               g_assert (thr_ret == 0);
+                       }
+
+                       /* If iter ever reaches 100 the nanosleep will
+                        * return EINVAL immediately, but we have a
+                        * design flaw if that happens.
+                        */
+                       iter++;
+                       if(iter==100) {
+                               g_warning ("%s: iteration overflow!",
+                                          __func__);
+                               iter=1;
+                       }
+
+                       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Backing off for %d ms", __func__,
+                                  iter*10);
+                       spin (10 * iter);
+
+                       goto again;
+               }
+       }
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Locked all handles", __func__);
+
+       count=0;
+       *lowest=numhandles;
+
+       for(i=0; i<numhandles; i++) {
+               gpointer handle = handles[i];
+
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Checking handle %p", __func__, handle);
+
+               if(((mono_w32handle_test_capabilities (handle, MONO_W32HANDLE_CAP_OWN)==TRUE) &&
+                   (mono_w32handle_ops_isowned (handle) == TRUE)) ||
+                  (mono_w32handle_issignalled (handle))) {
+                       count++;
+
+                       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Handle %p signalled", __func__,
+                                  handle);
+                       if(*lowest>i) {
+                               *lowest=i;
+                       }
+               }
+       }
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: %d event handles signalled", __func__, count);
+
+       if ((waitall == TRUE && count == numhandles) ||
+           (waitall == FALSE && count > 0)) {
+               ret=TRUE;
+       } else {
+               ret=FALSE;
+       }
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: Returning %d", __func__, ret);
+
+       *retcount=count;
+
+       return(ret);
+}
+
+void mono_w32handle_unlock_handles (guint32 numhandles, gpointer *handles)
+{
+       guint32 i;
+       int thr_ret;
+
+       for(i=0; i<numhandles; i++) {
+               gpointer handle = handles[i];
+
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: unlocking handle %p", __func__, handle);
+
+               thr_ret = mono_w32handle_unlock_handle (handle);
+               g_assert (thr_ret == 0);
+       }
+}
+
+static int
+mono_w32handle_timedwait_signal_naked (mono_cond_t *cond, mono_mutex_t *mutex, guint32 timeout, gboolean poll, gboolean *alerted)
+{
+       int res;
+
+       if (!poll) {
+               res = mono_os_cond_timedwait (cond, mutex, timeout);
+       } else {
+               /* This is needed when waiting for process handles */
+               if (!alerted) {
+                       /*
+                        * pthread_cond_(timed)wait() can return 0 even if the condition was not
+                        * signalled.  This happens at least on Darwin.  We surface this, i.e., we
+                        * get spurious wake-ups.
+                        *
+                        * http://pubs.opengroup.org/onlinepubs/007908775/xsh/pthread_cond_wait.html
+                        */
+                       res = mono_os_cond_timedwait (cond, mutex, timeout);
+               } else {
+                       if (timeout < 100) {
+                               /* Real timeout is less than 100ms time */
+                               res = mono_os_cond_timedwait (cond, mutex, timeout);
+                       } else {
+                               res = mono_os_cond_timedwait (cond, mutex, 100);
+
+                               /* Mask the fake timeout, this will cause
+                                * another poll if the cond was not really signaled
+                                */
+                               if (res == ETIMEDOUT)
+                                       res = 0;
+                       }
+               }
+       }
+
+       return res;
+}
+
+static void
+signal_global (gpointer unused)
+{
+       /* If we reach here, then interrupt token is set to the flag value, which
+        * means that the target thread is either
+        * - before the first CAS in timedwait, which means it won't enter the wait.
+        * - it is after the first CAS, so it is already waiting, or it will enter
+        *    the wait, and it will be interrupted by the broadcast. */
+       mono_os_mutex_lock (&global_signal_mutex);
+       mono_os_cond_broadcast (&global_signal_cond);
+       mono_os_mutex_unlock (&global_signal_mutex);
+}
+
+int
+mono_w32handle_timedwait_signal (guint32 timeout, gboolean poll, gboolean *alerted)
+{
+       int res;
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: waiting for global", __func__);
+
+       if (alerted)
+               *alerted = FALSE;
+
+       if (alerted) {
+               mono_thread_info_install_interrupt (signal_global, NULL, alerted);
+               if (*alerted)
+                       return 0;
+       }
+
+       res = mono_w32handle_timedwait_signal_naked (&global_signal_cond, &global_signal_mutex, timeout, poll, alerted);
+
+       if (alerted)
+               mono_thread_info_uninstall_interrupt (alerted);
+
+       return res;
+}
+
+static void
+signal_handle_and_unref (gpointer handle)
+{
+       MonoW32HandleBase *handle_data;
+       mono_cond_t *cond;
+       mono_mutex_t *mutex;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data))
+               g_error ("cannot signal unknown handle %p", handle);
+
+       /* If we reach here, then interrupt token is set to the flag value, which
+        * means that the target thread is either
+        * - before the first CAS in timedwait, which means it won't enter the wait.
+        * - it is after the first CAS, so it is already waiting, or it will enter
+        *    the wait, and it will be interrupted by the broadcast. */
+       cond = &handle_data->signal_cond;
+       mutex = &handle_data->signal_mutex;
+
+       mono_os_mutex_lock (mutex);
+       mono_os_cond_broadcast (cond);
+       mono_os_mutex_unlock (mutex);
+
+       mono_w32handle_unref (handle);
+}
+
+int
+mono_w32handle_timedwait_signal_handle (gpointer handle, guint32 timeout, gboolean poll, gboolean *alerted)
+{
+       MonoW32HandleBase *handle_data;
+       int res;
+
+       if (!mono_w32handle_lookup_data (handle, &handle_data))
+               g_error ("cannot wait on unknown handle %p", handle);
+
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: waiting for %p (type %s)", __func__, handle,
+                  mono_w32handle_ops_typename (mono_w32handle_get_type (handle)));
+
+       if (alerted)
+               *alerted = FALSE;
+
+       if (alerted) {
+               mono_thread_info_install_interrupt (signal_handle_and_unref, handle, alerted);
+               if (*alerted)
+                       return 0;
+               mono_w32handle_ref (handle);
+       }
+
+       res = mono_w32handle_timedwait_signal_naked (&handle_data->signal_cond, &handle_data->signal_mutex, timeout, poll, alerted);
+
+       if (alerted) {
+               mono_thread_info_uninstall_interrupt (alerted);
+               if (!*alerted) {
+                       /* if it is alerted, then the handle is unref in the interrupt callback */
+                       mono_w32handle_unref (handle);
+               }
+       }
+
+       return res;
+}
+
+void mono_w32handle_dump (void)
+{
+       MonoW32HandleBase *handle_data;
+       guint32 i, k;
+       int thr_ret;
+
+       thr_ret = mono_os_mutex_lock (&scan_mutex);
+       g_assert (thr_ret == 0);
+
+       for(i = SLOT_INDEX (0); i < private_handles_slots_count; i++) {
+               if (private_handles [i]) {
+                       for (k = SLOT_OFFSET (0); k < HANDLE_PER_SLOT; k++) {
+                               handle_data = &private_handles [i][k];
+
+                               if (handle_data->type == MONO_W32HANDLE_UNUSED) {
+                                       continue;
+                               }
+
+                               g_print ("%3x [%7s] %s %d ",
+                                                i * HANDLE_PER_SLOT + k,
+                                                mono_w32handle_ops_typename (handle_data->type),
+                                                handle_data->signalled?"Sg":"Un",
+                                                handle_data->ref);
+                               mono_w32handle_ops_details (handle_data->type, handle_data->specific);
+                               g_print ("\n");
+                       }
+               }
+       }
+
+       thr_ret = mono_os_mutex_unlock (&scan_mutex);
+       g_assert (thr_ret == 0);
+}
+
+#endif /* !defined(HOST_WIN32) */
diff --git a/mono/utils/w32handle.h b/mono/utils/w32handle.h
new file mode 100644 (file)
index 0000000..4e2c27c
--- /dev/null
@@ -0,0 +1,186 @@
+
+#ifndef _MONO_UTILS_W32HANDLE_H_
+#define _MONO_UTILS_W32HANDLE_H_
+
+#include <config.h>
+
+#if !defined(HOST_WIN32)
+
+#include <glib.h>
+
+#define INVALID_HANDLE_VALUE (gpointer)-1
+
+typedef enum {
+       MONO_W32HANDLE_UNUSED = 0,
+       MONO_W32HANDLE_FILE,
+       MONO_W32HANDLE_CONSOLE,
+       MONO_W32HANDLE_THREAD,
+       MONO_W32HANDLE_SEM,
+       MONO_W32HANDLE_MUTEX,
+       MONO_W32HANDLE_EVENT,
+       MONO_W32HANDLE_SOCKET,
+       MONO_W32HANDLE_FIND,
+       MONO_W32HANDLE_PROCESS,
+       MONO_W32HANDLE_PIPE,
+       MONO_W32HANDLE_NAMEDMUTEX,
+       MONO_W32HANDLE_NAMEDSEM,
+       MONO_W32HANDLE_NAMEDEVENT,
+       MONO_W32HANDLE_COUNT
+} MonoW32HandleType;
+
+typedef struct 
+{
+       void (*close)(gpointer handle, gpointer data);
+
+       /* SignalObjectAndWait */
+       void (*signal)(gpointer signal);
+
+       /* Called by WaitForSingleObject and WaitForMultipleObjects,
+        * with the handle locked (shared handles aren't locked.)
+        * Returns TRUE if ownership was established, false otherwise.
+        */
+       gboolean (*own_handle)(gpointer handle);
+
+       /* Called by WaitForSingleObject and WaitForMultipleObjects, if the
+        * handle in question is "ownable" (ie mutexes), to see if the current
+        * thread already owns this handle
+        */
+       gboolean (*is_owned)(gpointer handle);
+
+       /* Called by WaitForSingleObject and WaitForMultipleObjects,
+        * if the handle in question needs a special wait function
+        * instead of using the normal handle signal mechanism.
+        * Returns the WaitForSingleObject return code.
+        */
+       guint32 (*special_wait)(gpointer handle, guint32 timeout, gboolean alertable);
+
+       /* Called by WaitForSingleObject and WaitForMultipleObjects,
+        * if the handle in question needs some preprocessing before the
+        * signal wait.
+        */
+       void (*prewait)(gpointer handle);
+
+       /* Called when dumping the handles */
+       void (*details)(gpointer data);
+
+       /* Called to get the name of the handle type */
+       const gchar* (*typename) (void);
+
+       /* Called to get the size of the handle type */
+       gsize (*typesize) (void);
+} MonoW32HandleOps;
+
+typedef enum {
+       MONO_W32HANDLE_CAP_WAIT         = 0x01,
+       MONO_W32HANDLE_CAP_SIGNAL       = 0x02,
+       MONO_W32HANDLE_CAP_OWN          = 0x04,
+       MONO_W32HANDLE_CAP_SPECIAL_WAIT = 0x08,
+} MonoW32HandleCapability;
+
+extern guint32 mono_w32handle_fd_reserve;
+
+void
+mono_w32handle_init (void);
+
+void
+mono_w32handle_cleanup (void);
+
+void
+mono_w32handle_register_ops (MonoW32HandleType type, MonoW32HandleOps *ops);
+
+gpointer
+mono_w32handle_new (MonoW32HandleType type, gpointer handle_specific);
+
+gpointer
+mono_w32handle_new_fd (MonoW32HandleType type, int fd, gpointer handle_specific);
+
+MonoW32HandleType
+mono_w32handle_get_type (gpointer handle);
+
+gboolean
+mono_w32handle_lookup (gpointer handle, MonoW32HandleType type, gpointer *handle_specific);
+
+gpointer
+mono_w32handle_search (MonoW32HandleType type, gboolean (*check)(gpointer, gpointer), gpointer user_data, gpointer *handle_specific, gboolean search_shared);
+
+void
+mono_w32handle_foreach (gboolean (*on_each)(gpointer handle, gpointer data, gpointer user_data), gpointer user_data);
+
+void
+mono_w32handle_dump (void);
+
+void
+mono_w32handle_ref (gpointer handle);
+
+void
+mono_w32handle_unref (gpointer handle);
+
+void
+mono_w32handle_register_capabilities (MonoW32HandleType type, MonoW32HandleCapability caps);
+
+gboolean
+mono_w32handle_test_capabilities (gpointer handle, MonoW32HandleCapability caps);
+
+void
+mono_w32handle_ops_close (gpointer handle, gpointer data);
+
+void
+mono_w32handle_ops_signal (gpointer handle);
+
+gboolean
+mono_w32handle_ops_own (gpointer handle);
+
+gboolean
+mono_w32handle_ops_isowned (gpointer handle);
+
+guint32
+mono_w32handle_ops_specialwait (gpointer handle, guint32 timeout, gboolean alertable);
+
+void
+mono_w32handle_ops_prewait (gpointer handle);
+
+void
+mono_w32handle_ops_details (MonoW32HandleType type, gpointer data);
+
+const gchar*
+mono_w32handle_ops_typename (MonoW32HandleType type);
+
+gsize
+mono_w32handle_ops_typesize (MonoW32HandleType type);
+
+gboolean
+mono_w32handle_count_signalled_handles (guint32 numhandles, gpointer *handles, gboolean waitall, guint32 *retcount, guint32 *lowest);
+
+void
+mono_w32handle_unlock_handles (guint32 numhandles, gpointer *handles);
+
+int
+mono_w32handle_timedwait_signal_handle (gpointer handle, guint32 timeout, gboolean poll, gboolean *alerted);
+
+int
+mono_w32handle_timedwait_signal (guint32 timeout, gboolean poll, gboolean *alerted);
+
+void
+mono_w32handle_set_signal_state (gpointer handle, gboolean state, gboolean broadcast);
+
+gboolean
+mono_w32handle_issignalled (gpointer handle);
+
+int
+mono_w32handle_lock_handle (gpointer handle);
+
+int
+mono_w32handle_trylock_handle (gpointer handle);
+
+int
+mono_w32handle_unlock_handle (gpointer handle);
+
+int
+mono_w32handle_lock_signal_mutex (void);
+
+int
+mono_w32handle_unlock_signal_mutex (void);
+
+#endif /* !defined(HOST_WIN32) */
+
+#endif /* _MONO_UTILS_W32HANDLE_H_ */
index 486f7866be2d0b45c247cbe011dae9bbe459afc0..bcd711d0f5a8d1919e14d0746597bf6e8195ab7a 100644 (file)
@@ -4,7 +4,12 @@
 /*.suo
 /*.sdf
 /*.opensdf
+/*.opendb
+mono.VC.db
 /ipch/
 /Win32/
 /x64/
-/include/
\ No newline at end of file
+/include/
+/package/
+/build/
+/dist/
diff --git a/msvc/build-all.vcxproj b/msvc/build-all.vcxproj
new file mode 100644 (file)
index 0000000..0626d25
--- /dev/null
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{5362490B-8516-44EE-9987-014C015A080A}</ProjectGuid>\r
+    <RootNamespace>buildall</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="Shared">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <PreBuildEvent>\r
+      <Command>\r
+      </Command>\r
+    </PreBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <PreBuildEvent>\r
+      <Command>\r
+      </Command>\r
+    </PreBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PreBuildEvent>\r
+      <Command>\r
+      </Command>\r
+    </PreBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PreBuildEvent>\r
+      <Command>\r
+      </Command>\r
+    </PreBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="build-init.vcxproj">\r
+      <Project>{92ae7622-5f58-4234-9a26-9ec71876b3f4}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/build-all.vcxproj.filters b/msvc/build-all.vcxproj.filters
new file mode 100644 (file)
index 0000000..ef1ebf5
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
\ No newline at end of file
diff --git a/msvc/build-init.vcxproj b/msvc/build-init.vcxproj
new file mode 100644 (file)
index 0000000..ee690bc
--- /dev/null
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{92AE7622-5F58-4234-9A26-9EC71876B3F4}</ProjectGuid>\r
+    <RootNamespace>buildinit</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="Shared">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <PostBuildEvent>\r
+      <Command>winsetup.bat</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <PostBuildEvent>\r
+      <Command>winsetup.bat</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>winsetup.bat</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>winsetup.bat</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/build-init.vcxproj.filters b/msvc/build-init.vcxproj.filters
new file mode 100644 (file)
index 0000000..ef1ebf5
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
\ No newline at end of file
diff --git a/msvc/build-install.vcxproj b/msvc/build-install.vcxproj
new file mode 100644 (file)
index 0000000..a50201f
--- /dev/null
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{A9DC644B-9171-4FCD-BF21-2CC6D055FC40}</ProjectGuid>\r
+    <RootNamespace>buildinstall</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="Shared">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <PostBuildEvent>\r
+      <Command>.\install.bat  $(Platform) $(Configuration) "$(MONO_BUILD_DIR_PREFIX)" "$(MONO_INSTALL_DIR_PREFIX)" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <PostBuildEvent>\r
+      <Command>.\install.bat  $(Platform) $(Configuration) "$(MONO_BUILD_DIR_PREFIX)" "$(MONO_INSTALL_DIR_PREFIX)" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>.\install.bat  $(Platform) $(Configuration) "$(MONO_BUILD_DIR_PREFIX)" "$(MONO_INSTALL_DIR_PREFIX)" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>.\install.bat  $(Platform) $(Configuration) "$(MONO_BUILD_DIR_PREFIX)" "$(MONO_INSTALL_DIR_PREFIX)" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="build-package.vcxproj">\r
+      <Project>{b6e563b8-7f57-4f7f-9439-f2405d4e2522}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/build-install.vcxproj.filters b/msvc/build-install.vcxproj.filters
new file mode 100644 (file)
index 0000000..ef1ebf5
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
\ No newline at end of file
diff --git a/msvc/build-package.vcxproj b/msvc/build-package.vcxproj
new file mode 100644 (file)
index 0000000..b4f6dab
--- /dev/null
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{B6E563B8-7F57-4F7F-9439-F2405D4E2522}</ProjectGuid>\r
+    <RootNamespace>buildpackage</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="Shared">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <PostBuildEvent>\r
+      <Command>.\package.bat  $(Platform) $(Configuration) "$(MONO_BUILD_DIR_PREFIX)" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <PostBuildEvent>\r
+      <Command>.\package.bat  $(Platform) $(Configuration) "$(MONO_BUILD_DIR_PREFIX)" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>.\package.bat  $(Platform) $(Configuration) "$(MONO_BUILD_DIR_PREFIX)" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>.\package.bat  $(Platform) $(Configuration) "$(MONO_BUILD_DIR_PREFIX)" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="build-all.vcxproj">\r
+      <Project>{5362490b-8516-44ee-9987-014c015a080a}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/build-package.vcxproj.filters b/msvc/build-package.vcxproj.filters
new file mode 100644 (file)
index 0000000..ef1ebf5
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
\ No newline at end of file
diff --git a/msvc/compare-config-content.ps1 b/msvc/compare-config-content.ps1
new file mode 100644 (file)
index 0000000..0ed84ba
--- /dev/null
@@ -0,0 +1,51 @@
+##############################################################################
+##
+## compare-config-content
+##
+##############################################################################
+
+<#
+
+.SYNOPSIS
+
+Compares mono build configuration content detecting diff's.
+
+#>
+
+param(
+    ## first config source to compare.
+    $mono_config_source1,
+
+    ## second config source to compare.
+    $mono_config_source2
+)
+
+if ((Test-Path -isvalid $mono_config_source1) -And (Test-Path $mono_config_source1))
+{
+       $mono_config_source1_content = Get-Content $mono_config_source1
+}
+else
+{
+       $mono_config_source1_content = $mono_config_source1
+}
+
+if ((Test-Path -isvalid $mono_config_source2) -And (Test-Path $mono_config_source2))
+{
+       $mono_config_source2_content = Get-Content $mono_config_source2
+}
+else
+{
+       $mono_config_source2_content = $mono_config_source2
+}
+
+## Compare content.
+$comparedLines = Compare-Object $mono_config_source1_content $mono_config_source2_content -IncludeEqual | Sort-Object { $_.InputObject.ReadCount }
+$comparedLines | foreach {
+    if($_.SideIndicator -ne "==")
+    {
+               Write-Host "Changes detected."
+               exit 1;
+    }
+}
+
+exit 0;
\ No newline at end of file
diff --git a/msvc/compare-config-files.ps1 b/msvc/compare-config-files.ps1
new file mode 100644 (file)
index 0000000..9122f1e
--- /dev/null
@@ -0,0 +1,58 @@
+##############################################################################
+##
+## compare-config-files
+##
+##############################################################################
+
+<#
+
+.SYNOPSIS
+
+Compares mono build configuration files detecting incompatible changes.
+
+#>
+
+param(
+    ## winconfig header file.
+    $mono_winconfig,
+
+    ## config header file.
+    $mono_config,
+
+       ## The master configuration file, optional.
+       $mono_config_ac
+)
+
+## Get the content from each config file
+$mono_winconfig_content = Get-Content $mono_winconfig
+$mono_config_content = Get-Content $mono_config
+
+## Compare config files.
+$comparedLines = Compare-Object $mono_winconfig_content $mono_config_content -IncludeEqual | Sort-Object { $_.InputObject.ReadCount }
+
+$comparedLines | foreach {
+
+    if($_.SideIndicator -ne "==")
+    {
+               ##Look for diffs.
+               $mono_version = (Select-String -InputObject $_.InputObject -pattern '#define VERSION \"(.*)\"')
+               if ($mono_version -eq $null) {
+                       Write-Host "Changes detected, versions doesn't match. Configuration must to be replaced."
+                       exit 1;
+               }
+    }
+}
+
+if ($mono_config_ac -ne $null -And $mono_config_ac -ne "") {
+
+       $mono_version_ac = (Select-String -path $mono_config_ac -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value
+       $mono_version = (Select-String -path $mono_config -pattern '#define VERSION \"(.*)\"').Matches[0].Groups[1].Value
+
+       if($mono_version_ac -ne $mono_version)
+       {
+               Write-Host "Changes detected, versions doesn't match. Configuration must to be replaced."
+               exit 1;
+       }
+}
+
+exit 0;
index 129314ca64a7c0b5f894069502d3cd2ff1cc78af..7d588b915df6e8e499648bbd642f9bad0b5a96b0 100755 (executable)
@@ -30,7 +30,7 @@ push @symbols, "MonoFixupCorEE";
 
 open (OUT, ">$outfile") || die "Cannot open '$outfile': $!\n";
 print OUT "; file generated by create-windef.pl\n";
-print OUT "LIBRARY $dllname\nEXPORTS\n";
+print OUT "EXPORTS\n";
 print OUT join ("\n", @symbols);
 print OUT "\n";
 
index b3d0229f79d09827dabf9277216c18ab9caae03a..94a7127d7318cad19bd892a6f7e50eb800455856 100644 (file)
@@ -1,14 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug_SGen|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug_SGen|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
       <Platform>Win32</Platform>\r
@@ -17,14 +9,6 @@
       <Configuration>Debug</Configuration>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Release|Win32">\r
       <Configuration>Release</Configuration>\r
       <Platform>Win32</Platform>\r
     <ProjectGuid>{158073ED-99AE-4196-9EDC-DDB2344F8466}</ProjectGuid>\r
     <RootNamespace>eglib</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\lib\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\lib\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\lib\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\lib\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
-    </PreBuildEvent>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level4</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-    </ClCompile>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-    <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_EGLIB_SOURCE_DIR);$(MONO_EGLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level4</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-    </ClCompile>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
-    </PreBuildEvent>\r
-    <ClCompile>\r
-      <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level4</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
   </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <AdditionalIncludeDirectories>$(MONO_EGLIB_SOURCE_DIR);$(MONO_EGLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level4</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <Midl>\r
       <TargetEnvironment>X64</TargetEnvironment>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_EGLIB_SOURCE_DIR);$(MONO_EGLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level4</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-    </ClCompile>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-    <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level4</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <Midl>\r
       <TargetEnvironment>X64</TargetEnvironment>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <AdditionalIncludeDirectories>$(MONO_EGLIB_SOURCE_DIR);$(MONO_EGLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level4</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
   </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-    <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level4</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-    </ClCompile>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_eglib|Win32'">\r
-    <ClCompile />\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_eglib|Win32'">\r
-    <ClCompile />\r
-  </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\eglib\src\garray.c" />\r
     <ClCompile Include="..\eglib\src\gbytearray.c" />\r
     <ClCompile Include="..\eglib\src\gtimer-win32.c" />\r
     <ClCompile Include="..\eglib\src\gunicode.c" />\r
     <ClCompile Include="..\eglib\src\gutf8.c" />\r
-    <ClCompile Include="..\eglib\src\vasprintf.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="..\eglib\src\glib.h" />\r
     <ClInclude Include="..\eglib\src\gmodule.h" />\r
     <ClInclude Include="..\eglib\src\sort.frag.h" />\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="build-init.vcxproj">\r
+      <Project>{92ae7622-5f58-4234-9a26-9ec71876b3f4}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
-</Project>
\ No newline at end of file
+</Project>\r
diff --git a/msvc/eglib.vcxproj.filters b/msvc/eglib.vcxproj.filters
new file mode 100644 (file)
index 0000000..680ff1a
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\eglib\src\garray.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gbytearray.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gdate-win32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gdir-win32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gerror.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gfile.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gfile-posix.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gfile-win32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\ghashtable.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\giconv.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\glist.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gmarkup.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gmem.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gmisc-win32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gqueue.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gmodule-win32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\goutput.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gpath.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gpattern.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gptrarray.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gqsort.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gshell.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gslist.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gspawn.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gstr.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gstring.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gtimer-win32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gunicode.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\gutf8.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\src\vasprintf.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\eglib\src\glib.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\eglib\src\gmodule.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\eglib\src\sort.frag.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{d16b81e3-5093-424e-a5d4-e7dd8da49dce}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{b9df2a0f-4f98-4451-a22e-c731a46eff24}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{38a39ff1-842b-431b-b54b-24094e8283eb}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 001463f7af21b3eadd9fc8e0a0516b34bb01a61a..7183d6f4a80004ba495fc185e0ac61c284c27f57 100644 (file)
@@ -1,14 +1,6 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug_SGen|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug_SGen|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
       <Platform>Win32</Platform>\r
@@ -17,14 +9,6 @@
       <Configuration>Debug</Configuration>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Release|Win32">\r
       <Configuration>Release</Configuration>\r
       <Platform>Win32</Platform>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
   </ItemGroup>\r
-  <Import Project="mono.props" />\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{B7098DFA-31E6-4006-8A15-1C9A4E925149}</ProjectGuid>\r
     <RootNamespace>genmdesc</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\obj\$(ProjectName)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\obj\$(ProjectName)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\obj\$(ProjectName)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\obj\$(ProjectName)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LinkIncremental>true</LinkIncremental>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <PreBuildEvent>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <Culture>0x0409</Culture>\r
-    </ResourceCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>runmdesc.bat "$(TargetPath)" $(Platform)</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-    <PreBuildEvent>\r
-      <Command>\r
-      </Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TypeLibraryName>.\./VSDependancies/genmdesc___Win32_Debug/genmdesc.tlb</TypeLibraryName>\r
-      <HeaderFileName>\r
-      </HeaderFileName>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_LIBGC_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>eglib.lib;libmonoutils.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX86</TargetMachine>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_LIBGC_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_DEBUG;__x86_64__;TARGET_AMD64;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;_CONSOLE;HAVE_CONFIG_H;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>runmdesc.bat "$(TargetPath)" $(Platform)</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-    <PreBuildEvent>\r
-      <Command>\r
-      </Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-      <TypeLibraryName>.\./VSDependancies/genmdesc___Win32_Debug/genmdesc.tlb</TypeLibraryName>\r
-      <HeaderFileName>\r
-      </HeaderFileName>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_DEBUG;__x86_64__;TARGET_AMD64;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;_CONSOLE;HAVE_CONFIG_H;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <Culture>0x0409</Culture>\r
-    </ResourceCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>eglib.lib;libmonoutils.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <Culture>0x0409</Culture>\r
-    </ResourceCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <SubSystem>Console</SubSystem>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>runmdesc.bat "$(TargetPath)" $(Platform)</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-    <PreBuildEvent>\r
-      <Command>\r
-      </Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TypeLibraryName>.\Release/genmdesc.tlb</TypeLibraryName>\r
-      <HeaderFileName>\r
-      </HeaderFileName>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>MinSpace</Optimization>\r
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_LIBGC_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>eglib.lib;libmonoutils.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX86</TargetMachine>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_LIBGC_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>NDEBUG;__x86_64__;TARGET_AMD64;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;_CONSOLE;HAVE_CONFIG_H;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <SubSystem>Console</SubSystem>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>runmdesc.bat "$(TargetPath)" $(Platform)</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-    <PreBuildEvent>\r
-      <Command>\r
-      </Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-      <TypeLibraryName>.\Release/genmdesc.tlb</TypeLibraryName>\r
-      <HeaderFileName>\r
-      </HeaderFileName>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>MinSpace</Optimization>\r
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>NDEBUG;__x86_64__;TARGET_AMD64;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;_CONSOLE;HAVE_CONFIG_H;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <Culture>0x0409</Culture>\r
-    </ResourceCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>eglib.lib;libmonoutils.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
       </PrecompiledHeader>\r
       <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-      </PrecompiledHeader>\r
-      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</BrowseInformation>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
       </PrecompiledHeader>\r
       <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-      </PrecompiledHeader>\r
-      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</BrowseInformation>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
       </PrecompiledHeader>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-      </PrecompiledHeader>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
       </PrecompiledHeader>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-      </PrecompiledHeader>\r
     </ClCompile>\r
     <ClCompile Include="..\mono\mini\helpers.c">\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
       </PrecompiledHeader>\r
       <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-      </PrecompiledHeader>\r
-      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</BrowseInformation>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
       </PrecompiledHeader>\r
       <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-      </PrecompiledHeader>\r
-      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</BrowseInformation>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
       </PrecompiledHeader>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-      </PrecompiledHeader>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
       </PrecompiledHeader>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-      </PrecompiledHeader>\r
     </ClCompile>\r
     <ClCompile Include="..\mono\utils\monobitset.c">\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
       </PrecompiledHeader>\r
       <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-      </PrecompiledHeader>\r
-      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</BrowseInformation>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
       </PrecompiledHeader>\r
       <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-      </PrecompiledHeader>\r
-      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</BrowseInformation>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
       </PrecompiledHeader>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-      </PrecompiledHeader>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
       </PrecompiledHeader>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-      </PrecompiledHeader>\r
     </ClCompile>\r
     <ClCompile Include="..\mono\metadata\opcodes.c">\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
       </PrecompiledHeader>\r
       <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-      </PrecompiledHeader>\r
-      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</BrowseInformation>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
       </PrecompiledHeader>\r
       <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-      </PrecompiledHeader>\r
-      <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</BrowseInformation>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
       </PrecompiledHeader>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-      </PrecompiledHeader>\r
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
       </PrecompiledHeader>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-      </PrecompiledHeader>\r
     </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/genmdesc.vcxproj.filters b/msvc/genmdesc.vcxproj.filters
new file mode 100644 (file)
index 0000000..bd94041
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\mini\genmdesc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\helpers.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\monobitset.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\opcodes.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{da9e2258-c654-445a-82e4-ddbee1f7e961}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{439ee672-2e40-4530-a4a0-38fc5a709175}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{d51a0903-747f-410b-9621-22b208eeb41b}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/install.bat b/msvc/install.bat
new file mode 100644 (file)
index 0000000..1a43399
--- /dev/null
@@ -0,0 +1,96 @@
+@ECHO off
+
+SET PLATFORM=%1
+SET CONFIG=%2
+SET BUILD_DIR=%3
+SET INSTALL_DIR=%4
+SET ARGUMENTS=%5
+
+SET XCOPY_COMMAND=%windir%\system32\xcopy
+
+SET BUILD_DIR=%BUILD_DIR:"=%
+SET BUILD_DIR=%BUILD_DIR:/=\%
+SET INSTALL_DIR=%INSTALL_DIR:"=%
+SET INSTALL_DIR=%INSTALL_DIR:/=\%
+
+IF "" == "%PLATFORM%" (
+       ECHO Error: No platform parameter set.
+       GOTO ON_ERROR
+
+       )
+IF "" == "%CONFIG%" (
+       ECHO Error: No configuration parameter set.
+       GOTO ON_ERROR
+)
+
+IF "" == "%BUILD_DIR%" (
+       ECHO Error: No MONO_BUILD_DIR_PREFIX parameter set.
+       GOTO ON_ERROR
+)
+
+IF "" == "%INSTALL_DIR%" (
+       ECHO Error: No MONO_INSTALLATION_DIR_PREFIX parameter set.
+       GOTO ON_ERROR
+)
+
+IF "\" == "%BUILD_DIR:~-1%" (
+       SET BUILD_DIR=%BUILD_DIR:~0,-1%
+)
+
+IF "\" == "%INSTALL_DIR:~-1%" (
+       SET INSTALL_DIR=%INSTALL_DIR:~0,-1%
+)
+
+IF NOT EXIST %BUILD_DIR% (
+       ECHO Error: '%BUILD_DIR%', directory doesn't eixst.
+       GOTO ON_ERROR
+)
+
+IF NOT EXIST %INSTALL_DIR% (
+       ECHO Install directory '%INSTALL_DIR%', directory doesn't eixst, creating....
+       mkdir "%INSTALL_DIR%"
+       ECHO Install directory '%INSTALL_DIR%' created.
+)
+
+SET PACKAGE_DIR=%BUILD_DIR%\package\%PLATFORM%\%CONFIG%
+
+IF NOT EXIST %PACKAGE_DIR% (
+       ECHO Error: '%PACKAGE_DIR%' directory unavailable.
+       GOTO ON_ERROR
+)
+
+SET OPTIONS=/s /e /y
+
+IF "-v" == "%ARGUMENTS%" (
+       SET OPTIONS=/f /s /e /y
+)
+
+IF "-q" == "%ARGUMENTS%" (
+       SET "OPTIONS=/s /e /q /y"
+)
+
+ECHO Installing mono build %PLATFORM% %CONFIG% from %PACKAGE_DIR% into %INSTALL_DIR% ...
+
+SET RUN=%XCOPY_COMMAND% "%PACKAGE_DIR%\*.*" "%INSTALL_DIR%" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+ECHO Installing of mono build %PLATFORM% %CONFIG% from %PACKAGE_DIR% into %INSTALL_DIR% DONE.
+
+EXIT /b 0
+
+:ON_ERROR
+       ECHO "install.bat [win32|x64] [Debug|Release] [MONO_BUILD_DIR_PREFIX] [MONO_INSTALLATION_DIR_PREFIX] [ARGUMENTS]"
+       EXIT /b 1
+
+@ECHO on
+
+:runCommand
+
+       IF "-q" == "%~2" (
+               %~1 >nul 2>&1
+       ) ELSE (
+               %~1
+       )
+
+goto :EOF
+       
\ No newline at end of file
index 2be0904f02ff1167dd55961a015e7ff56cc5b356..6999c3536b42fcaa8c956e6483363e141e7a794a 100644 (file)
@@ -1,14 +1,6 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug_SGen|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug_SGen|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
       <Platform>Win32</Platform>\r
@@ -17,14 +9,6 @@
       <Configuration>Debug</Configuration>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Release|Win32">\r
       <Configuration>Release</Configuration>\r
       <Platform>Win32</Platform>\r
     <ProjectGuid>{EB56000B-C80B-4E8B-908D-D84D31B517D3}</ProjectGuid>\r
     <RootNamespace>libgc</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\lib\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\lib\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\lib\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\lib\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_DEBUG;__i386__;TARGET_X86;i386;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;__STDC__;PACKAGE_NAME="libgc-mono";PACKAGE_TARNAME="libgc-mono";PACKAGE_VERSION="6.6";PACKAGE_STRING="libgc-mono 6.6";PACKAGE_BUGREPORT="Hans_Boehm%40hp.com";GC_WIN32_THREADS=1;NO_GETENV=1;GC_INSIDE_DLL=1;GC_NOT_DLL=1;STDC_HEADERS=1;HAVE_SYS_TYPES_H=1;HAVE_SYS_STAT_H=1;HAVE_STDLIB_H=1;HAVE_STRING_H=1;HAVE_MEMORY_H=1;HAVE_STRINGS_H=1;HAVE_INTTYPES_H=1;HAVE_STDINT_H=1;HAVE_UNISTD_H=1;SILENT=1;NO_SIGNALS=1;NO_EXECUTE_PERMISSION=1;JAVA_FINALIZATION=1;GC_GCJ_SUPPORT=1;ATOMIC_UNCOLLECTABLE=1;_IN_LIBGC=1;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-      <DisableSpecificWarnings>4311;4312;4996;4005;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <Lib>\r
-      <OutputFile>$(OutDir)libgc.lib</OutputFile>\r
-    </Lib>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_LIBGC_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_DEBUG;__i386__;TARGET_X86;i386;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;__STDC__;PACKAGE_NAME="libgc-mono";PACKAGE_TARNAME="libgc-mono";PACKAGE_VERSION="6.6";PACKAGE_STRING="libgc-mono 6.6";PACKAGE_BUGREPORT="Hans_Boehm%40hp.com";GC_WIN32_THREADS=1;NO_GETENV=1;GC_INSIDE_DLL=1;GC_NOT_DLL=1;STDC_HEADERS=1;HAVE_SYS_TYPES_H=1;HAVE_SYS_STAT_H=1;HAVE_STDLIB_H=1;HAVE_STRING_H=1;HAVE_MEMORY_H=1;HAVE_STRINGS_H=1;HAVE_INTTYPES_H=1;HAVE_STDINT_H=1;HAVE_UNISTD_H=1;SILENT=1;NO_SIGNALS=1;NO_EXECUTE_PERMISSION=1;JAVA_FINALIZATION=1;GC_GCJ_SUPPORT=1;ATOMIC_UNCOLLECTABLE=1;_IN_LIBGC=1;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <DisableSpecificWarnings>4311;4312;4996;4005;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <WarningLevel>Level1</WarningLevel>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Lib>\r
-      <OutputFile>$(OutDir)libgc.lib</OutputFile>\r
+      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
     </Lib>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>NDEBUG;__i386__;TARGET_X86;i386;i386;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;__STDC__;PACKAGE_NAME="libgc-mono";PACKAGE_TARNAME="libgc-mono";PACKAGE_VERSION="6.6";PACKAGE_STRING="libgc-mono 6.6";PACKAGE_BUGREPORT="Hans_Boehm%40hp.com";GC_WIN32_THREADS=1;NO_GETENV=1;GC_INSIDE_DLL=1;GC_NOT_DLL=1;STDC_HEADERS=1;HAVE_SYS_TYPES_H=1;HAVE_SYS_STAT_H=1;HAVE_STDLIB_H=1;HAVE_STRING_H=1;HAVE_MEMORY_H=1;HAVE_STRINGS_H=1;HAVE_INTTYPES_H=1;HAVE_STDINT_H=1;HAVE_UNISTD_H=1;SILENT=1;NO_SIGNALS=1;NO_EXECUTE_PERMISSION=1;JAVA_FINALIZATION=1;GC_GCJ_SUPPORT=1;ATOMIC_UNCOLLECTABLE=1;_IN_LIBGC=1;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-    </ClCompile>\r
-    <Lib>\r
-      <OutputFile>$(OutDir)libgc.lib</OutputFile>\r
-    </Lib>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-    <ClCompile>\r
-      <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_LIBGC_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>NDEBUG;__i386__;TARGET_X86;i386;i386;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;__STDC__;PACKAGE_NAME="libgc-mono";PACKAGE_TARNAME="libgc-mono";PACKAGE_VERSION="6.6";PACKAGE_STRING="libgc-mono 6.6";PACKAGE_BUGREPORT="Hans_Boehm%40hp.com";GC_WIN32_THREADS=1;NO_GETENV=1;GC_INSIDE_DLL=1;GC_NOT_DLL=1;STDC_HEADERS=1;HAVE_SYS_TYPES_H=1;HAVE_SYS_STAT_H=1;HAVE_STDLIB_H=1;HAVE_STRING_H=1;HAVE_MEMORY_H=1;HAVE_STRINGS_H=1;HAVE_INTTYPES_H=1;HAVE_STDINT_H=1;HAVE_UNISTD_H=1;SILENT=1;NO_SIGNALS=1;NO_EXECUTE_PERMISSION=1;JAVA_FINALIZATION=1;GC_GCJ_SUPPORT=1;ATOMIC_UNCOLLECTABLE=1;_IN_LIBGC=1;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Lib>\r
-      <OutputFile>$(OutDir)libgc.lib</OutputFile>\r
+      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
     </Lib>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_DEBUG;__x86_64__;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;__STDC__;PACKAGE_NAME="libgc-mono";PACKAGE_TARNAME="libgc-mono";PACKAGE_VERSION="6.6";PACKAGE_STRING="libgc-mono 6.6";PACKAGE_BUGREPORT="Hans_Boehm%40hp.com";GC_WIN32_THREADS=1;NO_GETENV=1;GC_INSIDE_DLL=1;GC_NOT_DLL=1;STDC_HEADERS=1;HAVE_SYS_TYPES_H=1;HAVE_SYS_STAT_H=1;HAVE_STDLIB_H=1;HAVE_STRING_H=1;HAVE_MEMORY_H=1;HAVE_STRINGS_H=1;HAVE_INTTYPES_H=1;HAVE_STDINT_H=1;HAVE_UNISTD_H=1;SILENT=1;NO_SIGNALS=1;NO_EXECUTE_PERMISSION=1;JAVA_FINALIZATION=1;GC_GCJ_SUPPORT=1;ATOMIC_UNCOLLECTABLE=1;_IN_LIBGC=1;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-      <DisableSpecificWarnings>4311;4312;4996;4005;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <Lib>\r
-      <OutputFile>$(OutDir)libgc.lib</OutputFile>\r
-    </Lib>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_LIBGC_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_DEBUG;__x86_64__;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;__STDC__;PACKAGE_NAME="libgc-mono";PACKAGE_TARNAME="libgc-mono";PACKAGE_VERSION="6.6";PACKAGE_STRING="libgc-mono 6.6";PACKAGE_BUGREPORT="Hans_Boehm%40hp.com";GC_WIN32_THREADS=1;NO_GETENV=1;GC_INSIDE_DLL=1;GC_NOT_DLL=1;STDC_HEADERS=1;HAVE_SYS_TYPES_H=1;HAVE_SYS_STAT_H=1;HAVE_STDLIB_H=1;HAVE_STRING_H=1;HAVE_MEMORY_H=1;HAVE_STRINGS_H=1;HAVE_INTTYPES_H=1;HAVE_STDINT_H=1;HAVE_UNISTD_H=1;SILENT=1;NO_SIGNALS=1;NO_EXECUTE_PERMISSION=1;JAVA_FINALIZATION=1;GC_GCJ_SUPPORT=1;ATOMIC_UNCOLLECTABLE=1;_IN_LIBGC=1;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <DisableSpecificWarnings>4311;4312;4996;4005;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Lib>\r
-      <OutputFile>$(OutDir)libgc.lib</OutputFile>\r
+      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
     </Lib>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>NDEBUG;__x86_64__;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;__STDC__;PACKAGE_NAME="libgc-mono";PACKAGE_TARNAME="libgc-mono";PACKAGE_VERSION="6.6";PACKAGE_STRING="libgc-mono 6.6";PACKAGE_BUGREPORT="Hans_Boehm%40hp.com";GC_WIN32_THREADS=1;NO_GETENV=1;GC_INSIDE_DLL=1;GC_NOT_DLL=1;STDC_HEADERS=1;HAVE_SYS_TYPES_H=1;HAVE_SYS_STAT_H=1;HAVE_STDLIB_H=1;HAVE_STRING_H=1;HAVE_MEMORY_H=1;HAVE_STRINGS_H=1;HAVE_INTTYPES_H=1;HAVE_STDINT_H=1;HAVE_UNISTD_H=1;SILENT=1;NO_SIGNALS=1;NO_EXECUTE_PERMISSION=1;JAVA_FINALIZATION=1;GC_GCJ_SUPPORT=1;ATOMIC_UNCOLLECTABLE=1;_IN_LIBGC=1;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-    </ClCompile>\r
-    <Lib>\r
-      <OutputFile>$(OutDir)libgc.lib</OutputFile>\r
-    </Lib>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_LIBGC_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>NDEBUG;__x86_64__;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;__STDC__;PACKAGE_NAME="libgc-mono";PACKAGE_TARNAME="libgc-mono";PACKAGE_VERSION="6.6";PACKAGE_STRING="libgc-mono 6.6";PACKAGE_BUGREPORT="Hans_Boehm%40hp.com";GC_WIN32_THREADS=1;NO_GETENV=1;GC_INSIDE_DLL=1;GC_NOT_DLL=1;STDC_HEADERS=1;HAVE_SYS_TYPES_H=1;HAVE_SYS_STAT_H=1;HAVE_STDLIB_H=1;HAVE_STRING_H=1;HAVE_MEMORY_H=1;HAVE_STRINGS_H=1;HAVE_INTTYPES_H=1;HAVE_STDINT_H=1;HAVE_UNISTD_H=1;SILENT=1;NO_SIGNALS=1;NO_EXECUTE_PERMISSION=1;JAVA_FINALIZATION=1;GC_GCJ_SUPPORT=1;ATOMIC_UNCOLLECTABLE=1;_IN_LIBGC=1;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;WIN32_THREADS;FD_SETSIZE=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Lib>\r
-      <OutputFile>$(OutDir)libgc.lib</OutputFile>\r
+      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
     </Lib>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
diff --git a/msvc/libgc.vcxproj.filters b/msvc/libgc.vcxproj.filters
new file mode 100644 (file)
index 0000000..6453cc0
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\libgc\allchblk.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\alloc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\blacklst.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\dbg_mlc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\dyn_load.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\finalize.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\gcj_mlc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\headers.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\mach_dep.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\malloc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\mallocx.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\mark.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\mark_rts.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\misc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\new_hblk.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\obj_map.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\os_dep.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\ptr_chck.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\reclaim.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\stubborn.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\typd_mlc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\libgc\win32_threads.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\libgc\include\gc.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\libgc\include\private\gc_hdrs.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\libgc\include\private\gc_locks.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\libgc\include\gc_mark.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\libgc\include\private\gc_pmark.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\libgc\include\private\gc_priv.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\libgc\include\private\gcconfig.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{699a2844-7533-4292-9d33-c8f0ff83fc43}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{adac5b81-1d62-4900-8b59-a68c6636c687}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{b3da4a6f-b547-4b41-9e7e-3b76a2bda990}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/libgcmonosgen.vcxproj b/msvc/libgcmonosgen.vcxproj
new file mode 100644 (file)
index 0000000..52dd0ba
--- /dev/null
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\sgen\sgen-alloc.c" />\r
+    <ClCompile Include="..\mono\metadata\sgen-bridge.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-array-list.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-cardtable.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-debug.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-descriptor.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-gc.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-gchandles.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-gray.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-hash-table.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-internal.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-los.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-marksweep.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-memory-governor.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-nursery-allocator.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-pinning-stats.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-pinning.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-pointer-queue.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-protocol.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-qsort.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-simple-nursery.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-split-nursery.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-thread-pool.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-workers.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-fin-weak-hash.c" />\r
+    <ClCompile Include="..\mono\sgen\sgen-layout-stats.c" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\mono\sgen\gc-internal-agnostic.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-archdep.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-array-list.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-cardtable.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-client.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-conf.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-copy-object.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-descriptor.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-gc.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-gray.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-hash-table.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-layout-stats.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-major-copy-object.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-marksweep-drain-gray-stack.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-marksweep-scan-object-concurrent.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-memory-governor.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-minor-copy-object.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-minor-scan-object.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-pinning.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-pointer-queue.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-protocol-def.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-protocol.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-qsort.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-scan-object.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-tagged-pointer.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-thread-pool.h" />\r
+    <ClInclude Include="..\mono\sgen\sgen-workers.h" />\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{C36612BD-22D3-4B95-85E2-7FDC4FC5D740}</ProjectGuid>\r
+    <Keyword>Win32Proj</Keyword>\r
+    <RootNamespace>libmonosgen</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+    <ProjectName>libgcmonosgen</ProjectName>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)</TargetName>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <OmitFramePointers>false</OmitFramePointers>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/libgcmonosgen.vcxproj.filters b/msvc/libgcmonosgen.vcxproj.filters
new file mode 100644 (file)
index 0000000..d40313b
--- /dev/null
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\sgen\sgen-alloc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-bridge.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-cardtable.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-debug.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-descriptor.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-fin-weak-hash.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-gc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-gchandles.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-gray.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-hash-table.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-internal.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-layout-stats.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-los.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-marksweep.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-memory-governor.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-nursery-allocator.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-pinning.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-pinning-stats.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-pointer-queue.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-protocol.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-qsort.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-simple-nursery.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-split-nursery.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-thread-pool.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-workers.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\sgen\sgen-array-list.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\mono\sgen\gc-internal-agnostic.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-archdep.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-cardtable.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-client.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-conf.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-copy-object.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-descriptor.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-gc.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-gray.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-hash-table.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-layout-stats.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-major-copy-object.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-marksweep-drain-gray-stack.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-marksweep-scan-object-concurrent.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-memory-governor.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-minor-copy-object.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-minor-scan-object.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-pinning.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-pointer-queue.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-protocol.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-protocol-def.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-qsort.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-scan-object.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-tagged-pointer.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-thread-pool.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-workers.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\sgen-array-list.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{62eb1a19-26dd-4c17-8bd0-0a734673637d}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{0de15c24-0de8-4592-88fc-d16d0ad05d21}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{ede39adb-354b-436b-9fc1-0e7667901ab6}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/libmono-static.vcxproj b/msvc/libmono-static.vcxproj
new file mode 100644 (file)
index 0000000..6628317
--- /dev/null
@@ -0,0 +1,340 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\metadata\remoting.c" />\r
+    <ClCompile Include="..\mono\mini\alias-analysis.c" />\r
+    <ClCompile Include="..\mono\mini\arch-stubs.c" />\r
+    <ClCompile Include="..\mono\mini\exceptions-amd64.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\exceptions-x86.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-amd64.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-amd64-gsharedvt.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-runtime.c" />\r
+    <ClCompile Include="..\mono\mini\mini-windows.c" />\r
+    <ClCompile Include="..\mono\mini\mini-x86.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-x86-gsharedvt.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini.c" />\r
+    <ClInclude Include="..\mono\metadata\remoting.h" />\r
+    <ClInclude Include="..\mono\mini\ir-emit.h" />\r
+    <ClCompile Include="..\mono\mini\method-to-ir.c" />\r
+    <ClCompile Include="..\mono\mini\decompose.c" />\r
+    <ClInclude Include="..\mono\mini\mini-amd64.h">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-amd64-gsharedvt.h">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-x86.h">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini.h" />\r
+    <ClInclude Include="..\mono\mini\seq-points.h" />\r
+    <ClInclude Include="..\mono\mini\version.h" />\r
+    <ClInclude Include="..\mono\mini\optflags-def.h" />\r
+    <ClInclude Include="..\mono\mini\cfgdump.h" />\r
+    <ClCompile Include="..\mono\mini\cfgdump.c" />\r
+    <ClInclude Include="..\mono\mini\jit-icalls.h " />\r
+    <ClCompile Include="..\mono\mini\jit-icalls.c " />\r
+    <ClCompile Include="..\mono\mini\seq-points.c" />\r
+    <ClCompile Include="..\mono\mini\trace.c" />\r
+    <ClInclude Include="..\mono\mini\trace.h" />\r
+    <ClInclude Include="..\mono\mini\patch-info.h" />\r
+    <ClInclude Include="..\mono\mini\mini-ops.h" />\r
+    <ClInclude Include="..\mono\mini\mini-arch.h" />\r
+    <ClCompile Include="..\mono\mini\dominators.c" />\r
+    <ClCompile Include="..\mono\mini\cfold.c" />\r
+    <ClInclude Include="..\mono\mini\regalloc.h" />\r
+    <ClCompile Include="..\mono\mini\helpers.c" />\r
+    <ClCompile Include="..\mono\mini\liveness.c" />\r
+    <ClCompile Include="..\mono\mini\ssa.c" />\r
+    <ClCompile Include="..\mono\mini\abcremoval.c" />\r
+    <ClInclude Include="..\mono\mini\abcremoval.h" />\r
+    <ClCompile Include="..\mono\mini\local-propagation.c" />\r
+    <ClCompile Include="..\mono\mini\driver.c" />\r
+    <ClCompile Include="..\mono\mini\debug-mini.c" />\r
+    <ClCompile Include="..\mono\mini\linear-scan.c" />\r
+    <ClCompile Include="..\mono\mini\aot-compiler.c" />\r
+    <ClCompile Include="..\mono\mini\aot-runtime.c" />\r
+    <ClCompile Include="..\mono\mini\graph.c" />\r
+    <ClCompile Include="..\mono\mini\mini-codegen.c" />\r
+    <ClCompile Include="..\mono\mini\mini-cross-helpers.c" />\r
+    <ClCompile Include="..\mono\mini\mini-exceptions.c" />\r
+    <ClCompile Include="..\mono\mini\mini-exceptions-native-unwinder.c" />\r
+    <ClCompile Include="..\mono\mini\mini-trampolines.c  " />\r
+    <ClCompile Include="..\mono\mini\tramp-amd64.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\tramp-amd64-gsharedvt.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\tramp-x86.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\tramp-x86-gsharedvt.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\branch-opts.c" />\r
+    <ClCompile Include="..\mono\mini\mini-generic-sharing.c" />\r
+    <ClInclude Include="..\mono\mini\simd-methods.h" />\r
+    <ClCompile Include="..\mono\mini\tasklets.c" />\r
+    <ClInclude Include="..\mono\mini\tasklets.h" />\r
+    <ClCompile Include="..\mono\mini\simd-intrinsics.c" />\r
+    <ClInclude Include="..\mono\mini\mini-unwind.h" />\r
+    <ClCompile Include="..\mono\mini\unwind.c" />\r
+    <ClInclude Include="..\mono\mini\image-writer.h" />\r
+    <ClCompile Include="..\mono\mini\image-writer.c" />\r
+    <ClInclude Include="..\mono\mini\dwarfwriter.h" />\r
+    <ClCompile Include="..\mono\mini\dwarfwriter.c" />\r
+    <ClInclude Include="..\mono\mini\mini-gc.h" />\r
+    <ClCompile Include="..\mono\mini\mini-gc.c" />\r
+    <ClInclude Include="..\mono\mini\debugger-agent.h " />\r
+    <ClCompile Include="..\mono\mini\debugger-agent.c" />\r
+    <ClCompile Include="..\mono\mini\xdebug.c" />\r
+    <ClInclude Include="..\mono\mini\mini-llvm.h" />\r
+    <ClInclude Include="..\mono\mini\mini-llvm-cpp.h" />\r
+    <ClCompile Include="..\mono\mini\mini-native-types.c" />\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{CB0D9E92-293C-439C-9AC7-C5F59B6E0772}</ProjectGuid>\r
+    <RootNamespace>libmono-static</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>StaticLibrary</ConfigurationType>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <PreBuildEvent>\r
+      <Command>\r
+      </Command>\r
+    </PreBuildEvent>\r
+    <ClCompile>\r
+      <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
+      <Optimization>Disabled</Optimization>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <MinimalRebuild>true</MinimalRebuild>\r
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <BrowseInformation>false</BrowseInformation>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <DisableSpecificWarnings>4996;4018;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <PreBuildEvent>\r
+      <Command>\r
+      </Command>\r
+    </PreBuildEvent>\r
+    <ClCompile>\r
+      <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
+      <Optimization>Disabled</Optimization>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <MinimalRebuild>true</MinimalRebuild>\r
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <BrowseInformation>false</BrowseInformation>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <DisableSpecificWarnings>4996;4018;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <PreBuildEvent>\r
+      <Command>\r
+      </Command>\r
+    </PreBuildEvent>\r
+    <ClCompile>\r
+      <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <PreBuildEvent>\r
+      <Command>\r
+      </Command>\r
+    </PreBuildEvent>\r
+    <ClCompile>\r
+      <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <PostBuildEvent>\r
+      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <CustomBuildStep Include="..\mono\mini\mini-x86.h">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </CustomBuildStep>\r
+    <CustomBuildStep Include="..\mono\mini\mini-amd64.h">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+    </CustomBuildStep>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="eglib.vcxproj">\r
+      <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="genmdesc.vcxproj">\r
+      <Project>{b7098dfa-31e6-4006-8a15-1c9a4e925149}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libgc.vcxproj">\r
+      <Project>{eb56000b-c80b-4e8b-908d-d84d31b517d3}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libgcmonosgen.vcxproj">\r
+      <Project>{c36612bd-22d3-4b95-85e2-7fdc4fc5d740}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libmonoruntime.vcxproj">\r
+      <Project>{c36612bd-22d3-4b95-85e2-7fdc4fc5d739}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libmonoutils.vcxproj">\r
+      <Project>{8fc2b0c8-51ad-49df-851f-5d01a77a75e4}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/libmono-static.vcxproj.filters b/msvc/libmono-static.vcxproj.filters
new file mode 100644 (file)
index 0000000..75748b8
--- /dev/null
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\mini\abcremoval.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\alias-analysis.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\aot-compiler.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\aot-runtime.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\arch-stubs.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\branch-opts.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\cfold.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\debugger-agent.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\debug-mini.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\decompose.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\dominators.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\driver.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\dwarfwriter.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\exceptions-amd64.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\exceptions-x86.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\graph.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\helpers.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\image-writer.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\jit-icalls.c ">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\linear-scan.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\liveness.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\local-propagation.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\method-to-ir.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-amd64.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-codegen.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-exceptions.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-gc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-generic-sharing.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-native-types.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-runtime.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-trampolines.c  ">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-windows.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-x86.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\remoting.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\seq-points.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\simd-intrinsics.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\ssa.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\tasklets.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\trace.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\tramp-amd64.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\tramp-x86.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\unwind.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\xdebug.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\cfgdump.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-amd64-gsharedvt.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-cross-helpers.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-exceptions-native-unwinder.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\mini-x86-gsharedvt.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\tramp-amd64-gsharedvt.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\mini\tramp-x86-gsharedvt.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\mono\mini\abcremoval.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\debugger-agent.h ">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\dwarfwriter.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\ir-emit.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\image-writer.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\seq-points.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\jit-icalls.h ">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-amd64.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-arch.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-gc.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-llvm.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-llvm-cpp.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-ops.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-unwind.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-x86.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\optflags-def.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\patch-info.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\regalloc.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\remoting.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\simd-methods.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\tasklets.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\trace.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\version.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\cfgdump.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\mini\mini-amd64-gsharedvt.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{bdc9f80b-3045-49d2-bb7b-510450371395}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{f7700495-afaa-4d16-9aac-79d54d10de23}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{5370c3c4-b6ec-4f8a-8b21-ce4e782720a6}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/libmono.bat b/msvc/libmono.bat
new file mode 100644 (file)
index 0000000..6509ac1
--- /dev/null
@@ -0,0 +1,97 @@
+@ECHO off
+
+SET SOURCE_ROOT=%1
+SET TARGET_ROOT=%2
+SET ARGUMENTS=%3
+
+SET XCOPY_COMMAND=%windir%\system32\xcopy
+
+SET TARGET_ROOT=%TARGET_ROOT:"=%
+SET TARGET_ROOT=%TARGET_ROOT:/=\%
+SET SOURCE_ROOT=%SOURCE_ROOT:"=%
+SET SOURCE_ROOT=%SOURCE_ROOT:/=\%
+
+IF "" == "%SOURCE_ROOT%" (
+       ECHO Error: No source root parameter set.
+       GOTO ON_ERROR
+)
+       
+IF "" == "%TARGET_ROOT%" (
+       ECHO Error: No target root parameter set.
+       GOTO ON_ERROR
+)
+
+IF NOT EXIST %SOURCE_ROOT% (
+       ECHO Error: source directory '%SOURCE_ROOT%', directory doesn't eixst.
+       GOTO ON_ERROR
+)
+
+IF NOT EXIST %TARGET_ROOT% (
+       ECHO Target directory '%TARGET_ROOT%', directory doesn't eixst, creating....
+       mkdir %TARGET_ROOT%
+       ECHO Target directory '%TARGET_ROOT%' created.
+)
+
+IF "\" == "%SOURCE_ROOT:~-1%" (
+       SET SOURCE_ROOT=%SOURCE_ROOT:~0,-1%
+)
+
+IF "\" == "%TARGET_ROOT:~-1%" (
+       SET TARGET_ROOT=%TARGET_ROOT:~0,-1%
+)
+
+SET OPTIONS=/y
+
+IF "-v" == "%ARGUMENTS%" (
+       SET OPTIONS=/f /y
+)
+
+IF "-q" == "%ARGUMENTS%" (
+       SET "OPTIONS=/q /y"
+)
+
+ECHO Copying mono include files from %SOURCE_ROOT% to %TARGET_ROOT% ...
+
+SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\cil\opcode.def" "%TARGET_ROOT%\cil\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\mini\jit.h" "%TARGET_ROOT%\jit\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\metadata\*.h" "%TARGET_ROOT%\metadata\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-counters.h" "%TARGET_ROOT%\utils\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-dl-fallback.h" "%TARGET_ROOT%\utils\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-error.h" "%TARGET_ROOT%\utils\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-logger.h" "%TARGET_ROOT%\utils\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-publib.h" "%TARGET_ROOT%\utils\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+ECHO Copying mono include files from %SOURCE_ROOT% to %TARGET_ROOT% DONE.
+
+EXIT /b 0
+
+:ON_ERROR
+       ECHO "libmono.bat [SOURCE_ROOT] [TARGET_ROOT] [ARGUMENTS]"
+       EXIT /b 1
+
+@ECHO on
+
+:runCommand
+
+       IF "-q" == "%~2" (
+               %~1 >nul 2>&1
+       ) ELSE (
+               %~1
+       )
+
+goto :EOF
index 68a0ff55687fc5461ebddaa4d7ee5243583dc12e..3acce45d4bbc5356b29c7993c7e5c5bef8f58108 100644 (file)
@@ -1,14 +1,6 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug_SGen|Win32">\r
-      <Configuration>Debug_SGen</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug_SGen|x64">\r
-      <Configuration>Debug_SGen</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
       <Platform>Win32</Platform>\r
@@ -17,14 +9,6 @@
       <Configuration>Debug</Configuration>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|Win32">\r
-      <Configuration>Release_SGen</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|x64">\r
-      <Configuration>Release_SGen</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Release|Win32">\r
       <Configuration>Release</Configuration>\r
       <Platform>Win32</Platform>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
   </ItemGroup>\r
-  <Import Project="mono.props" />\r
-  <ItemGroup>\r
-    <ClCompile Include="..\mono\metadata\remoting.c" />\r
-    <ClCompile Include="..\mono\mini\alias-analysis.c" />\r
-    <ClCompile Include="..\mono\mini\arch-stubs.c" />\r
-    <ClCompile Include="..\mono\mini\exceptions-amd64.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\exceptions-x86.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\mini-amd64.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\mini-amd64-gsharedvt.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\mini-runtime.c" />\r
-    <ClCompile Include="..\mono\mini\mini-windows.c" />\r
-    <ClCompile Include="..\mono\mini\mini-x86.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\mini-x86-gsharedvt.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\mini.c" />\r
-    <ClInclude Include="..\mono\metadata\remoting.h" />\r
-    <ClInclude Include="..\mono\mini\ir-emit.h" />\r
-    <ClCompile Include="..\mono\mini\method-to-ir.c" />\r
-    <ClCompile Include="..\mono\mini\decompose.c" />\r
-    <ClInclude Include="..\mono\mini\mini-amd64.h">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">true</ExcludedFromBuild>\r
-    </ClInclude>\r
-    <ClInclude Include="..\mono\mini\mini-amd64-gsharedvt.h">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">true</ExcludedFromBuild>\r
-    </ClInclude>\r
-    <ClInclude Include="..\mono\mini\mini-x86.h">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">true</ExcludedFromBuild>\r
-    </ClInclude>\r
-    <ClInclude Include="..\mono\mini\mini.h" />\r
-    <ClInclude Include="..\mono\mini\seq-points.h" />\r
-    <ClInclude Include="..\mono\mini\version.h" />\r
-    <ClInclude Include="..\mono\mini\optflags-def.h" />\r
-    <ClInclude Include="..\mono\mini\cfgdump.h" />\r
-    <ClCompile Include="..\mono\mini\cfgdump.c" />\r
-    <ClInclude Include="..\mono\mini\jit-icalls.h " />\r
-    <ClCompile Include="..\mono\mini\jit-icalls.c " />\r
-    <ClCompile Include="..\mono\mini\seq-points.c" />\r
-    <ClCompile Include="..\mono\mini\trace.c" />\r
-    <ClInclude Include="..\mono\mini\trace.h" />\r
-    <ClInclude Include="..\mono\mini\patch-info.h" />\r
-    <ClInclude Include="..\mono\mini\mini-ops.h" />\r
-    <ClInclude Include="..\mono\mini\mini-arch.h" />\r
-    <ClCompile Include="..\mono\mini\dominators.c" />\r
-    <ClCompile Include="..\mono\mini\cfold.c" />\r
-    <ClInclude Include="..\mono\mini\regalloc.h" />\r
-    <ClCompile Include="..\mono\mini\helpers.c" />\r
-    <ClCompile Include="..\mono\mini\liveness.c" />\r
-    <ClCompile Include="..\mono\mini\ssa.c" />\r
-    <ClCompile Include="..\mono\mini\abcremoval.c" />\r
-    <ClInclude Include="..\mono\mini\abcremoval.h" />\r
-    <ClCompile Include="..\mono\mini\local-propagation.c" />\r
-    <ClCompile Include="..\mono\mini\driver.c" />\r
-    <ClCompile Include="..\mono\mini\debug-mini.c" />\r
-    <ClCompile Include="..\mono\mini\linear-scan.c" />\r
-    <ClCompile Include="..\mono\mini\aot-compiler.c" />\r
-    <ClCompile Include="..\mono\mini\aot-runtime.c" />\r
-    <ClCompile Include="..\mono\mini\graph.c" />\r
-    <ClCompile Include="..\mono\mini\mini-codegen.c" />\r
-    <ClCompile Include="..\mono\mini\mini-cross-helpers.c" />\r
-    <ClCompile Include="..\mono\mini\mini-exceptions.c" />\r
-    <ClCompile Include="..\mono\mini\mini-exceptions-native-unwinder.c" />\r
-    <ClCompile Include="..\mono\mini\mini-trampolines.c  " />\r
-    <ClCompile Include="..\mono\mini\tramp-amd64.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\tramp-amd64-gsharedvt.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\tramp-x86.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\tramp-x86-gsharedvt.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
-    <ClCompile Include="..\mono\mini\branch-opts.c" />\r
-    <ClCompile Include="..\mono\mini\mini-generic-sharing.c" />\r
-    <ClInclude Include="..\mono\mini\simd-methods.h" />\r
-    <ClCompile Include="..\mono\mini\tasklets.c" />\r
-    <ClInclude Include="..\mono\mini\tasklets.h" />\r
-    <ClCompile Include="..\mono\mini\simd-intrinsics.c" />\r
-    <ClInclude Include="..\mono\mini\mini-unwind.h" />\r
-    <ClCompile Include="..\mono\mini\unwind.c" />\r
-    <ClInclude Include="..\mono\mini\image-writer.h" />\r
-    <ClCompile Include="..\mono\mini\image-writer.c" />\r
-    <ClInclude Include="..\mono\mini\dwarfwriter.h" />\r
-    <ClCompile Include="..\mono\mini\dwarfwriter.c" />\r
-    <ClInclude Include="..\mono\mini\mini-gc.h" />\r
-    <ClCompile Include="..\mono\mini\mini-gc.c" />\r
-    <ClInclude Include="..\mono\mini\debugger-agent.h " />\r
-    <ClCompile Include="..\mono\mini\debugger-agent.c" />\r
-    <ClCompile Include="..\mono\mini\xdebug.c" />\r
-    <ClInclude Include="..\mono\mini\mini-llvm.h" />\r
-    <ClInclude Include="..\mono\mini\mini-llvm-cpp.h" />\r
-    <ClCompile Include="..\mono\mini\mini-native-types.c" />\r
-  </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{CB0D9E92-293C-439C-9AC7-C5F59B6E0771}</ProjectGuid>\r
     <RootNamespace>libmono</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mono-2.0</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">monosgen-2.0</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mono-2.0</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">monosgen-2.0</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mono-2.0</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">monosgen-2.0</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mono-2.0</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">monosgen-2.0</TargetName>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mono-2.0$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mono-2.0$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mono-2.0$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mono-2.0$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LinkIncremental>true</LinkIncremental>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <PreBuildEvent>\r
-      <Command>echo #define FULL_VERSION "Visual Studio built mono" &gt; ..\mono\mini\version.h</Command>\r
-    </PreBuildEvent>\r
-    <ClCompile>\r
-      <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>Disabled</Optimization>\r
-      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <PrecompiledHeaderOutputFile>\r
-      </PrecompiledHeaderOutputFile>\r
-      <BrowseInformation>true</BrowseInformation>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-      <DisableSpecificWarnings>4996;4018;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <Culture>0x0409</Culture>\r
-    </ResourceCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>mono.def</ModuleDefinitionFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
-      <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\cil\opcode.def" "$(SolutionDir)include\mono\cil\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\mini\jit.h" "$(SolutionDir)include\mono\jit\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\metadata\*.h" "$(SolutionDir)include\mono\metadata\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-counters.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-dl-fallback.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-error.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-logger.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(SolutionDir)include\mono\utils\"</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-    <PreBuildEvent>\r
-      <Command>echo #define FULL_VERSION "Visual Studio built mono" &gt; ..\mono\mini\version.h</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <ClCompile>\r
       <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
       <Optimization>Disabled</Optimization>\r
       <InlineFunctionExpansion>Default</InlineFunctionExpansion>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <PrecompiledHeaderOutputFile>\r
@@ -367,33 +117,27 @@ $(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(So
       <Culture>0x0409</Culture>\r
     </ResourceCompile>\r
     <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>monosgen.def</ModuleDefinitionFile>\r
+      <AdditionalDependencies>eglib.lib;libmonoutils.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmono-static$(MONO_TARGET_SUFFIX).lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <ModuleDefinitionFile>$(MONO_DEF)</ModuleDefinitionFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
-      <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>\r
     </Link>\r
     <PostBuildEvent>\r
-      <Command>$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\cil\opcode.def" "$(SolutionDir)include\mono\cil\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\mini\jit.h" "$(SolutionDir)include\mono\jit\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\metadata\*.h" "$(SolutionDir)include\mono\metadata\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-counters.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-dl-fallback.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-error.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-logger.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(SolutionDir)include\mono\utils\"</Command>\r
+      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
     </PostBuildEvent>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     <PreBuildEvent>\r
-      <Command>echo #define FULL_VERSION "Visual Studio built mono" &gt; ..\mono\mini\version.h</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <Midl>\r
       <TargetEnvironment>X64</TargetEnvironment>\r
@@ -403,11 +147,10 @@ $(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(So
       <Optimization>Disabled</Optimization>\r
       <InlineFunctionExpansion>Default</InlineFunctionExpansion>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <PrecompiledHeaderOutputFile>\r
@@ -422,92 +165,33 @@ $(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(So
       <Culture>0x0409</Culture>\r
     </ResourceCompile>\r
     <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>mono.def</ModuleDefinitionFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\cil\opcode.def" "$(SolutionDir)include\mono\cil\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\mini\jit.h" "$(SolutionDir)include\mono\jit\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\metadata\*.h" "$(SolutionDir)include\mono\metadata\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-counters.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-dl-fallback.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-error.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-logger.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(SolutionDir)include\mono\utils\"</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-    <PreBuildEvent>\r
-      <Command>echo #define FULL_VERSION "Visual Studio built mono" &gt; ..\mono\mini\version.h</Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>Disabled</Optimization>\r
-      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <PrecompiledHeaderOutputFile>\r
-      </PrecompiledHeaderOutputFile>\r
-      <BrowseInformation>true</BrowseInformation>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-      <DisableSpecificWarnings>4996;4018;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <Culture>0x0409</Culture>\r
-    </ResourceCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>monosgen.def</ModuleDefinitionFile>\r
+      <AdditionalDependencies>eglib.lib;libmonoutils.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmono-static$(MONO_TARGET_SUFFIX).lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <ModuleDefinitionFile>$(MONO_DEF)</ModuleDefinitionFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     </Link>\r
     <PostBuildEvent>\r
-      <Command>$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\cil\opcode.def" "$(SolutionDir)include\mono\cil\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\mini\jit.h" "$(SolutionDir)include\mono\jit\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\metadata\*.h" "$(SolutionDir)include\mono\metadata\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-counters.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-dl-fallback.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-error.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-logger.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(SolutionDir)include\mono\utils\"</Command>\r
+      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
     </PostBuildEvent>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <PreBuildEvent>\r
-      <Command>echo #define FULL_VERSION "Visual Studio built mono" &gt; ..\mono\mini\version.h</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <ClCompile>\r
       <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
       <Optimization>MinSpace</Optimization>\r
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
@@ -520,81 +204,26 @@ $(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(So
       <Culture>0x0409</Culture>\r
     </ResourceCompile>\r
     <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>mono.def</ModuleDefinitionFile>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\cil\opcode.def" "$(SolutionDir)include\mono\cil\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\mini\jit.h" "$(SolutionDir)include\mono\jit\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\metadata\*.h" "$(SolutionDir)include\mono\metadata\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-counters.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-dl-fallback.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-error.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-logger.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(SolutionDir)include\mono\utils\"</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-    <PreBuildEvent>\r
-      <Command>echo #define FULL_VERSION "Visual Studio built mono" &gt; ..\mono\mini\version.h</Command>\r
-    </PreBuildEvent>\r
-    <ClCompile>\r
-      <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>MinSpace</Optimization>\r
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <PrecompiledHeaderOutputFile>\r
-      </PrecompiledHeaderOutputFile>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <Culture>0x0409</Culture>\r
-    </ResourceCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>monosgen.def</ModuleDefinitionFile>\r
+      <AdditionalDependencies>eglib.lib;libmonoutils.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmono-static$(MONO_TARGET_SUFFIX).lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <ModuleDefinitionFile>$(MONO_DEF)</ModuleDefinitionFile>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>\r
     </Link>\r
     <PostBuildEvent>\r
-      <Command>$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\cil\opcode.def" "$(SolutionDir)include\mono\cil\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\mini\jit.h" "$(SolutionDir)include\mono\jit\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\metadata\*.h" "$(SolutionDir)include\mono\metadata\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-counters.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-dl-fallback.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-error.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-logger.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(SolutionDir)include\mono\utils\"</Command>\r
+      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
     </PostBuildEvent>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <PreBuildEvent>\r
-      <Command>echo #define FULL_VERSION "Visual Studio built mono" &gt; ..\mono\mini\version.h</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <Midl>\r
       <TargetEnvironment>X64</TargetEnvironment>\r
@@ -604,10 +233,9 @@ $(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(So
       <Optimization>MinSpace</Optimization>\r
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
@@ -620,122 +248,51 @@ $(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(So
       <Culture>0x0409</Culture>\r
     </ResourceCompile>\r
     <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>mono.def</ModuleDefinitionFile>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\cil\opcode.def" "$(SolutionDir)include\mono\cil\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\mini\jit.h" "$(SolutionDir)include\mono\jit\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\metadata\*.h" "$(SolutionDir)include\mono\metadata\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-counters.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-dl-fallback.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-error.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-logger.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(SolutionDir)include\mono\utils\"</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-    <PreBuildEvent>\r
-      <Command>echo #define FULL_VERSION "Visual Studio built mono" &gt; ..\mono\mini\version.h</Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>MinSpace</Optimization>\r
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <PrecompiledHeaderOutputFile>\r
-      </PrecompiledHeaderOutputFile>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-    </ClCompile>\r
-    <ResourceCompile>\r
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <Culture>0x0409</Culture>\r
-    </ResourceCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>monosgen.def</ModuleDefinitionFile>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <AdditionalDependencies>eglib.lib;libmonoutils.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmono-static$(MONO_TARGET_SUFFIX).lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <ModuleDefinitionFile>$(MONO_DEF)</ModuleDefinitionFile>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX64</TargetMachine>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     </Link>\r
     <PostBuildEvent>\r
-      <Command>$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\cil\opcode.def" "$(SolutionDir)include\mono\cil\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\mini\jit.h" "$(SolutionDir)include\mono\jit\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\metadata\*.h" "$(SolutionDir)include\mono\metadata\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-counters.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-dl-fallback.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-error.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-logger.h" "$(SolutionDir)include\mono\utils\"\r
-$(windir)\system32\xcopy /F /Y "$(SolutionDir)..\mono\utils\mono-publib.h" "$(SolutionDir)include\mono\utils\"</Command>\r
+      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
     </PostBuildEvent>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <CustomBuildStep Include="..\mono\mini\mini-x86.h">\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">true</ExcludedFromBuild>\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">true</ExcludedFromBuild>\r
     </CustomBuildStep>\r
     <CustomBuildStep Include="..\mono\mini\mini-amd64.h">\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">true</ExcludedFromBuild>\r
     </CustomBuildStep>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
+    </ProjectReference>\r
+    <ProjectReference Include="genmdesc.vcxproj">\r
+      <Project>{b7098dfa-31e6-4006-8a15-1c9a4e925149}</Project>\r
     </ProjectReference>\r
     <ProjectReference Include="libgc.vcxproj">\r
       <Project>{eb56000b-c80b-4e8b-908d-d84d31b517d3}</Project>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libgcmonosgen.vcxproj">\r
+      <Project>{c36612bd-22d3-4b95-85e2-7fdc4fc5d740}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libmono-static.vcxproj">\r
+      <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0772}</Project>\r
     </ProjectReference>\r
     <ProjectReference Include="libmonoruntime.vcxproj">\r
       <Project>{c36612bd-22d3-4b95-85e2-7fdc4fc5d739}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
     <ProjectReference Include="libmonoutils.vcxproj">\r
       <Project>{8fc2b0c8-51ad-49df-851f-5d01a77a75e4}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/libmono.vcxproj.filters b/msvc/libmono.vcxproj.filters
new file mode 100644 (file)
index 0000000..0d407ea
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{bdc9f80b-3045-49d2-bb7b-510450371395}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{f7700495-afaa-4d16-9aac-79d54d10de23}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{5370c3c4-b6ec-4f8a-8b21-ce4e782720a6}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index d8f354b76079eb2f3d601a0f7ff7e3082a13fc04..d0c79d0f0a4e2d66cd6335238edaae8736756357 100644 (file)
@@ -1,14 +1,6 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug_SGen|Win32">\r
-      <Configuration>Debug_SGen</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug_SGen|x64">\r
-      <Configuration>Debug_SGen</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
       <Platform>Win32</Platform>\r
@@ -17,14 +9,6 @@
       <Configuration>Debug</Configuration>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|Win32">\r
-      <Configuration>Release_SGen</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|x64">\r
-      <Configuration>Release_SGen</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Release|Win32">\r
       <Configuration>Release</Configuration>\r
       <Platform>Win32</Platform>\r
@@ -34,7 +18,6 @@
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
   </ItemGroup>\r
-  <Import Project="mono.props" />\r
   <ItemGroup>\r
     <ClCompile Include="..\mono\metadata\appdomain.c" />\r
     <ClCompile Include="..\mono\metadata\assembly.c" />\r
@@ -87,6 +70,7 @@
     <ClCompile Include="..\mono\metadata\profiler.c" />\r
     <ClCompile Include="..\mono\metadata\rand.c" />\r
     <ClCompile Include="..\mono\metadata\reflection.c" />\r
+    <ClCompile Include="..\mono\metadata\remoting.c" />\r
     <ClCompile Include="..\mono\metadata\runtime.c" />\r
     <ClCompile Include="..\mono\metadata\security-core-clr.c" />\r
     <ClCompile Include="..\mono\metadata\security-manager.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-mono.c" />\r
     <ClCompile Include="..\mono\metadata\threadpool-ms-io.c" />\r
     <ClCompile Include="..\mono\metadata\threadpool-ms.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-alloc.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-bridge.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-cardtable.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-debug.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-descriptor.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-gc.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-gchandles.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-gray.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-hash-table.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-internal.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-los.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-marksweep.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-memory-governor.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-new-bridge.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-nursery-allocator.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-old-bridge.c" />\r
-    <ClCompile Include="..\mono\metadata\sgen-os-mach.c" />\r
-    <ClCompile Include="..\mono\metadata\sgen-os-posix.c" />\r
+    <ClCompile Include="..\mono\metadata\sgen-os-mach.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-os-posix.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\mono\metadata\sgen-os-win32.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-pinning-stats.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-pinning.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-pointer-queue.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-array-list.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-protocol.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-qsort.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-simple-nursery.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-split-nursery.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-tarjan-bridge.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-toggleref.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-thread-pool.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-workers.c" />\r
-    <ClCompile Include="..\mono\sgen\sgen-fin-weak-hash.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-stw.c" />\r
     <ClCompile Include="..\mono\metadata\socket-io.c" />\r
     <ClCompile Include="..\mono\metadata\string-icalls.c" />\r
     <ClInclude Include="..\mono\metadata\appdomain.h" />\r
     <ClInclude Include="..\mono\metadata\assembly.h" />\r
     <ClInclude Include="..\mono\metadata\attach.h" />\r
-    <ClInclude Include="..\mono\metadata\char-conversions.h" />\r
     <ClInclude Include="..\mono\metadata\cil-coff.h" />\r
     <ClInclude Include="..\mono\metadata\class-internals.h" />\r
     <ClInclude Include="..\mono\metadata\class.h" />\r
     <ClInclude Include="..\mono\metadata\debug-helpers.h" />\r
     <ClInclude Include="..\mono\metadata\debug-mono-ppdb.h" />\r
     <ClInclude Include="..\mono\metadata\debug-mono-symfile.h" />\r
-    <ClInclude Include="..\mono\metadata\decimal.h" />\r
     <ClInclude Include="..\mono\metadata\domain-internals.h" />\r
     <ClInclude Include="..\mono\metadata\environment.h" />\r
     <ClInclude Include="..\mono\metadata\exception.h" />\r
     <ClInclude Include="..\mono\metadata\gc-internals.h" />\r
     <ClInclude Include="..\mono\metadata\handle.h" />\r
     <ClInclude Include="..\mono\metadata\number-ms.h" />\r
+    <ClInclude Include="..\mono\metadata\remoting.h" />\r
     <ClInclude Include="..\mono\metadata\seq-points-data.h" />\r
+    <ClInclude Include="..\mono\metadata\sgen-bridge-internals.h" />\r
+    <ClInclude Include="..\mono\metadata\sgen-client-mono.h" />\r
     <ClInclude Include="..\mono\metadata\threadpool-ms-io.h" />\r
     <ClInclude Include="..\mono\metadata\threadpool-ms.h" />\r
     <ClInclude Include="..\mono\sgen\gc-internal-agnostic.h" />\r
     <ClInclude Include="..\mono\metadata\security-core-clr.h" />\r
     <ClInclude Include="..\mono\metadata\security-manager.h" />\r
     <ClInclude Include="..\mono\metadata\security.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-archdep.h" />\r
     <ClInclude Include="..\mono\metadata\sgen-bridge.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-cardtable.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-conf.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-copy-object.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-descriptor.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-gc.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-gray.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-major-copy-object.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-major-scan-object.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-memory-governor.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-minor-copy-object.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-minor-scan-object.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-pinning.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-protocol.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-qsort.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-scan-object.h" />\r
     <ClInclude Include="..\mono\metadata\sgen-toggleref.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-thread-pool.h" />\r
-    <ClInclude Include="..\mono\sgen\sgen-workers.h" />\r
     <ClInclude Include="..\mono\metadata\socket-io.h" />\r
     <ClInclude Include="..\mono\metadata\string-icalls.h" />\r
     <ClInclude Include="..\mono\metadata\sysmath.h" />\r
     <ClInclude Include="..\mono\metadata\verify.h" />\r
     <ClInclude Include="..\mono\metadata\wrapper-types.h" />\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="eglib.vcxproj">\r
+      <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{C36612BD-22D3-4B95-85E2-7FDC4FC5D739}</ProjectGuid>\r
     <Keyword>Win32Proj</Keyword>\r
     <RootNamespace>libmonoruntime</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>true</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>true</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>false</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>false</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <TargetName>$(ProjectName)sgen</TargetName>\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <TargetName>$(ProjectName)sgen</TargetName>\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <TargetName>$(ProjectName)sgen</TargetName>\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <TargetName>$(ProjectName)sgen</TargetName>\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;$(BOEHM_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-    <ClCompile>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     </Link>\r
+    <Lib />\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     <ClCompile>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;$(BOEHM_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-    <ClCompile>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <OmitFramePointers>false</OmitFramePointers>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(top_srcdir)\mono</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     </Link>\r
+    <Lib />\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MaxSpeed</Optimization>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;$(BOEHM_DEFINES);NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-    <ClCompile>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <OptimizeReferences>true</OptimizeReferences>\r
     </Link>\r
+    <Lib />\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <ClCompile>\r
       <Optimization>MaxSpeed</Optimization>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;$(BOEHM_DEFINES);NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-    <ClCompile>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <OptimizeReferences>true</OptimizeReferences>\r
     </Link>\r
+    <Lib />\r
   </ItemDefinitionGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
-</Project>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/libmonoruntime.vcxproj.filters b/msvc/libmonoruntime.vcxproj.filters
new file mode 100644 (file)
index 0000000..e7d4b41
--- /dev/null
@@ -0,0 +1,486 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\metadata\assembly.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\attach.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\class.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\cominterop.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\console-win32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\coree.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\debug-helpers.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\debug-mono-ppdb.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\debug-mono-symfile.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\decimal-ms.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\environment.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\exception.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\file-io.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\file-mmap-windows.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\filewatcher.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\handle.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\icall.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\image.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\jit-info.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\loader.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\locales.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\lock-tracer.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\marshal.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mempool.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\metadata.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\metadata-verify.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\method-builder.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-basic-block.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-config.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-config-dirs.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-debug.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-endian.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-mlist.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-perfcounters.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-security.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\nacl-stub.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\null-gc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\number-ms.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\opcodes.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\process.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\profiler.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\rand.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\remoting.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\runtime.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\security-core-clr.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\security-manager.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\seq-points-data.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\socket-io.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\string-icalls.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sysmath.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\threadpool-ms.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\threadpool-ms-io.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\threads.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\verify.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\boehm-gc.c">\r
+      <Filter>Source Files\boehm</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-os-mach.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-os-posix.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-os-win32.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\appdomain.c">\r
+      <Filter>Source Files\gc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\domain.c">\r
+      <Filter>Source Files\gc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\gc-stats.c">\r
+      <Filter>Source Files\gc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\gc.c">\r
+      <Filter>Source Files\gc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\monitor.c">\r
+      <Filter>Source Files\gc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-hash.c">\r
+      <Filter>Source Files\gc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\object.c">\r
+      <Filter>Source Files\gc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\reflection.c">\r
+      <Filter>Source Files\gc</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-bridge.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-old-bridge.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-new-bridge.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-tarjan-bridge.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-toggleref.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-stw.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-mono.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\metadata-cross-helpers.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\mono\metadata\appdomain.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\assembly.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\attach.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\cil-coff.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\class.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\class-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\cominterop.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\console-io.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\coree.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\culture-info.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\culture-info-tables.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\debug-helpers.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\debug-mono-ppdb.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\debug-mono-symfile.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\domain-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\environment.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\exception.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\file-io.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\filewatcher.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\handle.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\icall-def.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\image.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\loader.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\locales.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\lock-tracer.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\marshal.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mempool.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mempool-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\metadata.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\metadata-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\method-builder.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\monitor.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-basic-block.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-config.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-config-dirs.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-debug.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-debug-debugger.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-endian.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-hash.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-mlist.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-perfcounters.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-perfcounters-def.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\mono-ptr-array.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\normalization-tables.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\number-formatter.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\number-ms.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\object.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\object-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\opcodes.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\process.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\profiler.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\profiler-private.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\rand.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\reflection.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\remoting.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\runtime.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\security.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\security-core-clr.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\security-manager.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\seq-points-data.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\socket-io.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\string-icalls.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\sysmath.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\tabledefs.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\threadpool-ms.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\wrapper-types.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\threadpool-ms-io.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\threads-types.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\verify.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\verify-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\sgen-bridge.h">\r
+      <Filter>Header Files\sgen</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\sgen-bridge-internals.h">\r
+      <Filter>Header Files\sgen</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\sgen-toggleref.h">\r
+      <Filter>Header Files\sgen</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\sgen-client-mono.h">\r
+      <Filter>Header Files\sgen</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\sgen\gc-internal-agnostic.h">\r
+      <Filter>Header Files\gc</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\gc-internals.h">\r
+      <Filter>Header Files\gc</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{eb8a6a4d-924c-494d-99c1-663e4c09a806}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{b3f8bc4c-d4c8-457a-b29c-5f49d00a3b6c}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{3f4ff222-41cc-4bbc-b36b-cac0c21266ad}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files\boehm">\r
+      <UniqueIdentifier>{728e57f8-14d3-42f4-b92a-be03cd2acdfa}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files\sgen">\r
+      <UniqueIdentifier>{d5996ea0-8b43-4267-a46c-715270aaee2b}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Header Files\boehm">\r
+      <UniqueIdentifier>{2446a0bf-5f8b-4789-91ab-6107f72b8539}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Header Files\sgen">\r
+      <UniqueIdentifier>{5fede250-d478-466b-aa2a-36d2222de065}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files\gc">\r
+      <UniqueIdentifier>{410dd556-6715-4c4e-beff-c5dd7a6b78a1}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Header Files\gc">\r
+      <UniqueIdentifier>{e37c9a88-bfb3-47dd-948c-a74dea25b3ad}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 5daad9472621c95d4b94c98809d6f0ab2a74ff50..ca9ce67c4658365ada96d183ab9f909a5e9a2ec0 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
@@ -18,7 +18,6 @@
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
   </ItemGroup>\r
-  <Import Project="mono.props" />\r
   <ItemGroup>\r
     <ClCompile Include="..\mono\utils\dlmalloc.c" />\r
     <ClCompile Include="..\mono\utils\hazard-pointer.c" />\r
     <ClCompile Include="..\mono\utils\lock-free-alloc.c" />\r
     <ClCompile Include="..\mono\utils\lock-free-array-queue.c" />\r
     <ClCompile Include="..\mono\utils\lock-free-queue.c" />\r
-    <ClCompile Include="..\mono\utils\mach-support-amd64.c" />\r
-    <ClCompile Include="..\mono\utils\mach-support-arm.c" />\r
-    <ClCompile Include="..\mono\utils\mach-support-x86.c" />\r
-    <ClCompile Include="..\mono\utils\mach-support.c" />\r
+    <ClCompile Include="..\mono\utils\mach-support-amd64.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mach-support-arm.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mach-support-x86.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mach-support.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\mono\utils\mono-codeman.c" />\r
     <ClCompile Include="..\mono\utils\mono-conc-hashtable.c" />\r
     <ClCompile Include="..\mono\utils\mono-context.c" />\r
@@ -42,6 +61,8 @@
     <ClCompile Include="..\mono\utils\mono-io-portability.c" />\r
     <ClCompile Include="..\mono\utils\mono-linked-list-set.c" />\r
     <ClCompile Include="..\mono\utils\mono-logger.c" />\r
+    <ClCompile Include="..\mono\utils\mono-log-windows.c" />\r
+    <ClCompile Include="..\mono\utils\mono-log-common.c" />\r
     <ClCompile Include="..\mono\utils\mono-math.c" />\r
     <ClCompile Include="..\mono\utils\mono-md5.c" />\r
     <ClCompile Include="..\mono\utils\mono-mmap.c" />\r
     <ClCompile Include="..\mono\utils\mono-publib.c" />\r
     <ClCompile Include="..\mono\utils\mono-sha1.c" />\r
     <ClCompile Include="..\mono\utils\mono-stdlib.c" />\r
-    <ClCompile Include="..\mono\utils\mono-threads-mach.c" />\r
-    <ClCompile Include="..\mono\utils\mono-threads-posix.c" />\r
-    <ClCompile Include="..\mono\utils\mono-threads-posix-signals.c" />\r
+    <ClCompile Include="..\mono\utils\mono-threads-mach.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-posix.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-posix-signals.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\mono\utils\mono-threads-windows.c" />\r
     <ClCompile Include="..\mono\utils\mono-threads.c" />\r
     <ClCompile Include="..\mono\utils\mono-threads-coop.c" />\r
-    <ClCompile Include="..\mono\utils\mono-threads-posix-abort-syscall.c" />\r
-    <ClCompile Include="..\mono\utils\mono-threads-mach-abort-syscall.c" />\r
+    <ClCompile Include="..\mono\utils\mono-threads-posix-abort-syscall.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-mach-abort-syscall.c">\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+    </ClCompile>\r
     <ClCompile Include="..\mono\utils\mono-threads-windows-abort-syscall.c" />\r
     <ClCompile Include="..\mono\utils\mono-time.c" />\r
     <ClCompile Include="..\mono\utils\mono-tls.c" />\r
   <ItemGroup>\r
     <MASM Include="..\mono\utils\win64.asm">\r
       <FileType>Document</FileType>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
     </MASM>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="eglib.vcxproj">\r
+      <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}</ProjectGuid>\r
     <Keyword>Win32Proj</Keyword>\r
     <RootNamespace>libmonoutils</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <OutDir>$(Platform)\lib\$(Configuration)\</OutDir>\r
-    <IntDir>$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     </Link>\r
     <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/eglib/src;$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     </Link>\r
     <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <MASM>\r
       <PreprocessorDefinitions>X64</PreprocessorDefinitions>\r
       <Optimization>MaxSpeed</Optimization>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
     </Link>\r
     <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
       <Optimization>MaxSpeed</Optimization>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
     </Link>\r
     <PreBuildEvent>\r
-      <Command>winsetup.bat</Command>\r
+      <Command>\r
+      </Command>\r
     </PreBuildEvent>\r
     <MASM>\r
       <PreprocessorDefinitions>X64</PreprocessorDefinitions>\r
   <ImportGroup Label="ExtensionTargets">\r
     <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />\r
   </ImportGroup>\r
-</Project>\r
+</Project>
diff --git a/msvc/libmonoutils.vcxproj.filters b/msvc/libmonoutils.vcxproj.filters
new file mode 100644 (file)
index 0000000..dae5e30
--- /dev/null
@@ -0,0 +1,416 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\utils\atomic.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\bsearch.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\dlmalloc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\hazard-pointer.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\json.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\lock-free-alloc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\lock-free-array-queue.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\lock-free-queue.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mach-support.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mach-support-amd64.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mach-support-arm.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mach-support-x86.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\memfuncs.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\monobitset.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-codeman.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-conc-hashtable.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-context.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-counters.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-dl.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-dl-windows.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-error.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-filemap.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-hwcap.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-hwcap-x86.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-internal-hash.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-io-portability.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-linked-list-set.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-logger.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-math.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-md5.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-mmap.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-networkinterfaces.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-path.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-poll.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-proclib.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-property-hash.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-publib.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-rand.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-sha1.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-stdlib.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-coop.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-mach.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-mach-abort-syscall.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-posix.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-posix-abort-syscall.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-posix-signals.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-state-machine.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-windows.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-threads-windows-abort-syscall.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-time.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-tls.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-uri.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-value-hash.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\networking.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\networking-missing.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\networking-posix.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\networking-windows.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\parse.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\strenc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-log-common.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-log-windows.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\mono\utils\atomic.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\bsearch.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\dlmalloc.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\dtrace.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\freebsd-dwarf.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\freebsd-elf_common.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\freebsd-elf32.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\freebsd-elf64.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\gc_wrapper.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\hazard-pointer.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\json.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\linux_magic.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\lock-free-alloc.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\lock-free-array-queue.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\lock-free-queue.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mach-support.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\memcheck.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\memfuncs.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\monobitset.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-codeman.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-compiler.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-complex.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-conc-hashtable.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-context.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-coop-mutex.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-coop-semaphore.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-counters.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-digest.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-dl.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-dl-fallback.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-error.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-error-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-hwcap.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-hwcap-x86.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-internal-hash.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-io-portability.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-linked-list-set.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-logger.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-logger-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-machine.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-math.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-membar.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-memory-model.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-mmap.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-networkinterfaces.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-once.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-os-mutex.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-os-semaphore.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-path.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-poll.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-proclib.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-property-hash.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-publib.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-rand.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-sigcontext.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-stack-unwinding.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-stdlib.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-string.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-threads.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-threads-api.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-threads-coop.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-threads-posix-signals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-time.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-tls.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-uri.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-value-hash.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\parse.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\strenc.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\valgrind.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{7d1240fd-7e95-4e21-ab1a-365dd69355de}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{f07c02ee-fbf8-4f7f-9991-c100492ef765}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{82f9c5a2-bc7b-4424-ae85-a203027fd038}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <MASM Include="..\mono\utils\win64.asm">\r
+      <Filter>Resource Files</Filter>\r
+    </MASM>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 64aaae18a4a7460a573e0c5dcb51fab88bf6251d..27a44e3ae8cb8675b56bba9e4659ab9f6ff20c84 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
   </ItemGroup>\r
-  <Import Project="mono.props" />\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}</ProjectGuid>\r
     <RootNamespace>libtest</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\eglib\src;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Windows</SubSystem>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX86</TargetMachine>\r
     </Link>\r
   </ItemDefinitionGroup>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\eglib\src;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Windows</SubSystem>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\eglib\src;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Windows</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX86</TargetMachine>\r
     </Link>\r
   </ItemDefinitionGroup>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\eglib\src;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Windows</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libmono.vcxproj">\r
+      <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/libtest.vcxproj.filters b/msvc/libtest.vcxproj.filters
new file mode 100644 (file)
index 0000000..0fa3590
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{4f6cb78a-c0fd-44ff-b6eb-3fd8cb31f602}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{bbadd15b-d268-41c7-9f14-7141812f5baf}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{11b4a994-1216-42cd-82bf-cef5e70afcb8}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\tests\libtest.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/mono-mini-regression-aot-test.vcxproj b/msvc/mono-mini-regression-aot-test.vcxproj
new file mode 100644 (file)
index 0000000..9dcde12
--- /dev/null
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{D632D664-C0F5-4B60-9375-BDDAD5C7A649}</ProjectGuid>\r
+    <RootNamespace>monominiregressionaottest</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="Shared">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+    <Import Project="mono-regression-test-Win32.props" />\r
+    <Import Project="mono-regression-test.props" />\r
+    <Import Project="mono-mini-regression-test-aot.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+    <Import Project="mono-regression-test-Win32.props" />\r
+    <Import Project="mono-regression-test.props" />\r
+    <Import Project="mono-mini-regression-test-aot.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+    <Import Project="mono-regression-test-x64.props" />\r
+    <Import Project="mono-regression-test.props" />\r
+    <Import Project="mono-mini-regression-test-aot.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+    <Import Project="mono-regression-test-x64.props" />\r
+    <Import Project="mono-regression-test.props" />\r
+    <Import Project="mono-mini-regression-test-aot.props" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LocalDebuggerCommand>$(MONO_EXECUTABLE)</LocalDebuggerCommand>\r
+    <LocalDebuggerCommandArguments>$(MONO_MINI_REGRESSION_TEST_AOT_ARGS)</LocalDebuggerCommandArguments>\r
+    <LocalDebuggerWorkingDirectory>$(MONO_EXECUTABLE_DIR)</LocalDebuggerWorkingDirectory>\r
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+    <LocalDebuggerEnvironment>$(MONO_PATH_ENV)\r
+$(MONO_CFG_DIR_ENV)\r
+$(MONO_TOOLCHAIN_PATH_ENV)\r
+$(MONO_LOG_LEVEL_ENV)\r
+$(MONO_LOG_MASK_ENV)\r
+$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <LocalDebuggerCommand>$(MONO_EXECUTABLE)</LocalDebuggerCommand>\r
+    <LocalDebuggerCommandArguments>$(MONO_MINI_REGRESSION_TEST_AOT_ARGS)</LocalDebuggerCommandArguments>\r
+    <LocalDebuggerWorkingDirectory>$(MONO_EXECUTABLE_DIR)</LocalDebuggerWorkingDirectory>\r
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+    <LocalDebuggerEnvironment>$(MONO_PATH_ENV)\r
+$(MONO_CFG_DIR_ENV)\r
+$(MONO_TOOLCHAIN_PATH_ENV)\r
+$(MONO_LOG_LEVEL_ENV)\r
+$(MONO_LOG_MASK_ENV)\r
+$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LocalDebuggerCommand>$(MONO_EXECUTABLE)</LocalDebuggerCommand>\r
+    <LocalDebuggerCommandArguments>$(MONO_MINI_REGRESSION_TEST_AOT_ARGS)</LocalDebuggerCommandArguments>\r
+    <LocalDebuggerWorkingDirectory>$(MONO_EXECUTABLE_DIR)</LocalDebuggerWorkingDirectory>\r
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+    <LocalDebuggerEnvironment>$(MONO_PATH_ENV)\r
+$(MONO_CFG_DIR_ENV)\r
+$(MONO_TOOLCHAIN_PATH_ENV)\r
+$(MONO_LOG_LEVEL_ENV)\r
+$(MONO_LOG_MASK_ENV)\r
+$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <LocalDebuggerCommand>$(MONO_EXECUTABLE)</LocalDebuggerCommand>\r
+    <LocalDebuggerCommandArguments>$(MONO_MINI_REGRESSION_TEST_AOT_ARGS)</LocalDebuggerCommandArguments>\r
+    <LocalDebuggerWorkingDirectory>$(MONO_EXECUTABLE_DIR)</LocalDebuggerWorkingDirectory>\r
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+    <LocalDebuggerEnvironment>$(MONO_PATH_ENV)\r
+$(MONO_CFG_DIR_ENV)\r
+$(MONO_TOOLCHAIN_PATH_ENV)\r
+$(MONO_LOG_LEVEL_ENV)\r
+$(MONO_LOG_MASK_ENV)\r
+$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="mono.vcxproj">\r
+      <Project>{a0eddcd9-940f-432c-a28f-7ef322437d79}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/mono-mini-regression-aot-test.vcxproj.filters b/msvc/mono-mini-regression-aot-test.vcxproj.filters
new file mode 100644 (file)
index 0000000..f81daba
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+    </Filter>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/mono-mini-regression-test-aot.props b/msvc/mono-mini-regression-test-aot.props
new file mode 100644 (file)
index 0000000..e741e13
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--<ImportGroup Label="PropertySheets" />-->
+  <PropertyGroup Label="UserMacros">
+    <MONO_MINI_ALL_REGRESSION_TEST_AOT_ARG>--aot="tool-prefix=$(MONO_TOOLCHAIN_PREFIX)"  $(MONO_MINI_REGRESSION_TESTS)</MONO_MINI_ALL_REGRESSION_TEST_AOT_ARG>
+    <MONO_MINI_ONE_REGRESSION_TEST_AOT_ARG>--aot="tool-prefix=$(MONO_TOOLCHAIN_PREFIX)" basic.exe</MONO_MINI_ONE_REGRESSION_TEST_AOT_ARG>
+    <MONO_MINI_REGRESSION_TEST_AOT_ARGS>$(MONO_EXECUTABLE_CONFIG_ARG) $(MONO_MINI_ALL_REGRESSION_TEST_AOT_ARG)</MONO_MINI_REGRESSION_TEST_AOT_ARGS>
+  </PropertyGroup>
+  <ItemGroup>
+    <BuildMacro Include="MONO_MINI_ALL_REGRESSION_TEST_AOT_ARG">
+      <Value>$(MONO_MINI_ALL_REGRESSION_TEST_AOT_ARG)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_MINI_ONE_REGRESSION_TEST_AOT_ARG">
+      <Value>$(MONO_MINI_ONE_REGRESSION_TEST_AOT_ARG)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_MINI_REGRESSION_TEST_AOT_ARGS">
+      <Value>$(MONO_MINI_REGRESSION_TEST_AOT_ARGS)</Value>
+    </BuildMacro>
+  </ItemGroup>
+  <ItemDefinitionGroup />
+</Project>
\ No newline at end of file
diff --git a/msvc/mono-mini-regression-test.props b/msvc/mono-mini-regression-test.props
new file mode 100644 (file)
index 0000000..b000310
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--<ImportGroup Label="PropertySheets" />-->
+  <PropertyGroup Label="UserMacros">
+    <MONO_MINI_ALL_REGRESSION_TEST_ARG>--regression $(MONO_MINI_REGRESSION_TESTS)</MONO_MINI_ALL_REGRESSION_TEST_ARG>
+    <MONO_MINI_ONE_REGRESSION_TEST_ARG>--regression basic.exe</MONO_MINI_ONE_REGRESSION_TEST_ARG>
+    <MONO_MINI_REGRESSION_TEST_ARGS>$(MONO_EXECUTABLE_CONFIG_ARG) $(MONO_MINI_ALL_REGRESSION_TEST_ARG)</MONO_MINI_REGRESSION_TEST_ARGS>
+  </PropertyGroup>
+  <ItemGroup>
+    <BuildMacro Include="MONO_MINI_ALL_REGRESSION_TEST_ARG">
+      <Value>$(MONO_MINI_ALL_REGRESSION_TEST_ARG)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_MINI_ONE_REGRESSION_TEST_ARG">
+      <Value>$(MONO_MINI_ONE_REGRESSION_TEST_ARG)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_MINI_REGRESSION_TEST_ARGS">
+      <Value>$(MONO_MINI_REGRESSION_TEST_ARGS)</Value>
+    </BuildMacro>
+  </ItemGroup>
+  <ItemDefinitionGroup />
+</Project>
\ No newline at end of file
diff --git a/msvc/mono-mini-regression-test.vcxproj b/msvc/mono-mini-regression-test.vcxproj
new file mode 100644 (file)
index 0000000..6ad3801
--- /dev/null
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="mono.vcxproj">\r
+      <Project>{a0eddcd9-940f-432c-a28f-7ef322437d79}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}</ProjectGuid>\r
+    <RootNamespace>monoregressiontest</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+    <ProjectName>mono-mini-regression-test</ProjectName>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>Utility</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>MultiByte</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="Shared">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+    <Import Project="mono-regression-test-Win32.props" />\r
+    <Import Project="mono-regression-test.props" />\r
+    <Import Project="mono-mini-regression-test.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+    <Import Project="mono-regression-test-Win32.props" />\r
+    <Import Project="mono-regression-test.props" />\r
+    <Import Project="mono-mini-regression-test.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+    <Import Project="mono-regression-test-x64.props" />\r
+    <Import Project="mono-regression-test.props" />\r
+    <Import Project="mono-mini-regression-test.props" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
+    <Import Project="mono-regression-test-x64.props" />\r
+    <Import Project="mono-regression-test.props" />\r
+    <Import Project="mono-mini-regression-test.props" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <OutDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\</OutDir>\r
+    <IntDir>$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LocalDebuggerCommand>$(MONO_EXECUTABLE)</LocalDebuggerCommand>\r
+    <LocalDebuggerCommandArguments>$(MONO_MINI_REGRESSION_TEST_ARGS)</LocalDebuggerCommandArguments>\r
+    <LocalDebuggerWorkingDirectory>$(MONO_EXECUTABLE_DIR)</LocalDebuggerWorkingDirectory>\r
+    <LocalDebuggerEnvironment>$(MONO_PATH_ENV)\r
+$(MONO_CFG_DIR_ENV)\r
+$(MONO_TOOLCHAIN_PATH_ENV)\r
+$(MONO_LOG_LEVEL_ENV)\r
+$(MONO_LOG_MASK_ENV)\r
+$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\r
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LocalDebuggerCommand>$(MONO_EXECUTABLE)</LocalDebuggerCommand>\r
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+    <LocalDebuggerCommandArguments>$(MONO_MINI_REGRESSION_TEST_ARGS)</LocalDebuggerCommandArguments>\r
+    <LocalDebuggerWorkingDirectory>$(MONO_EXECUTABLE_DIR)</LocalDebuggerWorkingDirectory>\r
+    <LocalDebuggerEnvironment>$(MONO_PATH_ENV)\r
+$(MONO_CFG_DIR_ENV)\r
+$(MONO_TOOLCHAIN_PATH_ENV)\r
+$(MONO_LOG_LEVEL_ENV)\r
+$(MONO_LOG_MASK_ENV)\r
+$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <LocalDebuggerCommand>$(MONO_EXECUTABLE)</LocalDebuggerCommand>\r
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+    <LocalDebuggerCommandArguments>$(MONO_MINI_REGRESSION_TEST_ARGS)</LocalDebuggerCommandArguments>\r
+    <LocalDebuggerWorkingDirectory>$(MONO_EXECUTABLE_DIR)</LocalDebuggerWorkingDirectory>\r
+    <LocalDebuggerEnvironment>$(MONO_PATH_ENV)\r
+$(MONO_CFG_DIR_ENV)\r
+$(MONO_TOOLCHAIN_PATH_ENV)\r
+$(MONO_LOG_LEVEL_ENV)\r
+$(MONO_LOG_MASK_ENV)\r
+$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <LocalDebuggerCommand>$(MONO_EXECUTABLE)</LocalDebuggerCommand>\r
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+    <LocalDebuggerCommandArguments>$(MONO_MINI_REGRESSION_TEST_ARGS)</LocalDebuggerCommandArguments>\r
+    <LocalDebuggerWorkingDirectory>$(MONO_EXECUTABLE_DIR)</LocalDebuggerWorkingDirectory>\r
+    <LocalDebuggerEnvironment>$(MONO_PATH_ENV)\r
+$(MONO_CFG_DIR_ENV)\r
+$(MONO_TOOLCHAIN_PATH_ENV)\r
+$(MONO_LOG_LEVEL_ENV)\r
+$(MONO_LOG_MASK_ENV)\r
+$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <SDLCheck>true</SDLCheck>\r
+    </ClCompile>\r
+    <Link>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/mono-mini-regression-test.vcxproj.filters b/msvc/mono-mini-regression-test.vcxproj.filters
new file mode 100644 (file)
index 0000000..ef1ebf5
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
\ No newline at end of file
diff --git a/msvc/mono-regression-test-Win32.props b/msvc/mono-regression-test-Win32.props
new file mode 100644 (file)
index 0000000..c74e5c8
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ImportGroup Label="PropertySheets" />
+  <PropertyGroup Label="UserMacros">
+    <MONO_TOOLCHAIN_PREFIX>i686-w64-mingw32-</MONO_TOOLCHAIN_PREFIX>
+    <MONO_TOOLCHAIN_PATH>C:/ProgramData/chocolatey/lib/Cygwin/tools/cygwin/bin</MONO_TOOLCHAIN_PATH>
+  </PropertyGroup>
+  <PropertyGroup />
+  <ItemDefinitionGroup />
+  <ItemGroup>
+    <BuildMacro Include="MONO_TOOLCHAIN_PREFIX">
+      <Value>$(MONO_TOOLCHAIN_PREFIX)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_TOOLCHAIN_PATH">
+      <Value>$(MONO_TOOLCHAIN_PATH)</Value>
+    </BuildMacro>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/msvc/mono-regression-test-x64.props b/msvc/mono-regression-test-x64.props
new file mode 100644 (file)
index 0000000..a2724a9
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ImportGroup Label="PropertySheets" />
+  <PropertyGroup Label="UserMacros">
+    <MONO_TOOLCHAIN_PREFIX>x86_64-w64-mingw32-</MONO_TOOLCHAIN_PREFIX>
+    <MONO_TOOLCHAIN_PATH>C:/ProgramData/chocolatey/lib/Cygwin/tools/cygwin/bin</MONO_TOOLCHAIN_PATH>
+  </PropertyGroup>
+  <PropertyGroup />
+  <ItemDefinitionGroup />
+  <ItemGroup>
+    <BuildMacro Include="MONO_TOOLCHAIN_PREFIX">
+      <Value>$(MONO_TOOLCHAIN_PREFIX)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_TOOLCHAIN_PATH">
+      <Value>$(MONO_TOOLCHAIN_PATH)</Value>
+    </BuildMacro>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/msvc/mono-regression-test.props b/msvc/mono-regression-test.props
new file mode 100644 (file)
index 0000000..d4e6bf6
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--<ImportGroup Label="PropertySheets" />-->
+  <PropertyGroup Label="UserMacros">
+    <MONO_PATH>$(MONO_DIR)/mcs/class/lib/net_4_x</MONO_PATH>
+    <MONO_CFG_DIR>$(MONO_DIR)/runtime/etc</MONO_CFG_DIR>
+    <MONO_CONFIG_ARG>--config "$(MONO_DIR)/runtime/etc/mono/config"</MONO_CONFIG_ARG>
+    <MONO_MINI_REGRESSION_TEST_DIR>$(MONO_DIR)/mono/mini</MONO_MINI_REGRESSION_TEST_DIR>
+    <MONO_MINI_REGRESSION_TESTS>basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe iltests.exe devirtualization.exe generics.exe basic-simd.exe</MONO_MINI_REGRESSION_TESTS>
+    <MONO_EXECUTABLE>$(MONO_BUILD_DIR_PREFIX)$(Platform)/bin/$(Configuration)/mono$(MONO_TARGET_SUFFIX).exe</MONO_EXECUTABLE>
+    <MONO_EXECUTABLE_DIR>$(MONO_MINI_REGRESSION_TEST_DIR)</MONO_EXECUTABLE_DIR>
+    <MONO_PATH_ENV>MONO_PATH=$(MONO_PATH)</MONO_PATH_ENV>
+    <MONO_CFG_DIR_ENV>MONO_CFG_DIR=$(MONO_CFG_DIR)</MONO_CFG_DIR_ENV>
+    <MONO_TOOLCHAIN_PATH_ENV>PATH=$(MONO_TOOLCHAIN_PATH)</MONO_TOOLCHAIN_PATH_ENV>
+    <MONO_LOG_LEVEL_ENV>MONO_LOG_LEVEL=debug</MONO_LOG_LEVEL_ENV>
+    <MONO_LOG_MASK_ENV>MONO_LOG_MASK=asm,aot</MONO_LOG_MASK_ENV>
+  </PropertyGroup>
+  <ItemGroup>
+    <BuildMacro Include="MONO_PATH">
+      <Value>$(MONO_PATH)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_CFG_DIR">
+      <Value>$(MONO_CFG_DIR)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_CONFIG_ARG">
+      <Value>$(MONO_CONFIG_ARG)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_MINI_REGRESSION_TEST_DIR">
+      <Value>$(MONO_MINI_REGRESSION_TEST_DIR)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_MINI_REGRESSION_TESTS">
+      <Value>$(MONO_MINI_REGRESSION_TESTS)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_EXECUTABLE">
+      <Value>$(MONO_EXECUTABLE)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_EXECUTABLE_DIR">
+      <Value>$(MONO_EXECUTABLE_DIR)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_PATH_ENV">
+      <Value>$(MONO_PATH_ENV)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_CFG_DIR_ENV">
+      <Value>$(MONO_CFG_DIR_ENV)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_TOOLCHAIN_PATH_ENV">
+      <Value>$(MONO_TOOLCHAIN_PATH_ENV)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_LOG_LEVEL_ENV">
+      <Value>$(MONO_LOG_LEVEL_ENV)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_LOG_MASK_ENV">
+      <Value>$(MONO_LOG_MASK_ENV)</Value>
+    </BuildMacro>
+  </ItemGroup>
+  <ItemDefinitionGroup />
+</Project>
\ No newline at end of file
index cec505f17e543309c627d69b5c159137a5471a5e..2251543e666491a794934617bde33931d99d5dfd 100644 (file)
@@ -1,5 +1,4 @@
 ; file generated by create-windef.pl
-LIBRARY mono-2.0.dll
 EXPORTS
 MonoFixupCorEE
 mono_add_internal_call
@@ -424,6 +423,7 @@ mono_get_uint64_class
 mono_get_uintptr_class
 mono_get_void_class
 mono_guid_to_string
+mono_guid_to_string_minimal
 mono_image_add_to_name_cache
 mono_image_addref
 mono_image_close
@@ -506,6 +506,12 @@ mono_lock_free_queue_init
 mono_lock_free_queue_node_init
 mono_lock_free_queue_node_unpoison
 mono_locks_dump
+mono_log_close_logfile
+mono_log_close_syslog
+mono_log_open_logfile
+mono_log_open_syslog
+mono_log_write_logfile
+mono_log_write_syslog
 mono_lookup_icall_symbol
 mono_lookup_internal_call
 mono_lookup_pinvoke_call
@@ -770,6 +776,7 @@ mono_security_core_clr_require_elevated_permissions
 mono_security_core_clr_set_options
 mono_security_enable_core_clr
 mono_security_set_core_clr_platform_callback
+mono_set_allocator_vtable
 mono_set_assemblies_path
 mono_set_break_policy
 mono_set_config_dir
@@ -853,14 +860,20 @@ mono_threads_attach_coop
 mono_threads_attach_tools_thread
 mono_threads_detach_coop
 mono_threads_enter_gc_safe_region
+mono_threads_enter_gc_safe_region_unbalanced
 mono_threads_enter_gc_unsafe_region
+mono_threads_enter_gc_unsafe_region_unbalanced
 mono_threads_exit_gc_safe_region
+mono_threads_exit_gc_safe_region_unbalanced
 mono_threads_exit_gc_unsafe_region
+mono_threads_exit_gc_unsafe_region_unbalanced
 mono_threads_get_default_stacksize
 mono_threads_request_thread_dump
 mono_threads_set_default_stacksize
 mono_trace_set_level_string
 mono_trace_set_log_handler
+mono_trace_set_logdest_string
+mono_trace_set_logheader_string
 mono_trace_set_mask_string
 mono_trace_set_print_handler
 mono_trace_set_printerr_handler
index 23f0ec49c4655646527a7753ec7930e516244356..5384dc846b4cb2c0ee72d1e25695c04c47c44898 100644 (file)
@@ -1,21 +1,90 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup Label="MonoDefines">
-    <top_srcdir>$(MSBuildProjectDirectory)\..</top_srcdir>
-    <LIBGC_CPPFLAGS_INCLUDE>$(top_srcdir)\libgc\include</LIBGC_CPPFLAGS_INCLUDE>
-    <GLIB_CFLAGS_INCLUDE>$(top_srcdir)\eglib\src</GLIB_CFLAGS_INCLUDE>
-    <BOEHM_DEFINES>HAVE_BOEHM_GC</BOEHM_DEFINES>
+  <PropertyGroup Label="UserMacros">
+    <!-- Change this to custom build tree location to enable out of source tree builds, example c:/mono-build/ -->
+    <MONO_BUILD_DIR_PREFIX>$(MSBuildProjectDirectory)/./build/</MONO_BUILD_DIR_PREFIX>
+    <!-- Change this to custom distribution tree location to enable out of source tree distribution, example c:/mono-dist/ -->
+    <MONO_INSTALL_DIR_PREFIX>$(MSBuildProjectDirectory)/./dist/</MONO_INSTALL_DIR_PREFIX>
+    <!-- GC in use, sgen or boehm, default is sgen. -->
+    <MONO_TARGET_GC>sgen</MONO_TARGET_GC>
+    <!-- When true, build targets will get a suffix based on used GC. Makes it possible to have builds using different GC's in same build folders, sharing common targets. -->
+    <MONO_USE_TARGET_SUFFIX>true</MONO_USE_TARGET_SUFFIX>
+    <!-- When true, build will get a separate build folder based on used GC. Makes it possible separate builds into different output folders under the same build prefix. -->
+    <MONO_USE_SEPARATE_BUILD_DIR>true</MONO_USE_SEPARATE_BUILD_DIR>
+    <!-- When true, all binaries and libraries will link using static c-runtime. When false, all binaries and libraries will link using dynamic c-runtime.  -->
+    <MONO_USE_STATIC_C_RUNTIME>false</MONO_USE_STATIC_C_RUNTIME>
+  </PropertyGroup>
+  <PropertyGroup Label="MonoDirectories">
+    <top_srcdir>$(MSBuildProjectDirectory)/..</top_srcdir>
+    <MONO_DIR>$(top_srcdir)</MONO_DIR>
+    <MONO_INCLUDE_DIR>$(MONO_DIR)/mono</MONO_INCLUDE_DIR>
+    <MONO_EGLIB_INCLUDE_DIR>$(MONO_DIR)/eglib;$(MONO_DIR)/eglib/include;$(MONO_DIR)/eglib/test</MONO_EGLIB_INCLUDE_DIR>
+    <MONO_EGLIB_SOURCE_DIR>$(MONO_DIR)/eglib/src</MONO_EGLIB_SOURCE_DIR>
+    <MONO_LIBGC_INCLUDE_DIR>$(MONO_DIR)/libgc/include</MONO_LIBGC_INCLUDE_DIR>
+    <MONO_LIBGC_SOURCE_DIR>$(MONO_DIR)/libgc/src</MONO_LIBGC_SOURCE_DIR>
+    <MONO_JIT_INCLUDE_DIR>$(MONO_INCLUDE_DIR)/jit</MONO_JIT_INCLUDE_DIR>
+    <MONO_JIT_SOURCE_DIR>$(MONO_INCLUDE_DIR)/jit</MONO_JIT_SOURCE_DIR>
+    <LIBGC_CPPFLAGS_INCLUDE>$(MONO_LIBGC_INCLUDE_DIR)</LIBGC_CPPFLAGS_INCLUDE>
+    <GLIB_CFLAGS_INCLUDE>$(MONO_EGLIB_SOURCE_DIR)</GLIB_CFLAGS_INCLUDE>
+  </PropertyGroup>
+  <PropertyGroup Label="Static-C-Runtime" Condition="$(MONO_USE_STATIC_C_RUNTIME)=='true'">
+    <MONO_C_RUNTIME Condition="'$(Configuration)'=='Debug'">MultiThreadedDebug</MONO_C_RUNTIME>
+    <MONO_C_RUNTIME Condition="'$(Configuration)'!='Debug'">MultiThreaded</MONO_C_RUNTIME>
+  </PropertyGroup>
+  <PropertyGroup Label="Dynamic-C-Runtime" Condition="$(MONO_USE_STATIC_C_RUNTIME)!='true'">
+    <MONO_C_RUNTIME Condition="'$(Configuration)'=='Debug'">MultiThreadedDebugDLL</MONO_C_RUNTIME>
+    <MONO_C_RUNTIME Condition="'$(Configuration)'!='Debug'">MultiThreadedDLL</MONO_C_RUNTIME>
+  </PropertyGroup>
+  <PropertyGroup Label="MonoSGEN" Condition="$(MONO_TARGET_GC)=='sgen' Or $(MONO_TARGET_GC)!='boehm'">
     <SGEN_DEFINES>HAVE_SGEN_GC;HAVE_MOVING_COLLECTOR;HAVE_WRITE_BARRIERS</SGEN_DEFINES>
+    <GC_DEFINES>$(SGEN_DEFINES)</GC_DEFINES>
+    <GC_LIB>libgcmonosgen.lib</GC_LIB>
+    <MONO_DEF>monosgen.def</MONO_DEF>
+    <MONO_TARGET_SUFFIX Condition="'$(MONO_USE_TARGET_SUFFIX)'=='true'">-sgen</MONO_TARGET_SUFFIX>
+    <MONO_BUILD_DIR_PREFIX Condition="'$(MONO_USE_SEPARATE_BUILD_DIR)'=='true'">$(MONO_BUILD_DIR_PREFIX)sgen/</MONO_BUILD_DIR_PREFIX>
+  </PropertyGroup>
+  <PropertyGroup Label="MonoBOEHM" Condition="$(MONO_TARGET_GC)=='boehm'">
+    <BOEHM_DEFINES>HAVE_BOEHM_GC</BOEHM_DEFINES>
+    <GC_DEFINES>$(BOEHM_DEFINES)</GC_DEFINES>
+    <GC_LIB>libgc.lib</GC_LIB>
+    <MONO_DEF>mono.def</MONO_DEF>
+    <MONO_TARGET_SUFFIX Condition="'$(MONO_USE_TARGET_SUFFIX)'=='true'">-boehm</MONO_TARGET_SUFFIX>
+    <MONO_BUILD_DIR_PREFIX Condition="'$(MONO_USE_SEPARATE_BUILD_DIR)'=='true'">$(MONO_BUILD_DIR_PREFIX)boehm/</MONO_BUILD_DIR_PREFIX>
+  </PropertyGroup>
+  <PropertyGroup Label="MonoProfiler">
+    <VTUNE_INCLUDE_DIR>$(ProgramFiles)/Intel/VTune Amplifier XE 2013/include</VTUNE_INCLUDE_DIR>
   </PropertyGroup>
+  <ItemGroup>
+    <BuildMacro Include="MONO_BUILD_DIR_PREFIX">
+      <Value>$(MONO_BUILD_DIR_PREFIX)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_INSTALL_DIR_PREFIX">
+      <Value>$(MONO_INSTALL_DIR_PREFIX)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_TARGET_GC">
+      <Value>$(MONO_TARGET_GC)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_USE_TARGET_SUFFIX">
+      <Value>$(MONO_USE_TARGET_SUFFIX)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_USE_SEPARATE_BUILD_DIR">
+      <Value>$(MONO_USE_SEPARATE_BUILD_DIR)</Value>
+    </BuildMacro>
+    <BuildMacro Include="MONO_USE_STATIC_C_RUNTIME">
+      <Value>$(MONO_USE_STATIC_C_RUNTIME)</Value>
+    </BuildMacro>
+  </ItemGroup>
   <ItemDefinitionGroup>
     <ClCompile>
       <DllExportPreprocessorDefinitions>MONO_DLL_EXPORT</DllExportPreprocessorDefinitions>
       <DllImportPreprocessorDefinitions>MONO_DLL_IMPORT</DllImportPreprocessorDefinitions>
-      <PreprocessorDefinitions>__default_codegen__;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H;GC_NOT_DLL;WIN32_THREADS;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;_UNICODE;UNICODE;WIN32_THREADS;FD_SETSIZE=1024;$(PreprocessorDefinitions);_WINSOCKAPI_</PreprocessorDefinitions>
-         <DisableSpecificWarnings>4273;4005</DisableSpecificWarnings>
+      <PreprocessorDefinitions>__default_codegen__;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H;GC_NOT_DLL;WIN32_THREADS;WINVER=0x0600;_WIN32_WINNT=0x0600;_WIN32_IE=0x0501;_UNICODE;UNICODE;FD_SETSIZE=1024;%(PreprocessorDefinitions);</PreprocessorDefinitions>
+      <DisableSpecificWarnings>4273;4005</DisableSpecificWarnings>
+      <RuntimeLibrary>$(MONO_C_RUNTIME)</RuntimeLibrary>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>Mswsock.lib;ws2_32.lib;ole32.lib;oleaut32.lib;psapi.lib;version.lib;advapi32.lib;winmm.lib;kernel32.lib;$(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>Mswsock.lib;ws2_32.lib;ole32.lib;oleaut32.lib;psapi.lib;version.lib;advapi32.lib;winmm.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(MONO_BUILD_DIR_PREFIX)$(Platform)/lib/$(Configuration)</AdditionalLibraryDirectories>
     </Link>
-    </ItemDefinitionGroup>
-</Project>
+  </ItemDefinitionGroup>
+</Project>
\ No newline at end of file
index 17660be4ef0d7e875b1575794c737fea8aee2538..0861cda54050dc6d3e14cfd52a335da11e7d7542 100644 (file)
@@ -1,6 +1,8 @@
-Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual Studio 2010\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Embedded Samples", "Embedded Samples", "{5FE09AA5-C3C9-45EA-A323-36A11B653CEC}"\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 14\r
+VisualStudioVersion = 14.0.25123.0\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EmbeddedSamples", "EmbeddedSamples", "{5FE09AA5-C3C9-45EA-A323-36A11B653CEC}"\r
 EndProject\r
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{EE2CC761-9652-44AC-9204-7EB31194CAA6}"\r
 EndProject\r
@@ -10,297 +12,387 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{ECA11C76
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmdesc", "genmdesc.vcxproj", "{B7098DFA-31E6-4006-8A15-1C9A4E925149}"\r
        ProjectSection(ProjectDependencies) = postProject\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4} = {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmono", "libmono.vcxproj", "{CB0D9E92-293C-439C-9AC7-C5F59B6E0771}"\r
        ProjectSection(ProjectDependencies) = postProject\r
+               {EB56000B-C80B-4E8B-908D-D84D31B517D3} = {EB56000B-C80B-4E8B-908D-D84D31B517D3}\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739} = {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4} = {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+               {B7098DFA-31E6-4006-8A15-1C9A4E925149} = {B7098DFA-31E6-4006-8A15-1C9A4E925149}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-invoke", "test-invoke.vcxproj", "{C5639B3F-288A-4A4B-A4A5-C0D85834221D}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "teste", "teste.vcxproj", "{6FDE4E5E-57D0-432F-A987-6C226A7827E4}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mono", "mono.vcxproj", "{A0EDDCD9-940F-432C-A28F-7EF322437D79}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgc", "libgc.vcxproj", "{EB56000B-C80B-4E8B-908D-D84D31B517D3}"\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monodis", "monodis.vcxproj", "{37F50E5A-4818-46CF-81FE-4BB06DE5D42E}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pedump", "pedump.vcxproj", "{84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monograph", "monograph.vcxproj", "{CA2A69D6-3B9D-45A5-8BF7-4E242E683122}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-metadata", "test-metadata.vcxproj", "{C2EB666E-9146-4B7A-85F6-25F9EA313770}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eglib", "eglib.vcxproj", "{158073ED-99AE-4196-9EDC-DDB2344F8466}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4} = {92AE7622-5F58-4234-9A26-9EC71876B3F4}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_eglib", "test_eglib.vcxproj", "{80A0620A-3478-4E1A-AA7C-0D2387B892AB}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtest", "libtest.vcxproj", "{5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monoposixhelper", "monoposixhelper.vcxproj", "{33014734-0F46-4099-9A21-0C989E428681}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jay", "..\mcs\jay\jay.vcxproj", "{5D485D32-3B9F-4287-AB24-C8DA5B89F537}"\r
 EndProject\r
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Profilers", "Profilers", "{4CFD7702-60B2-4E82-BFAD-FCBB53EB4DA2}"\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "profiler-vtune", "profiler-vtune.vcxproj", "{F51017F9-B7FB-4F87-B7B5-12799D965783}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmonoutils", "libmonoutils.vcxproj", "{8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmonoruntime", "libmonoruntime.vcxproj", "{C36612BD-22D3-4B95-85E2-7FDC4FC5D739}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+       EndProjectSection\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Runtime", "Runtime", "{DE3617B4-17A8-4E5F-A00F-BA43D956881F}"\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildTargets", "BuildTargets", "{DC782E23-920A-4873-82A7-37F195FB92C1}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build-all", "build-all.vcxproj", "{5362490B-8516-44EE-9987-014C015A080A}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {80A0620A-3478-4E1A-AA7C-0D2387B892AB} = {80A0620A-3478-4E1A-AA7C-0D2387B892AB}\r
+               {EB56000B-C80B-4E8B-908D-D84D31B517D3} = {EB56000B-C80B-4E8B-908D-D84D31B517D3}\r
+               {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4} = {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}\r
+               {5D485D32-3B9F-4287-AB24-C8DA5B89F537} = {5D485D32-3B9F-4287-AB24-C8DA5B89F537}\r
+               {33014734-0F46-4099-9A21-0C989E428681} = {33014734-0F46-4099-9A21-0C989E428681}\r
+               {C5639B3F-288A-4A4B-A4A5-C0D85834221D} = {C5639B3F-288A-4A4B-A4A5-C0D85834221D}\r
+               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3} = {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}\r
+               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E} = {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}\r
+               {6FDE4E5E-57D0-432F-A987-6C226A7827E4} = {6FDE4E5E-57D0-432F-A987-6C226A7827E4}\r
+               {C2EB666E-9146-4B7A-85F6-25F9EA313770} = {C2EB666E-9146-4B7A-85F6-25F9EA313770}\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739} = {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}\r
+               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4} = {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}\r
+               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122} = {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}\r
+               {A0EDDCD9-940F-432C-A28F-7EF322437D79} = {A0EDDCD9-940F-432C-A28F-7EF322437D79}\r
+               {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}\r
+               {F51017F9-B7FB-4F87-B7B5-12799D965783} = {F51017F9-B7FB-4F87-B7B5-12799D965783}\r
+               {B7098DFA-31E6-4006-8A15-1C9A4E925149} = {B7098DFA-31E6-4006-8A15-1C9A4E925149}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build-init", "build-init.vcxproj", "{92AE7622-5F58-4234-9A26-9EC71876B3F4}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build-install", "build-install.vcxproj", "{A9DC644B-9171-4FCD-BF21-2CC6D055FC40}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {B6E563B8-7F57-4F7F-9439-F2405D4E2522} = {B6E563B8-7F57-4F7F-9439-F2405D4E2522}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build-package", "build-package.vcxproj", "{B6E563B8-7F57-4F7F-9439-F2405D4E2522}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {5362490B-8516-44EE-9987-014C015A080A} = {5362490B-8516-44EE-9987-014C015A080A}\r
+       EndProjectSection\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GC", "GC", "{21DF4C80-0EC9-4BFE-8552-2D47FCEF419A}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgcmonosgen", "libgcmonosgen.vcxproj", "{C36612BD-22D3-4B95-85E2-7FDC4FC5D740}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4} = {92AE7622-5F58-4234-9A26-9EC71876B3F4}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mono-mini-regression-test", "mono-mini-regression-test.vcxproj", "{3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mono-mini-regression-aot-test", "mono-mini-regression-aot-test.vcxproj", "{D632D664-C0F5-4B60-9375-BDDAD5C7A649}"\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "regression", "regression", "{A0068765-334B-414C-8E21-8376CD2EC9F6}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmono-static", "libmono-static.vcxproj", "{CB0D9E92-293C-439C-9AC7-C5F59B6E0772}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug_SGen|Win32 = Debug_SGen|Win32\r
-               Debug_SGen|x64 = Debug_SGen|x64\r
                Debug|Win32 = Debug|Win32\r
                Debug|x64 = Debug|x64\r
-               Release_SGen|Win32 = Release_SGen|Win32\r
-               Release_SGen|x64 = Release_SGen|x64\r
                Release|Win32 = Release|Win32\r
                Release|x64 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
-               {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug_SGen|x64.Build.0 = Debug|x64\r
                {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|Win32.Build.0 = Debug|Win32\r
                {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|x64.ActiveCfg = Debug|x64\r
                {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Debug|x64.Build.0 = Debug|x64\r
-               {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release_SGen|Win32.Build.0 = Release|Win32\r
-               {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release_SGen|x64.ActiveCfg = Release|x64\r
-               {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release_SGen|x64.Build.0 = Release|x64\r
                {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Win32.ActiveCfg = Release|Win32\r
                {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|Win32.Build.0 = Release|Win32\r
                {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|x64.ActiveCfg = Release|x64\r
                {B7098DFA-31E6-4006-8A15-1C9A4E925149}.Release|x64.Build.0 = Release|x64\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug_SGen|Win32.ActiveCfg = Debug_SGen|Win32\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug_SGen|Win32.Build.0 = Debug_SGen|Win32\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug_SGen|x64.ActiveCfg = Debug_SGen|x64\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug_SGen|x64.Build.0 = Debug_SGen|x64\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|Win32.Build.0 = Debug|Win32\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|x64.ActiveCfg = Debug|x64\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Debug|x64.Build.0 = Debug|x64\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release_SGen|Win32.ActiveCfg = Release_SGen|Win32\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release_SGen|Win32.Build.0 = Release_SGen|Win32\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release_SGen|x64.ActiveCfg = Release_SGen|x64\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release_SGen|x64.Build.0 = Release_SGen|x64\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Win32.ActiveCfg = Release|Win32\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|Win32.Build.0 = Release|Win32\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|x64.ActiveCfg = Release|x64\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}.Release|x64.Build.0 = Release|x64\r
-               {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
                {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|Win32.Build.0 = Debug|Win32\r
                {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|x64.ActiveCfg = Debug|x64\r
-               {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release_SGen|x64.ActiveCfg = Release|x64\r
+               {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Debug|x64.Build.0 = Debug|x64\r
                {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Win32.ActiveCfg = Release|Win32\r
+               {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|Win32.Build.0 = Release|Win32\r
                {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|x64.ActiveCfg = Release|x64\r
-               {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
+               {C5639B3F-288A-4A4B-A4A5-C0D85834221D}.Release|x64.Build.0 = Release|x64\r
                {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|Win32.Build.0 = Debug|Win32\r
                {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|x64.ActiveCfg = Debug|x64\r
-               {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release_SGen|x64.ActiveCfg = Release|x64\r
+               {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Debug|x64.Build.0 = Debug|x64\r
                {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Win32.ActiveCfg = Release|Win32\r
+               {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|Win32.Build.0 = Release|Win32\r
                {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|x64.ActiveCfg = Release|x64\r
-               {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug_SGen|Win32.ActiveCfg = Debug_SGen|Win32\r
-               {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug_SGen|Win32.Build.0 = Debug_SGen|Win32\r
-               {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug_SGen|x64.ActiveCfg = Debug_SGen|x64\r
-               {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug_SGen|x64.Build.0 = Debug_SGen|x64\r
+               {6FDE4E5E-57D0-432F-A987-6C226A7827E4}.Release|x64.Build.0 = Release|x64\r
                {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|Win32.Build.0 = Debug|Win32\r
                {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|x64.ActiveCfg = Debug|x64\r
                {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Debug|x64.Build.0 = Debug|x64\r
-               {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release_SGen|Win32.ActiveCfg = Release_SGen|Win32\r
-               {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release_SGen|Win32.Build.0 = Release_SGen|Win32\r
-               {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release_SGen|x64.ActiveCfg = Release_SGen|x64\r
-               {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release_SGen|x64.Build.0 = Release_SGen|x64\r
                {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Win32.ActiveCfg = Release|Win32\r
                {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|Win32.Build.0 = Release|Win32\r
                {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|x64.ActiveCfg = Release|x64\r
                {A0EDDCD9-940F-432C-A28F-7EF322437D79}.Release|x64.Build.0 = Release|x64\r
-               {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
-               {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug_SGen|x64.Build.0 = Debug|x64\r
                {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|Win32.Build.0 = Debug|Win32\r
                {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|x64.ActiveCfg = Debug|x64\r
                {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Debug|x64.Build.0 = Debug|x64\r
-               {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release_SGen|Win32.Build.0 = Release|Win32\r
-               {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release_SGen|x64.ActiveCfg = Release|x64\r
-               {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release_SGen|x64.Build.0 = Release|x64\r
                {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Win32.ActiveCfg = Release|Win32\r
                {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|Win32.Build.0 = Release|Win32\r
                {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|x64.ActiveCfg = Release|x64\r
                {EB56000B-C80B-4E8B-908D-D84D31B517D3}.Release|x64.Build.0 = Release|x64\r
-               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
                {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|Win32.Build.0 = Debug|Win32\r
                {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|x64.ActiveCfg = Debug|x64\r
-               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release_SGen|x64.ActiveCfg = Release|x64\r
+               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Debug|x64.Build.0 = Debug|x64\r
                {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Win32.ActiveCfg = Release|Win32\r
+               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|Win32.Build.0 = Release|Win32\r
                {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|x64.ActiveCfg = Release|x64\r
-               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
+               {37F50E5A-4818-46CF-81FE-4BB06DE5D42E}.Release|x64.Build.0 = Release|x64\r
                {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|Win32.Build.0 = Debug|Win32\r
                {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|x64.ActiveCfg = Debug|x64\r
-               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release_SGen|x64.ActiveCfg = Release|x64\r
+               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Debug|x64.Build.0 = Debug|x64\r
                {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Win32.ActiveCfg = Release|Win32\r
+               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|Win32.Build.0 = Release|Win32\r
                {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|x64.ActiveCfg = Release|x64\r
-               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
+               {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}.Release|x64.Build.0 = Release|x64\r
                {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|Win32.Build.0 = Debug|Win32\r
                {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|x64.ActiveCfg = Debug|x64\r
-               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release_SGen|x64.ActiveCfg = Release|x64\r
+               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Debug|x64.Build.0 = Debug|x64\r
                {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Win32.ActiveCfg = Release|Win32\r
+               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|Win32.Build.0 = Release|Win32\r
                {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|x64.ActiveCfg = Release|x64\r
-               {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
+               {CA2A69D6-3B9D-45A5-8BF7-4E242E683122}.Release|x64.Build.0 = Release|x64\r
                {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|Win32.Build.0 = Debug|Win32\r
                {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|x64.ActiveCfg = Debug|x64\r
-               {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release_SGen|x64.ActiveCfg = Release|x64\r
+               {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Debug|x64.Build.0 = Debug|x64\r
                {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Win32.ActiveCfg = Release|Win32\r
+               {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|Win32.Build.0 = Release|Win32\r
                {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|x64.ActiveCfg = Release|x64\r
-               {158073ED-99AE-4196-9EDC-DDB2344F8466}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {158073ED-99AE-4196-9EDC-DDB2344F8466}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
-               {158073ED-99AE-4196-9EDC-DDB2344F8466}.Debug_SGen|x64.Build.0 = Debug|x64\r
+               {C2EB666E-9146-4B7A-85F6-25F9EA313770}.Release|x64.Build.0 = Release|x64\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466}.Debug|Win32.Build.0 = Debug|Win32\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466}.Debug|x64.ActiveCfg = Debug|x64\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466}.Debug|x64.Build.0 = Debug|x64\r
-               {158073ED-99AE-4196-9EDC-DDB2344F8466}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {158073ED-99AE-4196-9EDC-DDB2344F8466}.Release_SGen|Win32.Build.0 = Release|Win32\r
-               {158073ED-99AE-4196-9EDC-DDB2344F8466}.Release_SGen|x64.ActiveCfg = Release|x64\r
-               {158073ED-99AE-4196-9EDC-DDB2344F8466}.Release_SGen|x64.Build.0 = Release|x64\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466}.Release|Win32.ActiveCfg = Release|Win32\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466}.Release|Win32.Build.0 = Release|Win32\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466}.Release|x64.ActiveCfg = Release|x64\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466}.Release|x64.Build.0 = Release|x64\r
-               {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
                {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Debug|Win32.Build.0 = Debug|Win32\r
                {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Debug|x64.ActiveCfg = Debug|x64\r
-               {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Release_SGen|x64.ActiveCfg = Release|x64\r
+               {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Debug|x64.Build.0 = Debug|x64\r
                {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Release|Win32.ActiveCfg = Release|Win32\r
+               {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Release|Win32.Build.0 = Release|Win32\r
                {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Release|x64.ActiveCfg = Release|x64\r
-               {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
-               {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Debug_SGen|x64.Build.0 = Debug|x64\r
+               {80A0620A-3478-4E1A-AA7C-0D2387B892AB}.Release|x64.Build.0 = Release|x64\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Debug|Win32.Build.0 = Debug|Win32\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Debug|x64.ActiveCfg = Debug|x64\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Debug|x64.Build.0 = Debug|x64\r
-               {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Release_SGen|Win32.Build.0 = Release|Win32\r
-               {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Release_SGen|x64.ActiveCfg = Release|x64\r
-               {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Release_SGen|x64.Build.0 = Release|x64\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Release|Win32.ActiveCfg = Release|Win32\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Release|Win32.Build.0 = Release|Win32\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Release|x64.ActiveCfg = Release|x64\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4}.Release|x64.Build.0 = Release|x64\r
-               {33014734-0F46-4099-9A21-0C989E428681}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {33014734-0F46-4099-9A21-0C989E428681}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
-               {33014734-0F46-4099-9A21-0C989E428681}.Debug_SGen|x64.Build.0 = Debug|x64\r
                {33014734-0F46-4099-9A21-0C989E428681}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {33014734-0F46-4099-9A21-0C989E428681}.Debug|Win32.Build.0 = Debug|Win32\r
                {33014734-0F46-4099-9A21-0C989E428681}.Debug|x64.ActiveCfg = Debug|x64\r
                {33014734-0F46-4099-9A21-0C989E428681}.Debug|x64.Build.0 = Debug|x64\r
-               {33014734-0F46-4099-9A21-0C989E428681}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {33014734-0F46-4099-9A21-0C989E428681}.Release_SGen|Win32.Build.0 = Release|Win32\r
-               {33014734-0F46-4099-9A21-0C989E428681}.Release_SGen|x64.ActiveCfg = Release|x64\r
-               {33014734-0F46-4099-9A21-0C989E428681}.Release_SGen|x64.Build.0 = Release|x64\r
                {33014734-0F46-4099-9A21-0C989E428681}.Release|Win32.ActiveCfg = Release|Win32\r
                {33014734-0F46-4099-9A21-0C989E428681}.Release|Win32.Build.0 = Release|Win32\r
                {33014734-0F46-4099-9A21-0C989E428681}.Release|x64.ActiveCfg = Release|x64\r
                {33014734-0F46-4099-9A21-0C989E428681}.Release|x64.Build.0 = Release|x64\r
-               {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|Win32.Build.0 = Debug|Win32\r
-               {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|x64.ActiveCfg = Debug|Win32\r
                {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug|Win32.Build.0 = Debug|Win32\r
                {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug|x64.ActiveCfg = Debug|Win32\r
-               {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release_SGen|Win32.Build.0 = Release|Win32\r
-               {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release_SGen|x64.ActiveCfg = Release|Win32\r
                {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release|Win32.ActiveCfg = Release|Win32\r
                {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release|Win32.Build.0 = Release|Win32\r
                {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release|x64.ActiveCfg = Release|Win32\r
-               {F51017F9-B7FB-4F87-B7B5-12799D965783}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {F51017F9-B7FB-4F87-B7B5-12799D965783}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
                {F51017F9-B7FB-4F87-B7B5-12799D965783}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {F51017F9-B7FB-4F87-B7B5-12799D965783}.Debug|x64.ActiveCfg = Debug|x64\r
-               {F51017F9-B7FB-4F87-B7B5-12799D965783}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {F51017F9-B7FB-4F87-B7B5-12799D965783}.Release_SGen|x64.ActiveCfg = Release|x64\r
                {F51017F9-B7FB-4F87-B7B5-12799D965783}.Release|Win32.ActiveCfg = Release|Win32\r
                {F51017F9-B7FB-4F87-B7B5-12799D965783}.Release|x64.ActiveCfg = Release|x64\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Debug_SGen|Win32.ActiveCfg = Debug|Win32\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Debug_SGen|Win32.Build.0 = Debug|Win32\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Debug_SGen|x64.ActiveCfg = Debug|x64\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Debug_SGen|x64.Build.0 = Debug|x64\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Debug|Win32.Build.0 = Debug|Win32\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Debug|x64.ActiveCfg = Debug|x64\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Debug|x64.Build.0 = Debug|x64\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Release_SGen|Win32.ActiveCfg = Release|Win32\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Release_SGen|Win32.Build.0 = Release|Win32\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Release_SGen|x64.ActiveCfg = Release|x64\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Release_SGen|x64.Build.0 = Release|x64\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Release|Win32.ActiveCfg = Release|Win32\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Release|Win32.Build.0 = Release|Win32\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Release|x64.ActiveCfg = Release|x64\r
                {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}.Release|x64.Build.0 = Release|x64\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Debug_SGen|Win32.ActiveCfg = Debug_SGen|Win32\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Debug_SGen|Win32.Build.0 = Debug_SGen|Win32\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Debug_SGen|x64.ActiveCfg = Debug_SGen|x64\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Debug_SGen|x64.Build.0 = Debug_SGen|x64\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Debug|Win32.Build.0 = Debug|Win32\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Debug|x64.ActiveCfg = Debug|x64\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Debug|x64.Build.0 = Debug|x64\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Release_SGen|Win32.ActiveCfg = Release_SGen|Win32\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Release_SGen|Win32.Build.0 = Release_SGen|Win32\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Release_SGen|x64.ActiveCfg = Release_SGen|x64\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Release_SGen|x64.Build.0 = Release_SGen|x64\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Release|Win32.ActiveCfg = Release|Win32\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Release|Win32.Build.0 = Release|Win32\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Release|x64.ActiveCfg = Release|x64\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D739}.Release|x64.Build.0 = Release|x64\r
+               {5362490B-8516-44EE-9987-014C015A080A}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {5362490B-8516-44EE-9987-014C015A080A}.Debug|x64.ActiveCfg = Debug|x64\r
+               {5362490B-8516-44EE-9987-014C015A080A}.Release|Win32.ActiveCfg = Release|Win32\r
+               {5362490B-8516-44EE-9987-014C015A080A}.Release|x64.ActiveCfg = Release|x64\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4}.Debug|Win32.Build.0 = Debug|Win32\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4}.Debug|x64.ActiveCfg = Debug|x64\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4}.Debug|x64.Build.0 = Debug|x64\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4}.Release|Win32.ActiveCfg = Release|Win32\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4}.Release|Win32.Build.0 = Release|Win32\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4}.Release|x64.ActiveCfg = Release|x64\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4}.Release|x64.Build.0 = Release|x64\r
+               {A9DC644B-9171-4FCD-BF21-2CC6D055FC40}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {A9DC644B-9171-4FCD-BF21-2CC6D055FC40}.Debug|x64.ActiveCfg = Debug|x64\r
+               {A9DC644B-9171-4FCD-BF21-2CC6D055FC40}.Release|Win32.ActiveCfg = Release|Win32\r
+               {A9DC644B-9171-4FCD-BF21-2CC6D055FC40}.Release|x64.ActiveCfg = Release|x64\r
+               {B6E563B8-7F57-4F7F-9439-F2405D4E2522}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {B6E563B8-7F57-4F7F-9439-F2405D4E2522}.Debug|x64.ActiveCfg = Debug|x64\r
+               {B6E563B8-7F57-4F7F-9439-F2405D4E2522}.Release|Win32.ActiveCfg = Release|Win32\r
+               {B6E563B8-7F57-4F7F-9439-F2405D4E2522}.Release|x64.ActiveCfg = Release|x64\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Debug|Win32.Build.0 = Debug|Win32\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Debug|x64.ActiveCfg = Debug|x64\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Debug|x64.Build.0 = Debug|x64\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Release|Win32.ActiveCfg = Release|Win32\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Release|Win32.Build.0 = Release|Win32\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Release|x64.ActiveCfg = Release|x64\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Release|x64.Build.0 = Release|x64\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Debug|Win32.Build.0 = Debug|Win32\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Debug|x64.ActiveCfg = Debug|x64\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Debug|x64.Build.0 = Debug|x64\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Release|Win32.ActiveCfg = Release|Win32\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Release|Win32.Build.0 = Release|Win32\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Release|x64.ActiveCfg = Release|x64\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Release|x64.Build.0 = Release|x64\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649}.Debug|Win32.Build.0 = Debug|Win32\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649}.Debug|x64.ActiveCfg = Debug|x64\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649}.Debug|x64.Build.0 = Debug|x64\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649}.Release|Win32.ActiveCfg = Release|Win32\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649}.Release|Win32.Build.0 = Release|Win32\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649}.Release|x64.ActiveCfg = Release|x64\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649}.Release|x64.Build.0 = Release|x64\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Debug|Win32.Build.0 = Debug|Win32\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Debug|x64.ActiveCfg = Debug|x64\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Debug|x64.Build.0 = Debug|x64\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Release|Win32.ActiveCfg = Release|Win32\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Release|Win32.Build.0 = Release|Win32\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Release|x64.ActiveCfg = Release|x64\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
        EndGlobalSection\r
        GlobalSection(NestedProjects) = preSolution\r
+               {B7098DFA-31E6-4006-8A15-1C9A4E925149} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {DE3617B4-17A8-4E5F-A00F-BA43D956881F}\r
                {C5639B3F-288A-4A4B-A4A5-C0D85834221D} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
                {6FDE4E5E-57D0-432F-A987-6C226A7827E4} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
-               {C2EB666E-9146-4B7A-85F6-25F9EA313770} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
-               {B7098DFA-31E6-4006-8A15-1C9A4E925149} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
+               {A0EDDCD9-940F-432C-A28F-7EF322437D79} = {DE3617B4-17A8-4E5F-A00F-BA43D956881F}\r
+               {EB56000B-C80B-4E8B-908D-D84D31B517D3} = {21DF4C80-0EC9-4BFE-8552-2D47FCEF419A}\r
                {37F50E5A-4818-46CF-81FE-4BB06DE5D42E} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
                {84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
                {CA2A69D6-3B9D-45A5-8BF7-4E242E683122} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
-               {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
-               {EB56000B-C80B-4E8B-908D-D84D31B517D3} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
+               {C2EB666E-9146-4B7A-85F6-25F9EA313770} = {5FE09AA5-C3C9-45EA-A323-36A11B653CEC}\r
                {158073ED-99AE-4196-9EDC-DDB2344F8466} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
-               {33014734-0F46-4099-9A21-0C989E428681} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
-               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
-               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
                {80A0620A-3478-4E1A-AA7C-0D2387B892AB} = {ECA11C76-E192-4F67-A8FA-28B637D9716F}\r
                {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4} = {ECA11C76-E192-4F67-A8FA-28B637D9716F}\r
+               {33014734-0F46-4099-9A21-0C989E428681} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
+               {5D485D32-3B9F-4287-AB24-C8DA5B89F537} = {EE2CC761-9652-44AC-9204-7EB31194CAA6}\r
                {F51017F9-B7FB-4F87-B7B5-12799D965783} = {4CFD7702-60B2-4E82-BFAD-FCBB53EB4DA2}\r
+               {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D739} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1}\r
+               {5362490B-8516-44EE-9987-014C015A080A} = {DC782E23-920A-4873-82A7-37F195FB92C1}\r
+               {92AE7622-5F58-4234-9A26-9EC71876B3F4} = {DC782E23-920A-4873-82A7-37F195FB92C1}\r
+               {A9DC644B-9171-4FCD-BF21-2CC6D055FC40} = {DC782E23-920A-4873-82A7-37F195FB92C1}\r
+               {B6E563B8-7F57-4F7F-9439-F2405D4E2522} = {DC782E23-920A-4873-82A7-37F195FB92C1}\r
+               {C36612BD-22D3-4B95-85E2-7FDC4FC5D740} = {21DF4C80-0EC9-4BFE-8552-2D47FCEF419A}\r
+               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D} = {A0068765-334B-414C-8E21-8376CD2EC9F6}\r
+               {D632D664-C0F5-4B60-9375-BDDAD5C7A649} = {A0068765-334B-414C-8E21-8376CD2EC9F6}\r
+               {A0068765-334B-414C-8E21-8376CD2EC9F6} = {ECA11C76-E192-4F67-A8FA-28B637D9716F}\r
+               {CB0D9E92-293C-439C-9AC7-C5F59B6E0772} = {DE3617B4-17A8-4E5F-A00F-BA43D956881F}\r
        EndGlobalSection\r
        GlobalSection(ExtensibilityGlobals) = postSolution\r
                AMDCaProjectFile = C:\Users\Owner\Development\monogit\mono\msvc\CodeAnalyst\mono.caw\r
index 66f1f0ef99cc5a6ad402271dc976c8b89febc524..12cceebe601e6c6be260770cff6f7ef0598e753a 100644 (file)
@@ -1,14 +1,6 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug_SGen|Win32">\r
-      <Configuration>Debug_SGen</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug_SGen|x64">\r
-      <Configuration>Debug_SGen</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
       <Platform>Win32</Platform>\r
@@ -17,14 +9,6 @@
       <Configuration>Debug</Configuration>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|Win32">\r
-      <Configuration>Release_SGen</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release_SGen|x64">\r
-      <Configuration>Release_SGen</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Release|Win32">\r
       <Configuration>Release</Configuration>\r
       <Platform>Win32</Platform>\r
       <Platform>x64</Platform>\r
     </ProjectConfiguration>\r
   </ItemGroup>\r
-  <Import Project="mono.props" />\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{A0EDDCD9-940F-432C-A28F-7EF322437D79}</ProjectGuid>\r
     <RootNamespace>mono</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">$(ProjectName)-sgen</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">$(ProjectName)-sgen</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">$(ProjectName)-sgen</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">$(ProjectName)-sgen</TargetName>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <LinkIncremental>false</LinkIncremental>\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <LinkIncremental>false</LinkIncremental>\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\;..\jit;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_LIBGC_SOURCE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <ProjectReference />\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-    </Link>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\;..\jit;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-      <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <ProjectReference />\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\;..\jit;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_LIBGC_SOURCE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\;..\jit;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-      <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
+      <ShowProgress>\r
+      </ShowProgress>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\;..\jit;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_LIBGC_SOURCE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     </Link>\r
   </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'">\r
-    <ClCompile>\r
-      <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\;..\jit;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-    </ClCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <Midl>\r
       <TargetEnvironment>X64</TargetEnvironment>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\;..\jit;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CompileAs>CompileAsC</CompileAs>\r
-    </ClCompile>\r
-    <ProjectReference>\r
-      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
-    </ProjectReference>\r
-    <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\;..\jit;..\eglib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_LIBGC_SOURCE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
   <ItemGroup>\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
     <ProjectReference Include="libmono.vcxproj">\r
       <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/mono.vcxproj.filters b/msvc/mono.vcxproj.filters
new file mode 100644 (file)
index 0000000..8d1de7d
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{b38b5984-2dce-4e4c-b7a9-efbfd9020787}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{a5d90d91-dfa6-4431-a256-9a4f05987798}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{9da0f496-002d-4de5-bdce-b77a14368e4d}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\mini\main.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 9a739c622b362a421674251b9cdd62456b6e8b1a..7e7eb2df1552132be1d5f91f13028c9ee2f631ff 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{37F50E5A-4818-46CF-81FE-4BB06DE5D42E}</ProjectGuid>\r
     <RootNamespace>dis</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\;..\eglib\src;..\mono\;..\mono\jit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;HOST_WIN32;TARGET_WIN32;__i386__;TARGET_X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DisableSpecificWarnings>4996;4018;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ProjectReference>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>\r
-      </AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmonoutils.lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\;..\eglib\src;..\mono\;..\mono\jit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <ProjectReference>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
       <TargetMachine>MachineX86</TargetMachine>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmonoutils.lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\;..\eglib\src;..\mono\;..\mono\jit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;HOST_WIN32;TARGET_WIN32;__i386__;TARGET_X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DisableSpecificWarnings>4996;4018;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ProjectReference>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>\r
-      </AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmonoutils.lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
+      <ShowProgress>NotSet</ShowProgress>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\;..\eglib\src;..\mono\;..\mono\jit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <ProjectReference>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <TargetMachine>MachineX64</TargetMachine>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmonoutils.lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libgc.vcxproj">\r
+      <Project>{eb56000b-c80b-4e8b-908d-d84d31b517d3}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libgcmonosgen.vcxproj">\r
+      <Project>{c36612bd-22d3-4b95-85e2-7fdc4fc5d740}</Project>\r
     </ProjectReference>\r
     <ProjectReference Include="libmono.vcxproj">\r
       <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
diff --git a/msvc/monodis.vcxproj.filters b/msvc/monodis.vcxproj.filters
new file mode 100644 (file)
index 0000000..b2d0e1f
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\dis\declsec.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\dis\dis-cil.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\dis\dump.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\dis\get.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\dis\main.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\opcodes.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\dis\util.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\mono\dis\declsec.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\dis\dis-cil.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\dis\dump.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\dis\get.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\dis\meta.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\dis\push-pop.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\dis\util.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{930a623e-3354-4408-8337-bcc10486de30}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{ed6c7bc3-7db2-4d06-afe2-cef361f172a3}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{bcb6eb9e-da1a-4edf-936d-e7fbb7212858}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 962d5bacf515679a4d14793cf9b3ec324692db47..cce843fff837109d89404089ffbf4356c2d69fba 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{CA2A69D6-3B9D-45A5-8BF7-4E242E683122}</ProjectGuid>\r
     <RootNamespace>monograph</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\;..\eglib\src;..\mono\;..\mono\jit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;HOST_WIN32;TARGET_WIN32;__i386__;TARGET_X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>ws2_32.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\;..\eglib\src;..\mono\;..\mono\jit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
       <TargetMachine>MachineX86</TargetMachine>\r
+      <AdditionalDependencies>eglib.lib;mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\;..\eglib\src;..\mono\;..\mono\jit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;HOST_WIN32;TARGET_WIN32;__i386__;TARGET_X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>ws2_32.lib;libmono.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\;..\eglib\src;..\mono\;..\mono\jit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <TargetMachine>MachineX64</TargetMachine>\r
+      <AdditionalDependencies>eglib.lib;mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
     <ProjectReference Include="libmono.vcxproj">\r
       <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/monograph.vcxproj.filters b/msvc/monograph.vcxproj.filters
new file mode 100644 (file)
index 0000000..3391822
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\tools\monograph\monograph.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\opcodes.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{816448ff-856a-473b-8b2c-5a753c609efa}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{0fd5c5dd-f2f7-4c88-90a4-a18f2788fbd7}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{41563c0c-c891-43a9-aee3-e8f91a8c9162}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index df216b7622ccae357b321e8ac672676996079786..83304969ab20ec2f93929d747146fd03db64a965 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{33014734-0F46-4099-9A21-0C989E428681}</ProjectGuid>\r
     <RootNamespace>monoposixhelper</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MonoPosixHelper</TargetName>\r
     <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MonoPosixHelper</TargetName>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\eglib\src;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_DEBUG;__i386__;TARGET_X86;_WIN32_WINNT=0x0600;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
     </ClCompile>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
       <ModuleDefinitionFile>monoposixhelper.def</ModuleDefinitionFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX86</TargetMachine>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
     </Link>\r
+    <ProjectReference>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+    </ProjectReference>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     <Midl>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\eglib\src;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_DEBUG;__x86_64__;_WIN32_WINNT=0x0600;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <ModuleDefinitionFile>monoposixhelper.def</ModuleDefinitionFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Windows</SubSystem>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX64</TargetMachine>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
     </Link>\r
+    <ProjectReference>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+    </ProjectReference>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\eglib\src;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>NDEBUG;__i386__;TARGET_X86;i386;_WIN32_WINNT=0x0600;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <CompileAs>CompileAsC</CompileAs>\r
     </ClCompile>\r
     <Link>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
       <ModuleDefinitionFile>monoposixhelper.def</ModuleDefinitionFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX86</TargetMachine>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
     </Link>\r
+    <ProjectReference>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+    </ProjectReference>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <Midl>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>..\eglib\src;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>NDEBUG;__x86_64__;_WIN32_WINNT=0x0600;WIN64;_WIN64;WIN32;_WIN32;__WIN32__;_WINDOWS;WINDOWS;HOST_WIN32;TARGET_WIN32;_CRT_SECURE_NO_DEPRECATE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SubSystem>Windows</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <ImportLibrary>$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
+      <ImportLibrary>$(MONO_BUILD_DIR_PREFIX)$(Platform)\lib\$(Configuration)\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX64</TargetMachine>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
     </Link>\r
+    <ProjectReference>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+    </ProjectReference>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\support\adler32.c" />\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
     </ProjectReference>\r
-    <ProjectReference Include="genmdesc.vcxproj">\r
-      <Project>{b7098dfa-31e6-4006-8a15-1c9a4e925149}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
diff --git a/msvc/monoposixhelper.vcxproj.filters b/msvc/monoposixhelper.vcxproj.filters
new file mode 100644 (file)
index 0000000..9df33f5
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\support\adler32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\compress.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\crc32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\deflate.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\errno.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\infback.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\inffast.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\inflate.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\inftrees.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\map.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\signal.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\stdio.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\stdlib.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\string.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\trees.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\uncompr.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\zlib-helper.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\support\zutil.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\support\crc32.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\deflate.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\inffast.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\inffixed.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\inflate.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\inftrees.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\map.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\mph.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\trees.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\zconf.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\support\zutil.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{45dae598-72bc-4d0e-9cba-004f84c718c0}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{2f5dbdd8-33f3-495b-964a-55d67a027fad}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{2835d7d3-cd1c-4f3c-8783-d2413b0b1ae2}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="monoposixhelper.def">\r
+      <Filter>Resource Files</Filter>\r
+    </None>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 246785ccb6bb385ffafa5bf4fae289ee2d46361b..1f82284e7c29e944108087ebb05d2fa117fdac27 100644 (file)
@@ -1,5 +1,4 @@
 ; file generated by create-windef.pl
-LIBRARY monosgen-2.0.dll
 EXPORTS
 MonoFixupCorEE
 mono_add_internal_call
@@ -426,6 +425,7 @@ mono_get_uint64_class
 mono_get_uintptr_class
 mono_get_void_class
 mono_guid_to_string
+mono_guid_to_string_minimal
 mono_image_add_to_name_cache
 mono_image_addref
 mono_image_close
@@ -508,6 +508,12 @@ mono_lock_free_queue_init
 mono_lock_free_queue_node_init
 mono_lock_free_queue_node_unpoison
 mono_locks_dump
+mono_log_close_logfile
+mono_log_close_syslog
+mono_log_open_logfile
+mono_log_open_syslog
+mono_log_write_logfile
+mono_log_write_syslog
 mono_lookup_icall_symbol
 mono_lookup_internal_call
 mono_lookup_pinvoke_call
@@ -772,6 +778,7 @@ mono_security_core_clr_require_elevated_permissions
 mono_security_core_clr_set_options
 mono_security_enable_core_clr
 mono_security_set_core_clr_platform_callback
+mono_set_allocator_vtable
 mono_set_assemblies_path
 mono_set_break_policy
 mono_set_config_dir
@@ -855,14 +862,20 @@ mono_threads_attach_coop
 mono_threads_attach_tools_thread
 mono_threads_detach_coop
 mono_threads_enter_gc_safe_region
+mono_threads_enter_gc_safe_region_unbalanced
 mono_threads_enter_gc_unsafe_region
+mono_threads_enter_gc_unsafe_region_unbalanced
 mono_threads_exit_gc_safe_region
+mono_threads_exit_gc_safe_region_unbalanced
 mono_threads_exit_gc_unsafe_region
+mono_threads_exit_gc_unsafe_region_unbalanced
 mono_threads_get_default_stacksize
 mono_threads_request_thread_dump
 mono_threads_set_default_stacksize
 mono_trace_set_level_string
 mono_trace_set_log_handler
+mono_trace_set_logdest_string
+mono_trace_set_logheader_string
 mono_trace_set_mask_string
 mono_trace_set_print_handler
 mono_trace_set_printerr_handler
diff --git a/msvc/package.bat b/msvc/package.bat
new file mode 100644 (file)
index 0000000..df29a8b
--- /dev/null
@@ -0,0 +1,104 @@
+@ECHO off
+
+SET PLATFORM=%1
+SET CONFIG=%2
+SET BUILD_DIR=%3
+SET ARGUMENTS=%4
+
+SET XCOPY_COMMAND=%windir%\system32\xcopy
+
+SET BUILD_DIR=%BUILD_DIR:"=%
+SET BUILD_DIR=%BUILD_DIR:/=\%
+
+IF "" == "%PLATFORM%" (
+       ECHO Error: No platform parameter set.
+       GOTO ON_ERROR
+)
+       
+IF "" == "%CONFIG%" (
+       ECHO Error: No configuration parameter set.
+       GOTO ON_ERROR
+)
+
+IF "" == "%BUILD_DIR%" (
+       ECHO Error: No MONO_BUILD_DIR_PREFIX parameter set.
+       GOTO ON_ERROR
+)
+
+IF NOT EXIST %BUILD_DIR% (
+       ECHO Error: '%BUILD_DIR%', directory doesn't eixst.
+       GOTO ON_ERROR
+)
+
+IF "\" == "%BUILD_DIR:~-1%" (
+       SET BUILD_DIR=%BUILD_DIR:~0,-1%
+)
+
+IF NOT EXIST %BUILD_DIR%\%PLATFORM%\lib\%CONFIG% (
+       ECHO Error: No lib directory available for %PLATFORM% %CONFIG% at '%BUILD_DIR%'. Any build availalbe for platform, configuration pair?
+       GOTO ON_ERROR
+)
+
+IF NOT EXIST %BUILD_DIR%\%PLATFORM%\bin\%CONFIG% (
+       ECHO Error: No bin directory available for %PLATFORM% %CONFIG% at '%BUILD_DIR%'. Any build availalbe for platform, configuration pair?
+       GOTO ON_ERROR
+)
+
+SET PACKAGE_DIR=%BUILD_DIR%\package\%PLATFORM%\%CONFIG%
+
+SET OPTIONS=/s /e /y
+
+IF "-v" == "%ARGUMENTS%" (
+       SET OPTIONS=/f /s /e /y
+)
+
+IF "-q" == "%ARGUMENTS%" (
+       SET "OPTIONS=/s /e /q /y"
+)
+
+ECHO Packaging mono build %PLATFORM% %CONFIG% into '%PACKAGE_DIR%' ...
+
+IF EXIST %PACKAGE_DIR% rmdir %PACKAGE_DIR% /s /q
+mkdir %PACKAGE_DIR%
+mkdir %PACKAGE_DIR%\include\mono-2.0
+
+SET RUN=%XCOPY_COMMAND% ".\include\*.*" "%PACKAGE_DIR%\include\mono-2.0\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\lib\%CONFIG%\*.lib" "%PACKAGE_DIR%\lib\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\lib\%CONFIG%\*.pdb" "%PACKAGE_DIR%\lib\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\bin\%CONFIG%\*.exe" "%PACKAGE_DIR%\bin\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\bin\%CONFIG%\*.dll" "%PACKAGE_DIR%\bin\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\bin\%CONFIG%\*.pdb" "%PACKAGE_DIR%\bin\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+SET RUN=%XCOPY_COMMAND% "%BUILD_DIR%\%PLATFORM%\bin\%CONFIG%\*.lib" "%PACKAGE_DIR%\bin\" %OPTIONS%
+call :runCommand "%RUN%" %ARGUMENTS%
+
+ECHO Packaging of mono build %PLATFORM% %CONFIG% into '%PACKAGE_DIR%' DONE. 
+
+EXIT /b 0
+
+:ON_ERROR
+       ECHO "package.bat [win32|x64] [Debug|Release] [MONO_BUILD_DIR_PREFIX] [ARGUMENTS]"
+       EXIT /b 1
+
+@ECHO on
+
+:runCommand
+
+       IF "-q" == "%~2" (
+               %~1 >nul 2>&1
+       ) ELSE (
+               %~1
+       )
+
+goto :EOF
index 275e4c17c95efe7c35b181ead4fa308851e7bf6e..5a6e9116bd9759204af84f6bbdaa11fd2f611fb0 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{84C7DB50-D6F8-4C47-B22C-6BB203AEB4D3}</ProjectGuid>\r
     <RootNamespace>pedump</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\eglib\src\;$(SolutionDir)..\;$(SolutionDir)..\mono\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;HOST_WIN32;TARGET_WIN32;__i386__;TARGET_X86;GC_NOT_DLL;GC_GCJ_SUPPORT;GC_WIN32_THREADS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ObjectFileName>$(IntDir)pedump/</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)pedump/vc80.pdb</ProgramDataBaseFileName>\r
-      <XMLDocumentationFileName>$(IntDir)pedump/</XMLDocumentationFileName>\r
+      <ObjectFileName>$(IntDir)</ObjectFileName>\r
+      <XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Psapi.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmonoutils.lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\eglib\src\;$(SolutionDir)..\;$(SolutionDir)..\mono\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Psapi.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmonoutils.lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\eglib\src\;$(SolutionDir)..\;$(SolutionDir)..\mono\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WINDOWS;__WIN32__;HOST_WIN32;TARGET_WIN32;__i386__;TARGET_X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ObjectFileName>$(IntDir)pedump/</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)pedump/vc80.pdb</ProgramDataBaseFileName>\r
-      <XMLDocumentationFileName>$(IntDir)pedump/</XMLDocumentationFileName>\r
+      <ObjectFileName>$(IntDir)</ObjectFileName>\r
+      <XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Psapi.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmonoutils.lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\eglib\src\;$(SolutionDir)..\;$(SolutionDir)..\mono\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Psapi.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;libmonoruntime$(MONO_TARGET_SUFFIX).lib;libmonoutils.lib;$(GC_LIB);%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
     <ClCompile Include="..\mono\metadata\mono-config.c" />\r
     <ClCompile Include="..\mono\utils\mono-dl.c" />\r
     <ClCompile Include="..\mono\metadata\object.c" />\r
-    <ClCompile Include="..\mono\metadata\pedump.c" />\r
     <ClCompile Include="..\mono\metadata\process.c" />\r
     <ClCompile Include="..\mono\metadata\profiler.c" />\r
     <ClCompile Include="..\mono\metadata\rand.c" />\r
     <ClCompile Include="..\mono\metadata\string-icalls.c" />\r
     <ClCompile Include="..\mono\metadata\sysmath.c" />\r
     <ClCompile Include="..\mono\metadata\threads.c" />\r
+    <ClCompile Include="..\tools\pedump\pedump.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
     <ProjectReference Include="libgc.vcxproj">\r
       <Project>{eb56000b-c80b-4e8b-908d-d84d31b517d3}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libgcmonosgen.vcxproj">\r
+      <Project>{c36612bd-22d3-4b95-85e2-7fdc4fc5d740}</Project>\r
     </ProjectReference>\r
     <ProjectReference Include="libmono.vcxproj">\r
       <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
-    </ProjectReference>\r
-    <ProjectReference Include="libmonoruntime.vcxproj">\r
-      <Project>{c36612bd-22d3-4b95-85e2-7fdc4fc5d739}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
-    </ProjectReference>\r
-    <ProjectReference Include="libmonoutils.vcxproj">\r
-      <Project>{8fc2b0c8-51ad-49df-851f-5d01a77a75e4}</Project>\r
-      <Private>false</Private>\r
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/pedump.vcxproj.filters b/msvc/pedump.vcxproj.filters
new file mode 100644 (file)
index 0000000..7658bc1
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\metadata\appdomain.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\assembly.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\boehm-gc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\class.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\console-win32.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\domain.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\environment.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\file-io.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\filewatcher.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\gc.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\icall.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\image.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\loader.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\locales.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\marshal.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\metadata.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\monitor.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\mono-config.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\utils\mono-dl.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\object.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\process.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\profiler.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\rand.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\reflection.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\security-manager.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\socket-io.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\string-icalls.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sysmath.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\threads.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\tools\pedump\pedump.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{e36ce4ec-2939-4ed1-9bee-c1697823c53a}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{091ce72c-8fa4-4aa9-a8b8-e5a8a38db6e2}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{699de579-6295-481f-be9a-b8aaadad1b0e}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index dcdb2ba64855620ad1a170e0fb8b434fff1430a8..45c497b9bdc31612d3d1fbd4a95b2bdd7041ba50 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{F51017F9-B7FB-4F87-B7B5-12799D965783}</ProjectGuid>\r
     <RootNamespace>profilervtune</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mono-profiler-vtune</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mono-profiler-vtune</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mono-profiler-vtune</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mono-profiler-vtune</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mono-profiler-vtune$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mono-profiler-vtune$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mono-profiler-vtune$(MONO_TARGET_SUFFIX)</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mono-profiler-vtune$(MONO_TARGET_SUFFIX)</TargetName>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MaxSpeed</Optimization>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\mono\jit;..\mono\eglib\src;..\..\mono\eglib\src;$(ProgramFiles)\Intel\VTune Amplifier XE 2013\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_LIBGC_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);$(VTUNE_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <TargetMachine>MachineX86</TargetMachine>\r
       <ModuleDefinitionFile>mono-profiler-vtune.def</ModuleDefinitionFile>\r
-      <AdditionalDependencies>mono-2.0.lib;libgc.lib;eglib.lib;jitprofiling.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;$(ProgramFiles)\Intel\VTune Amplifier XE 2013\lib32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;$(GC_LIB);eglib.lib;jitprofiling.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>$(ProgramFiles)\Intel\VTune Amplifier XE 2013\lib32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
     </Link>\r
+    <ProjectReference>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+    </ProjectReference>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <ClCompile>\r
       <Optimization>MaxSpeed</Optimization>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\mono\jit;..\mono\eglib\src;..\..\mono\eglib\src;$(ProgramFiles)\Intel\VTune Amplifier XE 2011\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_LIBGC_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);$(VTUNE_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <ModuleDefinitionFile>mono-profiler-vtune.def</ModuleDefinitionFile>\r
-      <AdditionalDependencies>mono-2.0.lib;version.lib;libgc.lib;eglib.lib;ws2_32.lib;Psapi.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;$(GC_LIB);eglib.lib;jitprofiling.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>$(ProgramFiles)\Intel\VTune Amplifier XE 2013\lib32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
     </Link>\r
+    <ProjectReference>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+    </ProjectReference>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\mono\jit;..\mono\eglib\src;..\..\mono\eglib\src;$(ProgramFiles)\Intel\VTune Amplifier XE 2013\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_LIBGC_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);$(VTUNE_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
-      <AdditionalDependencies>mono-2.0.lib;libgc.lib;eglib.lib;jitprofiling.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;$(ProgramFiles)\Intel\VTune Amplifier XE 2013\lib32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;$(GC_LIB);eglib.lib;jitprofiling.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>$(ProgramFiles)\Intel\VTune Amplifier XE 2013\lib32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Windows</SubSystem>\r
       <TargetMachine>MachineX86</TargetMachine>\r
       <ModuleDefinitionFile>mono-profiler-vtune.def</ModuleDefinitionFile>\r
     </Link>\r
+    <ProjectReference>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+    </ProjectReference>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\libgc\include;..\;..\mono\;..\mono\jit;..\mono\eglib\src;..\..\mono\eglib\src;$(ProgramFiles)\Intel\VTune Amplifier XE 2011\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(MONO_LIBGC_INCLUDE_DIR);$(MONO_JIT_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR);$(VTUNE_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
-      <AdditionalDependencies>mono-2.0.lib;version.lib;libgc.lib;eglib.lib;ws2_32.lib;Psapi.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;$(GC_LIB);eglib.lib;jitprofiling.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>$(ProgramFiles)\Intel\VTune Amplifier XE 2013\lib32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Windows</SubSystem>\r
       <ModuleDefinitionFile>mono-profiler-vtune.def</ModuleDefinitionFile>\r
     </Link>\r
+    <ProjectReference>\r
+      <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
+    </ProjectReference>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\mono\profiler\mono-profiler-vtune.c" />\r
   <ItemGroup>\r
     <None Include="mono-profiler-vtune.def" />\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="eglib.vcxproj">\r
+      <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libgc.vcxproj">\r
+      <Project>{eb56000b-c80b-4e8b-908d-d84d31b517d3}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libgcmonosgen.vcxproj">\r
+      <Project>{c36612bd-22d3-4b95-85e2-7fdc4fc5d740}</Project>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libmono.vcxproj">\r
+      <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
diff --git a/msvc/profiler-vtune.vcxproj.filters b/msvc/profiler-vtune.vcxproj.filters
new file mode 100644 (file)
index 0000000..7b3e25b
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{b83592a6-eeed-445a-9946-28081f6ca7f6}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{893b7f18-0c7b-4514-8148-39085ecda2f6}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{80c1df13-7968-4ed0-8849-a42648a684e8}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\mono\profiler\mono-profiler-vtune.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="mono-profiler-vtune.def">\r
+      <Filter>Resource Files</Filter>\r
+    </None>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
diff --git a/msvc/scripts/System.ComponentModel.Composition.pre b/msvc/scripts/System.ComponentModel.Composition.pre
deleted file mode 100644 (file)
index 70fe6d0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-resgen $(ProjectDir)\src\ComponentModel\Strings.resx $(ProjectDir)\Microsoft.Internal.Strings.resx
\ No newline at end of file
diff --git a/msvc/scripts/System.Data.Services.Client.pre b/msvc/scripts/System.Data.Services.Client.pre
deleted file mode 100644 (file)
index a8709db..0000000
+++ /dev/null
@@ -1 +0,0 @@
-resgen $(ProjectDir)\Client\System.Data.Services.Client.txt $(ProjectDir)\Client\System.Data.Services.Client.resx
\ No newline at end of file
diff --git a/msvc/scripts/System.Json.Microsoft.pre b/msvc/scripts/System.Json.Microsoft.pre
deleted file mode 100644 (file)
index 3938879..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cp $(ProjectDir)\System.Json\Properties\Resources.resx System.Json.Properties.Resources.resx
\ No newline at end of file
diff --git a/msvc/scripts/System.Net.Http.Formatting.pre b/msvc/scripts/System.Net.Http.Formatting.pre
deleted file mode 100644 (file)
index 0324a81..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-@COPY@ $(ProjectDir)/../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx $(ProjectDir)/System.Net.Http.Properties.CommonWebApiResources.resx
-@COPY@ $(ProjectDir)/../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.resx $(ProjectDir)/System.Net.Http.Properties.Resources.resx
diff --git a/msvc/scripts/System.Web.Http.pre b/msvc/scripts/System.Web.Http.pre
deleted file mode 100644 (file)
index 879ce63..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-@COPY@ $(ProjectDir)/../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx $(ProjectDir)/System.Web.Http.Properties.CommonWebApiResources.resx
-@COPY@ $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.Http/Properties/SRResources.resx $(ProjectDir)/System.Web.Http.Properties.SRResources.resx
diff --git a/msvc/scripts/System.Web.Razor.pre b/msvc/scripts/System.Web.Razor.pre
deleted file mode 100644 (file)
index a33b050..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-resgen $(ProjectDir)\..\..\..\external\aspnetwebstack\src\CommonResources.resx $(ProjectDir)\System.Web.Razor.Common.CommonResources.resx
-resgen $(ProjectDir)\..\..\..\external\aspnetwebstack\src\System.Web.Razor\Resources\RazorResources.resx $(ProjectDir)\System.Web.Razor.Resources.RazorResources.resx
\ No newline at end of file
diff --git a/msvc/scripts/System.Web.WebPages.Deployment.pre b/msvc/scripts/System.Web.WebPages.Deployment.pre
deleted file mode 100644 (file)
index 5c61127..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-@COPY@ $(ProjectDir)/../../../external/aspnetwebstack/src/System.Web.WebPages.Deployment/Resources/ConfigurationResources.resx $(ProjectDir)/System.Web.WebPages.Deployment.Resources.ConfigurationResources.resx
-@COPY@ $(ProjectDir)/../../../external/aspnetwebstack/src/CommonResources.resx $(ProjectDir)/System.Web.WebPages.Deployment.Common.CommonResources.resx
index 1836f7db2a117e42e61531a58a8150a1448fd66c..40690525782ba2ddf512e4f9c0e59886e3f08f39 100644 (file)
@@ -9,4 +9,4 @@ These are the tasks that are pending in the MSVC scripts to fully roll it out:
 [ ] Eliminate the need for "build-libs.sh/build-libs.bat" at the toplevel with proper MSBuild idioms
 [ ] Integrate the "update-solution-files" with each build, so we auto-update the files on commits
 [ ] Make it work with MSBuild instead of xbuild
-[ ] Design a system for listing resources, so we avoid the ".pre" that runs resgen or copy by hand, because this ruins dependencies.  Alternatively, have @COPY@ be a "Copy if newer"
+[x] Design a system for listing resources, so we avoid the ".pre" that runs resgen or copy by hand, because this ruins dependencies.  Alternatively, have @COPY@ be a "Copy if newer"
index d442697c3ce92389f3396c4cd502b66b0bc57126..b627e50afd84c80f9660c99d8c511ad554c1c4f0 100644 (file)
@@ -654,12 +654,19 @@ class MsbuildGenerator {
 
        public VsCsproj Csproj;
 
+       void AppendResource (StringBuilder resources, string source, string logical)
+       {
+               resources.AppendFormat ("    <EmbeddedResource Include=\"{0}\">" + NewLine, source);
+               resources.AppendFormat ("      <LogicalName>{0}</LogicalName>" + NewLine, logical);
+               resources.AppendFormat ("    </EmbeddedResource>" + NewLine);
+       }
+       
        public VsCsproj Generate (string library_output, Dictionary<string,MsbuildGenerator> projects, bool showWarnings = false)
        {
                var generatedProjFile = NativeName (Csproj.csProjFilename);
                //Console.WriteLine ("Generating: {0}", generatedProjFile);
 
-               string boot, flags, output_name, built_sources, response, profile;
+               string boot, flags, output_name, built_sources, response, profile, reskey;
 
                boot = xproject.Element ("boot").Value;
                flags = xproject.Element ("flags").Value;
@@ -668,6 +675,7 @@ class MsbuildGenerator {
                        Target = Target.Exe;
                built_sources = xproject.Element ("built_sources").Value;
                response = xproject.Element ("response").Value;
+               reskey = xproject.Element ("resources").Value;
 
                profile = xproject.Element ("profile").Value;
                if (string.IsNullOrEmpty (response)) {
@@ -788,14 +796,16 @@ class MsbuildGenerator {
                        refs.Append (string.Format ("    <Reference Include=\"{0}\" />" + NewLine, nunitLibPath));
                }
 
+               //
+               // Generate resource referenced from the command line
+               //
                var resources = new StringBuilder ();
                if (embedded_resources.Count > 0) {
-                       resources.AppendFormat ("  <ItemGroup>" + NewLine);
                        foreach (var dk in embedded_resources) {
                                var source = dk.Key;
                                if (source.EndsWith (".resources"))
                                        source = source.Replace (".resources", ".resx");
-
+                               
                                // try to find a pre-built resource, and use that instead of trying to build it
                                if (source.EndsWith (".resx")) {
                                        var probe_prebuilt = Path.Combine (base_dir, source.Replace (".resx", ".resources.prebuilt"));
@@ -804,13 +814,27 @@ class MsbuildGenerator {
                                                source = GetRelativePath (base_dir + "/", probe_prebuilt);
                                        }
                                }
-                               resources.AppendFormat ("    <EmbeddedResource Include=\"{0}\">" + NewLine, source);
-                               resources.AppendFormat ("      <LogicalName>{0}</LogicalName>" + NewLine, dk.Value);
-                               resources.AppendFormat ("    </EmbeddedResource>" + NewLine);
+                               AppendResource (resources, source, dk.Value);
                        }
+               }
+               //
+               // Generate resources that were part of the explicit <resource> node
+               //
+               if (reskey != null && reskey != ""){
+                       var pairs = reskey.Split (' ', '\n', '\t');
+                       foreach (var pair in pairs){
+                               var p = pair.IndexOf (",");
+                               if (p == -1){
+                                       Console.Error.WriteLine ($"Found a resource without a filename: {pairs} for {Csproj.csProjFilename}");
+                                       Environment.Exit (1);
+                               }
+                               AppendResource (resources, pair.Substring (p+1), pair.Substring (0, p) + ".resources");
+                       }
+               }
+               if (resources.Length > 0){
+                       resources.Insert (0, "  <ItemGroup>" + NewLine);
                        resources.AppendFormat ("  </ItemGroup>" + NewLine);
                }
-       
 
                if (references.Count > 0 || reference_aliases.Count > 0) {
                        // -r:mscorlib.dll -r:System.dll
index 23dd86f22fe137d20502dace7927448ae5f00acc..d0473063375ecd968f0ab6fa27cda916d46b5be3 100644 (file)
@@ -8,6 +8,7 @@
       <library_output>./../class/lib/basic/basic.exe</library_output>
       <fx_version>4.0</fx_version>
       <profile>basic</profile>
+      <resources></resources>
       <response>mcs.exe.sources</response>
     </project>
     <project dir="class/corlib" library="corlib-basic">
@@ -18,6 +19,7 @@
       <library_output>./../../class/lib/basic/mscorlib.dll</library_output>
       <fx_version>4.0</fx_version>
       <profile>basic</profile>
+      <resources></resources>
       <response>corlib.dll.sources</response>
     </project>
     <project dir="class/Mono.Security" library="Mono.Security-basic">
@@ -28,6 +30,7 @@
       <library_output>./../../class/lib/basic/Mono.Security.dll</library_output>
       <fx_version>4.0</fx_version>
       <profile>basic</profile>
+      <resources></resources>
       <response>Mono.Security.dll.sources</response>
     </project>
     <project dir="class/System" library="System-basic">
@@ -38,6 +41,7 @@
       <library_output>./../../class/lib/basic/System.dll</library_output>
       <fx_version>4.0</fx_version>
       <profile>basic</profile>
+      <resources></resources>
       <response>./../../build/deps/basic_System.dll.sources</response>
     </project>
     <project dir="class/System.XML" library="System.Xml-basic">
@@ -48,6 +52,7 @@
       <library_output>./../../class/lib/basic/System.Xml.dll</library_output>
       <fx_version>4.0</fx_version>
       <profile>basic</profile>
+      <resources></resources>
       <response>System.Xml.dll.sources</response>
     </project>
     <project dir="class/System.Core" library="System.Core-basic">
@@ -58,6 +63,7 @@
       <library_output>./../../class/lib/basic/System.Core.dll</library_output>
       <fx_version>4.0</fx_version>
       <profile>basic</profile>
+      <resources></resources>
       <response>./../../build/deps/basic_System.Core.dll.sources</response>
     </project>
     <project dir="class/corlib" library="corlib-build">
@@ -68,6 +74,7 @@
       <library_output>./../../class/lib/build/mscorlib.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>corlib.dll.sources</response>
     </project>
     <project dir="class/Mono.Security" library="Mono.Security-build">
@@ -78,6 +85,7 @@
       <library_output>./../../class/lib/build/Mono.Security.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>Mono.Security.dll.sources</response>
     </project>
     <project dir="class/System" library="System-build">
@@ -88,6 +96,7 @@
       <library_output>./../../class/lib/build/System.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>System.dll.sources</response>
     </project>
     <project dir="class/System" library="System-bare-build">
       <library_output>./../../class/lib/build/bare/System.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>System.dll.sources</response>
     </project>
     <project dir="class/System" library="System-secxml-build">
       <library_output>./../../class/lib/build/secxml/System.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>System.dll.sources</response>
     </project>
     <project dir="class/System.XML" library="System.Xml-build">
       <library_output>./../../class/lib/build/System.Xml.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>System.Xml.dll.sources</response>
     </project>
     <project dir="class/System.XML" library="System.Xml-bare-build">
       <library_output>./../../class/lib/build/bare/System.Xml.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>System.Xml.dll.sources</response>
     </project>
     <project dir="class/Mono.Posix" library="Mono.Posix-build">
       <library_output>./../../class/lib/build/Mono.Posix.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>Mono.Posix.dll.sources</response>
     </project>
     <project dir="class/System.Core" library="System.Core-build">
       <library_output>./../../class/lib/build/System.Core.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>./../../build/deps/build_System.Core.dll.sources</response>
     </project>
     <project dir="class/System.Core" library="System.Core-plaincore-build">
       <library_output>./../../class/lib/build/plaincore/System.Core.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>./../../build/deps/build_System.Core.dll.sources</response>
     </project>
     <project dir="class/Mono.Cecil" library="Mono.Cecil-build">
       <library_output>./../../class/lib/build/Mono.Cecil.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>Mono.Cecil.dll.sources</response>
     </project>
     <project dir="class/Mono.Cecil.Mdb" library="Mono.Cecil.Mdb-build">
       <library_output>./../../class/lib/build/Mono.Cecil.Mdb.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>Mono.Cecil.Mdb.dll.sources</response>
     </project>
     <project dir="mcs" library="mcs-build">
       <library_output>mcs.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>mcs.exe.sources</response>
     </project>
     <project dir="tools/gacutil" library="gacutil-build">
       <library_output>./../../class/lib/build/gacutil.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>gacutil.exe.sources</response>
     </project>
     <project dir="tools/culevel" library="culevel-build">
       <library_output>./../../class/lib/build/culevel.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>culevel.exe.sources</response>
     </project>
     <project dir="tools/cil-stringreplacer" library="cil-stringreplacer-build">
       <library_output>./../../class/lib/build/cil-stringreplacer.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>cil-stringreplacer.exe.sources</response>
     </project>
     <project dir="tools/commoncryptogenerator" library="commoncryptogenerator-build">
       <library_output>./../../class/lib/build/commoncryptogenerator.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>build</profile>
+      <resources></resources>
       <response>commoncryptogenerator.exe.sources</response>
     </project>
     <project dir="mcs" library="mcs-net_4_x">
       <library_output>mcs.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mcs.exe.sources</response>
     </project>
     <project dir="class/corlib" library="corlib-net_4_x">
       <library_output>./../../class/lib/net_4_x/mscorlib.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_corlib.dll.sources</response>
     </project>
     <project dir="class/corlib" library="corlib-tests-net_4_x">
       <library_output>net_4_x_corlib_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_corlib_test.dll.response</response>
     </project>
     <project dir="class/Mono.Security" library="Mono.Security-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Security.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Security.dll.sources</response>
     </project>
     <project dir="class/Mono.Security" library="Mono.Security-tests-net_4_x">
       <library_output>net_4_x_Mono.Security_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Security_test.dll.response</response>
     </project>
     <project dir="class/System" library="System-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.dll.sources</response>
     </project>
     <project dir="class/System" library="System-tests-net_4_x">
       <library_output>net_4_x_System_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System_test.dll.response</response>
     </project>
     <project dir="class/System" library="System-bare-net_4_x">
       <library_output>./../../class/lib/net_4_x/bare/System.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.dll.sources</response>
     </project>
     <project dir="class/System" library="System-tests-net_4_x">
       <library_output>net_4_x_System_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System_test.dll.response</response>
     </project>
     <project dir="class/System" library="System-secxml-net_4_x">
       <library_output>./../../class/lib/net_4_x/secxml/System.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.dll.sources</response>
     </project>
     <project dir="class/System" library="System-tests-net_4_x">
       <library_output>net_4_x_System_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System_test.dll.response</response>
     </project>
     <project dir="class/System.XML" library="System.Xml-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Xml.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.dll.sources</response>
     </project>
     <project dir="class/System.XML" library="System.Xml-tests-net_4_x">
       <library_output>net_4_x_System.Xml_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Xml_test.dll.response</response>
     </project>
     <project dir="class/System.XML" library="System.Xml-bare-net_4_x">
       <library_output>./../../class/lib/net_4_x/bare/System.Xml.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.dll.sources</response>
     </project>
     <project dir="class/System.XML" library="System.Xml-tests-net_4_x">
       <library_output>net_4_x_System.Xml_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Xml_test.dll.response</response>
     </project>
     <project dir="class/Mono.CompilerServices.SymbolWriter" library="Mono.CompilerServices.SymbolWriter-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.CompilerServices.SymbolWriter.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.CompilerServices.SymbolWriter.dll.sources</response>
     </project>
     <project dir="class/Mono.Posix" library="Mono.Posix-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Posix.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Posix.dll.sources</response>
     </project>
     <project dir="class/Mono.Posix" library="Mono.Posix-tests-net_4_x">
       <library_output>net_4_x_Mono.Posix_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Posix_test.dll.response</response>
     </project>
     <project dir="class/System.Core" library="System.Core-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Core.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Core.dll.sources</response>
     </project>
     <project dir="class/System.Core" library="System.Core-tests-net_4_x">
       <library_output>net_4_x_System.Core_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Core_test.dll.response</response>
     </project>
     <project dir="class/System.Core" library="System.Core-plaincore-net_4_x">
       <library_output>./../../class/lib/net_4_x/plaincore/System.Core.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Core.dll.sources</response>
     </project>
     <project dir="class/System.Core" library="System.Core-tests-net_4_x">
       <library_output>net_4_x_System.Core_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Core_test.dll.response</response>
     </project>
     <project dir="class/System.Security" library="System.Security-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Security.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.dll.sources</response>
     </project>
     <project dir="class/System.Security" library="System.Security-tests-net_4_x">
       <library_output>net_4_x_System.Security_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Security_test.dll.response</response>
     </project>
     <project dir="class/System.Configuration" library="System.Configuration-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Configuration.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Configuration.dll.sources</response>
     </project>
     <project dir="class/System.Configuration" library="System.Configuration-tests-net_4_x">
       <library_output>net_4_x_System.Configuration_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Configuration_test.dll.response</response>
     </project>
     <project dir="tools/resgen" library="resgen-net_4_x">
       <library_output>./../../class/lib/net_4_x/resgen.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>resgen.exe.sources</response>
     </project>
     <project dir="class/System.IO.Compression" library="System.IO.Compression-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.IO.Compression.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.Compression.dll.sources</response>
     </project>
     <project dir="class/System.IO.Compression" library="System.IO.Compression-tests-net_4_x">
       <library_output>net_4_x_System.IO.Compression_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.IO.Compression_test.dll.response</response>
     </project>
     <project dir="class/System.IO.Compression.FileSystem" library="System.IO.Compression.FileSystem-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.IO.Compression.FileSystem.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.Compression.FileSystem.dll.sources</response>
     </project>
     <project dir="class/System.IO.Compression.FileSystem" library="System.IO.Compression.FileSystem-tests-net_4_x">
       <library_output>net_4_x_System.IO.Compression.FileSystem_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.IO.Compression.FileSystem_test.dll.response</response>
     </project>
     <project dir="class/System.Drawing" library="System.Drawing-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Drawing.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Drawing.dll.sources</response>
     </project>
     <project dir="class/System.Drawing" library="System.Drawing-tests-net_4_x">
       <library_output>net_4_x_System.Drawing_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Drawing_test.dll.response</response>
     </project>
     <project dir="class/System.Transactions" library="System.Transactions-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Transactions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Transactions.dll.sources</response>
     </project>
     <project dir="class/System.Transactions" library="System.Transactions-tests-net_4_x">
       <library_output>net_4_x_System.Transactions_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Transactions_test.dll.response</response>
     </project>
     <project dir="class/System.EnterpriseServices" library="System.EnterpriseServices-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.EnterpriseServices.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.EnterpriseServices.dll.sources</response>
     </project>
     <project dir="class/Mono.Data.Tds" library="Mono.Data.Tds-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Data.Tds.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Data.Tds.dll.sources</response>
     </project>
     <project dir="class/Mono.Data.Tds" library="Mono.Data.Tds-tests-net_4_x">
       <library_output>net_4_x_Mono.Data.Tds_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Data.Tds_test.dll.response</response>
     </project>
     <project dir="class/System.Numerics" library="System.Numerics-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Numerics.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Numerics.dll.sources</response>
     </project>
     <project dir="class/System.Numerics" library="System.Numerics-tests-net_4_x">
       <library_output>net_4_x_System.Numerics_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Numerics_test.dll.response</response>
     </project>
     <project dir="class/System.Numerics.Vectors" library="System.Numerics.Vectors-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Numerics.Vectors.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Numerics.Vectors.dll.sources</response>
     </project>
     <project dir="class/System.Data" library="System.Data-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Data.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Data.dll.sources</response>
     </project>
     <project dir="class/System.Data" library="System.Data-tests-net_4_x">
       <library_output>net_4_x_System.Data_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Data_test.dll.response</response>
     </project>
     <project dir="class/System.ComponentModel.DataAnnotations" library="System.ComponentModel.DataAnnotations-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ComponentModel.DataAnnotations.dll.sources</response>
     </project>
     <project dir="class/System.ComponentModel.DataAnnotations" library="System.ComponentModel.DataAnnotations-tests-net_4_x">
       <library_output>net_4_x_System.ComponentModel.DataAnnotations_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.ComponentModel.DataAnnotations_test.dll.response</response>
     </project>
     <project dir="class/Accessibility" library="Accessibility-net_4_x">
       <library_output>./../../class/lib/net_4_x/Accessibility.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Accessibility.dll.sources</response>
     </project>
     <project dir="class/Mono.WebBrowser" library="Mono.WebBrowser-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.WebBrowser.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.WebBrowser.dll.sources</response>
     </project>
     <project dir="class/System.Runtime.Serialization.Formatters.Soap" library="System.Runtime.Serialization.Formatters.Soap-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Serialization.Formatters.Soap.dll.sources</response>
     </project>
     <project dir="class/System.Runtime.Serialization.Formatters.Soap" library="System.Runtime.Serialization.Formatters.Soap-tests-net_4_x">
       <library_output>net_4_x_System.Runtime.Serialization.Formatters.Soap_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Runtime.Serialization.Formatters.Soap_test.dll.response</response>
     </project>
     <project dir="class/System.Windows.Forms" library="System.Windows.Forms-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Windows.Forms.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Windows.Forms.dll.sources</response>
     </project>
     <project dir="class/System.Windows.Forms" library="System.Windows.Forms-tests-net_4_x">
       <library_output>net_4_x_System.Windows.Forms_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Windows.Forms_test.dll.response</response>
     </project>
     <project dir="class/Mono.Data.Sqlite" library="Mono.Data.Sqlite-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Data.Sqlite.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Data.Sqlite.dll.sources</response>
     </project>
     <project dir="class/Mono.Data.Sqlite" library="Mono.Data.Sqlite-tests-net_4_x">
       <library_output>net_4_x_Mono.Data.Sqlite_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Data.Sqlite_test.dll.response</response>
     </project>
     <project dir="class/System.Web.ApplicationServices" library="System.Web.ApplicationServices-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.ApplicationServices.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.ApplicationServices.dll.sources</response>
     </project>
     <project dir="class/Novell.Directory.Ldap" library="Novell.Directory.Ldap-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -warn:1 -nowarn:612 /res:Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resources -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/Mono.Security.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -warn:1 -nowarn:612 -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/Mono.Security.dll</flags>
       <output>Novell.Directory.Ldap.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/Novell.Directory.Ldap.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>ResultCodeMessages,Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt</resources>
       <response>Novell.Directory.Ldap.dll.sources</response>
     </project>
     <project dir="class/Novell.Directory.Ldap" library="Novell.Directory.Ldap-tests-net_4_x">
       <library_output>net_4_x_Novell.Directory.Ldap_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Novell.Directory.Ldap_test.dll.response</response>
     </project>
     <project dir="class/System.DirectoryServices" library="System.DirectoryServices-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.DirectoryServices.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.DirectoryServices.dll.sources</response>
     </project>
     <project dir="class/System.DirectoryServices" library="System.DirectoryServices-tests-net_4_x">
       <library_output>net_4_x_System.DirectoryServices_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.DirectoryServices_test.dll.response</response>
     </project>
     <project dir="class/System.Web" library="System.Web-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -unsafe -nowarn:612,618 -d:INSIDE_SYSTEM_WEB -nowarn:618 /resource:resources/TranslationResources.resources /resource:resources/WebUIValidation.js /resource:resources/folder.gif /resource:resources/file.gif /resource:resources/computer.gif /resource:resources/arrow_minus.gif /resource:resources/arrow_noexpand.gif /resource:resources/arrow_plus.gif /resource:resources/arrow_up.gif /resource:resources/arrow_down.gif /resource:resources/box_full.gif /resource:resources/box_empty.gif /resource:resources/box_minus.gif /resource:resources/box_noexpand.gif /resource:resources/box_plus.gif /resource:resources/contact.gif /resource:resources/dot_empty.gif /resource:resources/dot_full.gif /resource:resources/dots.gif /resource:resources/inbox.gif /resource:resources/star_empty.gif /resource:resources/star_full.gif /resource:resources/warning.gif /resource:resources/TreeView_noexpand.gif /resource:resources/TreeView_dash.gif /resource:resources/TreeView_dashminus.gif /resource:resources/TreeView_dashplus.gif /resource:resources/TreeView_i.gif /resource:resources/TreeView_l.gif /resource:resources/TreeView_lminus.gif /resource:resources/TreeView_lplus.gif /resource:resources/TreeView_minus.gif /resource:resources/TreeView_plus.gif /resource:resources/TreeView_r.gif /resource:resources/TreeView_rminus.gif /resource:resources/TreeView_rplus.gif /resource:resources/TreeView_t.gif /resource:resources/TreeView_tminus.gif /resource:resources/TreeView_tplus.gif /resource:resources/transparent.gif /resource:resources/webform.js /resource:resources/WebUIValidation_2.0.js /resource:resources/ErrorTemplateCommon_Top.html /resource:resources/DefaultErrorTemplate_CustomErrorDefault.html /resource:resources/ErrorTemplateCommon_Bottom.html /resource:resources/DefaultErrorTemplate_StandardPage.html /resource:resources/HtmlizedExceptionPage_Top.html /resource:resources/HtmlizedExceptionPage_FileLongSource.html /resource:resources/HtmlizedExceptionPage_FileShortSource.html /resource:resources/HtmlizedExceptionPage_CompilerOutput.html /resource:System.Web.UI.WebControls/GridView.js /resource:System.Web.UI.WebControls/DetailsView.js /resource:System.Web.UI.WebControls/TreeView.js /resource:System.Web.UI.WebControls/Menu.js /resource:System.Web.UI.WebControls/MenuModern.js -define:WEBSERVICES_DEP -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Drawing.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.EnterpriseServices.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Web.ApplicationServices.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/Mono.Data.Sqlite.dll -r:./../../class/lib/net_4_x/System.Web.Services.dll -r:./../../class/lib/net_4_x/plaindesign/System.Design.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -unsafe -nowarn:612,618 -d:INSIDE_SYSTEM_WEB -nowarn:618 /resource:resources/WebUIValidation.js /resource:resources/folder.gif /resource:resources/file.gif /resource:resources/computer.gif /resource:resources/arrow_minus.gif /resource:resources/arrow_noexpand.gif /resource:resources/arrow_plus.gif /resource:resources/arrow_up.gif /resource:resources/arrow_down.gif /resource:resources/box_full.gif /resource:resources/box_empty.gif /resource:resources/box_minus.gif /resource:resources/box_noexpand.gif /resource:resources/box_plus.gif /resource:resources/contact.gif /resource:resources/dot_empty.gif /resource:resources/dot_full.gif /resource:resources/dots.gif /resource:resources/inbox.gif /resource:resources/star_empty.gif /resource:resources/star_full.gif /resource:resources/warning.gif /resource:resources/TreeView_noexpand.gif /resource:resources/TreeView_dash.gif /resource:resources/TreeView_dashminus.gif /resource:resources/TreeView_dashplus.gif /resource:resources/TreeView_i.gif /resource:resources/TreeView_l.gif /resource:resources/TreeView_lminus.gif /resource:resources/TreeView_lplus.gif /resource:resources/TreeView_minus.gif /resource:resources/TreeView_plus.gif /resource:resources/TreeView_r.gif /resource:resources/TreeView_rminus.gif /resource:resources/TreeView_rplus.gif /resource:resources/TreeView_t.gif /resource:resources/TreeView_tminus.gif /resource:resources/TreeView_tplus.gif /resource:resources/transparent.gif /resource:resources/webform.js /resource:resources/WebUIValidation_2.0.js /resource:resources/ErrorTemplateCommon_Top.html /resource:resources/DefaultErrorTemplate_CustomErrorDefault.html /resource:resources/ErrorTemplateCommon_Bottom.html /resource:resources/DefaultErrorTemplate_StandardPage.html /resource:resources/HtmlizedExceptionPage_Top.html /resource:resources/HtmlizedExceptionPage_FileLongSource.html /resource:resources/HtmlizedExceptionPage_FileShortSource.html /resource:resources/HtmlizedExceptionPage_CompilerOutput.html /resource:System.Web.UI.WebControls/GridView.js /resource:System.Web.UI.WebControls/DetailsView.js /resource:System.Web.UI.WebControls/TreeView.js /resource:System.Web.UI.WebControls/Menu.js /resource:System.Web.UI.WebControls/MenuModern.js -define:WEBSERVICES_DEP -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Drawing.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.EnterpriseServices.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Web.ApplicationServices.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/Mono.Data.Sqlite.dll -r:./../../class/lib/net_4_x/System.Web.Services.dll -r:./../../class/lib/net_4_x/plaindesign/System.Design.dll</flags>
       <output>System.Web.dll</output>
       <built_sources>System.Web/UplevelHelper.cs</built_sources>
       <library_output>./../../class/lib/net_4_x/System.Web.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>TranslationResources,resources/TranslationResources.resx</resources>
       <response>System.Web.dll.sources</response>
     </project>
     <project dir="class/System.Web" library="System.Web-tests-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize -r:./../../class/lib/net_4_x/plainweb/System.Web.dll -unsafe -nowarn:612,618 -d:INSIDE_SYSTEM_WEB -nowarn:618 /resource:resources/TranslationResources.resources /resource:resources/WebUIValidation.js /resource:resources/folder.gif /resource:resources/file.gif /resource:resources/computer.gif /resource:resources/arrow_minus.gif /resource:resources/arrow_noexpand.gif /resource:resources/arrow_plus.gif /resource:resources/arrow_up.gif /resource:resources/arrow_down.gif /resource:resources/box_full.gif /resource:resources/box_empty.gif /resource:resources/box_minus.gif /resource:resources/box_noexpand.gif /resource:resources/box_plus.gif /resource:resources/contact.gif /resource:resources/dot_empty.gif /resource:resources/dot_full.gif /resource:resources/dots.gif /resource:resources/inbox.gif /resource:resources/star_empty.gif /resource:resources/star_full.gif /resource:resources/warning.gif /resource:resources/TreeView_noexpand.gif /resource:resources/TreeView_dash.gif /resource:resources/TreeView_dashminus.gif /resource:resources/TreeView_dashplus.gif /resource:resources/TreeView_i.gif /resource:resources/TreeView_l.gif /resource:resources/TreeView_lminus.gif /resource:resources/TreeView_lplus.gif /resource:resources/TreeView_minus.gif /resource:resources/TreeView_plus.gif /resource:resources/TreeView_r.gif /resource:resources/TreeView_rminus.gif /resource:resources/TreeView_rplus.gif /resource:resources/TreeView_t.gif /resource:resources/TreeView_tminus.gif /resource:resources/TreeView_tplus.gif /resource:resources/transparent.gif /resource:resources/webform.js /resource:resources/WebUIValidation_2.0.js /resource:resources/ErrorTemplateCommon_Top.html /resource:resources/DefaultErrorTemplate_CustomErrorDefault.html /resource:resources/ErrorTemplateCommon_Bottom.html /resource:resources/DefaultErrorTemplate_StandardPage.html /resource:resources/HtmlizedExceptionPage_Top.html /resource:resources/HtmlizedExceptionPage_FileLongSource.html /resource:resources/HtmlizedExceptionPage_FileShortSource.html /resource:resources/HtmlizedExceptionPage_CompilerOutput.html /resource:System.Web.UI.WebControls/GridView.js /resource:System.Web.UI.WebControls/DetailsView.js /resource:System.Web.UI.WebControls/TreeView.js /resource:System.Web.UI.WebControls/Menu.js /resource:System.Web.UI.WebControls/MenuModern.js -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Drawing.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.EnterpriseServices.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Web.ApplicationServices.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/Mono.Data.Sqlite.dll -doc:net_4_x_System.Web_test.xml -nowarn:219,169,1591 /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Global.asax /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/My.ashx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/My.master /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPageWithMaster.aspx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/sub_map_01.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_01.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_02.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_03.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_04.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_05.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_06.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_07.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_08.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_09.sitemap /resource:Test/mainsoft/NunitWebResources/menuclass.aspx /resource:Test/mainsoft/NunitWebResources/FormView.aspx /resource:Test/mainsoft/NunitWebResources/PostBackMenuTest.aspx /resource:Test/mainsoft/NunitWebResources/PageWithStyleSheet.aspx /resource:Test/mainsoft/NunitWebResources/PageWithTheme.aspx /resource:Test/mainsoft/NunitWebResources/ResolveUrl.ascx /resource:Test/mainsoft/NunitWebResources/ResolveUrl.aspx /resource:Test/mainsoft/NunitWebResources/RunTimeSetTheme.aspx /resource:Test/mainsoft/NunitWebResources/ReadOnlyPropertyBind.aspx /resource:Test/mainsoft/NunitWebResources/ReadOnlyPropertyControl.ascx /resource:Test/mainsoft/NunitWebResources/Theme1.skin /resource:Test/mainsoft/NunitWebResources/Theme2.skin /resource:Test/mainsoft/NunitWebResources/UrlProperty.aspx /resource:Test/mainsoft/NunitWebResources/UrlProperty.ascx /resource:Test/mainsoft/NunitWebResources/UrlProperty.ascx.cs /resource:Test/mainsoft/NunitWebResources/Web.sitemap /resource:Test/mainsoft/NunitWebResources/WizardTest.skin /resource:Test/mainsoft/NunitWebResources/FooterTemplateTest.aspx /resource:Test/mainsoft/NunitWebResources/DataGrid.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates_2.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates_3.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewDataActions.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewProperties1.aspx /resource:Test/mainsoft/NunitWebResources/Bluehills.jpg /resource:Test/mainsoft/NunitWebResources/FormViewTest1.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_2.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_3.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_4.aspx /resource:Test/mainsoft/NunitWebResources/FormViewInsertEditDelete.aspx /resource:Test/mainsoft/NunitWebResources/GridViewUpdate.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest.xml /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest.xsl /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest1.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest2.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest3.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest4.aspx /resource:Test/mainsoft/NunitWebResources/LoginViewTest1.aspx /resource:Test/mainsoft/NunitWebResources/WebControl.config /resource:Test/mainsoft/NunitWebResources/WebLogin.config /resource:Test/mainsoft/NunitWebResources/CallbackTest1.aspx /resource:Test/mainsoft/NunitWebResources/CallbackTest2.aspx /resource:Test/mainsoft/NunitWebResources/EventValidationTest2.aspx /resource:Test/mainsoft/NunitWebResources/EventValidationTest1.aspx /resource:Test/mainsoft/NunitWebResources/ClientScript.js /resource:Test/mainsoft/NunitWebResources/EvalTest.aspx /resource:Test/mainsoft/NunitWebResources/TemplateUserControl.ascx /resource:Test/mainsoft/NunitWebResources/WebMapping.config /resource:Test/mainsoft/NunitWebResources/Mapping.aspx /resource:Test/mainsoft/NunitWebResources/Mapping1.aspx /resource:Test/mainsoft/NunitWebResources/CrossPagePosting1.aspx /resource:Test/mainsoft/NunitWebResources/CrossPagePosting2.aspx /resource:Test/mainsoft/NunitWebResources/MyDerived.master /resource:Test/mainsoft/NunitWebResources/MyPageWithDerivedMaster.aspx /resource:Test/mainsoft/NunitWebResources/MasterTypeTest1.aspx /resource:Test/mainsoft/NunitWebResources/MasterTypeTest2.aspx /resource:Test/mainsoft/NunitWebResources/PageLifecycleTest.aspx /resource:Test/mainsoft/NunitWebResources/PageValidationTest.aspx /resource:Test/mainsoft/NunitWebResources/AsyncPage.aspx /resource:Test/mainsoft/NunitWebResources/PageCultureTest.aspx /resource:Test/mainsoft/NunitWebResources/adapters.browser /resource:Test/mainsoft/NunitWebResources/NoEventValidation.aspx /resource:Test/mainsoft/NunitWebResources/ListControlPage.aspx /resource:Test/mainsoft/NunitWebResources/TextBoxTestlPage.aspx /resource:Test/mainsoft/NunitWebResources/ClearErrorOnError.aspx /resource:Test/mainsoft/NunitWebResources/RedirectOnError.aspx /resource:Test/mainsoft/NunitWebResources/TestCapability.browser /resource:Test/mainsoft/NunitWebResources/PageWithAdapter.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind1.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind2.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind3.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind4.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind1.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind2.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind3.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind4.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind5.aspx /resource:Test/mainsoft/NunitWebResources/ReadWritePropertyControl.ascx /resource:Test/mainsoft/MainsoftWebTest/nunitweb_config.xml /resource:Test/mainsoft/NunitWebResources/TemplateControlParsingTest.aspx /resource:Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.aspx /resource:Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.master /resource:Test/mainsoft/NunitWebResources/MissingMasterFile.aspx /resource:Test/mainsoft/NunitWebResources/CustomSectionEmptyCollection.aspx /resource:Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx /resource:Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx.cs /resource:Test/mainsoft/NunitWebResources/LoginDisplayRememberMe.aspx /resource:Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx /resource:Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx /resource:Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx /resource:Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx /resource:Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx /resource:Test/mainsoft/NunitWebResources/PreprocessorDirectivesInMarkup.aspx /resource:Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx /resource:Test/mainsoft/NunitWebResources/FullTagsInText.aspx /resource:Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx /resource:Test/mainsoft/NunitWebResources/NewlineInCodeExpression.aspx /resource:Test/mainsoft/NunitWebResources/DuplicateControlsInClientComment.aspx /resource:Test/mainsoft/NunitWebResources/TagsNestedInClientTag.aspx /resource:Test/mainsoft/NunitWebResources/ConditionalClientComments.aspx /resource:Test/mainsoft/NunitWebResources/OneLetterIdentifierInCodeRender.aspx /resource:Test/mainsoft/NunitWebResources/GlobalResourcesLocalization.aspx /resource:Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx /resource:Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx.cs /resource:Test/mainsoft/NunitWebResources/NestedParserFileText.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs /resource:Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx /resource:Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_1.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_2.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug578770.aspx /resource:Test/mainsoft/NunitWebResources/EnumConverter_Bug578586.aspx /resource:Test/mainsoft/NunitWebResources/ButtonColor_Bug325489.aspx /resource:Test/mainsoft/NunitWebResources/SqlDataSource_OnInit_Bug572781.aspx /resource:Test/mainsoft/NunitWebResources/FormViewPagerVisibility.aspx /resource:Test/mainsoft/NunitWebResources/OverridenControlsPropertyAndPostBack_Bug594238.aspx /resource:Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_0.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_1.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_2.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_5.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_6.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_7.aspx /resource:Test/mainsoft/NunitWebResources/GridView_Bug595567.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug600415.aspx /resource:Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx /resource:Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx.cs /resource:Test/mainsoft/NunitWebResources/HtmlTitleCodeRender_Bug662918.aspx /resource:Test/mainsoft/NunitWebResources/App_Code/EnumConverterControl.cs,App_Code/EnumConverterControl.cs /resource:Test/mainsoft/NunitWebResources/App_Code/MyContainer.cs,App_Code/MyContainer.cs /resource:Test/mainsoft/NunitWebResources/App_Code/CustomCheckBoxColumn.cs,App_Code/CustomCheckBoxColumn.cs /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Common.resx,App_GlobalResources/Common.resx /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Common.fr-FR.resx,App_GlobalResources/Common.fr-FR.resx /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx,App_GlobalResources/Resource1.resx</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize -r:./../../class/lib/net_4_x/plainweb/System.Web.dll -unsafe -nowarn:612,618 -d:INSIDE_SYSTEM_WEB -nowarn:618 /resource:resources/WebUIValidation.js /resource:resources/folder.gif /resource:resources/file.gif /resource:resources/computer.gif /resource:resources/arrow_minus.gif /resource:resources/arrow_noexpand.gif /resource:resources/arrow_plus.gif /resource:resources/arrow_up.gif /resource:resources/arrow_down.gif /resource:resources/box_full.gif /resource:resources/box_empty.gif /resource:resources/box_minus.gif /resource:resources/box_noexpand.gif /resource:resources/box_plus.gif /resource:resources/contact.gif /resource:resources/dot_empty.gif /resource:resources/dot_full.gif /resource:resources/dots.gif /resource:resources/inbox.gif /resource:resources/star_empty.gif /resource:resources/star_full.gif /resource:resources/warning.gif /resource:resources/TreeView_noexpand.gif /resource:resources/TreeView_dash.gif /resource:resources/TreeView_dashminus.gif /resource:resources/TreeView_dashplus.gif /resource:resources/TreeView_i.gif /resource:resources/TreeView_l.gif /resource:resources/TreeView_lminus.gif /resource:resources/TreeView_lplus.gif /resource:resources/TreeView_minus.gif /resource:resources/TreeView_plus.gif /resource:resources/TreeView_r.gif /resource:resources/TreeView_rminus.gif /resource:resources/TreeView_rplus.gif /resource:resources/TreeView_t.gif /resource:resources/TreeView_tminus.gif /resource:resources/TreeView_tplus.gif /resource:resources/transparent.gif /resource:resources/webform.js /resource:resources/WebUIValidation_2.0.js /resource:resources/ErrorTemplateCommon_Top.html /resource:resources/DefaultErrorTemplate_CustomErrorDefault.html /resource:resources/ErrorTemplateCommon_Bottom.html /resource:resources/DefaultErrorTemplate_StandardPage.html /resource:resources/HtmlizedExceptionPage_Top.html /resource:resources/HtmlizedExceptionPage_FileLongSource.html /resource:resources/HtmlizedExceptionPage_FileShortSource.html /resource:resources/HtmlizedExceptionPage_CompilerOutput.html /resource:System.Web.UI.WebControls/GridView.js /resource:System.Web.UI.WebControls/DetailsView.js /resource:System.Web.UI.WebControls/TreeView.js /resource:System.Web.UI.WebControls/Menu.js /resource:System.Web.UI.WebControls/MenuModern.js -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Drawing.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.EnterpriseServices.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Web.ApplicationServices.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/Mono.Data.Sqlite.dll -doc:net_4_x_System.Web_test.xml -nowarn:219,169,1591 /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Global.asax /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/My.ashx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/My.master /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPageWithMaster.aspx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/sub_map_01.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_01.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_02.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_03.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_04.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_05.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_06.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_07.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_08.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_09.sitemap /resource:Test/mainsoft/NunitWebResources/menuclass.aspx /resource:Test/mainsoft/NunitWebResources/FormView.aspx /resource:Test/mainsoft/NunitWebResources/PostBackMenuTest.aspx /resource:Test/mainsoft/NunitWebResources/PageWithStyleSheet.aspx /resource:Test/mainsoft/NunitWebResources/PageWithTheme.aspx /resource:Test/mainsoft/NunitWebResources/ResolveUrl.ascx /resource:Test/mainsoft/NunitWebResources/ResolveUrl.aspx /resource:Test/mainsoft/NunitWebResources/RunTimeSetTheme.aspx /resource:Test/mainsoft/NunitWebResources/ReadOnlyPropertyBind.aspx /resource:Test/mainsoft/NunitWebResources/ReadOnlyPropertyControl.ascx /resource:Test/mainsoft/NunitWebResources/Theme1.skin /resource:Test/mainsoft/NunitWebResources/Theme2.skin /resource:Test/mainsoft/NunitWebResources/UrlProperty.aspx /resource:Test/mainsoft/NunitWebResources/UrlProperty.ascx /resource:Test/mainsoft/NunitWebResources/UrlProperty.ascx.cs /resource:Test/mainsoft/NunitWebResources/Web.sitemap /resource:Test/mainsoft/NunitWebResources/WizardTest.skin /resource:Test/mainsoft/NunitWebResources/FooterTemplateTest.aspx /resource:Test/mainsoft/NunitWebResources/DataGrid.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates_2.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates_3.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewDataActions.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewProperties1.aspx /resource:Test/mainsoft/NunitWebResources/Bluehills.jpg /resource:Test/mainsoft/NunitWebResources/FormViewTest1.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_2.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_3.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_4.aspx /resource:Test/mainsoft/NunitWebResources/FormViewInsertEditDelete.aspx /resource:Test/mainsoft/NunitWebResources/GridViewUpdate.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest.xml /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest.xsl /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest1.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest2.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest3.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest4.aspx /resource:Test/mainsoft/NunitWebResources/LoginViewTest1.aspx /resource:Test/mainsoft/NunitWebResources/WebControl.config /resource:Test/mainsoft/NunitWebResources/WebLogin.config /resource:Test/mainsoft/NunitWebResources/CallbackTest1.aspx /resource:Test/mainsoft/NunitWebResources/CallbackTest2.aspx /resource:Test/mainsoft/NunitWebResources/EventValidationTest2.aspx /resource:Test/mainsoft/NunitWebResources/EventValidationTest1.aspx /resource:Test/mainsoft/NunitWebResources/ClientScript.js /resource:Test/mainsoft/NunitWebResources/EvalTest.aspx /resource:Test/mainsoft/NunitWebResources/TemplateUserControl.ascx /resource:Test/mainsoft/NunitWebResources/WebMapping.config /resource:Test/mainsoft/NunitWebResources/Mapping.aspx /resource:Test/mainsoft/NunitWebResources/Mapping1.aspx /resource:Test/mainsoft/NunitWebResources/CrossPagePosting1.aspx /resource:Test/mainsoft/NunitWebResources/CrossPagePosting2.aspx /resource:Test/mainsoft/NunitWebResources/MyDerived.master /resource:Test/mainsoft/NunitWebResources/MyPageWithDerivedMaster.aspx /resource:Test/mainsoft/NunitWebResources/MasterTypeTest1.aspx /resource:Test/mainsoft/NunitWebResources/MasterTypeTest2.aspx /resource:Test/mainsoft/NunitWebResources/PageLifecycleTest.aspx /resource:Test/mainsoft/NunitWebResources/PageValidationTest.aspx /resource:Test/mainsoft/NunitWebResources/AsyncPage.aspx /resource:Test/mainsoft/NunitWebResources/PageCultureTest.aspx /resource:Test/mainsoft/NunitWebResources/adapters.browser /resource:Test/mainsoft/NunitWebResources/NoEventValidation.aspx /resource:Test/mainsoft/NunitWebResources/ListControlPage.aspx /resource:Test/mainsoft/NunitWebResources/TextBoxTestlPage.aspx /resource:Test/mainsoft/NunitWebResources/ClearErrorOnError.aspx /resource:Test/mainsoft/NunitWebResources/RedirectOnError.aspx /resource:Test/mainsoft/NunitWebResources/TestCapability.browser /resource:Test/mainsoft/NunitWebResources/PageWithAdapter.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind1.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind2.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind3.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind4.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind1.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind2.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind3.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind4.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind5.aspx /resource:Test/mainsoft/NunitWebResources/ReadWritePropertyControl.ascx /resource:Test/mainsoft/MainsoftWebTest/nunitweb_config.xml /resource:Test/mainsoft/NunitWebResources/TemplateControlParsingTest.aspx /resource:Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.aspx /resource:Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.master /resource:Test/mainsoft/NunitWebResources/MissingMasterFile.aspx /resource:Test/mainsoft/NunitWebResources/CustomSectionEmptyCollection.aspx /resource:Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx /resource:Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx.cs /resource:Test/mainsoft/NunitWebResources/LoginDisplayRememberMe.aspx /resource:Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx /resource:Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx /resource:Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx /resource:Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx /resource:Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx /resource:Test/mainsoft/NunitWebResources/PreprocessorDirectivesInMarkup.aspx /resource:Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx /resource:Test/mainsoft/NunitWebResources/FullTagsInText.aspx /resource:Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx /resource:Test/mainsoft/NunitWebResources/NewlineInCodeExpression.aspx /resource:Test/mainsoft/NunitWebResources/DuplicateControlsInClientComment.aspx /resource:Test/mainsoft/NunitWebResources/TagsNestedInClientTag.aspx /resource:Test/mainsoft/NunitWebResources/ConditionalClientComments.aspx /resource:Test/mainsoft/NunitWebResources/OneLetterIdentifierInCodeRender.aspx /resource:Test/mainsoft/NunitWebResources/GlobalResourcesLocalization.aspx /resource:Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx /resource:Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx.cs /resource:Test/mainsoft/NunitWebResources/NestedParserFileText.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs /resource:Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx /resource:Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_1.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_2.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug578770.aspx /resource:Test/mainsoft/NunitWebResources/EnumConverter_Bug578586.aspx /resource:Test/mainsoft/NunitWebResources/ButtonColor_Bug325489.aspx /resource:Test/mainsoft/NunitWebResources/SqlDataSource_OnInit_Bug572781.aspx /resource:Test/mainsoft/NunitWebResources/FormViewPagerVisibility.aspx /resource:Test/mainsoft/NunitWebResources/OverridenControlsPropertyAndPostBack_Bug594238.aspx /resource:Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_0.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_1.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_2.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_5.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_6.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_7.aspx /resource:Test/mainsoft/NunitWebResources/GridView_Bug595567.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug600415.aspx /resource:Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx /resource:Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx.cs /resource:Test/mainsoft/NunitWebResources/HtmlTitleCodeRender_Bug662918.aspx /resource:Test/mainsoft/NunitWebResources/App_Code/EnumConverterControl.cs,App_Code/EnumConverterControl.cs /resource:Test/mainsoft/NunitWebResources/App_Code/MyContainer.cs,App_Code/MyContainer.cs /resource:Test/mainsoft/NunitWebResources/App_Code/CustomCheckBoxColumn.cs,App_Code/CustomCheckBoxColumn.cs /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Common.resx,App_GlobalResources/Common.resx /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Common.fr-FR.resx,App_GlobalResources/Common.fr-FR.resx /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx,App_GlobalResources/Resource1.resx</flags>
       <output>net_4_x_System.Web_test.dll</output>
       <built_sources>System.Web/UplevelHelper.cs</built_sources>
       <library_output>net_4_x_System.Web_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Web_test.dll.response</response>
     </project>
     <project dir="class/System.Web" library="System.Web-plainweb-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -unsafe -nowarn:612,618 -d:INSIDE_SYSTEM_WEB -nowarn:618 /resource:resources/TranslationResources.resources /resource:resources/WebUIValidation.js /resource:resources/folder.gif /resource:resources/file.gif /resource:resources/computer.gif /resource:resources/arrow_minus.gif /resource:resources/arrow_noexpand.gif /resource:resources/arrow_plus.gif /resource:resources/arrow_up.gif /resource:resources/arrow_down.gif /resource:resources/box_full.gif /resource:resources/box_empty.gif /resource:resources/box_minus.gif /resource:resources/box_noexpand.gif /resource:resources/box_plus.gif /resource:resources/contact.gif /resource:resources/dot_empty.gif /resource:resources/dot_full.gif /resource:resources/dots.gif /resource:resources/inbox.gif /resource:resources/star_empty.gif /resource:resources/star_full.gif /resource:resources/warning.gif /resource:resources/TreeView_noexpand.gif /resource:resources/TreeView_dash.gif /resource:resources/TreeView_dashminus.gif /resource:resources/TreeView_dashplus.gif /resource:resources/TreeView_i.gif /resource:resources/TreeView_l.gif /resource:resources/TreeView_lminus.gif /resource:resources/TreeView_lplus.gif /resource:resources/TreeView_minus.gif /resource:resources/TreeView_plus.gif /resource:resources/TreeView_r.gif /resource:resources/TreeView_rminus.gif /resource:resources/TreeView_rplus.gif /resource:resources/TreeView_t.gif /resource:resources/TreeView_tminus.gif /resource:resources/TreeView_tplus.gif /resource:resources/transparent.gif /resource:resources/webform.js /resource:resources/WebUIValidation_2.0.js /resource:resources/ErrorTemplateCommon_Top.html /resource:resources/DefaultErrorTemplate_CustomErrorDefault.html /resource:resources/ErrorTemplateCommon_Bottom.html /resource:resources/DefaultErrorTemplate_StandardPage.html /resource:resources/HtmlizedExceptionPage_Top.html /resource:resources/HtmlizedExceptionPage_FileLongSource.html /resource:resources/HtmlizedExceptionPage_FileShortSource.html /resource:resources/HtmlizedExceptionPage_CompilerOutput.html /resource:System.Web.UI.WebControls/GridView.js /resource:System.Web.UI.WebControls/DetailsView.js /resource:System.Web.UI.WebControls/TreeView.js /resource:System.Web.UI.WebControls/Menu.js /resource:System.Web.UI.WebControls/MenuModern.js -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Drawing.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.EnterpriseServices.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Web.ApplicationServices.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/Mono.Data.Sqlite.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -unsafe -nowarn:612,618 -d:INSIDE_SYSTEM_WEB -nowarn:618 /resource:resources/WebUIValidation.js /resource:resources/folder.gif /resource:resources/file.gif /resource:resources/computer.gif /resource:resources/arrow_minus.gif /resource:resources/arrow_noexpand.gif /resource:resources/arrow_plus.gif /resource:resources/arrow_up.gif /resource:resources/arrow_down.gif /resource:resources/box_full.gif /resource:resources/box_empty.gif /resource:resources/box_minus.gif /resource:resources/box_noexpand.gif /resource:resources/box_plus.gif /resource:resources/contact.gif /resource:resources/dot_empty.gif /resource:resources/dot_full.gif /resource:resources/dots.gif /resource:resources/inbox.gif /resource:resources/star_empty.gif /resource:resources/star_full.gif /resource:resources/warning.gif /resource:resources/TreeView_noexpand.gif /resource:resources/TreeView_dash.gif /resource:resources/TreeView_dashminus.gif /resource:resources/TreeView_dashplus.gif /resource:resources/TreeView_i.gif /resource:resources/TreeView_l.gif /resource:resources/TreeView_lminus.gif /resource:resources/TreeView_lplus.gif /resource:resources/TreeView_minus.gif /resource:resources/TreeView_plus.gif /resource:resources/TreeView_r.gif /resource:resources/TreeView_rminus.gif /resource:resources/TreeView_rplus.gif /resource:resources/TreeView_t.gif /resource:resources/TreeView_tminus.gif /resource:resources/TreeView_tplus.gif /resource:resources/transparent.gif /resource:resources/webform.js /resource:resources/WebUIValidation_2.0.js /resource:resources/ErrorTemplateCommon_Top.html /resource:resources/DefaultErrorTemplate_CustomErrorDefault.html /resource:resources/ErrorTemplateCommon_Bottom.html /resource:resources/DefaultErrorTemplate_StandardPage.html /resource:resources/HtmlizedExceptionPage_Top.html /resource:resources/HtmlizedExceptionPage_FileLongSource.html /resource:resources/HtmlizedExceptionPage_FileShortSource.html /resource:resources/HtmlizedExceptionPage_CompilerOutput.html /resource:System.Web.UI.WebControls/GridView.js /resource:System.Web.UI.WebControls/DetailsView.js /resource:System.Web.UI.WebControls/TreeView.js /resource:System.Web.UI.WebControls/Menu.js /resource:System.Web.UI.WebControls/MenuModern.js -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Drawing.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.EnterpriseServices.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Web.ApplicationServices.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/Mono.Data.Sqlite.dll</flags>
       <output>System.Web.dll</output>
       <built_sources>System.Web/UplevelHelper.cs</built_sources>
       <library_output>./../../class/lib/net_4_x/plainweb/System.Web.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>TranslationResources,resources/TranslationResources.resx</resources>
       <response>System.Web.dll.sources</response>
     </project>
     <project dir="class/System.Web" library="System.Web-tests-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize -r:./../../class/lib/net_4_x/plainweb/System.Web.dll -unsafe -nowarn:612,618 -d:INSIDE_SYSTEM_WEB -nowarn:618 /resource:resources/TranslationResources.resources /resource:resources/WebUIValidation.js /resource:resources/folder.gif /resource:resources/file.gif /resource:resources/computer.gif /resource:resources/arrow_minus.gif /resource:resources/arrow_noexpand.gif /resource:resources/arrow_plus.gif /resource:resources/arrow_up.gif /resource:resources/arrow_down.gif /resource:resources/box_full.gif /resource:resources/box_empty.gif /resource:resources/box_minus.gif /resource:resources/box_noexpand.gif /resource:resources/box_plus.gif /resource:resources/contact.gif /resource:resources/dot_empty.gif /resource:resources/dot_full.gif /resource:resources/dots.gif /resource:resources/inbox.gif /resource:resources/star_empty.gif /resource:resources/star_full.gif /resource:resources/warning.gif /resource:resources/TreeView_noexpand.gif /resource:resources/TreeView_dash.gif /resource:resources/TreeView_dashminus.gif /resource:resources/TreeView_dashplus.gif /resource:resources/TreeView_i.gif /resource:resources/TreeView_l.gif /resource:resources/TreeView_lminus.gif /resource:resources/TreeView_lplus.gif /resource:resources/TreeView_minus.gif /resource:resources/TreeView_plus.gif /resource:resources/TreeView_r.gif /resource:resources/TreeView_rminus.gif /resource:resources/TreeView_rplus.gif /resource:resources/TreeView_t.gif /resource:resources/TreeView_tminus.gif /resource:resources/TreeView_tplus.gif /resource:resources/transparent.gif /resource:resources/webform.js /resource:resources/WebUIValidation_2.0.js /resource:resources/ErrorTemplateCommon_Top.html /resource:resources/DefaultErrorTemplate_CustomErrorDefault.html /resource:resources/ErrorTemplateCommon_Bottom.html /resource:resources/DefaultErrorTemplate_StandardPage.html /resource:resources/HtmlizedExceptionPage_Top.html /resource:resources/HtmlizedExceptionPage_FileLongSource.html /resource:resources/HtmlizedExceptionPage_FileShortSource.html /resource:resources/HtmlizedExceptionPage_CompilerOutput.html /resource:System.Web.UI.WebControls/GridView.js /resource:System.Web.UI.WebControls/DetailsView.js /resource:System.Web.UI.WebControls/TreeView.js /resource:System.Web.UI.WebControls/Menu.js /resource:System.Web.UI.WebControls/MenuModern.js -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Drawing.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.EnterpriseServices.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Web.ApplicationServices.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/Mono.Data.Sqlite.dll -doc:net_4_x_System.Web_test.xml -nowarn:219,169,1591 /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Global.asax /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/My.ashx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/My.master /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPageWithMaster.aspx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/sub_map_01.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_01.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_02.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_03.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_04.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_05.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_06.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_07.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_08.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_09.sitemap /resource:Test/mainsoft/NunitWebResources/menuclass.aspx /resource:Test/mainsoft/NunitWebResources/FormView.aspx /resource:Test/mainsoft/NunitWebResources/PostBackMenuTest.aspx /resource:Test/mainsoft/NunitWebResources/PageWithStyleSheet.aspx /resource:Test/mainsoft/NunitWebResources/PageWithTheme.aspx /resource:Test/mainsoft/NunitWebResources/ResolveUrl.ascx /resource:Test/mainsoft/NunitWebResources/ResolveUrl.aspx /resource:Test/mainsoft/NunitWebResources/RunTimeSetTheme.aspx /resource:Test/mainsoft/NunitWebResources/ReadOnlyPropertyBind.aspx /resource:Test/mainsoft/NunitWebResources/ReadOnlyPropertyControl.ascx /resource:Test/mainsoft/NunitWebResources/Theme1.skin /resource:Test/mainsoft/NunitWebResources/Theme2.skin /resource:Test/mainsoft/NunitWebResources/UrlProperty.aspx /resource:Test/mainsoft/NunitWebResources/UrlProperty.ascx /resource:Test/mainsoft/NunitWebResources/UrlProperty.ascx.cs /resource:Test/mainsoft/NunitWebResources/Web.sitemap /resource:Test/mainsoft/NunitWebResources/WizardTest.skin /resource:Test/mainsoft/NunitWebResources/FooterTemplateTest.aspx /resource:Test/mainsoft/NunitWebResources/DataGrid.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates_2.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates_3.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewDataActions.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewProperties1.aspx /resource:Test/mainsoft/NunitWebResources/Bluehills.jpg /resource:Test/mainsoft/NunitWebResources/FormViewTest1.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_2.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_3.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_4.aspx /resource:Test/mainsoft/NunitWebResources/FormViewInsertEditDelete.aspx /resource:Test/mainsoft/NunitWebResources/GridViewUpdate.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest.xml /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest.xsl /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest1.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest2.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest3.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest4.aspx /resource:Test/mainsoft/NunitWebResources/LoginViewTest1.aspx /resource:Test/mainsoft/NunitWebResources/WebControl.config /resource:Test/mainsoft/NunitWebResources/WebLogin.config /resource:Test/mainsoft/NunitWebResources/CallbackTest1.aspx /resource:Test/mainsoft/NunitWebResources/CallbackTest2.aspx /resource:Test/mainsoft/NunitWebResources/EventValidationTest2.aspx /resource:Test/mainsoft/NunitWebResources/EventValidationTest1.aspx /resource:Test/mainsoft/NunitWebResources/ClientScript.js /resource:Test/mainsoft/NunitWebResources/EvalTest.aspx /resource:Test/mainsoft/NunitWebResources/TemplateUserControl.ascx /resource:Test/mainsoft/NunitWebResources/WebMapping.config /resource:Test/mainsoft/NunitWebResources/Mapping.aspx /resource:Test/mainsoft/NunitWebResources/Mapping1.aspx /resource:Test/mainsoft/NunitWebResources/CrossPagePosting1.aspx /resource:Test/mainsoft/NunitWebResources/CrossPagePosting2.aspx /resource:Test/mainsoft/NunitWebResources/MyDerived.master /resource:Test/mainsoft/NunitWebResources/MyPageWithDerivedMaster.aspx /resource:Test/mainsoft/NunitWebResources/MasterTypeTest1.aspx /resource:Test/mainsoft/NunitWebResources/MasterTypeTest2.aspx /resource:Test/mainsoft/NunitWebResources/PageLifecycleTest.aspx /resource:Test/mainsoft/NunitWebResources/PageValidationTest.aspx /resource:Test/mainsoft/NunitWebResources/AsyncPage.aspx /resource:Test/mainsoft/NunitWebResources/PageCultureTest.aspx /resource:Test/mainsoft/NunitWebResources/adapters.browser /resource:Test/mainsoft/NunitWebResources/NoEventValidation.aspx /resource:Test/mainsoft/NunitWebResources/ListControlPage.aspx /resource:Test/mainsoft/NunitWebResources/TextBoxTestlPage.aspx /resource:Test/mainsoft/NunitWebResources/ClearErrorOnError.aspx /resource:Test/mainsoft/NunitWebResources/RedirectOnError.aspx /resource:Test/mainsoft/NunitWebResources/TestCapability.browser /resource:Test/mainsoft/NunitWebResources/PageWithAdapter.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind1.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind2.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind3.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind4.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind1.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind2.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind3.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind4.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind5.aspx /resource:Test/mainsoft/NunitWebResources/ReadWritePropertyControl.ascx /resource:Test/mainsoft/MainsoftWebTest/nunitweb_config.xml /resource:Test/mainsoft/NunitWebResources/TemplateControlParsingTest.aspx /resource:Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.aspx /resource:Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.master /resource:Test/mainsoft/NunitWebResources/MissingMasterFile.aspx /resource:Test/mainsoft/NunitWebResources/CustomSectionEmptyCollection.aspx /resource:Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx /resource:Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx.cs /resource:Test/mainsoft/NunitWebResources/LoginDisplayRememberMe.aspx /resource:Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx /resource:Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx /resource:Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx /resource:Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx /resource:Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx /resource:Test/mainsoft/NunitWebResources/PreprocessorDirectivesInMarkup.aspx /resource:Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx /resource:Test/mainsoft/NunitWebResources/FullTagsInText.aspx /resource:Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx /resource:Test/mainsoft/NunitWebResources/NewlineInCodeExpression.aspx /resource:Test/mainsoft/NunitWebResources/DuplicateControlsInClientComment.aspx /resource:Test/mainsoft/NunitWebResources/TagsNestedInClientTag.aspx /resource:Test/mainsoft/NunitWebResources/ConditionalClientComments.aspx /resource:Test/mainsoft/NunitWebResources/OneLetterIdentifierInCodeRender.aspx /resource:Test/mainsoft/NunitWebResources/GlobalResourcesLocalization.aspx /resource:Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx /resource:Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx.cs /resource:Test/mainsoft/NunitWebResources/NestedParserFileText.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs /resource:Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx /resource:Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_1.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_2.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug578770.aspx /resource:Test/mainsoft/NunitWebResources/EnumConverter_Bug578586.aspx /resource:Test/mainsoft/NunitWebResources/ButtonColor_Bug325489.aspx /resource:Test/mainsoft/NunitWebResources/SqlDataSource_OnInit_Bug572781.aspx /resource:Test/mainsoft/NunitWebResources/FormViewPagerVisibility.aspx /resource:Test/mainsoft/NunitWebResources/OverridenControlsPropertyAndPostBack_Bug594238.aspx /resource:Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_0.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_1.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_2.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_5.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_6.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_7.aspx /resource:Test/mainsoft/NunitWebResources/GridView_Bug595567.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug600415.aspx /resource:Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx /resource:Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx.cs /resource:Test/mainsoft/NunitWebResources/HtmlTitleCodeRender_Bug662918.aspx /resource:Test/mainsoft/NunitWebResources/App_Code/EnumConverterControl.cs,App_Code/EnumConverterControl.cs /resource:Test/mainsoft/NunitWebResources/App_Code/MyContainer.cs,App_Code/MyContainer.cs /resource:Test/mainsoft/NunitWebResources/App_Code/CustomCheckBoxColumn.cs,App_Code/CustomCheckBoxColumn.cs /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Common.resx,App_GlobalResources/Common.resx /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Common.fr-FR.resx,App_GlobalResources/Common.fr-FR.resx /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx,App_GlobalResources/Resource1.resx</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize -r:./../../class/lib/net_4_x/plainweb/System.Web.dll -unsafe -nowarn:612,618 -d:INSIDE_SYSTEM_WEB -nowarn:618 /resource:resources/WebUIValidation.js /resource:resources/folder.gif /resource:resources/file.gif /resource:resources/computer.gif /resource:resources/arrow_minus.gif /resource:resources/arrow_noexpand.gif /resource:resources/arrow_plus.gif /resource:resources/arrow_up.gif /resource:resources/arrow_down.gif /resource:resources/box_full.gif /resource:resources/box_empty.gif /resource:resources/box_minus.gif /resource:resources/box_noexpand.gif /resource:resources/box_plus.gif /resource:resources/contact.gif /resource:resources/dot_empty.gif /resource:resources/dot_full.gif /resource:resources/dots.gif /resource:resources/inbox.gif /resource:resources/star_empty.gif /resource:resources/star_full.gif /resource:resources/warning.gif /resource:resources/TreeView_noexpand.gif /resource:resources/TreeView_dash.gif /resource:resources/TreeView_dashminus.gif /resource:resources/TreeView_dashplus.gif /resource:resources/TreeView_i.gif /resource:resources/TreeView_l.gif /resource:resources/TreeView_lminus.gif /resource:resources/TreeView_lplus.gif /resource:resources/TreeView_minus.gif /resource:resources/TreeView_plus.gif /resource:resources/TreeView_r.gif /resource:resources/TreeView_rminus.gif /resource:resources/TreeView_rplus.gif /resource:resources/TreeView_t.gif /resource:resources/TreeView_tminus.gif /resource:resources/TreeView_tplus.gif /resource:resources/transparent.gif /resource:resources/webform.js /resource:resources/WebUIValidation_2.0.js /resource:resources/ErrorTemplateCommon_Top.html /resource:resources/DefaultErrorTemplate_CustomErrorDefault.html /resource:resources/ErrorTemplateCommon_Bottom.html /resource:resources/DefaultErrorTemplate_StandardPage.html /resource:resources/HtmlizedExceptionPage_Top.html /resource:resources/HtmlizedExceptionPage_FileLongSource.html /resource:resources/HtmlizedExceptionPage_FileShortSource.html /resource:resources/HtmlizedExceptionPage_CompilerOutput.html /resource:System.Web.UI.WebControls/GridView.js /resource:System.Web.UI.WebControls/DetailsView.js /resource:System.Web.UI.WebControls/TreeView.js /resource:System.Web.UI.WebControls/Menu.js /resource:System.Web.UI.WebControls/MenuModern.js -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Drawing.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.EnterpriseServices.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.Formatters.Soap.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Web.ApplicationServices.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/Mono.Data.Sqlite.dll -doc:net_4_x_System.Web_test.xml -nowarn:219,169,1591 /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Global.asax /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/My.ashx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/My.master /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPageWithMaster.aspx /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/sub_map_01.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_01.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_02.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_03.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_04.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_05.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_06.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_07.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_08.sitemap /resource:Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_09.sitemap /resource:Test/mainsoft/NunitWebResources/menuclass.aspx /resource:Test/mainsoft/NunitWebResources/FormView.aspx /resource:Test/mainsoft/NunitWebResources/PostBackMenuTest.aspx /resource:Test/mainsoft/NunitWebResources/PageWithStyleSheet.aspx /resource:Test/mainsoft/NunitWebResources/PageWithTheme.aspx /resource:Test/mainsoft/NunitWebResources/ResolveUrl.ascx /resource:Test/mainsoft/NunitWebResources/ResolveUrl.aspx /resource:Test/mainsoft/NunitWebResources/RunTimeSetTheme.aspx /resource:Test/mainsoft/NunitWebResources/ReadOnlyPropertyBind.aspx /resource:Test/mainsoft/NunitWebResources/ReadOnlyPropertyControl.ascx /resource:Test/mainsoft/NunitWebResources/Theme1.skin /resource:Test/mainsoft/NunitWebResources/Theme2.skin /resource:Test/mainsoft/NunitWebResources/UrlProperty.aspx /resource:Test/mainsoft/NunitWebResources/UrlProperty.ascx /resource:Test/mainsoft/NunitWebResources/UrlProperty.ascx.cs /resource:Test/mainsoft/NunitWebResources/Web.sitemap /resource:Test/mainsoft/NunitWebResources/WizardTest.skin /resource:Test/mainsoft/NunitWebResources/FooterTemplateTest.aspx /resource:Test/mainsoft/NunitWebResources/DataGrid.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates_2.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewTemplates_3.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewDataActions.aspx /resource:Test/mainsoft/NunitWebResources/DetailsViewProperties1.aspx /resource:Test/mainsoft/NunitWebResources/Bluehills.jpg /resource:Test/mainsoft/NunitWebResources/FormViewTest1.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_2.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_3.aspx /resource:Test/mainsoft/NunitWebResources/FormViewTest1_4.aspx /resource:Test/mainsoft/NunitWebResources/FormViewInsertEditDelete.aspx /resource:Test/mainsoft/NunitWebResources/GridViewUpdate.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest.xml /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest.xsl /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest1.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest2.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest3.aspx /resource:Test/mainsoft/NunitWebResources/XMLDataSourceTest4.aspx /resource:Test/mainsoft/NunitWebResources/LoginViewTest1.aspx /resource:Test/mainsoft/NunitWebResources/WebControl.config /resource:Test/mainsoft/NunitWebResources/WebLogin.config /resource:Test/mainsoft/NunitWebResources/CallbackTest1.aspx /resource:Test/mainsoft/NunitWebResources/CallbackTest2.aspx /resource:Test/mainsoft/NunitWebResources/EventValidationTest2.aspx /resource:Test/mainsoft/NunitWebResources/EventValidationTest1.aspx /resource:Test/mainsoft/NunitWebResources/ClientScript.js /resource:Test/mainsoft/NunitWebResources/EvalTest.aspx /resource:Test/mainsoft/NunitWebResources/TemplateUserControl.ascx /resource:Test/mainsoft/NunitWebResources/WebMapping.config /resource:Test/mainsoft/NunitWebResources/Mapping.aspx /resource:Test/mainsoft/NunitWebResources/Mapping1.aspx /resource:Test/mainsoft/NunitWebResources/CrossPagePosting1.aspx /resource:Test/mainsoft/NunitWebResources/CrossPagePosting2.aspx /resource:Test/mainsoft/NunitWebResources/MyDerived.master /resource:Test/mainsoft/NunitWebResources/MyPageWithDerivedMaster.aspx /resource:Test/mainsoft/NunitWebResources/MasterTypeTest1.aspx /resource:Test/mainsoft/NunitWebResources/MasterTypeTest2.aspx /resource:Test/mainsoft/NunitWebResources/PageLifecycleTest.aspx /resource:Test/mainsoft/NunitWebResources/PageValidationTest.aspx /resource:Test/mainsoft/NunitWebResources/AsyncPage.aspx /resource:Test/mainsoft/NunitWebResources/PageCultureTest.aspx /resource:Test/mainsoft/NunitWebResources/adapters.browser /resource:Test/mainsoft/NunitWebResources/NoEventValidation.aspx /resource:Test/mainsoft/NunitWebResources/ListControlPage.aspx /resource:Test/mainsoft/NunitWebResources/TextBoxTestlPage.aspx /resource:Test/mainsoft/NunitWebResources/ClearErrorOnError.aspx /resource:Test/mainsoft/NunitWebResources/RedirectOnError.aspx /resource:Test/mainsoft/NunitWebResources/TestCapability.browser /resource:Test/mainsoft/NunitWebResources/PageWithAdapter.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind1.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind2.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind3.aspx /resource:Test/mainsoft/NunitWebResources/InvalidPropertyBind4.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind1.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind2.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind3.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind4.aspx /resource:Test/mainsoft/NunitWebResources/ValidPropertyBind5.aspx /resource:Test/mainsoft/NunitWebResources/ReadWritePropertyControl.ascx /resource:Test/mainsoft/MainsoftWebTest/nunitweb_config.xml /resource:Test/mainsoft/NunitWebResources/TemplateControlParsingTest.aspx /resource:Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.aspx /resource:Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.master /resource:Test/mainsoft/NunitWebResources/MissingMasterFile.aspx /resource:Test/mainsoft/NunitWebResources/CustomSectionEmptyCollection.aspx /resource:Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx /resource:Test/mainsoft/NunitWebResources/NoDoubleOnInitOnRemoveAdd.aspx.cs /resource:Test/mainsoft/NunitWebResources/LoginDisplayRememberMe.aspx /resource:Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx /resource:Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx /resource:Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx /resource:Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx /resource:Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx /resource:Test/mainsoft/NunitWebResources/PreprocessorDirectivesInMarkup.aspx /resource:Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx /resource:Test/mainsoft/NunitWebResources/FullTagsInText.aspx /resource:Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx /resource:Test/mainsoft/NunitWebResources/NewlineInCodeExpression.aspx /resource:Test/mainsoft/NunitWebResources/DuplicateControlsInClientComment.aspx /resource:Test/mainsoft/NunitWebResources/TagsNestedInClientTag.aspx /resource:Test/mainsoft/NunitWebResources/ConditionalClientComments.aspx /resource:Test/mainsoft/NunitWebResources/OneLetterIdentifierInCodeRender.aspx /resource:Test/mainsoft/NunitWebResources/GlobalResourcesLocalization.aspx /resource:Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx /resource:Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx.cs /resource:Test/mainsoft/NunitWebResources/NestedParserFileText.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx /resource:Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs /resource:Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx /resource:Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_1.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_2.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug578770.aspx /resource:Test/mainsoft/NunitWebResources/EnumConverter_Bug578586.aspx /resource:Test/mainsoft/NunitWebResources/ButtonColor_Bug325489.aspx /resource:Test/mainsoft/NunitWebResources/SqlDataSource_OnInit_Bug572781.aspx /resource:Test/mainsoft/NunitWebResources/FormViewPagerVisibility.aspx /resource:Test/mainsoft/NunitWebResources/OverridenControlsPropertyAndPostBack_Bug594238.aspx /resource:Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_0.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_1.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_2.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_5.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_6.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_7.aspx /resource:Test/mainsoft/NunitWebResources/GridView_Bug595567.aspx /resource:Test/mainsoft/NunitWebResources/CheckBoxList_Bug600415.aspx /resource:Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx /resource:Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx.cs /resource:Test/mainsoft/NunitWebResources/HtmlTitleCodeRender_Bug662918.aspx /resource:Test/mainsoft/NunitWebResources/App_Code/EnumConverterControl.cs,App_Code/EnumConverterControl.cs /resource:Test/mainsoft/NunitWebResources/App_Code/MyContainer.cs,App_Code/MyContainer.cs /resource:Test/mainsoft/NunitWebResources/App_Code/CustomCheckBoxColumn.cs,App_Code/CustomCheckBoxColumn.cs /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Common.resx,App_GlobalResources/Common.resx /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Common.fr-FR.resx,App_GlobalResources/Common.fr-FR.resx /resource:Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx,App_GlobalResources/Resource1.resx</flags>
       <output>net_4_x_System.Web_test.dll</output>
       <built_sources>System.Web/UplevelHelper.cs</built_sources>
       <library_output>net_4_x_System.Web_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Web_test.dll.response</response>
     </project>
     <project dir="class/System.Web.Services" library="System.Web.Services-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.Services.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.Services.dll.sources</response>
     </project>
     <project dir="class/System.Web.Services" library="System.Web.Services-tests-net_4_x">
       <library_output>net_4_x_System.Web.Services_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Web.Services_test.dll.response</response>
     </project>
     <project dir="class/System.Design" library="System.Design-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Design.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Design.dll.sources</response>
     </project>
     <project dir="class/System.Design" library="System.Design-tests-net_4_x">
       <library_output>net_4_x_System.Design_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Design_test.dll.response</response>
     </project>
     <project dir="class/System.Design" library="System.Design-plaindesign-net_4_x">
       <library_output>./../../class/lib/net_4_x/plaindesign/System.Design.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Design.dll.sources</response>
     </project>
     <project dir="class/System.Design" library="System.Design-tests-net_4_x">
       <library_output>net_4_x_System.Design_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Design_test.dll.response</response>
     </project>
     <project dir="class/System.Runtime.Remoting" library="System.Runtime.Remoting-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Runtime.Remoting.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Remoting.dll.sources</response>
     </project>
     <project dir="class/System.Runtime.Remoting" library="System.Runtime.Remoting-tests-net_4_x">
       <library_output>net_4_x_System.Runtime.Remoting_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Runtime.Remoting_test.dll.response</response>
     </project>
     <project dir="class/System.Configuration.Install" library="System.Configuration.Install-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Configuration.Install.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Configuration.Install.dll.sources</response>
     </project>
     <project dir="class/System.Management" library="System.Management-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Management.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Management.dll.sources</response>
     </project>
     <project dir="class/System.Data.OracleClient" library="System.Data.OracleClient-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Data.OracleClient.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Data.OracleClient.dll.sources</response>
     </project>
     <project dir="class/System.Data.OracleClient" library="System.Data.OracleClient-tests-net_4_x">
       <library_output>net_4_x_System.Data.OracleClient_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Data.OracleClient_test.dll.response</response>
     </project>
     <project dir="class/Cscompmgd" library="Cscompmgd-net_4_x">
       <library_output>./../../class/lib/net_4_x/cscompmgd.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Cscompmgd.dll.sources</response>
     </project>
     <project dir="class/Cscompmgd" library="Cscompmgd-tests-net_4_x">
       <library_output>net_4_x_Cscompmgd_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Cscompmgd_test.dll.response</response>
     </project>
     <project dir="class/Commons.Xml.Relaxng" library="Commons.Xml.Relaxng-net_4_x">
       <library_output>./../../class/lib/net_4_x/Commons.Xml.Relaxng.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Commons.Xml.Relaxng.dll.sources</response>
     </project>
     <project dir="class/Commons.Xml.Relaxng" library="Commons.Xml.Relaxng-tests-net_4_x">
       <library_output>net_4_x_Commons.Xml.Relaxng_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Commons.Xml.Relaxng_test.dll.response</response>
     </project>
     <project dir="class/Mono.Messaging" library="Mono.Messaging-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Messaging.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Messaging.dll.sources</response>
     </project>
     <project dir="class/Mono.Messaging" library="Mono.Messaging-tests-net_4_x">
       <library_output>net_4_x_Mono.Messaging_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Messaging_test.dll.response</response>
     </project>
     <project dir="class/System.Messaging" library="System.Messaging-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Messaging.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Messaging.dll.sources</response>
     </project>
     <project dir="class/System.Messaging" library="System.Messaging-tests-net_4_x">
       <library_output>net_4_x_System.Messaging_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Messaging_test.dll.response</response>
     </project>
     <project dir="class/System.ServiceProcess" library="System.ServiceProcess-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.ServiceProcess.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceProcess.dll.sources</response>
     </project>
     <project dir="class/System.ServiceProcess" library="System.ServiceProcess-tests-net_4_x">
       <library_output>net_4_x_System.ServiceProcess_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.ServiceProcess_test.dll.response</response>
     </project>
     <project dir="class/System.Drawing.Design" library="System.Drawing.Design-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Drawing.Design.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Drawing.Design.dll.sources</response>
     </project>
     <project dir="class/ICSharpCode.SharpZipLib" library="ICSharpCode.SharpZipLib-net_4_x">
       <library_output>./../../class/lib/net_4_x/ICSharpCode.SharpZipLib.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>ICSharpCode.SharpZipLib.dll.sources</response>
     </project>
     <project dir="class/IBM.Data.DB2" library="IBM.Data.DB2-net_4_x">
       <library_output>./../../class/lib/net_4_x/IBM.Data.DB2.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>IBM.Data.DB2.dll.sources</response>
     </project>
     <project dir="class/CustomMarshalers" library="CustomMarshalers-net_4_x">
       <library_output>./../../class/lib/net_4_x/CustomMarshalers.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>CustomMarshalers.dll.sources</response>
     </project>
     <project dir="class/SystemWebTestShim" library="SystemWebTestShim-net_4_x">
       <library_output>./../../class/lib/net_4_x/SystemWebTestShim.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>SystemWebTestShim.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel.Internals" library="System.ServiceModel.Internals-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.ServiceModel.Internals.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Internals.dll.sources</response>
     </project>
     <project dir="class/SMDiagnostics" library="SMDiagnostics-net_4_x">
       <library_output>./../../class/lib/net_4_x/SMDiagnostics.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>SMDiagnostics.dll.sources</response>
     </project>
     <project dir="class/System.Runtime.Serialization" library="System.Runtime.Serialization-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Runtime.Serialization.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Runtime.Serialization.dll.sources</response>
     </project>
     <project dir="class/System.Runtime.Serialization" library="System.Runtime.Serialization-tests-net_4_x">
       <library_output>net_4_x_System.Runtime.Serialization_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Runtime.Serialization_test.dll.response</response>
     </project>
     <project dir="class/System.Xml.Linq" library="System.Xml.Linq-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Xml.Linq.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.Linq.dll.sources</response>
     </project>
     <project dir="class/System.Xml.Linq" library="System.Xml.Linq-tests-net_4_x">
       <library_output>net_4_x_System.Xml.Linq_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Xml.Linq_test.dll.response</response>
     </project>
     <project dir="class/System.Data.Linq" library="System.Data.Linq-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Data.Linq.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Data.Linq.dll.sources</response>
     </project>
     <project dir="class/System.Data.Linq" library="System.Data.Linq-tests-net_4_x">
       <library_output>net_4_x_System.Data.Linq_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Data.Linq_test.dll.response</response>
     </project>
     <project dir="class/System.Web.Abstractions" library="System.Web.Abstractions-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.Abstractions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.Abstractions.dll.sources</response>
     </project>
     <project dir="class/System.Web.Abstractions" library="System.Web.Abstractions-tests-net_4_x">
       <library_output>net_4_x_System.Web.Abstractions_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Web.Abstractions_test.dll.response</response>
     </project>
     <project dir="class/System.Web.Routing" library="System.Web.Routing-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.Routing.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.Routing.dll.sources</response>
     </project>
     <project dir="class/System.Web.Routing" library="System.Web.Routing-tests-net_4_x">
       <library_output>net_4_x_System.Web.Routing_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Web.Routing_test.dll.response</response>
     </project>
     <project dir="class/System.Runtime.DurableInstancing" library="System.Runtime.DurableInstancing-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Runtime.DurableInstancing.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.DurableInstancing.dll.sources</response>
     </project>
     <project dir="class/System.Runtime.DurableInstancing" library="System.Runtime.DurableInstancing-tests-net_4_x">
       <library_output>net_4_x_System.Runtime.DurableInstancing_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Runtime.DurableInstancing_test.dll.response</response>
     </project>
     <project dir="class/System.IdentityModel" library="System.IdentityModel-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.IdentityModel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IdentityModel.dll.sources</response>
     </project>
     <project dir="class/System.IdentityModel" library="System.IdentityModel-tests-net_4_x">
       <library_output>net_4_x_System.IdentityModel_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.IdentityModel_test.dll.response</response>
     </project>
     <project dir="class/System.IdentityModel.Selectors" library="System.IdentityModel.Selectors-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.IdentityModel.Selectors.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IdentityModel.Selectors.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel" library="System.ServiceModel-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.ServiceModel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel" library="System.ServiceModel-tests-net_4_x">
       <library_output>net_4_x_System.ServiceModel_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.ServiceModel_test.dll.response</response>
     </project>
     <project dir="class/System.ServiceModel" library="System.ServiceModel-plainservice-net_4_x">
       <library_output>./../../class/lib/net_4_x/plainservice/System.ServiceModel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel" library="System.ServiceModel-tests-net_4_x">
       <library_output>net_4_x_System.ServiceModel_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.ServiceModel_test.dll.response</response>
     </project>
     <project dir="class/System.Web.Extensions" library="System.Web.Extensions-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.Extensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.Extensions.dll.sources</response>
     </project>
     <project dir="class/System.Web.Extensions" library="System.Web.Extensions-tests-net_4_x">
       <library_output>net_4_x_System.Web.Extensions_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Web.Extensions_test.dll.response</response>
     </project>
     <project dir="class/System.Web.Extensions.Design" library="System.Web.Extensions.Design-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.Extensions.Design.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.Extensions.Design.dll.sources</response>
     </project>
     <project dir="class/System.Web.DynamicData" library="System.Web.DynamicData-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.DynamicData.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.DynamicData.dll.sources</response>
     </project>
     <project dir="class/System.Web.DynamicData" library="System.Web.DynamicData-tests-net_4_x">
       <library_output>net_4_x_System.Web.DynamicData_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Web.DynamicData_test.dll.response</response>
     </project>
     <project dir="class/Mono.CSharp" library="Mono.CSharp-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.CSharp.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.CSharp.dll.sources</response>
     </project>
     <project dir="class/Mono.CSharp" library="Mono.CSharp-tests-net_4_x">
       <library_output>net_4_x_Mono.CSharp_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.CSharp_test.dll.response</response>
     </project>
     <project dir="class/System.Net" library="System.Net-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Net.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.dll.sources</response>
     </project>
     <project dir="class/System.Json" library="System.Json-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Json.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Json.dll.sources</response>
     </project>
     <project dir="class/System.Json" library="System.Json-tests-net_4_x">
       <library_output>net_4_x_System.Json_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Json_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.CSharp" library="Microsoft.CSharp-net_4_x">
       <library_output>./../../class/lib/net_4_x/Microsoft.CSharp.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.CSharp.dll.sources</response>
     </project>
     <project dir="class/System.Xaml" library="System.Xaml-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Xaml.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xaml.dll.sources</response>
     </project>
     <project dir="class/System.Xaml" library="System.Xaml-tests-net_4_x">
       <library_output>net_4_x_System.Xaml_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Xaml_test.dll.response</response>
     </project>
     <project dir="class/WindowsBase" library="WindowsBase-net_4_x">
       <library_output>./../../class/lib/net_4_x/WindowsBase.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>WindowsBase.dll.sources</response>
     </project>
     <project dir="class/WindowsBase" library="WindowsBase-tests-net_4_x">
       <library_output>net_4_x_WindowsBase_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_WindowsBase_test.dll.response</response>
     </project>
     <project dir="class/System.ServiceModel.Activation" library="System.ServiceModel.Activation-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.ServiceModel.Activation.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Activation.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel.Routing" library="System.ServiceModel.Routing-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.ServiceModel.Routing.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Routing.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel.Discovery" library="System.ServiceModel.Discovery-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.ServiceModel.Discovery.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Discovery.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel.Discovery" library="System.ServiceModel.Discovery-tests-net_4_x">
       <library_output>net_4_x_System.ServiceModel.Discovery_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.ServiceModel.Discovery_test.dll.response</response>
     </project>
     <project dir="class/System.Runtime.Caching" library="System.Runtime.Caching-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Runtime.Caching.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Caching.dll.sources</response>
     </project>
     <project dir="class/System.Runtime.Caching" library="System.Runtime.Caching-tests-net_4_x">
       <library_output>net_4_x_System.Runtime.Caching_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Runtime.Caching_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Web.Infrastructure" library="Microsoft.Web.Infrastructure-net_4_x">
       <library_output>./../../class/lib/net_4_x/Microsoft.Web.Infrastructure.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Web.Infrastructure.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel.Web" library="System.ServiceModel.Web-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.ServiceModel.Web.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Web.dll.sources</response>
     </project>
     <project dir="class/System.ServiceModel.Web" library="System.ServiceModel.Web-tests-net_4_x">
       <library_output>net_4_x_System.ServiceModel.Web_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.ServiceModel.Web_test.dll.response</response>
     </project>
     <project dir="class/System.Net.Http" library="System.Net.Http-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Net.Http.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Http.dll.sources</response>
     </project>
     <project dir="class/System.Net.Http" library="System.Net.Http-tests-net_4_x">
       <library_output>net_4_x_System.Net.Http_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Net.Http_test.dll.response</response>
     </project>
     <project dir="class/System.Net.Http.WebRequest" library="System.Net.Http.WebRequest-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Net.Http.WebRequest.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Http.WebRequest.dll.sources</response>
     </project>
     <project dir="class/System.Web.Razor" library="System.Web.Razor-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub -delaysign /d:ASPNETWEBPAGES /resource:System.Web.Razor.Resources.RazorResources.resources /resource:System.Web.Razor.Common.CommonResources.resources -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub -delaysign /d:ASPNETWEBPAGES -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll</flags>
       <output>System.Web.Razor.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Web.Razor.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Web.Razor.Common.CommonResources,../../../external/aspnetwebstack/src/CommonResources.resx System.Web.Razor.Resources.RazorResources,../../../external/aspnetwebstack/src/System.Web.Razor/Resources/RazorResources.resx</resources>
       <response>System.Web.Razor.dll.sources</response>
     </project>
     <project dir="class/System.Web.WebPages.Deployment" library="System.Web.WebPages.Deployment-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub -delaysign /d:ASPNETWEBPAGES /resource:System.Web.WebPages.Deployment.Common.CommonResources.resources /resource:System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/System.Web.dll -r:./../../class/lib/net_4_x/Microsoft.Web.Infrastructure.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub -delaysign /d:ASPNETWEBPAGES -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/System.Web.dll -r:./../../class/lib/net_4_x/Microsoft.Web.Infrastructure.dll</flags>
       <output>System.Web.WebPages.Deployment.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Web.WebPages.Deployment.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Web.WebPages.Deployment.Common.CommonResources,../../../external/aspnetwebstack/src/CommonResources.resx System.Web.WebPages.Deployment.Resources.ConfigurationResources,../../../external/aspnetwebstack/src/System.Web.WebPages.Deployment/Resources/ConfigurationResources.resx</resources>
       <response>System.Web.WebPages.Deployment.dll.sources</response>
     </project>
     <project dir="class/System.Web.WebPages" library="System.Web.WebPages-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub /delaysign /d:ASPNETWEBPAGES /resource:System.Web.WebPages.Resources.WebPageResources.resources /resource:System.Web.WebPages.Common.CommonResources.resources -r:./../../class/lib/net_4_x/Microsoft.CSharp.dll -r:./../../class/lib/net_4_x/Microsoft.Web.Infrastructure.dll -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Data.Linq.dll -r:./../../class/lib/net_4_x/System.Web.dll -r:./../../class/lib/net_4_x/System.Web.WebPages.Deployment.dll -r:./../../class/lib/net_4_x/System.Web.Razor.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Xml.Linq.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub /delaysign /d:ASPNETWEBPAGES -r:./../../class/lib/net_4_x/Microsoft.CSharp.dll -r:./../../class/lib/net_4_x/Microsoft.Web.Infrastructure.dll -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Data.Linq.dll -r:./../../class/lib/net_4_x/System.Web.dll -r:./../../class/lib/net_4_x/System.Web.WebPages.Deployment.dll -r:./../../class/lib/net_4_x/System.Web.Razor.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Xml.Linq.dll</flags>
       <output>System.Web.WebPages.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Web.WebPages.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Web.WebPages.Common.CommonResources,../../../external/aspnetwebstack/src/CommonResources.resx System.Web.WebPages.Resources.WebPageResources,../../../external/aspnetwebstack/src/System.Web.WebPages/Resources/WebPageResources.resx</resources>
       <response>System.Web.WebPages.dll.sources</response>
     </project>
     <project dir="class/System.Web.WebPages.Razor" library="System.Web.WebPages.Razor-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub /delaysign /d:ASPNETWEBPAGES /resource:System.Web.WebPages.Razor.Resources.RazorWebResources.resources /resource:System.Web.WebPages.Razor.Common.CommonResources.resources -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/System.Web.dll -r:./../../class/lib/net_4_x/System.Web.WebPages.dll -r:./../../class/lib/net_4_x/System.Web.Razor.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub /delaysign /d:ASPNETWEBPAGES -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/System.Web.dll -r:./../../class/lib/net_4_x/System.Web.WebPages.dll -r:./../../class/lib/net_4_x/System.Web.Razor.dll</flags>
       <output>System.Web.WebPages.Razor.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Web.WebPages.Razor.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Web.WebPages.Razor.Common.CommonResources,../../../external/aspnetwebstack/src/CommonResources.resx System.Web.WebPages.Razor.Resources.RazorWebResources,../../../external/aspnetwebstack/src/System.Web.WebPages.Razor/Resources/RazorWebResources.resx</resources>
       <response>System.Web.WebPages.Razor.dll.sources</response>
     </project>
     <project dir="class/System.Web.Mvc3" library="System.Web.Mvc3-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub /d:MONO /delaysign /resource:Mvc/Resources/MvcResources.resources,System.Web.Mvc.Resources.MvcResources.resources -r:./../../class/lib/net_4_x/Microsoft.Web.Infrastructure.dll -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Web.dll -r:./../../class/lib/net_4_x/System.Web.Abstractions.dll -r:./../../class/lib/net_4_x/System.Web.Routing.dll -r:./../../class/lib/net_4_x/System.Web.Extensions.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Data.Linq.dll -r:./../../class/lib/net_4_x/System.Runtime.Caching.dll -r:./../../class/lib/net_4_x/System.Web.Razor.dll -r:./../../class/lib/net_4_x/System.Web.WebPages.Razor.dll -r:./../../class/lib/net_4_x/System.Web.WebPages.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /warn:1 /keyfile:../winfx.pub /d:MONO /delaysign -r:./../../class/lib/net_4_x/Microsoft.Web.Infrastructure.dll -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Web.dll -r:./../../class/lib/net_4_x/System.Web.Abstractions.dll -r:./../../class/lib/net_4_x/System.Web.Routing.dll -r:./../../class/lib/net_4_x/System.Web.Extensions.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Data.Linq.dll -r:./../../class/lib/net_4_x/System.Runtime.Caching.dll -r:./../../class/lib/net_4_x/System.Web.Razor.dll -r:./../../class/lib/net_4_x/System.Web.WebPages.Razor.dll -r:./../../class/lib/net_4_x/System.Web.WebPages.dll</flags>
       <output>System.Web.Mvc.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Web.Mvc.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Web.Mvc.Resources.MvcResources,Mvc/Resources/MvcResources.resx</resources>
       <response>System.Web.Mvc3.dll.sources</response>
     </project>
     <project dir="class/System.Net.Http.Formatting" library="System.Net.Http.Formatting-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:ASPNETMVC -keyfile:../winfx.pub -delaysign -resource:System.Net.Http.Properties.CommonWebApiResources.resources -resource:System.Net.Http.Properties.Resources.resources -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Net.Http.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.dll -r:./../../class/lib/net_4_x/System.Xml.Linq.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Configuration.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:ASPNETMVC -keyfile:../winfx.pub -delaysign -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Net.Http.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.dll -r:./../../class/lib/net_4_x/System.Xml.Linq.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Configuration.dll</flags>
       <output>System.Net.Http.Formatting.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Net.Http.Formatting.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Net.Http.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx System.Net.Http.Properties.Resources,../../../external/aspnetwebstack/src/System.Net.Http.Formatting/Properties/Resources.resx</resources>
       <response>System.Net.Http.Formatting.dll.sources</response>
     </project>
     <project dir="class/System.Web.Http" library="System.Web.Http-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:ASPNETMVC -keyfile:../winfx.pub -delaysign -resource:System.Web.Http.Properties.CommonWebApiResources.resources -resource:System.Web.Http.Properties.SRResources.resources -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Net.Http.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Net.Http.Formatting.dll -r:./../../class/lib/net_4_x/System.Runtime.Caching.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.dll -r:./../../class/lib/net_4_x/System.Data.Linq.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:ASPNETMVC -keyfile:../winfx.pub -delaysign -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Net.Http.dll -r:./../../class/lib/net_4_x/System.ComponentModel.DataAnnotations.dll -r:./../../class/lib/net_4_x/System.Net.Http.Formatting.dll -r:./../../class/lib/net_4_x/System.Runtime.Caching.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.dll -r:./../../class/lib/net_4_x/System.Data.Linq.dll</flags>
       <output>System.Web.Http.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Web.Http.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Web.Http.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx System.Web.Http.Properties.SRResources,../../../external/aspnetwebstack/src/System.Web.Http/Properties/SRResources.resx</resources>
       <response>System.Web.Http.dll.sources</response>
     </project>
     <project dir="class/System.Web.Http.SelfHost" library="System.Web.Http.SelfHost-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.Http.SelfHost.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Web.Http.SelfHost.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx System.Web.Http.SelfHost.Properties.SRResources,../../../external/aspnetwebstack/src/System.Web.Http.SelfHost/Properties/SRResources.resx</resources>
       <response>System.Web.Http.SelfHost.dll.sources</response>
     </project>
     <project dir="class/System.Web.Http.WebHost" library="System.Web.Http.WebHost-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.Http.WebHost.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Web.Http.WebHost.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx System.Web.Http.WebHost.Properties.SRResources,../../../external/aspnetwebstack/src/System.Web.Http.WebHost/Properties/SRResources.resx</resources>
       <response>System.Web.Http.WebHost.dll.sources</response>
     </project>
     <project dir="class/Mono.Security.Providers.NewSystemSource" library="Mono.Security.Providers.NewSystemSource-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Security.Providers.NewSystemSource.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Security.Providers.NewSystemSource.dll.sources</response>
     </project>
     <project dir="class/Mono.Security.Providers.NewTls" library="Mono.Security.Providers.NewTls-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Security.Providers.NewTls.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Security.Providers.NewTls.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Framework" library="Microsoft.Build.Framework-net_4_x">
       <library_output>./../../class/lib/net_4_x/Microsoft.Build.Framework.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Build.Framework.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Framework" library="Microsoft.Build.Framework-tests-net_4_x">
       <library_output>net_4_x_Microsoft.Build.Framework_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Microsoft.Build.Framework_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Utilities" library="Microsoft.Build.Utilities-net_4_x">
       <library_output>./../../class/lib/net_4_x/Microsoft.Build.Utilities.v4.0.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Build.Utilities.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Utilities" library="Microsoft.Build.Utilities-tests-net_4_x">
       <library_output>net_4_x_Microsoft.Build.Utilities_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Microsoft.Build.Utilities_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Engine" library="Microsoft.Build.Engine-net_4_x">
       <library_output>./../../class/lib/net_4_x/Microsoft.Build.Engine.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Build.Engine.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Engine" library="Microsoft.Build.Engine-tests-net_4_x">
       <library_output>net_4_x_Microsoft.Build.Engine_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Microsoft.Build.Engine_test.dll.response</response>
     </project>
     <project dir="class/Mono.XBuild.Tasks" library="Mono.XBuild.Tasks-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.XBuild.Tasks.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.XBuild.Tasks.dll.sources</response>
     </project>
     <project dir="class/Mono.XBuild.Tasks" library="Mono.XBuild.Tasks-tests-net_4_x">
       <library_output>net_4_x_Mono.XBuild.Tasks_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.XBuild.Tasks_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Tasks" library="Microsoft.Build.Tasks-net_4_x">
       <library_output>./../../class/lib/net_4_x/Microsoft.Build.Tasks.v4.0.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Build.Tasks.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Tasks" library="Microsoft.Build.Tasks-tests-net_4_x">
       <library_output>net_4_x_Microsoft.Build.Tasks_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Microsoft.Build.Tasks_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build" library="Microsoft.Build-net_4_x">
       <library_output>./../../class/lib/net_4_x/Microsoft.Build.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Build.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build" library="Microsoft.Build-tests-net_4_x">
       <library_output>net_4_x_Microsoft.Build_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Microsoft.Build_test.dll.response</response>
     </project>
     <project dir="class/PEAPI" library="PEAPI-net_4_x">
       <library_output>./../../class/lib/net_4_x/PEAPI.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>PEAPI.dll.sources</response>
     </project>
     <project dir="class/I18N/Common" library="I18N-net_4_x">
       <library_output>./../../../class/lib/net_4_x/I18N.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>I18N.dll.sources</response>
     </project>
     <project dir="class/I18N/West" library="I18N.West-net_4_x">
       <library_output>./../../../class/lib/net_4_x/I18N.West.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>I18N.West.dll.sources</response>
     </project>
     <project dir="class/I18N/West" library="I18N.West-tests-net_4_x">
       <library_output>net_4_x_I18N.West_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../../build/deps/net_4_x_I18N.West_test.dll.response</response>
     </project>
     <project dir="class/I18N/MidEast" library="I18N.MidEast-net_4_x">
       <library_output>./../../../class/lib/net_4_x/I18N.MidEast.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>I18N.MidEast.dll.sources</response>
     </project>
     <project dir="class/I18N/MidEast" library="I18N.MidEast-tests-net_4_x">
       <library_output>net_4_x_I18N.MidEast_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../../build/deps/net_4_x_I18N.MidEast_test.dll.response</response>
     </project>
     <project dir="class/I18N/Other" library="I18N.Other-net_4_x">
       <library_output>./../../../class/lib/net_4_x/I18N.Other.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>I18N.Other.dll.sources</response>
     </project>
     <project dir="class/I18N/Rare" library="I18N.Rare-net_4_x">
       <library_output>./../../../class/lib/net_4_x/I18N.Rare.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>I18N.Rare.dll.sources</response>
     </project>
     <project dir="class/I18N/CJK" library="I18N.CJK-net_4_x">
       <library_output>./../../../class/lib/net_4_x/I18N.CJK.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>I18N.CJK.dll.sources</response>
     </project>
     <project dir="class/I18N/CJK" library="I18N.CJK-tests-net_4_x">
       <library_output>net_4_x_I18N.CJK_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../../build/deps/net_4_x_I18N.CJK_test.dll.response</response>
     </project>
     <project dir="class/Mono.Http" library="Mono.Http-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Http.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Http.dll.sources</response>
     </project>
     <project dir="class/Mono.Cairo" library="Mono.Cairo-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Cairo.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Cairo.dll.sources</response>
     </project>
     <project dir="class/Mono.Cecil" library="Mono.Cecil-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Cecil.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Cecil.dll.sources</response>
     </project>
     <project dir="class/Mono.Cecil.Mdb" library="Mono.Cecil.Mdb-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Cecil.Mdb.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Cecil.Mdb.dll.sources</response>
     </project>
     <project dir="class/Mono.Debugger.Soft" library="Mono.Debugger.Soft-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Debugger.Soft.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Debugger.Soft.dll.sources</response>
     </project>
     <project dir="class/Mono.Debugger.Soft" library="Mono.Debugger.Soft-tests-net_4_x">
       <library_output>net_4_x_Mono.Debugger.Soft_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Debugger.Soft_test.dll.response</response>
     </project>
     <project dir="class/Mono.C5" library="Mono.C5-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.C5.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.C5.dll.sources</response>
     </project>
     <project dir="class/Mono.C5" library="Mono.C5-tests-net_4_x">
       <library_output>net_4_x_Mono.C5_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.C5_test.dll.response</response>
     </project>
     <project dir="class/Mono.Management" library="Mono.Management-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Management.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Management.dll.sources</response>
     </project>
     <project dir="class/Mono.Options" library="Mono.Options-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Options.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Options.dll.sources</response>
     </project>
     <project dir="class/Mono.Options" library="Mono.Options-tests-net_4_x">
       <library_output>net_4_x_Mono.Options_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Options_test.dll.response</response>
     </project>
     <project dir="class/Mono.Simd" library="Mono.Simd-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Simd.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Simd.dll.sources</response>
     </project>
     <project dir="class/Mono.Tasklets" library="Mono.Tasklets-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Tasklets.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Tasklets.dll.sources</response>
     </project>
     <project dir="class/Mono.CodeContracts" library="Mono.CodeContracts-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.CodeContracts.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.CodeContracts.dll.sources</response>
     </project>
     <project dir="class/Mono.CodeContracts" library="Mono.CodeContracts-tests-net_4_x">
       <library_output>net_4_x_Mono.CodeContracts_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.CodeContracts_test.dll.response</response>
     </project>
     <project dir="class/Mono.Parallel" library="Mono.Parallel-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Parallel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Parallel.dll.sources</response>
     </project>
     <project dir="class/Mono.Parallel" library="Mono.Parallel-tests-net_4_x">
       <library_output>net_4_x_Mono.Parallel_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Parallel_test.dll.response</response>
     </project>
     <project dir="class/Mono.Security.Win32" library="Mono.Security.Win32-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Security.Win32.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Security.Win32.dll.sources</response>
     </project>
     <project dir="class/RabbitMQ.Client/src/apigen" library="RabbitMQ.Client.Apigen-net_4_x">
       <library_output>./../../../../class/lib/net_4_x/RabbitMQ.Client.Apigen.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>RabbitMQ.Client.Apigen.exe.sources</response>
     </project>
     <project dir="class/RabbitMQ.Client/src/client" library="RabbitMQ.Client-net_4_x">
       <library_output>./../../../../class/lib/net_4_x/RabbitMQ.Client.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>RabbitMQ.Client.dll.sources</response>
     </project>
     <project dir="class/Mono.Messaging.RabbitMQ" library="Mono.Messaging.RabbitMQ-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Messaging.RabbitMQ.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Messaging.RabbitMQ.dll.sources</response>
     </project>
     <project dir="class/Mono.Messaging.RabbitMQ" library="Mono.Messaging.RabbitMQ-tests-net_4_x">
       <library_output>net_4_x_Mono.Messaging.RabbitMQ_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_Mono.Messaging.RabbitMQ_test.dll.response</response>
     </project>
     <project dir="class/System.Dynamic" library="System.Dynamic-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Dynamic.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Dynamic.dll.sources</response>
     </project>
     <project dir="class/System.Windows.Forms.DataVisualization" library="System.Windows.Forms.DataVisualization-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Windows.Forms.DataVisualization.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Windows.Forms.DataVisualization.dll.sources</response>
     </project>
     <project dir="class/System.Windows.Forms.DataVisualization" library="System.Windows.Forms.DataVisualization-tests-net_4_x">
       <library_output>net_4_x_System.Windows.Forms.DataVisualization_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Windows.Forms.DataVisualization_test.dll.response</response>
     </project>
     <project dir="class/System.Reactive.Interfaces" library="System.Reactive.Interfaces-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Interfaces.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Interfaces.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Core" library="System.Reactive.Core-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Core.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Core.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Linq" library="System.Reactive.Linq-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Linq.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Linq.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.PlatformServices" library="System.Reactive.PlatformServices-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.PlatformServices.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.PlatformServices.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Providers" library="System.Reactive.Providers-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Providers.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Providers.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Runtime.Remoting" library="System.Reactive.Runtime.Remoting-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Runtime.Remoting.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Runtime.Remoting.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Windows.Forms" library="System.Reactive.Windows.Forms-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Windows.Forms.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Windows.Forms.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Windows.Threading" library="System.Reactive.Windows.Threading-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Windows.Threading.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Windows.Threading.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Observable.Aliases" library="System.Reactive.Observable.Aliases-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Observable.Aliases.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Observable.Aliases.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Experimental" library="System.Reactive.Experimental-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Experimental.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Experimental.dll.sources</response>
     </project>
     <project dir="class/System.Reactive.Debugger" library="System.Reactive.Debugger-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Reactive.Debugger.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reactive.Debugger.dll.sources</response>
     </project>
     <project dir="class/System.Data.Services.Client" library="System.Data.Services.Client-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:NET_3_5 -resource:Client/System.Data.Services.Client.resources -warn:2 -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Xml.Linq.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/WindowsBase.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:NET_3_5 -warn:2 -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Xml.Linq.dll -r:./../../class/lib/net_4_x/System.Data.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/WindowsBase.dll</flags>
       <output>System.Data.Services.Client.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Data.Services.Client.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Data.Services.Client,Client/System.Data.Services.Client.txt</resources>
       <response>System.Data.Services.Client.dll.sources</response>
     </project>
     <project dir="class/System.Data.Services" library="System.Data.Services-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Data.Services.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Data.Services.dll.sources</response>
     </project>
     <project dir="class/System.Data.Services" library="System.Data.Services-tests-net_4_x">
       <library_output>net_4_x_System.Data.Services_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Data.Services_test.dll.response</response>
     </project>
     <project dir="class/System.Data.Entity" library="System.Data.Entity-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Data.Entity.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Data.Entity.dll.sources</response>
     </project>
     <project dir="class/System.Data.DataSetExtensions" library="System.Data.DataSetExtensions-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Data.DataSetExtensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Data.DataSetExtensions.dll.sources</response>
     </project>
     <project dir="class/System.Data.DataSetExtensions" library="System.Data.DataSetExtensions-tests-net_4_x">
       <library_output>net_4_x_System.Data.DataSetExtensions_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Data.DataSetExtensions_test.dll.response</response>
     </project>
     <project dir="class/System.Json.Microsoft" library="System.Json.Microsoft-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /d:ASPNETMVC -keyfile:../winfx.pub -delaysign /resource:System.Json/Properties/Resources.resources,System.Json.Properties.Resources.resources -d:FEATURE_DYNAMIC -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.dll -r:./../../class/lib/net_4_x/Microsoft.CSharp.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig /d:ASPNETMVC -keyfile:../winfx.pub -delaysign -d:FEATURE_DYNAMIC -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.dll -r:./../../class/lib/net_4_x/Microsoft.CSharp.dll</flags>
       <output>System.Json.Microsoft.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.Json.Microsoft.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>System.Json.Properties.Resources,System.Json/Properties/Resources.resx</resources>
       <response>System.Json.Microsoft.dll.sources</response>
     </project>
     <project dir="class/System.Json.Microsoft" library="System.Json.Microsoft-tests-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize -r:./../../class/lib/net_4_x/System.Json.Microsoft.dll /d:ASPNETMVC -keyfile:../winfx.pub -delaysign /resource:System.Json/Properties/Resources.resources,System.Json.Properties.Resources.resources -d:FEATURE_DYNAMIC -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.dll -r:./../../class/lib/net_4_x/Microsoft.CSharp.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize -r:./../../class/lib/net_4_x/System.Json.Microsoft.dll /d:ASPNETMVC -keyfile:../winfx.pub -delaysign -d:FEATURE_DYNAMIC -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.Runtime.Serialization.dll -r:./../../class/lib/net_4_x/Microsoft.CSharp.dll</flags>
       <output>net_4_x_System.Json.Microsoft_test.dll</output>
       <built_sources></built_sources>
       <library_output>net_4_x_System.Json.Microsoft_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Json.Microsoft_test.dll.response</response>
     </project>
     <project dir="class/System.Threading.Tasks.Dataflow" library="System.Threading.Tasks.Dataflow-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Threading.Tasks.Dataflow.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.Tasks.Dataflow.dll.sources</response>
     </project>
     <project dir="class/System.Threading.Tasks.Dataflow" library="System.Threading.Tasks.Dataflow-tests-net_4_x">
       <library_output>net_4_x_System.Threading.Tasks.Dataflow_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_System.Threading.Tasks.Dataflow_test.dll.response</response>
     </project>
     <project dir="class/System.ComponentModel.Composition.4.5" library="System.ComponentModel.Composition-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:CLR40 -resource:Microsoft.Internal.Strings.resources -d:USE_ECMA_KEY,FEATURE_REFLECTIONCONTEXT,FEATURE_REFLECTIONFILEIO,FEATURE_SERIALIZATION,FEATURE_SLIMLOCK -nowarn:219,414 -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll</flags>
+      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:CLR40 -d:USE_ECMA_KEY,FEATURE_REFLECTIONCONTEXT,FEATURE_REFLECTIONFILEIO,FEATURE_SERIALIZATION,FEATURE_SLIMLOCK -nowarn:219,414 -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.Core.dll</flags>
       <output>System.ComponentModel.Composition.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.ComponentModel.Composition.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources>Microsoft.Internal.Strings,src/ComponentModel/Strings.resx</resources>
       <response>System.ComponentModel.Composition.dll.sources</response>
     </project>
     <project dir="class/System.Windows" library="System.Windows-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Windows.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Windows.dll.sources</response>
     </project>
     <project dir="class/System.Xml.Serialization" library="System.Xml.Serialization-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Xml.Serialization.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.Serialization.dll.sources</response>
     </project>
     <project dir="class/Mono.Security.Providers.DotNet" library="Mono.Security.Providers.DotNet-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Security.Providers.DotNet.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Security.Providers.DotNet.dll.sources</response>
     </project>
     <project dir="class/Mono.Security.Providers.OldTls" library="Mono.Security.Providers.OldTls-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Security.Providers.OldTls.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Security.Providers.OldTls.dll.sources</response>
     </project>
     <project dir="class/System.DirectoryServices.Protocols" library="System.DirectoryServices.Protocols-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.DirectoryServices.Protocols.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.DirectoryServices.Protocols.dll.sources</response>
     </project>
     <project dir="class/Microsoft.VisualC" library="Microsoft.VisualC-net_4_x">
       <library_output>./../../class/lib/net_4_x/Microsoft.VisualC.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.VisualC.dll.sources</response>
     </project>
     <project dir="class/WebMatrix.Data" library="WebMatrix.Data-net_4_x">
       <library_output>./../../class/lib/net_4_x/WebMatrix.Data.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>WebMatrix.Data.dll.sources</response>
     </project>
     <project dir="class/WebMatrix.Data" library="WebMatrix.Data-tests-net_4_x">
       <library_output>net_4_x_WebMatrix.Data_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_WebMatrix.Data_test.dll.response</response>
     </project>
     <project dir="class/monodoc" library="monodoc-net_4_x">
       <library_output>./../../class/lib/net_4_x/monodoc.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>monodoc.dll.sources</response>
     </project>
     <project dir="class/monodoc" library="monodoc-tests-net_4_x">
       <library_output>net_4_x_monodoc_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>./../../build/deps/net_4_x_monodoc_test.dll.response</response>
     </project>
     <project dir="class/System.Deployment" library="System.Deployment-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Deployment.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Deployment.dll.sources</response>
     </project>
     <project dir="class/System.Web.Mobile" library="System.Web.Mobile-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.Mobile.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.Mobile.dll.sources</response>
     </project>
     <project dir="class/System.Web.RegularExpressions" library="System.Web.RegularExpressions-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Web.RegularExpressions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Web.RegularExpressions.dll.sources</response>
     </project>
     <project dir="class/System.Workflow.Activities" library="System.Workflow.Activities-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Workflow.Activities.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Workflow.Activities.dll.sources</response>
     </project>
     <project dir="class/System.Workflow.ComponentModel" library="System.Workflow.ComponentModel-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Workflow.ComponentModel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Workflow.ComponentModel.dll.sources</response>
     </project>
     <project dir="class/System.Workflow.Runtime" library="System.Workflow.Runtime-net_4_x">
       <library_output>./../../class/lib/net_4_x/System.Workflow.Runtime.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Workflow.Runtime.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Collections.Concurrent" library="Facades_System.Collections.Concurrent-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Collections.Concurrent.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Collections.Concurrent.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Collections" library="Facades_System.Collections-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Collections.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Collections.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ComponentModel.Annotations" library="Facades_System.ComponentModel.Annotations-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ComponentModel.Annotations.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ComponentModel.Annotations.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ComponentModel.EventBasedAsync" library="Facades_System.ComponentModel.EventBasedAsync-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ComponentModel.EventBasedAsync.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ComponentModel.EventBasedAsync.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ComponentModel" library="Facades_System.ComponentModel-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ComponentModel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ComponentModel.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.Contracts" library="Facades_System.Diagnostics.Contracts-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.Contracts.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.Contracts.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.Debug" library="Facades_System.Diagnostics.Debug-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.Debug.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.Debug.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.Tracing" library="Facades_System.Diagnostics.Tracing-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.Tracing.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.Tracing.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.Tools" library="Facades_System.Diagnostics.Tools-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.Tools.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.Tools.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Dynamic.Runtime" library="Facades_System.Dynamic.Runtime-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Dynamic.Runtime.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Dynamic.Runtime.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Globalization" library="Facades_System.Globalization-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Globalization.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Globalization.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO" library="Facades_System.IO-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Linq.Expressions" library="Facades_System.Linq.Expressions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Linq.Expressions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Linq.Expressions.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Linq.Parallel" library="Facades_System.Linq.Parallel-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Linq.Parallel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Linq.Parallel.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Linq.Queryable" library="Facades_System.Linq.Queryable-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Linq.Queryable.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Linq.Queryable.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Linq" library="Facades_System.Linq-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Linq.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Linq.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.NetworkInformation" library="Facades_System.Net.NetworkInformation-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.NetworkInformation.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.NetworkInformation.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.Primitives" library="Facades_System.Net.Primitives-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.Primitives.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Primitives.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.Requests" library="Facades_System.Net.Requests-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.Requests.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Requests.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ObjectModel" library="Facades_System.ObjectModel-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ObjectModel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ObjectModel.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Reflection.Extensions" library="Facades_System.Reflection.Extensions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Reflection.Extensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reflection.Extensions.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Reflection.Primitives" library="Facades_System.Reflection.Primitives-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Reflection.Primitives.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reflection.Primitives.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Reflection" library="Facades_System.Reflection-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Reflection.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reflection.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Resources.ResourceManager" library="Facades_System.Resources.ResourceManager-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Resources.ResourceManager.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Resources.ResourceManager.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.Extensions" library="Facades_System.Runtime.Extensions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.Extensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Extensions.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.InteropServices" library="Facades_System.Runtime.InteropServices-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.InteropServices.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.InteropServices.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.InteropServices.WindowsRuntime" library="Facades_System.Runtime.InteropServices.WindowsRuntime-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.InteropServices.WindowsRuntime.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.InteropServices.WindowsRuntime.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.Numerics" library="Facades_System.Runtime.Numerics-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.Numerics.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Numerics.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.Serialization.Json" library="Facades_System.Runtime.Serialization.Json-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.Serialization.Json.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Serialization.Json.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.Serialization.Primitives" library="Facades_System.Runtime.Serialization.Primitives-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.Serialization.Primitives.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Serialization.Primitives.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.Serialization.Xml" library="Facades_System.Runtime.Serialization.Xml-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.Serialization.Xml.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Serialization.Xml.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime" library="Facades_System.Runtime-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Principal" library="Facades_System.Security.Principal-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Principal.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Principal.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ServiceModel.Http" library="Facades_System.ServiceModel.Http-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ServiceModel.Http.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Http.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ServiceModel.Primitives" library="Facades_System.ServiceModel.Primitives-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ServiceModel.Primitives.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Primitives.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ServiceModel.Security" library="Facades_System.ServiceModel.Security-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ServiceModel.Security.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Security.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Text.Encoding.Extensions" library="Facades_System.Text.Encoding.Extensions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Text.Encoding.Extensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Text.Encoding.Extensions.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Text.Encoding" library="Facades_System.Text.Encoding-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Text.Encoding.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Text.Encoding.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Text.RegularExpressions" library="Facades_System.Text.RegularExpressions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Text.RegularExpressions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Text.RegularExpressions.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Threading.Tasks.Parallel" library="Facades_System.Threading.Tasks.Parallel-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Threading.Tasks.Parallel.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.Tasks.Parallel.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Threading.Tasks" library="Facades_System.Threading.Tasks-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Threading.Tasks.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.Tasks.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Threading.Timer" library="Facades_System.Threading.Timer-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Threading.Timer.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.Timer.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Threading" library="Facades_System.Threading-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Threading.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Xml.ReaderWriter" library="Facades_System.Xml.ReaderWriter-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Xml.ReaderWriter.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.ReaderWriter.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Xml.XDocument" library="Facades_System.Xml.XDocument-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Xml.XDocument.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.XDocument.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Xml.XmlSerializer" library="Facades_System.Xml.XmlSerializer-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Xml.XmlSerializer.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.XmlSerializer.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.Handles" library="Facades_System.Runtime.Handles-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.Handles.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.Handles.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ServiceModel.Duplex" library="Facades_System.ServiceModel.Duplex-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ServiceModel.Duplex.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.Duplex.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ServiceModel.NetTcp" library="Facades_System.ServiceModel.NetTcp-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ServiceModel.NetTcp.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceModel.NetTcp.dll.sources</response>
     </project>
     <project dir="class/Facades/Microsoft.Win32.Primitives" library="Facades_Microsoft.Win32.Primitives-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/Microsoft.Win32.Primitives.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Win32.Primitives.dll.sources</response>
     </project>
     <project dir="class/Facades/Microsoft.Win32.Registry" library="Facades_Microsoft.Win32.Registry-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/Microsoft.Win32.Registry.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Win32.Registry.dll.sources</response>
     </project>
     <project dir="class/Facades/System.AppContext" library="Facades_System.AppContext-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.AppContext.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.AppContext.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Collections.NonGeneric" library="Facades_System.Collections.NonGeneric-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Collections.NonGeneric.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Collections.NonGeneric.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Collections.Specialized" library="Facades_System.Collections.Specialized-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Collections.Specialized.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Collections.Specialized.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ComponentModel.Primitives" library="Facades_System.ComponentModel.Primitives-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ComponentModel.Primitives.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ComponentModel.Primitives.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ComponentModel.TypeConverter" library="Facades_System.ComponentModel.TypeConverter-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ComponentModel.TypeConverter.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ComponentModel.TypeConverter.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Console" library="Facades_System.Console-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Console.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Console.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Data.Common" library="Facades_System.Data.Common-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Data.Common.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Data.Common.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Data.SqlClient" library="Facades_System.Data.SqlClient-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Data.SqlClient.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Data.SqlClient.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.FileVersionInfo" library="Facades_System.Diagnostics.FileVersionInfo-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.FileVersionInfo.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.FileVersionInfo.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.Process" library="Facades_System.Diagnostics.Process-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.Process.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.Process.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.TextWriterTraceListener" library="Facades_System.Diagnostics.TextWriterTraceListener-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.TextWriterTraceListener.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.TextWriterTraceListener.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.TraceEvent" library="Facades_System.Diagnostics.TraceEvent-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.TraceEvent.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.TraceEvent.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.TraceSource" library="Facades_System.Diagnostics.TraceSource-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.TraceSource.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.TraceSource.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Globalization.Calendars" library="Facades_System.Globalization.Calendars-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Globalization.Calendars.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Globalization.Calendars.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.Compression.ZipFile" library="Facades_System.IO.Compression.ZipFile-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.Compression.ZipFile.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.Compression.ZipFile.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.FileSystem" library="Facades_System.IO.FileSystem-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.FileSystem.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.FileSystem.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.FileSystem.DriveInfo" library="Facades_System.IO.FileSystem.DriveInfo-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.FileSystem.DriveInfo.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.FileSystem.DriveInfo.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.FileSystem.Primitives" library="Facades_System.IO.FileSystem.Primitives-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.FileSystem.Primitives.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.FileSystem.Primitives.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.IsolatedStorage" library="Facades_System.IO.IsolatedStorage-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.IsolatedStorage.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.IsolatedStorage.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.MemoryMappedFiles" library="Facades_System.IO.MemoryMappedFiles-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.MemoryMappedFiles.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.MemoryMappedFiles.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.UnmanagedMemoryStream" library="Facades_System.IO.UnmanagedMemoryStream-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.UnmanagedMemoryStream.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.UnmanagedMemoryStream.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.AuthenticationManager" library="Facades_System.Net.AuthenticationManager-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.AuthenticationManager.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.AuthenticationManager.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.Cache" library="Facades_System.Net.Cache-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.Cache.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Cache.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.HttpListener" library="Facades_System.Net.HttpListener-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.HttpListener.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.HttpListener.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.Mail" library="Facades_System.Net.Mail-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.Mail.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Mail.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.NameResolution" library="Facades_System.Net.NameResolution-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.NameResolution.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.NameResolution.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.Security" library="Facades_System.Net.Security-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.Security.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Security.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.ServicePoint" library="Facades_System.Net.ServicePoint-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.ServicePoint.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.ServicePoint.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.Sockets" library="Facades_System.Net.Sockets-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.Sockets.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Sockets.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.Utilities" library="Facades_System.Net.Utilities-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.Utilities.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Utilities.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.WebHeaderCollection" library="Facades_System.Net.WebHeaderCollection-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.WebHeaderCollection.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.WebHeaderCollection.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.WebSockets" library="Facades_System.Net.WebSockets-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.WebSockets.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.WebSockets.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.WebSockets.Client" library="Facades_System.Net.WebSockets.Client-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.WebSockets.Client.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.WebSockets.Client.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Resources.ReaderWriter" library="Facades_System.Resources.ReaderWriter-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Resources.ReaderWriter.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Resources.ReaderWriter.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Runtime.CompilerServices.VisualC" library="Facades_System.Runtime.CompilerServices.VisualC-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Runtime.CompilerServices.VisualC.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Runtime.CompilerServices.VisualC.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.AccessControl" library="Facades_System.Security.AccessControl-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.AccessControl.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.AccessControl.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Claims" library="Facades_System.Security.Claims-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Claims.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Claims.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.DeriveBytes" library="Facades_System.Security.Cryptography.DeriveBytes-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.DeriveBytes.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.DeriveBytes.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.Encoding" library="Facades_System.Security.Cryptography.Encoding-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.Encoding.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.Encoding.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.Encryption" library="Facades_System.Security.Cryptography.Encryption-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.Encryption.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.Encryption.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.Encryption.Aes" library="Facades_System.Security.Cryptography.Encryption.Aes-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.Encryption.Aes.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.Encryption.Aes.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.Encryption.ECDiffieHellman" library="Facades_System.Security.Cryptography.Encryption.ECDiffieHellman-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.Encryption.ECDiffieHellman.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.Encryption.ECDiffieHellman.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.Encryption.ECDsa" library="Facades_System.Security.Cryptography.Encryption.ECDsa-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.Encryption.ECDsa.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.Encryption.ECDsa.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.Hashing" library="Facades_System.Security.Cryptography.Hashing-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.Hashing.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.Hashing.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.Hashing.Algorithms" library="Facades_System.Security.Cryptography.Hashing.Algorithms-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.Hashing.Algorithms.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.Hashing.Algorithms.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.RSA" library="Facades_System.Security.Cryptography.RSA-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.RSA.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.RSA.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.RandomNumberGenerator" library="Facades_System.Security.Cryptography.RandomNumberGenerator-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.RandomNumberGenerator.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.RandomNumberGenerator.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.X509Certificates" library="Facades_System.Security.Cryptography.X509Certificates-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.X509Certificates.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.X509Certificates.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Principal.Windows" library="Facades_System.Security.Principal.Windows-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Principal.Windows.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Principal.Windows.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Threading.Thread" library="Facades_System.Threading.Thread-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Threading.Thread.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.Thread.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Threading.ThreadPool" library="Facades_System.Threading.ThreadPool-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Threading.ThreadPool.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.ThreadPool.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Xml.XPath" library="Facades_System.Xml.XPath-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Xml.XPath.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.XPath.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Xml.XmlDocument" library="Facades_System.Xml.XmlDocument-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Xml.XmlDocument.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.XmlDocument.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Xml.Xsl.Primitives" library="Facades_System.Xml.Xsl.Primitives-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Xml.Xsl.Primitives.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.Xsl.Primitives.dll.sources</response>
     </project>
     <project dir="class/Facades/Microsoft.Win32.Registry.AccessControl" library="Facades_Microsoft.Win32.Registry.AccessControl-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/Microsoft.Win32.Registry.AccessControl.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Microsoft.Win32.Registry.AccessControl.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.StackTrace" library="Facades_System.Diagnostics.StackTrace-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.StackTrace.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.StackTrace.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Globalization.Extensions" library="Facades_System.Globalization.Extensions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Globalization.Extensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Globalization.Extensions.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.FileSystem.AccessControl" library="Facades_System.IO.FileSystem.AccessControl-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.FileSystem.AccessControl.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.FileSystem.AccessControl.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Private.CoreLib.InteropServices" library="Facades_System.Private.CoreLib.InteropServices-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Private.CoreLib.InteropServices.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Private.CoreLib.InteropServices.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Private.CoreLib.Threading" library="Facades_System.Private.CoreLib.Threading-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Private.CoreLib.Threading.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Private.CoreLib.Threading.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Reflection.TypeExtensions" library="Facades_System.Reflection.TypeExtensions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Reflection.TypeExtensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reflection.TypeExtensions.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.SecureString" library="Facades_System.Security.SecureString-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.SecureString.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.SecureString.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Threading.AccessControl" library="Facades_System.Threading.AccessControl-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Threading.AccessControl.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.AccessControl.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Threading.Overlapped" library="Facades_System.Threading.Overlapped-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Threading.Overlapped.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Threading.Overlapped.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Xml.XPath.XDocument" library="Facades_System.Xml.XPath.XDocument-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Xml.XPath.XDocument.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Xml.XPath.XDocument.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Reflection.Emit.ILGeneration" library="Facades_System.Reflection.Emit.ILGeneration-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Reflection.Emit.ILGeneration.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reflection.Emit.ILGeneration.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Reflection.Emit.Lightweight" library="Facades_System.Reflection.Emit.Lightweight-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Reflection.Emit.Lightweight.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reflection.Emit.Lightweight.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Reflection.Emit" library="Facades_System.Reflection.Emit-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Reflection.Emit.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Reflection.Emit.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Diagnostics.PerformanceCounter" library="Facades_System.Diagnostics.PerformanceCounter-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Diagnostics.PerformanceCounter.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Diagnostics.PerformanceCounter.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.FileSystem.Watcher" library="Facades_System.IO.FileSystem.Watcher-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.FileSystem.Watcher.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.FileSystem.Watcher.dll.sources</response>
     </project>
     <project dir="class/Facades/System.IO.Pipes" library="Facades_System.IO.Pipes-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.IO.Pipes.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.IO.Pipes.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Security.Cryptography.ProtectedData" library="Facades_System.Security.Cryptography.ProtectedData-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Security.Cryptography.ProtectedData.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Security.Cryptography.ProtectedData.dll.sources</response>
     </project>
     <project dir="class/Facades/System.ServiceProcess.ServiceController" library="Facades_System.ServiceProcess.ServiceController-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.ServiceProcess.ServiceController.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.ServiceProcess.ServiceController.dll.sources</response>
     </project>
     <project dir="class/Facades/System.Net.Http.WebRequestHandler" library="Facades_System.Net.Http.WebRequestHandler-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Facades/System.Net.Http.WebRequestHandler.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>System.Net.Http.WebRequestHandler.dll.sources</response>
     </project>
     <project dir="nunit24/NUnitFramework/framework" library="NUnit.Framework-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit.framework.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>NUnit.Framework.dll.sources</response>
     </project>
     <project dir="nunit24/NUnitCore/interfaces" library="nunit.core.interfaces-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit.core.interfaces.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunit.core.interfaces.dll.sources</response>
     </project>
     <project dir="nunit24/NUnitCore/core" library="nunit.core-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit.core.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunit.core.dll.sources</response>
     </project>
     <project dir="nunit24/ClientUtilities/util" library="nunit.util-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit.util.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunit.util.dll.sources</response>
     </project>
     <project dir="nunit24/NUnitMocks/mocks" library="nunit.mocks-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit.mocks.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunit.mocks.dll.sources</response>
     </project>
     <project dir="nunit24/NUnitExtensions/framework" library="nunit.framework.extensions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit.framework.extensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunit.framework.extensions.dll.sources</response>
     </project>
     <project dir="nunit24/NUnitExtensions/core" library="nunit.core.extensions-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit.core.extensions.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunit.core.extensions.dll.sources</response>
     </project>
     <project dir="nunit24/ConsoleRunner/nunit-console" library="nunit-console-runner-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit-console-runner.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunit-console-runner.dll.sources</response>
     </project>
     <project dir="nunit24/ConsoleRunner/nunit-console-exe" library="nunit-console-net_4_x">
       <library_output>./../../../class/lib/net_4_x/nunit-console.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunit-console.exe.sources</response>
     </project>
     <project dir="ilasm" library="ilasm-net_4_x">
       <library_output>./../class/lib/net_4_x/ilasm.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>ilasm.exe.sources</response>
     </project>
     <project dir="tools/gacutil" library="gacutil-net_4_x">
       <library_output>./../../class/lib/net_4_x/gacutil.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>gacutil.exe.sources</response>
     </project>
     <project dir="tools/culevel" library="culevel-net_4_x">
       <library_output>./../../class/lib/net_4_x/culevel.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>culevel.exe.sources</response>
     </project>
     <project dir="tools/cil-stringreplacer" library="cil-stringreplacer-net_4_x">
       <library_output>./../../class/lib/net_4_x/cil-stringreplacer.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>cil-stringreplacer.exe.sources</response>
     </project>
     <project dir="tools/commoncryptogenerator" library="commoncryptogenerator-net_4_x">
       <library_output>./../../class/lib/net_4_x/commoncryptogenerator.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>commoncryptogenerator.exe.sources</response>
     </project>
     <project dir="tools/al" library="al-net_4_x">
       <library_output>./../../class/lib/net_4_x/al.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>al.exe.sources</response>
     </project>
     <project dir="tools/linker" library="monolinker-net_4_x">
       <library_output>./../../class/lib/net_4_x/monolinker.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>monolinker.exe.sources</response>
     </project>
     <project dir="tools/tuner" library="Mono.Tuner-net_4_x">
       <library_output>./../../class/lib/net_4_x/Mono.Tuner.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Tuner.dll.sources</response>
     </project>
     <project dir="tools/culevel" library="culevel-net_4_x">
       <library_output>./../../class/lib/net_4_x/culevel.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>culevel.exe.sources</response>
     </project>
     <project dir="tools/genxs" library="genxs-net_4_x">
       <library_output>./../../class/lib/net_4_x/genxs.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>genxs.exe.sources</response>
     </project>
     <project dir="tools/mkbundle" library="mkbundle-net_4_x">
       <library_output>./../../class/lib/net_4_x/mkbundle.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mkbundle.exe.sources</response>
     </project>
     <project dir="tools/monop" library="monop-net_4_x">
       <library_output>./../../class/lib/net_4_x/monop.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>monop.exe.sources</response>
     </project>
     <project dir="tools/mono-service" library="mono-service-net_4_x">
       <library_output>./../../class/lib/net_4_x/mono-service.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mono-service.exe.sources</response>
     </project>
     <project dir="tools/mono-xsd" library="xsd-net_4_x">
       <library_output>./../../class/lib/net_4_x/xsd.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>xsd.exe.sources</response>
     </project>
     <project dir="tools/resgen" library="resgen-net_4_x">
       <library_output>./../../class/lib/net_4_x/resgen.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>resgen.exe.sources</response>
     </project>
     <project dir="tools/gacutil" library="gacutil-net_4_x">
       <library_output>./../../class/lib/net_4_x/gacutil.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>gacutil.exe.sources</response>
     </project>
     <project dir="tools/wsdl" library="wsdl-net_4_x">
       <library_output>./../../class/lib/net_4_x/wsdl.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>wsdl.exe.sources</response>
     </project>
     <project dir="tools/xbuild" library="xbuild-net_4_x">
       <library_output>./../../class/lib/net_4_x/xbuild.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>xbuild.exe.sources</response>
     </project>
     <project dir="tools/csharp" library="csharp-net_4_x">
       <library_output>./../../class/lib/net_4_x/csharp.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>csharp.exe.sources</response>
     </project>
     <project dir="tools/corcompare" library="mono-api-info-net_4_x">
       <library_output>./../../class/lib/net_4_x/mono-api-info.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mono-api-info.exe.sources</response>
     </project>
     <project dir="tools/mono-api-html" library="mono-api-html-net_4_x">
       <library_output>./../../class/lib/net_4_x/mono-api-html.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mono-api-html.exe.sources</response>
     </project>
     <project dir="tools/compiler-tester" library="compiler-tester-net_4_x">
       <library_output>./../../class/lib/net_4_x/compiler-tester.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>compiler-tester.exe.sources</response>
     </project>
     <project dir="tools/mono-xmltool" library="mono-xmltool-net_4_x">
       <library_output>./../../class/lib/net_4_x/mono-xmltool.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mono-xmltool.exe.sources</response>
     </project>
     <project dir="tools/mono-shlib-cop" library="mono-shlib-cop-net_4_x">
       <library_output>./../../class/lib/net_4_x/mono-shlib-cop.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mono-shlib-cop.exe.sources</response>
     </project>
     <project dir="tools/sgen" library="sgen-net_4_x">
       <library_output>./../../class/lib/net_4_x/sgen.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>sgen.exe.sources</response>
     </project>
     <project dir="tools/mconfig" library="mconfig-net_4_x">
       <library_output>./../../class/lib/net_4_x/mconfig.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mconfig.exe.sources</response>
     </project>
     <project dir="tools/installutil" library="installutil-net_4_x">
       <library_output>./../../class/lib/net_4_x/installutil.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>installutil.exe.sources</response>
     </project>
     <project dir="tools/nunitreport" library="nunitreport-net_4_x">
       <library_output>./../../class/lib/net_4_x/nunitreport.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>nunitreport.exe.sources</response>
     </project>
     <project dir="tools/pdb2mdb" library="pdb2mdb-net_4_x">
       <library_output>./../../class/lib/net_4_x/pdb2mdb.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>pdb2mdb.exe.sources</response>
     </project>
     <project dir="tools/SqlSharp" library="sqlsharp-net_4_x">
       <library_output>./../../class/lib/net_4_x/sqlsharp.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>sqlsharp.exe.sources</response>
     </project>
     <project dir="tools/sqlmetal" library="sqlmetal-net_4_x">
       <library_output>./../../class/lib/net_4_x/sqlmetal.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>sqlmetal.exe.sources</response>
     </project>
     <project dir="tools/svcutil" library="svcutil-net_4_x">
       <library_output>./../../class/lib/net_4_x/svcutil.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>svcutil.exe.sources</response>
     </project>
     <project dir="tools/ictool" library="ictool-net_4_x">
       <library_output>./../../class/lib/net_4_x/ictool.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>ictool.exe.sources</response>
     </project>
     <project dir="tools/disco" library="disco-net_4_x">
       <library_output>./../../class/lib/net_4_x/disco.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>disco.exe.sources</response>
     </project>
     <project dir="tools/soapsuds" library="soapsuds-net_4_x">
       <library_output>./../../class/lib/net_4_x/soapsuds.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>soapsuds.exe.sources</response>
     </project>
     <project dir="tools/browsercaps-updater" library="browsercaps-updater-net_4_x">
       <library_output>./../../class/lib/net_4_x/browsercaps-updater.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>browsercaps-updater.exe.sources</response>
     </project>
     <project dir="tools/cil-strip" library="mono-cil-strip-net_4_x">
       <library_output>./../../class/lib/net_4_x/mono-cil-strip.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mono-cil-strip.exe.sources</response>
     </project>
     <project dir="tools/macpack" library="macpack-net_4_x">
       <library_output>./../../class/lib/net_4_x/macpack.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>macpack.exe.sources</response>
     </project>
     <project dir="tools/dtd2rng" library="dtd2rng-net_4_x">
       <library_output>./../../class/lib/net_4_x/dtd2rng.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>dtd2rng.exe.sources</response>
     </project>
     <project dir="tools/dtd2xsd" library="dtd2xsd-net_4_x">
       <library_output>./../../class/lib/net_4_x/dtd2xsd.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>dtd2xsd.exe.sources</response>
     </project>
     <project dir="tools/mdoc" library="mdoc-net_4_x">
       <library_output>./../../class/lib/net_4_x/mdoc.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mdoc.exe.sources</response>
     </project>
     <project dir="tools/mod" library="mod-net_4_x">
       <library_output>./../../class/lib/net_4_x/mod.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mod.exe.sources</response>
     </project>
     <project dir="tools/installvst" library="installvst-net_4_x">
       <library_output>./../../class/lib/net_4_x/installvst.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>installvst.exe.sources</response>
     </project>
     <project dir="tools/lc" library="lc-net_4_x">
       <library_output>./../../class/lib/net_4_x/lc.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>lc.exe.sources</response>
     </project>
     <project dir="tools/mono-configuration-crypto/lib" library="Mono.Configuration.Crypto-net_4_x">
       <library_output>./../../../class/lib/net_4_x/Mono.Configuration.Crypto.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>Mono.Configuration.Crypto.dll.sources</response>
     </project>
     <project dir="tools/mono-configuration-crypto/cli" library="mono-configuration-crypto-net_4_x">
       <library_output>./../../../class/lib/net_4_x/mono-configuration-crypto.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mono-configuration-crypto.exe.sources</response>
     </project>
     <project dir="tools/ccrewrite" library="ccrewrite-net_4_x">
       <library_output>./../../class/lib/net_4_x/ccrewrite.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>ccrewrite.exe.sources</response>
     </project>
     <project dir="tools/cccheck" library="cccheck-net_4_x">
       <library_output>./../../class/lib/net_4_x/cccheck.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>cccheck.exe.sources</response>
     </project>
     <project dir="tools/mdbrebase" library="mdbrebase-net_4_x">
       <library_output>./../../class/lib/net_4_x/mdbrebase.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mdbrebase.exe.sources</response>
     </project>
     <project dir="tools/ikdasm" library="ikdasm-net_4_x">
       <library_output>./../../class/lib/net_4_x/ikdasm.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>ikdasm.exe.sources</response>
     </project>
     <project dir="tools/mono-symbolicate" library="mono-symbolicate-net_4_x">
       <library_output>./../../class/lib/net_4_x/mono-symbolicate.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>mono-symbolicate.exe.sources</response>
     </project>
     <project dir="tools/linker-analyzer" library="linkeranalyzer-net_4_x">
       <library_output>./../../class/lib/net_4_x/linkeranalyzer.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
+      <resources></resources>
       <response>linkeranalyzer.exe.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Framework" library="Microsoft.Build.Framework-xbuild_12">
       <library_output>./../../class/lib/xbuild_12/Microsoft.Build.Framework.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>Microsoft.Build.Framework.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Framework" library="Microsoft.Build.Framework-tests-xbuild_12">
       <library_output>xbuild_12_Microsoft.Build.Framework_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_12_Microsoft.Build.Framework_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Utilities" library="Microsoft.Build.Utilities-xbuild_12">
       <library_output>./../../class/lib/xbuild_12/Microsoft.Build.Utilities.v12.0.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>Microsoft.Build.Utilities.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Utilities" library="Microsoft.Build.Utilities-tests-xbuild_12">
       <library_output>xbuild_12_Microsoft.Build.Utilities_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_12_Microsoft.Build.Utilities_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Engine" library="Microsoft.Build.Engine-xbuild_12">
       <library_output>./../../class/lib/xbuild_12/Microsoft.Build.Engine.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>Microsoft.Build.Engine.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Engine" library="Microsoft.Build.Engine-tests-xbuild_12">
       <library_output>xbuild_12_Microsoft.Build.Engine_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_12_Microsoft.Build.Engine_test.dll.response</response>
     </project>
     <project dir="class/Mono.XBuild.Tasks" library="Mono.XBuild.Tasks-xbuild_12">
       <library_output>./../../class/lib/xbuild_12/Mono.XBuild.Tasks.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>Mono.XBuild.Tasks.dll.sources</response>
     </project>
     <project dir="class/Mono.XBuild.Tasks" library="Mono.XBuild.Tasks-tests-xbuild_12">
       <library_output>xbuild_12_Mono.XBuild.Tasks_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_12_Mono.XBuild.Tasks_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Tasks" library="Microsoft.Build.Tasks-xbuild_12">
       <library_output>./../../class/lib/xbuild_12/Microsoft.Build.Tasks.v12.0.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>Microsoft.Build.Tasks.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Tasks" library="Microsoft.Build.Tasks-tests-xbuild_12">
       <library_output>xbuild_12_Microsoft.Build.Tasks_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_12_Microsoft.Build.Tasks_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build" library="Microsoft.Build-xbuild_12">
       <library_output>./../../class/lib/xbuild_12/Microsoft.Build.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>Microsoft.Build.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build" library="Microsoft.Build-tests-xbuild_12">
       <library_output>xbuild_12_Microsoft.Build_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_12_Microsoft.Build_test.dll.response</response>
     </project>
     <project dir="tools/xbuild" library="xbuild-xbuild_12">
       <library_output>./../../class/lib/xbuild_12/xbuild.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_12</profile>
+      <resources></resources>
       <response>xbuild.exe.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Framework" library="Microsoft.Build.Framework-xbuild_14">
       <library_output>./../../class/lib/xbuild_14/Microsoft.Build.Framework.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>Microsoft.Build.Framework.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Framework" library="Microsoft.Build.Framework-tests-xbuild_14">
       <library_output>xbuild_14_Microsoft.Build.Framework_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_14_Microsoft.Build.Framework_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Utilities" library="Microsoft.Build.Utilities-xbuild_14">
       <library_output>./../../class/lib/xbuild_14/Microsoft.Build.Utilities.Core.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>Microsoft.Build.Utilities.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Utilities" library="Microsoft.Build.Utilities-tests-xbuild_14">
       <library_output>xbuild_14_Microsoft.Build.Utilities_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_14_Microsoft.Build.Utilities_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Engine" library="Microsoft.Build.Engine-xbuild_14">
       <library_output>./../../class/lib/xbuild_14/Microsoft.Build.Engine.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>Microsoft.Build.Engine.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Engine" library="Microsoft.Build.Engine-tests-xbuild_14">
       <library_output>xbuild_14_Microsoft.Build.Engine_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_14_Microsoft.Build.Engine_test.dll.response</response>
     </project>
     <project dir="class/Mono.XBuild.Tasks" library="Mono.XBuild.Tasks-xbuild_14">
       <library_output>./../../class/lib/xbuild_14/Mono.XBuild.Tasks.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>Mono.XBuild.Tasks.dll.sources</response>
     </project>
     <project dir="class/Mono.XBuild.Tasks" library="Mono.XBuild.Tasks-tests-xbuild_14">
       <library_output>xbuild_14_Mono.XBuild.Tasks_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_14_Mono.XBuild.Tasks_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build.Tasks" library="Microsoft.Build.Tasks-xbuild_14">
       <library_output>./../../class/lib/xbuild_14/Microsoft.Build.Tasks.Core.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>Microsoft.Build.Tasks.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build.Tasks" library="Microsoft.Build.Tasks-tests-xbuild_14">
       <library_output>xbuild_14_Microsoft.Build.Tasks_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_14_Microsoft.Build.Tasks_test.dll.response</response>
     </project>
     <project dir="class/Microsoft.Build" library="Microsoft.Build-xbuild_14">
       <library_output>./../../class/lib/xbuild_14/Microsoft.Build.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>Microsoft.Build.dll.sources</response>
     </project>
     <project dir="class/Microsoft.Build" library="Microsoft.Build-tests-xbuild_14">
       <library_output>xbuild_14_Microsoft.Build_test.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>./../../build/deps/xbuild_14_Microsoft.Build_test.dll.response</response>
     </project>
     <project dir="tools/xbuild" library="xbuild-xbuild_14">
       <library_output>./../../class/lib/xbuild_14/xbuild.exe</library_output>
       <fx_version>4.5</fx_version>
       <profile>xbuild_14</profile>
+      <resources></resources>
       <response>xbuild.exe.sources</response>
     </project>
 </root>
index 2088fa3f0acf3f4f0573e740b00ff492b00a37d3..06ad062761f931b6d9efb5ed880536f88741b425 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{C5639B3F-288A-4A4B-A4A5-C0D85834221D}</ProjectGuid>\r
     <RootNamespace>testinvoke</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ObjectFileName>$(IntDir)invoke/</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)invoke/vc80.pdb</ProgramDataBaseFileName>\r
-      <XMLDocumentationFileName>$(IntDir)invoke/</XMLDocumentationFileName>\r
+      <ObjectFileName>$(IntDir)</ObjectFileName>\r
+      <XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>ws2_32.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
       <TargetMachine>MachineX86</TargetMachine>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ObjectFileName>$(IntDir)invoke/</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)invoke/vc80.pdb</ProgramDataBaseFileName>\r
-      <XMLDocumentationFileName>$(IntDir)invoke/</XMLDocumentationFileName>\r
+      <ObjectFileName>$(IntDir)</ObjectFileName>\r
+      <XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>glib-2.0.lib;gmodule-2.0.lib;ws2_32.lib;gthread-2.0.lib;gobject-2.0.lib;libmono.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <TargetMachine>MachineX64</TargetMachine>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\samples\embed\test-invoke.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <ProjectReference Include="eglib.vcxproj">\r
+      <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
+    </ProjectReference>\r
     <ProjectReference Include="libmono.vcxproj">\r
       <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/test-invoke.vcxproj.filters b/msvc/test-invoke.vcxproj.filters
new file mode 100644 (file)
index 0000000..d2844a7
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{cadb49f7-799a-4477-9eb7-7b0c4d6269ab}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{f28072aa-9dc5-4857-85a7-f5e3814bc54f}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{c6d2d3cd-3f16-4c83-8168-10e0e2c32ebc}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\samples\embed\test-invoke.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 42a5bd68e092bd3c059328a98257b833996cd210..31411b0df6193224ec03e5f28a99bd440928a3ba 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{C2EB666E-9146-4B7A-85F6-25F9EA313770}</ProjectGuid>\r
     <RootNamespace>testmetadata</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\eglib\src;$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ObjectFileName>$(IntDir)metadata/</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)metadata/vc80.pdb</ProgramDataBaseFileName>\r
-      <XMLDocumentationFileName>$(IntDir)metadata/</XMLDocumentationFileName>\r
+      <ObjectFileName>$(IntDir)</ObjectFileName>\r
+      <XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>ws2_32.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\eglib\src;$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
       <TargetMachine>MachineX86</TargetMachine>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\eglib\src;$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ObjectFileName>$(IntDir)metadata/</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)metadata/vc80.pdb</ProgramDataBaseFileName>\r
-      <XMLDocumentationFileName>$(IntDir)metadata/</XMLDocumentationFileName>\r
+      <ObjectFileName>$(IntDir)</ObjectFileName>\r
+      <XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>glib-2.0.lib;gmodule-2.0.lib;ws2_32.lib;gthread-2.0.lib;gobject-2.0.lib;libmono.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\eglib\src;$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_EGLIB_SOURCE_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <TargetMachine>MachineX64</TargetMachine>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\samples\embed\test-metadata.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <ProjectReference Include="eglib.vcxproj">\r
+      <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
+    </ProjectReference>\r
     <ProjectReference Include="libmono.vcxproj">\r
       <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/test-metadata.vcxproj.filters b/msvc/test-metadata.vcxproj.filters
new file mode 100644 (file)
index 0000000..4a504de
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{8b8d39e6-f879-4228-afab-c066b4f3cc60}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{edf4808c-dc97-4a3a-b226-cf0e663fe2d1}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{795e2d9a-7d6b-4516-9bc0-2f5f32ae3493}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\samples\embed\test-metadata.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 6986e99de777b4c346960db7ce742ce6668b42a0..d5e0fc41cd5343e8d3118ed336f30fe1f7b7e2ba 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{80A0620A-3478-4E1A-AA7C-0D2387B892AB}</ProjectGuid>\r
     <RootNamespace>test_eglib</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LinkIncremental>true</LinkIncremental>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib/test;../eglib;../msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_FORTIFY_SOURCE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_EGLIB_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR)%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTEST_EGLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level4</WarningLevel>\r
       <TreatWarningAsError>false</TreatWarningAsError>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Ws2_32.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <OptimizeReferences>false</OptimizeReferences>\r
       <EnableCOMDATFolding>false</EnableCOMDATFolding>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib/test;../eglib;../msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_FORTIFY_SOURCE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <AdditionalIncludeDirectories>$(MONO_EGLIB_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR)%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTEST_EGLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level4</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Ws2_32.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib/test;../eglib;../msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_FORTIFY_SOURCE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(MONO_EGLIB_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR)%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTEST_EGLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level4</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Ws2_32.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <OptimizeReferences>false</OptimizeReferences>\r
       <EnableCOMDATFolding>false</EnableCOMDATFolding>\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
-      <AdditionalIncludeDirectories>../eglib/src;../eglib/test;../eglib;../msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_FORTIFY_SOURCE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <AdditionalIncludeDirectories>$(MONO_EGLIB_INCLUDE_DIR);$(MONO_EGLIB_SOURCE_DIR)%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTEST_EGLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level4</WarningLevel>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>Ws2_32.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="eglib.vcxproj">\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
+    </ProjectReference>\r
+    <ProjectReference Include="libmono.vcxproj">\r
+      <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/test_eglib.vcxproj.filters b/msvc/test_eglib.vcxproj.filters
new file mode 100644 (file)
index 0000000..a93fb6f
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\eglib\test\array.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\dir.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\driver.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\endian.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\fake.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\file.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="getopt.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="getopt_long.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\hashtable.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\list.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\markup.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\memory.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\module.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\path.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\pattern.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\ptrarray.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\queue.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\shell.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\sizes.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\slist.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\spawn.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\string.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\string-util.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\test.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\utf8.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\timer.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\eglib\test\unicode.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="getopt.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="getopt_long.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\eglib\src\glib.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\eglib\test\test.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\eglib\test\tests.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{420afe04-ce25-4c88-8928-611e6ae34f50}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{6327617a-ab1c-4105-b58a-e5e175846a17}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{c193f76a-aed4-4e8d-9a03-89bb79573393}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 772dd3692c51cebdf903baa56d5465c814a8cecd..cd9433f8b1af0d5e3afe56396b78f2ac1f2e51d7 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{6FDE4E5E-57D0-432F-A987-6C226A7827E4}</ProjectGuid>\r
     <RootNamespace>teste</RootNamespace>\r
     <Keyword>Win32Proj</Keyword>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v120</PlatformToolset>\r
+    <PlatformToolset>v140</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="mono.props" />\r
   </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup>\r
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\bin\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\obj\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir>\r
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <TargetName>$(ProjectName)$(MONO_TARGET_SUFFIX)</TargetName>\r
+  </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ObjectFileName>$(IntDir)e/</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)e/vc80.pdb</ProgramDataBaseFileName>\r
-      <XMLDocumentationFileName>$(IntDir)e/</XMLDocumentationFileName>\r
+      <ObjectFileName>$(IntDir)</ObjectFileName>\r
+      <XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>ws2_32.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <DataExecutionPrevention>\r
       </DataExecutionPrevention>\r
       <TargetMachine>MachineX86</TargetMachine>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     </Midl>\r
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <MinimalRebuild>true</MinimalRebuild>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <ObjectFileName>$(IntDir)e/</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)e/vc80.pdb</ProgramDataBaseFileName>\r
-      <XMLDocumentationFileName>$(IntDir)e/</XMLDocumentationFileName>\r
+      <ObjectFileName>$(IntDir)</ObjectFileName>\r
+      <XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <CompileAs>CompileAsC</CompileAs>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>glib-2.0.lib;gmodule-2.0.lib;ws2_32.lib;gthread-2.0.lib;gobject-2.0.lib;libmono.lib;Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     <ClCompile>\r
       <Optimization>MinSpace</Optimization>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <BufferSecurityCheck>true</BufferSecurityCheck>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <WarningLevel>Level3</WarningLevel>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(MONO_DIR);$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <ProjectReference>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalLibraryDirectories>$(Platform)_$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <TargetMachine>MachineX64</TargetMachine>\r
+      <AdditionalDependencies>mono-2.0$(MONO_TARGET_SUFFIX).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\samples\embed\teste.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <ProjectReference Include="eglib.vcxproj">\r
+      <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
+    </ProjectReference>\r
     <ProjectReference Include="libmono.vcxproj">\r
       <Project>{cb0d9e92-293c-439c-9ac7-c5f59b6e0771}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-      <Private>false</Private>\r
-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
-      <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
diff --git a/msvc/teste.vcxproj.filters b/msvc/teste.vcxproj.filters
new file mode 100644 (file)
index 0000000..2a9ac33
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{41e7ed2d-af64-4a14-b616-a173548cfa98}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{80eb1b1e-ad38-4803-aed9-671e96c45886}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{cddd710c-97ab-4980-b086-d4af5bfc1c80}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\samples\embed\teste.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index 73f2a1b5cfa27d9b76c8791eaf3d1dfbf6784552..a05395ca491b2fa58eabf042b27bd7116a848737 100755 (executable)
@@ -1,17 +1,55 @@
-@echo off
-cd ..
-if exist config.h if not exist cygconfig.h copy config.h cygconfig.h
-if exist eglib\config.h if not exist eglib\cygconfig.h copy eglib\config.h eglib\cygconfig.h
-copy winconfig.h config.h
-copy eglib\winconfig.h eglib\config.h
-%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -Command "(Get-Content config.h) -replace '#MONO_VERSION#', (Select-String -path configure.ac -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value | Set-Content config.h"
-goto end
-:error
-echo fatal error: the VSDepenancies directory was not found in the "mono" directory
-echo error: you must download and unzip that file
-exit /b 100
-goto end
-:ok
-echo OK
-:end
-exit /b 0
+@ECHO off
+
+SET CONFIG_H=..\config.h
+SET EGLIB_CONFIG_H=..\eglib\config.h
+SET CYG_CONFIG_H=..\cygconfig.h
+SET EGLIB_CYG_CONFIG_H=..\eglib\cygconfig.h
+SET WIN_CONFIG_H=..\winconfig.h
+SET EGLIB_WIN_CONFIG_H=..\eglib\winconfig.h
+SET CONFIGURE_AC=..\configure.ac
+SET VERSION_H=..\mono\mini\version.h
+
+
+ECHO Setting up Mono configuration headers...
+
+IF EXIST %CONFIG_H% (
+       IF NOT EXIST %CYG_CONFIG_H% (
+               ECHO copy %CONFIG_H% %CYG_CONFIG_H%
+               copy %CONFIG_H% %CYG_CONFIG_H%
+       )
+)
+
+IF EXIST %EGLIB_CONFIG_H% (
+       IF NOT EXIST %EGLIB_CYG_CONFIG_H% (
+               ECHO copy %EGLIB_CONFIG_H% %EGLIB_CYG_CONFIG_H%
+               copy %EGLIB_CONFIG_H% %EGLIB_CYG_CONFIG_H%
+       )
+)
+
+%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File compare-config-files.ps1 %WIN_CONFIG_H% %CONFIG_H% %CONFIGURE_AC% >$null 2>&1
+
+IF NOT %ERRORLEVEL% == 0 (
+       ECHO copy %WIN_CONFIG_H% %CONFIG_H%
+       copy %WIN_CONFIG_H% %CONFIG_H%
+       %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -Command "(Get-Content %CONFIG_H%) -replace '#MONO_VERSION#', (Select-String -path %CONFIGURE_AC% -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value | Set-Content %CONFIG_H%" >$null 2>&1
+)
+
+%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File compare-config-files.ps1 %EGLIB_WIN_CONFIG_H% %EGLIB_CONFIG_H% >$null 2>&1
+
+IF NOT %ERRORLEVEL% == 0 (
+       ECHO copy %EGLIB_WIN_CONFIG_H% %EGLIB_CONFIG_H%
+       copy %EGLIB_WIN_CONFIG_H% %EGLIB_CONFIG_H%
+)
+
+SET VERSION_CONTENT="#define FULL_VERSION \"Visual Studio built mono\""
+%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File compare-config-content.ps1 %VERSION_CONTENT% %VERSION_H%
+
+
+IF NOT %ERRORLEVEL% == 0 (
+       ECHO Configure %VERSION_H%
+       ECHO #define FULL_VERSION "Visual Studio built mono"> %VERSION_H%
+)
+
+ECHO Successfully setup Mono configuration headers.
+
+EXIT /b 0
index 55750f27a09c017337d8d581cb0980efa79ee477..ba17c5e4e215857005ff74c9b74f17746742998a 100644 (file)
@@ -23,10 +23,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Security-net_4_x", "
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Core-net_4_x", "mcs/class/System.Core/System.Core-net_4_x.csproj", "{359142A1-D80F-401E-AA64-7167C9317649}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.CompilerServices.SymbolWriter-net_4_x", "mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter-net_4_x.csproj", "{88177C4B-894F-485D-B95A-44199C06BE9F}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Posix-net_4_x", "mcs/class/Mono.Posix/Mono.Posix-net_4_x.csproj", "{66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.CompilerServices.SymbolWriter-net_4_x", "mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter-net_4_x.csproj", "{88177C4B-894F-485D-B95A-44199C06BE9F}"
+EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Core-plaincore-net_4_x", "mcs/class/System.Core/System.Core-plaincore-net_4_x.csproj", "{1EC0EBC0-0B35-454C-89AE-3F8F0FDD9705}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "resgen-net_4_x", "mcs/tools/resgen/resgen-net_4_x.csproj", "{647DC12E-A4EE-424A-9EC7-CE6643EE2EF7}"
@@ -725,14 +725,14 @@ Global
                {359142A1-D80F-401E-AA64-7167C9317649}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {359142A1-D80F-401E-AA64-7167C9317649}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {359142A1-D80F-401E-AA64-7167C9317649}.Release|Any CPU.Build.0 = Release|Any CPU
-               {88177C4B-894F-485D-B95A-44199C06BE9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {88177C4B-894F-485D-B95A-44199C06BE9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {88177C4B-894F-485D-B95A-44199C06BE9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {88177C4B-894F-485D-B95A-44199C06BE9F}.Release|Any CPU.Build.0 = Release|Any CPU
                {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Release|Any CPU.Build.0 = Release|Any CPU
+               {88177C4B-894F-485D-B95A-44199C06BE9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {88177C4B-894F-485D-B95A-44199C06BE9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {88177C4B-894F-485D-B95A-44199C06BE9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {88177C4B-894F-485D-B95A-44199C06BE9F}.Release|Any CPU.Build.0 = Release|Any CPU
                {1EC0EBC0-0B35-454C-89AE-3F8F0FDD9705}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {1EC0EBC0-0B35-454C-89AE-3F8F0FDD9705}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {1EC0EBC0-0B35-454C-89AE-3F8F0FDD9705}.Release|Any CPU.ActiveCfg = Release|Any CPU
index 2183ccbb50bee875511c03a22ae71475208c50fa..6f727a00e1bb0a012ff04ae8ad912981715fbcac 100644 (file)
@@ -1,5 +1,6 @@
 #include <mono/jit/jit.h>
 #include <mono/metadata/environment.h>
+#include <mono/utils/mono-publib.h>
 #include <stdlib.h>
 
 /*
@@ -31,6 +32,13 @@ static void main_function (MonoDomain *domain, const char *file, int argc, char*
        mono_jit_exec (domain, assembly, argc, argv);
 }
 
+static int malloc_count = 0;
+
+static void* custom_malloc(size_t bytes)
+{
+       ++malloc_count;
+       return malloc(bytes);
+}
 
 int 
 main(int argc, char* argv[]) {
@@ -44,6 +52,9 @@ main(int argc, char* argv[]) {
        }
        file = argv [1];
 
+       MonoAllocatorVTable mem_vtable = {custom_malloc};
+       mono_set_allocator_vtable (&mem_vtable);
+
        /*
         * Load the default Mono configuration file, this is needed
         * if you are planning on using the dllmaps defined on the
@@ -66,6 +77,9 @@ main(int argc, char* argv[]) {
        retval = mono_environment_exitcode_get ();
        
        mono_jit_cleanup (domain);
+
+       fprintf (stdout, "custom malloc calls = %d\n", malloc_count);
+
        return retval;
 }
 
index ace325210599c89703974f27870db8aa7a672b84..ad2fe82914140b24f6daa4d5025b2f5b7bd995c5 100755 (executable)
@@ -3,19 +3,29 @@
 TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
 
 export TEST_HARNESS_VERBOSE=1
-export CFLAGS=-ggdb3
+if [[ ${label} == w* ]]; then
+    # Passing -ggdb3 on Cygwin breaks linking against libmonosgen-x.y.dll
+    export CFLAGS="-g -O2"
+else
+    export CFLAGS="-ggdb3 -O2"
+fi
 
 if [[ ${CI_TAGS} == *'coop-gc'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-cooperative-gc=yes"; export MONO_CHECK_MODE=gc,thread; fi
 
-if [[ ${label} == 'osx-i386' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib --enable-nls=no --build=i386-apple-darwin11.2.0"; fi
-if [[ ${label} == 'osx-amd64' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib --enable-nls=no"; fi
-if [[ ${label} == 'w32' ]]; then PLATFORM=Win32; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=i686-w64-mingw32"; export MONO_EXECUTABLE="`cygpath -u ${WORKSPACE}\\\msvc\\\Win32\\\bin\\\Release_SGen\\\mono-sgen.exe`";fi
-if [[ ${label} == 'w64' ]]; then PLATFORM=x64; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=x86_64-w64-mingw32 --disable-boehm"; export MONO_EXECUTABLE="`cygpath -u ${WORKSPACE}\\\msvc\\\x64\\\bin\\\Release_SGen\\\mono-sgen.exe`"; fi
+if [[ ${label} == 'osx-i386' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib --build=i386-apple-darwin11.2.0"; fi
+if [[ ${label} == 'osx-amd64' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib "; fi
+if [[ ${label} == 'w32' ]]; then PLATFORM=Win32; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=i686-w64-mingw32"; export MONO_EXECUTABLE="`cygpath -u ${WORKSPACE}\\\msvc\\\build\\\sgen\\\Win32\\\bin\\\Release\\\mono-sgen.exe`"; fi
+if [[ ${label} == 'w64' ]]; then PLATFORM=x64; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=x86_64-w64-mingw32 --disable-boehm"; export MONO_EXECUTABLE="`cygpath -u ${WORKSPACE}\\\msvc\\\build\\\sgen\\\x64\\\bin\\\Release\\\mono-sgen.exe`"; fi
 
-if [[ ${label} != w* ]] && [[ ${label} != 'debian-ppc64el' ]] && [[ ${label} != 'centos-s390x' ]];
+if [[ ${CI_TAGS} == 'mobile_static' ]];
+    then
+    EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=mobile_static";
+elif [[ ${label} != w* ]] && [[ ${label} != 'debian-ppc64el' ]] && [[ ${label} != 'centos-s390x' ]];
     then
-    EXTRA_CONF_FLAGS="$EXTRA_CONF_FLAGS --with-monodroid --with-monotouch --with-monotouch_watch --with-monotouch_tv --with-xammac --with-mobile_static"
+    # Override the defaults to skip profiles
     # only enable the mobile profiles and mobile_static on the main architectures
+    # only enable the concurrent collector by default on main unix archs
+    EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=all --with-sgen-default-concurrent=yes"
 fi
 
 if [ -x "/usr/bin/dpkg-architecture" ];
@@ -24,11 +34,16 @@ if [ -x "/usr/bin/dpkg-architecture" ];
        #force build arch = dpkg arch, sometimes misdetected
 fi
 
+
 ${TESTCMD} --label=configure --timeout=60m --fatal ./autogen.sh $EXTRA_CONF_FLAGS
+if [[ ${label} == 'w32' ]];
+    then
+       # only build boehm on w32 (only windows platform supporting boehm).
+    ${TESTCMD} --label=make-msvc --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release /p:MONO_TARGET_GC=boehm msvc/mono.sln
+fi
 if [[ ${label} == w* ]];
     then
-    ${TESTCMD} --label=make-msvc --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release msvc/mono.sln
-    ${TESTCMD} --label=make-msvc-sgen --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release_SGen msvc/mono.sln
+    ${TESTCMD} --label=make-msvc-sgen --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release /p:MONO_TARGET_GC=sgen msvc/mono.sln
 fi
 ${TESTCMD} --label=make --timeout=300m --fatal make -w V=1
 if [[ -n "${ghprbPullId}" ]] && [[ ${label} == w* ]];
@@ -36,81 +51,5 @@ if [[ -n "${ghprbPullId}" ]] && [[ ${label} == w* ]];
     exit 0
     # we don't run the test suite on Windows PRs, we just ensure the build succeeds, so end here
 fi
-${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k check
-${TESTCMD} --label=runtime --timeout=160m make -w -C mono/tests -k test-wrench V=1 CI=1
-${TESTCMD} --label=corlib --timeout=30m make -w -C mcs/class/corlib run-test
-${TESTCMD} --label=verify --timeout=15m make -w -C runtime mcs-compileall
-${TESTCMD} --label=profiler --timeout=30m make -w -C mono/profiler -k check
-${TESTCMD} --label=compiler --timeout=30m make -w -C mcs/tests run-test
-${TESTCMD} --label=compiler-errors --timeout=30m make -w -C mcs/errors run-test
-${TESTCMD} --label=System --timeout=10m make -w -C mcs/class/System run-test
-${TESTCMD} --label=System.XML --timeout=5m make -w -C mcs/class/System.XML run-test
-${TESTCMD} --label=Mono.Security --timeout=5m make -w -C mcs/class/Mono.Security run-test
-${TESTCMD} --label=System.Security --timeout=5m make -w -C mcs/class/System.Security run-test
-${TESTCMD} --label=System.Drawing --timeout=5m make -w -C mcs/class/System.Drawing run-test
-if [[ ${label} == osx-* ]]
-then ${TESTCMD} --label=Windows.Forms --skip
-else ${TESTCMD} --label=Windows.Forms --timeout=5m make -w -C mcs/class/System.Windows.Forms run-test
-fi
-${TESTCMD} --label=System.Data --timeout=5m make -w -C mcs/class/System.Data run-test
-${TESTCMD} --label=System.Data.OracleClient --timeout=5m make -w -C mcs/class/System.Data.OracleClient run-test
-${TESTCMD} --label=System.Design --timeout=5m make -w -C mcs/class/System.Design run-test
-${TESTCMD} --label=Mono.Posix --timeout=5m make -w -C mcs/class/Mono.Posix run-test
-${TESTCMD} --label=System.Web --timeout=30m make -w -C mcs/class/System.Web run-test
-${TESTCMD} --label=System.Web.Services --timeout=5m make -w -C mcs/class/System.Web.Services run-test
-${TESTCMD} --label=System.Runtime.SFS --timeout=5m make -w -C mcs/class/System.Runtime.Serialization.Formatters.Soap run-test
-${TESTCMD} --label=System.Runtime.Remoting --timeout=5m make -w -C mcs/class/System.Runtime.Remoting run-test
-${TESTCMD} --label=Cscompmgd --timeout=5m make -w -C mcs/class/Cscompmgd run-test
-${TESTCMD} --label=Commons.Xml.Relaxng --timeout=5m make -w -C mcs/class/Commons.Xml.Relaxng run-test
-${TESTCMD} --label=System.ServiceProcess --timeout=5m make -w -C mcs/class/System.ServiceProcess run-test
-${TESTCMD} --label=I18N.CJK --timeout=5m make -w -C mcs/class/I18N/CJK run-test
-${TESTCMD} --label=I18N.West --timeout=5m make -w -C mcs/class/I18N/West run-test
-${TESTCMD} --label=I18N.MidEast --timeout=5m make -w -C mcs/class/I18N/MidEast run-test
-${TESTCMD} --label=System.DirectoryServices --timeout=5m make -w -C mcs/class/System.DirectoryServices run-test
-${TESTCMD} --label=Microsoft.Build.Engine --timeout=5m make -w -C mcs/class/Microsoft.Build.Engine run-test
-${TESTCMD} --label=Microsoft.Build.Framework --timeout=5m make -w -C mcs/class/Microsoft.Build.Framework run-test
-${TESTCMD} --label=Microsoft.Build.Tasks --timeout=5m make -w -C mcs/class/Microsoft.Build.Tasks run-test
-${TESTCMD} --label=Microsoft.Build.Utilities --timeout=5m make -w -C mcs/class/Microsoft.Build.Utilities run-test
-${TESTCMD} --label=Mono.C5 --timeout=5m make -w -C mcs/class/Mono.C5 run-test
-${TESTCMD} --label=System.Configuration --timeout=5m make -w -C mcs/class/System.Configuration run-test
-${TESTCMD} --label=System.Transactions --timeout=5m make -w -C mcs/class/System.Transactions run-test
-${TESTCMD} --label=System.Web.Extensions --timeout=5m make -w -C mcs/class/System.Web.Extensions run-test
-${TESTCMD} --label=System.Core --timeout=15m make -w -C mcs/class/System.Core run-test
-${TESTCMD} --label=symbolicate --timeout=60m make -w -C mcs/tools/mono-symbolicate check
-${TESTCMD} --label=System.Xml.Linq --timeout=5m make -w -C mcs/class/System.Xml.Linq run-test
-${TESTCMD} --label=System.Data.DSE --timeout=5m make -w -C mcs/class/System.Data.DataSetExtensions run-test
-${TESTCMD} --label=System.Web.Abstractions --timeout=5m make -w -C mcs/class/System.Web.Abstractions run-test
-${TESTCMD} --label=System.Web.Routing --timeout=5m make -w -C mcs/class/System.Web.Routing run-test
-${TESTCMD} --label=System.Runtime.Serialization --timeout=5m make -w -C mcs/class/System.Runtime.Serialization run-test
-${TESTCMD} --label=System.IdentityModel --timeout=5m make -w -C mcs/class/System.IdentityModel run-test
-${TESTCMD} --label=System.ServiceModel --timeout=15m make -w -C mcs/class/System.ServiceModel run-test
-${TESTCMD} --label=System.ServiceModel.Web --timeout=5m make -w -C mcs/class/System.ServiceModel.Web run-test
-${TESTCMD} --label=System.Web.Extensions-standalone --timeout=5m make -w -C mcs/class/System.Web.Extensions run-standalone-test
-${TESTCMD} --label=System.ComponentModel.DataAnnotations --timeout=5m make -w -C mcs/class/System.ComponentModel.DataAnnotations run-test
-${TESTCMD} --label=Mono.CodeContracts --timeout=5m make -w -C mcs/class/Mono.CodeContracts run-test
-${TESTCMD} --label=System.Runtime.Caching --timeout=5m make -w -C mcs/class/System.Runtime.Caching run-test
-${TESTCMD} --label=System.Data.Services --timeout=5m make -w -C mcs/class/System.Data.Services run-test
-${TESTCMD} --label=System.Web.DynamicData --timeout=5m make -w -C mcs/class/System.Web.DynamicData run-test
-${TESTCMD} --label=Mono.CSharp --timeout=5m make -w -C mcs/class/Mono.CSharp run-test
-${TESTCMD} --label=WindowsBase --timeout=5m make -w -C mcs/class/WindowsBase run-test
-${TESTCMD} --label=System.Numerics --timeout=5m make -w -C mcs/class/System.Numerics run-test
-${TESTCMD} --label=System.Runtime.DurableInstancing --timeout=5m make -w -C mcs/class/System.Runtime.DurableInstancing run-test
-${TESTCMD} --label=System.ServiceModel.Discovery --timeout=5m make -w -C mcs/class/System.ServiceModel.Discovery run-test
-${TESTCMD} --label=System.Xaml --timeout=5m make -w -C mcs/class/System.Xaml run-test
-${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
-${TESTCMD} --label=Mono.Debugger.Soft --timeout=5m make -w -C mcs/class/Mono.Debugger.Soft run-test
-${TESTCMD} --label=Microsoft.Build --timeout=5m make -w -C mcs/class/Microsoft.Build run-test
-${TESTCMD} --label=monodoc --timeout=10m make -w -C mcs/tools/mdoc run-test
-${TESTCMD} --label=Microsoft.Build-12 --timeout=10m make -w -C mcs/class/Microsoft.Build run-test PROFILE=xbuild_12
-${TESTCMD} --label=Microsoft.Build.Engine-12 --timeout=60m make -w -C mcs/class/Microsoft.Build.Engine run-test PROFILE=xbuild_12
-${TESTCMD} --label=Microsoft.Build.Framework-12 --timeout=60m make -w -C mcs/class/Microsoft.Build.Framework run-test PROFILE=xbuild_12
-${TESTCMD} --label=Microsoft.Build.Tasks-12 --timeout=60m make -w -C mcs/class/Microsoft.Build.Tasks run-test PROFILE=xbuild_12
-${TESTCMD} --label=Microsoft.Build.Utilities-12 --timeout=60m make -w -C mcs/class/Microsoft.Build.Utilities run-test PROFILE=xbuild_12
-${TESTCMD} --label=Microsoft.Build-14 --timeout=60m make -w -C mcs/class/Microsoft.Build run-test PROFILE=xbuild_14
-${TESTCMD} --label=Microsoft.Build.Engine-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Engine run-test PROFILE=xbuild_14
-${TESTCMD} --label=Microsoft.Build.Framework-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Framework run-test PROFILE=xbuild_14
-${TESTCMD} --label=Microsoft.Build.Tasks-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Tasks run-test PROFILE=xbuild_14
-${TESTCMD} --label=Microsoft.Build.Utilities-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Utilities run-test PROFILE=xbuild_14
-rm -fr /tmp/jenkins-temp-aspnet*
+
+make check-ci
diff --git a/scripts/ci/run-test-default.sh b/scripts/ci/run-test-default.sh
new file mode 100755 (executable)
index 0000000..bcce919
--- /dev/null
@@ -0,0 +1,86 @@
+#!/bin/bash -e
+
+export TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
+
+${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k check
+${TESTCMD} --label=runtime --timeout=160m make -w -C mono/tests -k test-wrench V=1 CI=1
+${TESTCMD} --label=corlib --timeout=30m make -w -C mcs/class/corlib run-test
+${TESTCMD} --label=verify --timeout=15m make -w -C runtime mcs-compileall
+${TESTCMD} --label=profiler --timeout=30m make -w -C mono/profiler -k check
+${TESTCMD} --label=compiler --timeout=30m make -w -C mcs/tests run-test
+${TESTCMD} --label=compiler-errors --timeout=30m make -w -C mcs/errors run-test
+${TESTCMD} --label=System --timeout=10m make -w -C mcs/class/System run-test
+${TESTCMD} --label=System.XML --timeout=5m make -w -C mcs/class/System.XML run-test
+${TESTCMD} --label=Mono.Security --timeout=5m make -w -C mcs/class/Mono.Security run-test
+${TESTCMD} --label=System.Security --timeout=5m make -w -C mcs/class/System.Security run-test;
+${TESTCMD} --label=System.Drawing --timeout=5m make -w -C mcs/class/System.Drawing run-test
+if [[ ${label} == osx-* ]]
+then ${TESTCMD} --label=Windows.Forms --skip;
+else ${TESTCMD} --label=Windows.Forms --timeout=5m make -w -C mcs/class/System.Windows.Forms run-test
+fi
+${TESTCMD} --label=System.Data --timeout=5m make -w -C mcs/class/System.Data run-test
+${TESTCMD} --label=System.Data.OracleClient --timeout=5m make -w -C mcs/class/System.Data.OracleClient run-test;
+${TESTCMD} --label=System.Design --timeout=5m make -w -C mcs/class/System.Design run-test;
+${TESTCMD} --label=Mono.Posix --timeout=5m make -w -C mcs/class/Mono.Posix run-test
+${TESTCMD} --label=System.Web --timeout=30m make -w -C mcs/class/System.Web run-test
+${TESTCMD} --label=System.Web.Services --timeout=5m make -w -C mcs/class/System.Web.Services run-test
+${TESTCMD} --label=System.Runtime.SFS --timeout=5m make -w -C mcs/class/System.Runtime.Serialization.Formatters.Soap run-test;
+${TESTCMD} --label=System.Runtime.Remoting --timeout=5m make -w -C mcs/class/System.Runtime.Remoting run-test;
+${TESTCMD} --label=Cscompmgd --timeout=5m make -w -C mcs/class/Cscompmgd run-test;
+${TESTCMD} --label=Commons.Xml.Relaxng --timeout=5m make -w -C mcs/class/Commons.Xml.Relaxng run-test;
+${TESTCMD} --label=System.ServiceProcess --timeout=5m make -w -C mcs/class/System.ServiceProcess run-test;
+${TESTCMD} --label=I18N.CJK --timeout=5m make -w -C mcs/class/I18N/CJK run-test
+${TESTCMD} --label=I18N.West --timeout=5m make -w -C mcs/class/I18N/West run-test
+${TESTCMD} --label=I18N.MidEast --timeout=5m make -w -C mcs/class/I18N/MidEast run-test
+${TESTCMD} --label=System.DirectoryServices --timeout=5m make -w -C mcs/class/System.DirectoryServices run-test
+${TESTCMD} --label=Microsoft.Build.Engine --timeout=5m make -w -C mcs/class/Microsoft.Build.Engine run-test
+${TESTCMD} --label=Microsoft.Build.Framework --timeout=5m make -w -C mcs/class/Microsoft.Build.Framework run-test
+${TESTCMD} --label=Microsoft.Build.Tasks --timeout=5m make -w -C mcs/class/Microsoft.Build.Tasks run-test
+${TESTCMD} --label=Microsoft.Build.Utilities --timeout=5m make -w -C mcs/class/Microsoft.Build.Utilities run-test
+${TESTCMD} --label=Mono.C5 --timeout=5m make -w -C mcs/class/Mono.C5 run-test
+${TESTCMD} --label=System.Configuration --timeout=5m make -w -C mcs/class/System.Configuration run-test
+${TESTCMD} --label=System.Transactions --timeout=5m make -w -C mcs/class/System.Transactions run-test
+${TESTCMD} --label=System.Web.Extensions --timeout=5m make -w -C mcs/class/System.Web.Extensions run-test
+${TESTCMD} --label=System.Core --timeout=15m make -w -C mcs/class/System.Core run-test
+${TESTCMD} --label=symbolicate --timeout=60m make -w -C mcs/tools/mono-symbolicate check
+${TESTCMD} --label=System.Xml.Linq --timeout=5m make -w -C mcs/class/System.Xml.Linq run-test
+${TESTCMD} --label=System.Data.DSE --timeout=5m make -w -C mcs/class/System.Data.DataSetExtensions run-test
+${TESTCMD} --label=System.Web.Abstractions --timeout=5m make -w -C mcs/class/System.Web.Abstractions run-test
+${TESTCMD} --label=System.Web.Routing --timeout=5m make -w -C mcs/class/System.Web.Routing run-test
+${TESTCMD} --label=System.Runtime.Serialization --timeout=5m make -w -C mcs/class/System.Runtime.Serialization run-test
+${TESTCMD} --label=System.IdentityModel --timeout=5m make -w -C mcs/class/System.IdentityModel run-test
+${TESTCMD} --label=System.ServiceModel --timeout=15m make -w -C mcs/class/System.ServiceModel run-test
+${TESTCMD} --label=System.ServiceModel.Web --timeout=5m make -w -C mcs/class/System.ServiceModel.Web run-test
+${TESTCMD} --label=System.Web.Extensions-standalone --timeout=5m make -w -C mcs/class/System.Web.Extensions run-standalone-test
+${TESTCMD} --label=System.ComponentModel.DataAnnotations --timeout=5m make -w -C mcs/class/System.ComponentModel.DataAnnotations run-test
+${TESTCMD} --label=Mono.CodeContracts --timeout=5m make -w -C mcs/class/Mono.CodeContracts run-test
+${TESTCMD} --label=System.Runtime.Caching --timeout=5m make -w -C mcs/class/System.Runtime.Caching run-test
+${TESTCMD} --label=System.Data.Services --timeout=5m make -w -C mcs/class/System.Data.Services run-test
+${TESTCMD} --label=System.Web.DynamicData --timeout=5m make -w -C mcs/class/System.Web.DynamicData run-test
+${TESTCMD} --label=Mono.CSharp --timeout=5m make -w -C mcs/class/Mono.CSharp run-test
+${TESTCMD} --label=WindowsBase --timeout=5m make -w -C mcs/class/WindowsBase run-test
+${TESTCMD} --label=System.Numerics --timeout=5m make -w -C mcs/class/System.Numerics run-test
+${TESTCMD} --label=System.Runtime.DurableInstancing --timeout=5m make -w -C mcs/class/System.Runtime.DurableInstancing run-test
+${TESTCMD} --label=System.ServiceModel.Discovery --timeout=5m make -w -C mcs/class/System.ServiceModel.Discovery run-test
+${TESTCMD} --label=System.Xaml --timeout=5m make -w -C mcs/class/System.Xaml run-test
+${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
+${TESTCMD} --label=Mono.Debugger.Soft --timeout=5m make -w -C mcs/class/Mono.Debugger.Soft run-test
+${TESTCMD} --label=Microsoft.Build --timeout=5m make -w -C mcs/class/Microsoft.Build run-test
+${TESTCMD} --label=monodoc --timeout=10m make -w -C mcs/tools/mdoc run-test
+${TESTCMD} --label=Microsoft.Build-12 --timeout=10m make -w -C mcs/class/Microsoft.Build run-test PROFILE=xbuild_12
+${TESTCMD} --label=Microsoft.Build.Engine-12 --timeout=60m make -w -C mcs/class/Microsoft.Build.Engine run-test PROFILE=xbuild_12
+${TESTCMD} --label=Microsoft.Build.Framework-12 --timeout=60m make -w -C mcs/class/Microsoft.Build.Framework run-test PROFILE=xbuild_12
+${TESTCMD} --label=Microsoft.Build.Tasks-12 --timeout=60m make -w -C mcs/class/Microsoft.Build.Tasks run-test PROFILE=xbuild_12
+${TESTCMD} --label=Microsoft.Build.Utilities-12 --timeout=60m make -w -C mcs/class/Microsoft.Build.Utilities run-test PROFILE=xbuild_12
+${TESTCMD} --label=Microsoft.Build-14 --timeout=60m make -w -C mcs/class/Microsoft.Build run-test PROFILE=xbuild_14
+${TESTCMD} --label=Microsoft.Build.Engine-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Engine run-test PROFILE=xbuild_14
+${TESTCMD} --label=Microsoft.Build.Framework-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Framework run-test PROFILE=xbuild_14
+${TESTCMD} --label=Microsoft.Build.Tasks-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Tasks run-test PROFILE=xbuild_14
+${TESTCMD} --label=Microsoft.Build.Utilities-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Utilities run-test PROFILE=xbuild_14
+if [[ ${label} == osx-* ]]
+then ${TESTCMD} --label=ms-test-suite --timeout=15m make -w -C acceptance-tests check-ms-test-suite
+else ${TESTCMD} --label=ms-test-suite --skip;
+fi
+rm -fr /tmp/jenkins-temp-aspnet*
diff --git a/scripts/ci/run-test-mobile_static.sh b/scripts/ci/run-test-mobile_static.sh
new file mode 100755 (executable)
index 0000000..168fd8c
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash -e
+
+TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
+
+if test -n "${MONO_LLVMONLY}";
+then
+${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k llvmonlycheck
+else
+${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k fullaotcheck
+fi
+
+${TESTCMD} --label=runtime --timeout=160m make -w -C mono/tests -k test-wrench V=1 CI=1
+${TESTCMD} --label=corlib --timeout=30m make -w -C mcs/class/corlib run-test
+${TESTCMD} --label=verify --timeout=15m make -w -C runtime mcs-compileall
+${TESTCMD} --label=profiler --timeout=30m make -w -C mono/profiler -k check
+${TESTCMD} --label=compiler --timeout=30m make -w -C mcs/tests run-test
+${TESTCMD} --label=compiler-errors --timeout=30m make -w -C mcs/errors run-test
+${TESTCMD} --label=System --timeout=10m make -w -C mcs/class/System run-test
+${TESTCMD} --label=System.XML --timeout=5m make -w -C mcs/class/System.XML run-test
+${TESTCMD} --label=Mono.Security --timeout=5m make -w -C mcs/class/Mono.Security run-test
+${TESTCMD} --label=System.Data --timeout=5m make -w -C mcs/class/System.Data run-test
+${TESTCMD} --label=System.Web.Services --timeout=5m make -w -C mcs/class/System.Web.Services run-test
+${TESTCMD} --label=I18N.CJK --timeout=5m make -w -C mcs/class/I18N/CJK run-test
+${TESTCMD} --label=I18N.West --timeout=5m make -w -C mcs/class/I18N/West run-test
+${TESTCMD} --label=I18N.MidEast --timeout=5m make -w -C mcs/class/I18N/MidEast run-test
+${TESTCMD} --label=System.Transactions --timeout=5m make -w -C mcs/class/System.Transactions run-test
+${TESTCMD} --label=System.Core --timeout=15m make -w -C mcs/class/System.Core run-test
+${TESTCMD} --label=System.Xml.Linq --timeout=5m make -w -C mcs/class/System.Xml.Linq run-test
+${TESTCMD} --label=System.Runtime.Serialization --timeout=5m make -w -C mcs/class/System.Runtime.Serialization run-test
+${TESTCMD} --label=System.ServiceModel --timeout=15m make -w -C mcs/class/System.ServiceModel run-test
+${TESTCMD} --label=System.ServiceModel.Web --timeout=5m make -w -C mcs/class/System.ServiceModel.Web run-test
+${TESTCMD} --label=System.ComponentModel.DataAnnotations --timeout=5m make -w -C mcs/class/System.ComponentModel.DataAnnotations run-test
+${TESTCMD} --label=Mono.CSharp --timeout=5m make -w -C mcs/class/Mono.CSharp run-test
+${TESTCMD} --label=System.Numerics --timeout=5m make -w -C mcs/class/System.Numerics run-test
+${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
+
+rm -fr /tmp/jenkins-temp-aspnet*
index 440476df14051541e61639f3cc2d381c8b04e59d..3d429b80eac02769064d67bc5e5e8d36cf519f01 100644 (file)
@@ -68,7 +68,7 @@ test-$(1)::
 
 reset-$(1)::
        @if test -d $($(2)_PATH); then \
-               if ! (cd $($(2)_PATH) && git show $(NEEDED_$(2)_VERSION) >/dev/null 2>&1 && git log -1 $(NEEDED_$(2)_REMOTE) >/dev/null 2>&1) ; then \
+               if ! (cd $($(2)_PATH) && git show $(NEEDED_$(2)_VERSION) >/dev/null 2>&1 && git log -1 $(NEEDED_$(2)_REMOTE/NEEDED_$(2)_BRANCH) >/dev/null 2>&1) ; then \
                        echo "*** git fetch `basename $$($(2)_PATH)`" && (cd $($(2)_PATH) && git fetch); \
                fi;  \
        else \
index 3b30bc16f83c4375cb87ec9f0ba6b6bb119870a3..9aebe325e6e7506634247e6e38bd61c17ae371e2 100644 (file)
@@ -1,3 +1,3 @@
-SUBDIRS = locale-builder sgen monograph
+SUBDIRS = locale-builder sgen monograph pedump
 
 
index 123d63d2fb1e4353e385d15752b59816663d5417..3c52afc663451226a7b6b16a459081eec5e1bb7b 100644 (file)
@@ -6,18 +6,14 @@ endif
 if DISABLE_EXECUTABLES
 runtime_lib=$(top_builddir)/mono/mini/$(LIBMONO_LA) $(static_libs)
 else
-if !SHARED_MONO
 static_libs=   \
-       $(top_builddir)/mono/metadata/libmonoruntime-static.la  \
+       $(top_builddir)/mono/metadata/libmonoruntimesgen-static.la      \
        $(top_builddir)/mono/io-layer/libwapi.la        \
        $(top_builddir)/mono/utils/libmonoutils.la \
        $(GLIB_LIBS) $(LIBICONV) \
        $(LIBGC_STATIC_LIBS)
 
 runtime_lib=$(top_builddir)/mono/mini/$(LIBMONO_LA) $(static_libs)
-else
-runtime_lib=$(top_builddir)/mono/mini/$(LIBMONO_LA)
-endif
 endif
 
 if DISABLE_EXECUTABLES
@@ -26,7 +22,7 @@ else
 if DISABLE_LIBRARIES
 bin_PROGRAMS =
 else
-if SUPPORT_BOEHM
+if SUPPORT_SGEN
 bin_PROGRAMS = monograph
 endif
 endif
diff --git a/tools/pedump/.gitignore b/tools/pedump/.gitignore
new file mode 100644 (file)
index 0000000..a73a752
--- /dev/null
@@ -0,0 +1,5 @@
+/Makefile.in
+/Makefile
+/pedump
+/pedump.exe
+
diff --git a/tools/pedump/Makefile.am b/tools/pedump/Makefile.am
new file mode 100644 (file)
index 0000000..d329d1f
--- /dev/null
@@ -0,0 +1,31 @@
+
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS)
+
+if DISABLE_EXECUTABLES
+bin_PROGRAMS =
+else
+if DISABLE_LIBRARIES
+bin_PROGRAMS =
+else
+if SUPPORT_SGEN
+bin_PROGRAMS = pedump
+endif
+endif
+endif
+
+pedump_SOURCES =               \
+       pedump.c
+
+pedump_LDADD =                         \
+       $(top_builddir)/mono/metadata/libmonoruntimesgen-static.la \
+       $(top_builddir)/mono/sgen/libmonosgen-static.la \
+       $(top_builddir)/mono/io-layer/libwapi.la        \
+       $(top_builddir)/mono/utils/libmonoutils.la \
+       $(LLVM_LIBS)                    \
+       $(LLVM_LDFLAGS)                 \
+       $(GLIB_LIBS)                    \
+       $(LIBICONV)
+
+if PLATFORM_DARWIN
+pedump_LDFLAGS=-framework CoreFoundation -framework Foundation
+endif
diff --git a/tools/pedump/pedump.c b/tools/pedump/pedump.c
new file mode 100644 (file)
index 0000000..4bbcc69
--- /dev/null
@@ -0,0 +1,750 @@
+/*
+ * pedump.c: Dumps the contents of an extended PE/COFF file
+ *
+ * Author:
+ *   Miguel de Icaza (miguel@ximian.com)
+ *
+ * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
+ * Copyright 2004-2009 Novell, Inc (http://www.novell.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <mono/metadata/image.h>
+#include <glib.h>
+#include <mono/metadata/cil-coff.h>
+#include <mono/metadata/mono-endian.h>
+#include <mono/metadata/verify.h>
+#include <mono/metadata/class.h>
+#include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/tokentype.h>
+#include <mono/metadata/appdomain.h>
+#include <mono/metadata/assembly.h>
+#include <mono/metadata/metadata-internals.h>
+#include <mono/metadata/class-internals.h>
+#include <mono/metadata/verify-internals.h>
+#include <mono/metadata/marshal.h>
+#include "mono/utils/mono-digest.h"
+#include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-counters.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+gboolean dump_data = TRUE;
+gboolean verify_pe = FALSE;
+gboolean verify_metadata = FALSE;
+gboolean verify_code = FALSE;
+gboolean verify_partial_md = FALSE;
+
+static MonoAssembly *pedump_preload (MonoAssemblyName *aname, gchar **assemblies_path, gpointer user_data);
+static void pedump_assembly_load_hook (MonoAssembly *assembly, gpointer user_data);
+static MonoAssembly *pedump_assembly_search_hook (MonoAssemblyName *aname, gpointer user_data);
+
+/* unused
+static void
+hex_dump (const char *buffer, int base, int count)
+{
+       int i;
+       
+       for (i = 0; i < count; i++){
+               if ((i % 16) == 0)
+                       printf ("\n0x%08x: ", (unsigned char) base + i);
+
+               printf ("%02x ", (unsigned char) (buffer [i]));
+       }
+}
+*/
+
+static void
+hex8 (const char *label, unsigned char x)
+{
+       printf ("\t%s: 0x%02x\n", label, (unsigned char) x);
+}
+
+static void
+hex16 (const char *label, guint16 x)
+{
+       printf ("\t%s: 0x%04x\n", label, x);
+}
+
+static void
+hex32 (const char *label, guint32 x)
+{
+       printf ("\t%s: 0x%08x\n", label, x);
+}
+
+static void
+dump_coff_header (MonoCOFFHeader *coff)
+{
+       printf ("\nCOFF Header:\n");
+       hex16 ("                Machine", coff->coff_machine);
+       hex16 ("               Sections", coff->coff_sections);
+       hex32 ("             Time stamp", coff->coff_time);
+       hex32 ("Pointer to Symbol Table", coff->coff_symptr);
+       hex32 ("           Symbol Count", coff->coff_symcount);
+       hex16 ("   Optional Header Size", coff->coff_opt_header_size);
+       hex16 ("        Characteristics", coff->coff_attributes);
+
+}
+
+static void
+dump_pe_header (MonoPEHeader *pe)
+{
+       printf ("\nPE Header:\n");
+       hex16 ("         Magic (0x010b)", pe->pe_magic);
+       hex8  ("             LMajor (6)", pe->pe_major);
+       hex8  ("             LMinor (0)", pe->pe_minor);
+       hex32 ("              Code Size", pe->pe_code_size);
+       hex32 ("  Initialized Data Size", pe->pe_data_size);
+       hex32 ("Uninitialized Data Size", pe->pe_uninit_data_size);
+       hex32 ("        Entry Point RVA", pe->pe_rva_entry_point);
+       hex32 ("          Code Base RVA", pe->pe_rva_code_base);
+       hex32 ("          Data Base RVA", pe->pe_rva_data_base);
+       printf ("\n");
+}
+
+static void
+dump_nt_header (MonoPEHeaderNT *nt)
+{
+       printf ("\nNT Header:\n");
+
+       hex32 ("   Image Base (0x400000)", nt->pe_image_base);
+       hex32 ("Section Alignment (8192)", nt->pe_section_align);
+       hex32 ("   File Align (512/4096)", nt->pe_file_alignment);
+       hex16 ("            OS Major (4)", nt->pe_os_major);
+       hex16 ("            OS Minor (0)", nt->pe_os_minor);
+       hex16 ("          User Major (0)", nt->pe_user_major);
+       hex16 ("          User Minor (0)", nt->pe_user_minor);
+       hex16 ("        Subsys major (4)", nt->pe_subsys_major);
+       hex16 ("        Subsys minor (0)", nt->pe_subsys_minor);
+       hex32 ("               Reserverd", nt->pe_reserved_1);
+       hex32 ("              Image Size", nt->pe_image_size);
+       hex32 ("             Header Size", nt->pe_header_size);
+       hex32 ("            Checksum (0)", nt->pe_checksum);
+       hex16 ("               Subsystem", nt->pe_subsys_required);
+       hex16 ("           DLL Flags (0)", nt->pe_dll_flags);
+       hex32 (" Stack Reserve Size (1M)", nt->pe_stack_reserve);
+       hex32 ("Stack commit Size (4096)", nt->pe_stack_commit);
+       hex32 ("  Heap Reserve Size (1M)", nt->pe_heap_reserve);
+       hex32 (" Heap Commit Size (4096)", nt->pe_heap_commit);
+       hex32 ("      Loader flags (0x1)", nt->pe_loader_flags);
+       hex32 ("   Data Directories (16)", nt->pe_data_dir_count);
+}
+
+static void
+dent (const char *label, MonoPEDirEntry de)
+{
+       printf ("\t%s: 0x%08x [0x%08x]\n", label, de.rva, de.size);
+}
+
+static void
+dump_blob (const char *desc, const char* p, guint32 size)
+{
+       int i;
+
+       printf ("%s", desc);
+       if (!p) {
+               printf (" none\n");
+               return;
+       }
+
+       for (i = 0; i < size; ++i) {
+               if (!(i % 16))
+                       printf ("\n\t");
+               printf (" %02X", p [i] & 0xFF);
+       }
+       printf ("\n");
+}
+
+static void
+dump_public_key (MonoImage *m)
+{
+       guint32 size;
+       const char *p;
+
+       p = mono_image_get_public_key (m, &size);
+       dump_blob ("\nPublic key:", p, size);
+}
+
+static void
+dump_strong_name (MonoImage *m)
+{
+       guint32 size;
+       const char *p;
+
+       p = mono_image_get_strong_name (m, &size);
+       dump_blob ("\nStrong name:", p, size);
+}
+
+static void
+dump_datadir (MonoPEDatadir *dd)
+{
+       printf ("\nData directories:\n");
+       dent ("     Export Table", dd->pe_export_table);
+       dent ("     Import Table", dd->pe_import_table);
+       dent ("   Resource Table", dd->pe_resource_table);
+       dent ("  Exception Table", dd->pe_exception_table);
+       dent ("Certificate Table", dd->pe_certificate_table);
+       dent ("      Reloc Table", dd->pe_reloc_table);
+       dent ("            Debug", dd->pe_debug);
+       dent ("        Copyright", dd->pe_copyright);
+       dent ("       Global Ptr", dd->pe_global_ptr);
+       dent ("        TLS Table", dd->pe_tls_table);
+       dent ("Load Config Table", dd->pe_load_config_table);
+       dent ("     Bound Import", dd->pe_bound_import);
+       dent ("              IAT", dd->pe_iat);
+       dent ("Delay Import Desc", dd->pe_delay_import_desc);
+       dent ("       CLI Header", dd->pe_cli_header);
+}
+
+static void
+dump_dotnet_header (MonoDotNetHeader *header)
+{
+       dump_coff_header (&header->coff);
+       dump_pe_header (&header->pe);
+       dump_nt_header (&header->nt);
+       dump_datadir (&header->datadir);
+}
+
+static void
+dump_section_table (MonoSectionTable *st)
+{
+       guint32 flags = st->st_flags;
+               
+       printf ("\n\tName: %s\n", st->st_name);
+       hex32 ("   Virtual Size", st->st_virtual_size);
+       hex32 ("Virtual Address", st->st_virtual_address);
+       hex32 ("  Raw Data Size", st->st_raw_data_size);
+       hex32 ("   Raw Data Ptr", st->st_raw_data_ptr);
+       hex32 ("      Reloc Ptr", st->st_reloc_ptr);
+       hex32 ("     LineNo Ptr", st->st_lineno_ptr);
+       hex16 ("    Reloc Count", st->st_reloc_count);
+       hex16 ("     Line Count", st->st_line_count);
+
+       printf ("\tFlags: %s%s%s%s%s%s%s%s%s%s\n",
+               (flags & SECT_FLAGS_HAS_CODE) ? "code, " : "",
+               (flags & SECT_FLAGS_HAS_INITIALIZED_DATA) ? "data, " : "",
+               (flags & SECT_FLAGS_HAS_UNINITIALIZED_DATA) ? "bss, " : "",
+               (flags & SECT_FLAGS_MEM_DISCARDABLE) ? "discard, " : "",
+               (flags & SECT_FLAGS_MEM_NOT_CACHED) ? "nocache, " : "",
+               (flags & SECT_FLAGS_MEM_NOT_PAGED) ? "nopage, " : "",
+               (flags & SECT_FLAGS_MEM_SHARED) ? "shared, " : "",
+               (flags & SECT_FLAGS_MEM_EXECUTE) ? "exec, " : "",
+               (flags & SECT_FLAGS_MEM_READ) ? "read, " : "",
+               (flags & SECT_FLAGS_MEM_WRITE) ? "write" : "");
+}
+
+static void
+dump_sections (MonoCLIImageInfo *iinfo)
+{
+       const int top = iinfo->cli_header.coff.coff_sections;
+       int i;
+       
+       for (i = 0; i < top; i++)
+               dump_section_table (&iinfo->cli_section_tables [i]);
+}
+
+static void
+dump_cli_header (MonoCLIHeader *ch)
+{
+       printf ("\n");
+       printf ("          CLI header size: %d\n", ch->ch_size);
+       printf ("         Runtime required: %d.%d\n", ch->ch_runtime_major, ch->ch_runtime_minor);
+       printf ("                    Flags: %s, %s, %s, %s\n",
+               (ch->ch_flags & CLI_FLAGS_ILONLY ? "ilonly" : "contains native"),
+               (ch->ch_flags & CLI_FLAGS_32BITREQUIRED ? "32bits" : "32/64"),
+               (ch->ch_flags & CLI_FLAGS_TRACKDEBUGDATA ? "trackdebug" : "no-trackdebug"),
+               (ch->ch_flags & CLI_FLAGS_STRONGNAMESIGNED ? "strongnamesigned" : "notsigned"));
+       dent   ("         Metadata", ch->ch_metadata);
+       hex32  ("Entry Point Token", ch->ch_entry_point);
+       dent   ("     Resources at", ch->ch_resources);
+       dent   ("   Strong Name at", ch->ch_strong_name);
+       dent   ("  Code Manager at", ch->ch_code_manager_table);
+       dent   ("  VTableFixups at", ch->ch_vtable_fixups);
+       dent   ("     EAT jumps at", ch->ch_export_address_table_jumps);
+}      
+
+static void
+dsh (const char *label, MonoImage *meta, MonoStreamHeader *sh)
+{
+       printf ("%s: 0x%08x - 0x%08x [%d == 0x%08x]\n",
+               label,
+               (int)(sh->data - meta->raw_metadata), (int)(sh->data + sh->size - meta->raw_metadata),
+               sh->size, sh->size);
+}
+
+static void
+dump_metadata_header (MonoImage *meta)
+{
+       printf ("\nMetadata header:\n");
+       printf ("           Version: %d.%d\n", meta->md_version_major, meta->md_version_minor);
+       printf ("    Version string: %s\n", meta->version);
+}
+
+static void
+dump_metadata_ptrs (MonoImage *meta)
+{
+       printf ("\nMetadata pointers:\n");
+       dsh ("\tTables (#~)", meta, &meta->heap_tables);
+       dsh ("\t    Strings", meta, &meta->heap_strings);
+       dsh ("\t       Blob", meta, &meta->heap_blob);
+       dsh ("\tUser string", meta, &meta->heap_us);
+       dsh ("\t       GUID", meta, &meta->heap_guid);
+}
+
+static void
+dump_metadata (MonoImage *meta)
+{
+       int table;
+
+       dump_metadata_header (meta);
+
+       dump_metadata_ptrs (meta);
+
+       printf ("Rows:\n");
+       for (table = 0; table < MONO_TABLE_NUM; table++){
+               if (meta->tables [table].rows == 0)
+                       continue;
+               printf ("Table %s: %d records (%d bytes, at %x)\n",
+                       mono_meta_table_name (table),
+                       meta->tables [table].rows,
+                       meta->tables [table].row_size,
+                       (unsigned int)(meta->tables [table].base - meta->raw_data)
+                       );
+       }
+}
+
+static void
+dump_methoddef (MonoImage *metadata, guint32 token)
+{
+       const char *loc;
+
+       if (!token)
+               return;
+       loc = mono_metadata_locate_token (metadata, token);
+
+       printf ("RVA for Entry Point: 0x%08x\n", read32 (loc));
+}
+
+static void
+dump_dotnet_iinfo (MonoImage *image)
+{
+       MonoCLIImageInfo *iinfo = (MonoCLIImageInfo *)image->image_info;
+
+       dump_dotnet_header (&iinfo->cli_header);
+       dump_sections (iinfo);
+       dump_cli_header (&iinfo->cli_cli_header);
+       dump_strong_name (image);
+       dump_public_key (image);
+       dump_metadata (image);
+
+       dump_methoddef (image, iinfo->cli_cli_header.ch_entry_point);
+}
+
+static int
+dump_verify_info (MonoImage *image, int flags)
+{
+       GSList *errors, *tmp;
+       int count = 0, verifiable = 0;
+       const char* desc [] = {
+               "Ok", "Error", "Warning", NULL, "CLS", NULL, NULL, NULL, "Not Verifiable"
+       };
+
+       if (verify_code) { /* verify code */
+               int i;
+               MonoTableInfo *m = &image->tables [MONO_TABLE_METHOD];
+
+               for (i = 0; i < m->rows; ++i) {
+                       MonoMethod *method;
+                       MonoError error;
+
+                       method = mono_get_method_checked (image, MONO_TOKEN_METHOD_DEF | (i+1), NULL, NULL, &error);
+                       if (!method) {
+                               g_print ("Warning: Cannot lookup method with token 0x%08x due to %s\n", i + 1, mono_error_get_message (&error));
+                               mono_error_cleanup (&error);
+                               continue;
+                       }
+                       errors = mono_method_verify (method, flags);
+                       if (errors) {
+                               MonoClass *klass = mono_method_get_class (method);
+                               char *name = mono_type_full_name (&klass->byval_arg);
+                               if (mono_method_signature (method) == NULL) {
+                                       g_print ("In method: %s::%s(ERROR)\n", name, mono_method_get_name (method));
+                               } else {
+                                       char *sig;
+                                       sig = mono_signature_get_desc (mono_method_signature (method), FALSE);  
+                                       g_print ("In method: %s::%s(%s)\n", name, mono_method_get_name (method), sig);
+                                       g_free (sig);
+                               }
+                               g_free (name);
+                       }
+
+                       for (tmp = errors; tmp; tmp = tmp->next) {
+                               MonoVerifyInfo *info = (MonoVerifyInfo *)tmp->data;
+                               g_print ("%s: %s\n", desc [info->status], info->message);
+                               if (info->status == MONO_VERIFY_ERROR) {
+                                       count++;
+                                       verifiable = 3;
+                               }
+                               if(info->status == MONO_VERIFY_NOT_VERIFIABLE) {
+                                       if (verifiable < 2)
+                                               verifiable = 2; 
+                               }
+                       }
+                       mono_free_verify_list (errors);
+               }
+       }
+
+       if (count)
+               g_print ("Error count: %d\n", count);
+       return verifiable;
+}
+
+static void
+usage (void)
+{
+       printf ("Usage is: pedump [--verify error,warn,cls,all,code,fail-on-verifiable,non-strict,valid-only,metadata] file.exe\n");
+       exit (1);
+}
+
+static int
+verify_image_file (const char *fname)
+{
+       GSList *errors = NULL, *tmp;
+       MonoImage *image;
+       MonoTableInfo *table;
+       MonoAssembly *assembly;
+       MonoImageOpenStatus status;
+       int i, count = 0;
+       const char* desc [] = {
+               "Ok", "Error", "Warning", NULL, "CLS", NULL, NULL, NULL, "Not Verifiable"
+       };
+
+       image = mono_image_open_raw (fname, &status);
+       if (!image) {
+               printf ("Could not open %s\n", fname);
+               return 1;
+       }
+
+       if (!mono_verifier_verify_pe_data (image, &errors))
+               goto invalid_image;
+
+       if (!mono_image_load_pe_data (image)) {
+               printf ("Could not load pe data for assembly %s\n", fname);
+               return 1;
+       }
+
+       if (!mono_verifier_verify_cli_data (image, &errors))
+               goto invalid_image;
+
+       if (!mono_image_load_cli_data (image)) {
+               printf ("Could not load cli data for assembly %s\n", fname);
+               return 1;
+       }
+
+       if (!mono_verifier_verify_table_data (image, &errors))
+               goto invalid_image;
+
+       mono_image_load_names (image);
+
+       /*fake an assembly for class loading to work*/
+       assembly = g_new0 (MonoAssembly, 1);
+       assembly->in_gac = FALSE;
+       assembly->image = image;
+       image->assembly = assembly;
+       mono_assembly_fill_assembly_name (image, &assembly->aname);
+
+       /*Finish initializing the runtime*/
+       mono_install_assembly_load_hook (pedump_assembly_load_hook, NULL);
+       mono_install_assembly_search_hook (pedump_assembly_search_hook, NULL);
+
+       mono_init_version ("pedump", image->version);
+
+       mono_install_assembly_preload_hook (pedump_preload, GUINT_TO_POINTER (FALSE));
+
+       mono_icall_init ();
+       mono_marshal_init ();
+
+
+       if (!verify_partial_md && !mono_verifier_verify_full_table_data (image, &errors))
+               goto invalid_image;
+
+
+       table = &image->tables [MONO_TABLE_TYPEDEF];
+       for (i = 1; i <= table->rows; ++i) {
+               MonoError error;
+               guint32 token = i | MONO_TOKEN_TYPE_DEF;
+               MonoClass *klass = mono_class_get_checked (image, token, &error);
+               if (!klass) {
+                       printf ("Could not load class with token %x due to %s\n", token, mono_error_get_message (&error));
+                       mono_error_cleanup (&error);
+                       continue;
+               }
+               mono_class_init (klass);
+               if (mono_class_has_failure (klass)) {
+                       printf ("Error verifying class(0x%08x) %s.%s a type load error happened\n", token, klass->name_space, klass->name);
+                       ++count;
+               }
+
+               mono_class_setup_vtable (klass);
+               if (mono_class_has_failure (klass)) {
+                       printf ("Error verifying class(0x%08x) %s.%s a type load error happened\n", token, klass->name_space, klass->name);
+                       ++count;
+               }
+       }
+       if (count)
+               return 5;
+       return 0;
+
+invalid_image:
+       for (tmp = errors; tmp; tmp = tmp->next) {
+               MonoVerifyInfo *info = (MonoVerifyInfo *)tmp->data;
+               g_print ("%s: %s\n", desc [info->status], info->message);
+               if (info->status == MONO_VERIFY_ERROR)
+                       count++;
+       }
+       mono_free_verify_list (errors);
+       if (count)
+               g_print ("Error count: %d\n", count);
+       return 1;
+}
+
+static gboolean
+try_load_from (MonoAssembly **assembly, const gchar *path1, const gchar *path2,
+                                       const gchar *path3, const gchar *path4, gboolean refonly)
+{
+       gchar *fullpath;
+
+       *assembly = NULL;
+       fullpath = g_build_filename (path1, path2, path3, path4, NULL);
+       if (g_file_test (fullpath, G_FILE_TEST_IS_REGULAR))
+               *assembly = mono_assembly_open_full (fullpath, NULL, refonly);
+
+       g_free (fullpath);
+       return (*assembly != NULL);
+}
+
+static MonoAssembly *
+real_load (gchar **search_path, const gchar *culture, const gchar *name, gboolean refonly)
+{
+       MonoAssembly *result = NULL;
+       gchar **path;
+       gchar *filename;
+       const gchar *local_culture;
+       gint len;
+
+       if (!culture || *culture == '\0') {
+               local_culture = "";
+       } else {
+               local_culture = culture;
+       }
+
+       filename =  g_strconcat (name, ".dll", NULL);
+       len = strlen (filename);
+
+       for (path = search_path; *path; path++) {
+               if (**path == '\0')
+                       continue; /* Ignore empty ApplicationBase */
+
+               /* See test cases in bug #58992 and bug #57710 */
+               /* 1st try: [culture]/[name].dll (culture may be empty) */
+               strcpy (filename + len - 4, ".dll");
+               if (try_load_from (&result, *path, local_culture, "", filename, refonly))
+                       break;
+
+               /* 2nd try: [culture]/[name].exe (culture may be empty) */
+               strcpy (filename + len - 4, ".exe");
+               if (try_load_from (&result, *path, local_culture, "", filename, refonly))
+                       break;
+
+               /* 3rd try: [culture]/[name]/[name].dll (culture may be empty) */
+               strcpy (filename + len - 4, ".dll");
+               if (try_load_from (&result, *path, local_culture, name, filename, refonly))
+                       break;
+
+               /* 4th try: [culture]/[name]/[name].exe (culture may be empty) */
+               strcpy (filename + len - 4, ".exe");
+               if (try_load_from (&result, *path, local_culture, name, filename, refonly))
+                       break;
+       }
+
+       g_free (filename);
+       return result;
+}
+
+/*
+ * Try to load referenced assemblies from assemblies_path.
+ */
+static MonoAssembly *
+pedump_preload (MonoAssemblyName *aname,
+                                gchar **assemblies_path,
+                                gpointer user_data)
+{
+       MonoAssembly *result = NULL;
+       gboolean refonly = GPOINTER_TO_UINT (user_data);
+
+       if (assemblies_path && assemblies_path [0] != NULL) {
+               result = real_load (assemblies_path, aname->culture, aname->name, refonly);
+       }
+
+       return result;
+}
+
+static GList *loaded_assemblies = NULL;
+
+static void
+pedump_assembly_load_hook (MonoAssembly *assembly, gpointer user_data)
+{
+       loaded_assemblies = g_list_prepend (loaded_assemblies, assembly);
+}
+
+static MonoAssembly *
+pedump_assembly_search_hook (MonoAssemblyName *aname, gpointer user_data)
+{
+        GList *tmp;
+
+       for (tmp = loaded_assemblies; tmp; tmp = tmp->next) {
+               MonoAssembly *ass = (MonoAssembly *)tmp->data;
+               if (mono_assembly_names_equal (aname, &ass->aname))
+                      return ass;
+       }
+       return NULL;
+}
+
+#define VALID_ONLY_FLAG 0x08000000
+#define VERIFY_CODE_ONLY MONO_VERIFY_ALL + 1 
+#define VERIFY_METADATA_ONLY VERIFY_CODE_ONLY + 1
+#define VERIFY_PARTIAL_METADATA VERIFY_CODE_ONLY + 2
+
+int
+main (int argc, char *argv [])
+{
+       int image_result = 0;
+       MonoImage *image;
+       char *file = NULL;
+       char *flags = NULL;
+       MiniVerifierMode verifier_mode = MONO_VERIFIER_MODE_VERIFIABLE;
+       const char *flag_desc [] = {"error", "warn", "cls", "all", "code", "fail-on-verifiable", "non-strict", "valid-only", "metadata", "partial-md", NULL};
+       guint flag_vals [] = {MONO_VERIFY_ERROR, MONO_VERIFY_WARNING, MONO_VERIFY_CLS, MONO_VERIFY_ALL, VERIFY_CODE_ONLY, MONO_VERIFY_FAIL_FAST, MONO_VERIFY_NON_STRICT, VALID_ONLY_FLAG, VERIFY_METADATA_ONLY, VERIFY_PARTIAL_METADATA, 0};
+       int i, verify_flags = MONO_VERIFY_REPORT_ALL_ERRORS, run_new_metadata_verifier = 0;
+       
+       for (i = 1; i < argc; i++){
+               if (argv [i][0] != '-'){
+                       file = argv [i];
+                       continue;
+               }
+
+               if (strcmp (argv [i], "--help") == 0)
+                       usage ();
+               else if (strcmp (argv [i], "--verify") == 0) {
+                       verify_pe = 1;
+                       dump_data = 0;
+                       ++i;
+                       flags = argv [i];
+               } else {
+                       usage ();
+               }
+       }
+       
+       if (!file)
+               usage ();
+
+#ifndef DISABLE_PERFCOUNTERS
+       mono_perfcounters_init ();
+#endif
+       mono_counters_init ();
+       mono_metadata_init ();
+       mono_images_init ();
+       mono_assemblies_init ();
+       mono_loader_init ();
+       if (verify_pe) {
+               char *tok = strtok (flags, ",");
+
+               verify_metadata = 1;
+               verify_code = 0;
+               while (tok) {
+                       for (i = 0; flag_desc [i]; ++i) {
+                               if (strcmp (tok, flag_desc [i]) == 0) {
+                                       if (flag_vals [i] == VERIFY_CODE_ONLY) {
+                                               verify_metadata = 0;
+                                               verify_code = 1;
+                                       } else if(flag_vals [i] == MONO_VERIFY_ALL) {
+                                               verify_code = 1;
+                                       } else if(flag_vals [i] == VERIFY_METADATA_ONLY) {
+                                               verify_metadata = 0;
+                                               run_new_metadata_verifier = 1;
+                                       } else if(flag_vals [i] == VERIFY_PARTIAL_METADATA) {
+                                               verify_partial_md = 1;
+                                       }
+                                       if (flag_vals [i] == VALID_ONLY_FLAG)
+                                               verifier_mode = MONO_VERIFIER_MODE_VALID;
+                                       else
+                                               verify_flags |= flag_vals [i];
+                                       break;
+                               }
+                       }
+                       if (!flag_desc [i])
+                               g_print ("Unknown verify flag %s\n", tok);
+                       tok = strtok (NULL, ",");
+               }
+
+               mono_verifier_set_mode (verifier_mode);
+               /**/
+       }
+
+       if (verify_pe || run_new_metadata_verifier) {
+               run_new_metadata_verifier = 1;
+       }
+       
+       if (run_new_metadata_verifier) {
+               mono_verifier_set_mode (verifier_mode);
+
+               image_result = verify_image_file (file);
+               if (image_result == 1 || !verify_code)
+                       return image_result;
+       }
+
+       image = mono_image_open (file, NULL);
+       if (!image){
+               fprintf (stderr, "Cannot open image %s\n", file);
+               exit (1);
+       }
+
+       if (dump_data)
+               dump_dotnet_iinfo (image);
+       if (verify_pe) {
+               MonoAssembly *assembly;
+               MonoImage *image;
+               MonoImageOpenStatus status;
+               int code_result;
+
+               mono_verifier_set_mode (verifier_mode);
+
+               assembly = mono_assembly_open (file, NULL);
+               /*fake an assembly for netmodules so the verifier works*/
+               if (!assembly && (image = mono_image_open (file, &status)) && image->tables [MONO_TABLE_ASSEMBLY].rows == 0) {
+                       assembly = g_new0 (MonoAssembly, 1);
+                       assembly->in_gac = FALSE;
+                       assembly->image = image;
+                       image->assembly = assembly;
+               }
+
+               if (!assembly) {
+                       g_print ("Could not open assembly %s\n", file);
+                       return 4;
+               }
+
+               code_result = dump_verify_info (assembly->image, verify_flags);
+               return code_result ? code_result : image_result;
+       } else
+               mono_image_close (image);
+       
+       return 0;
+}
+
index ac155b0cedfb5eb43720b5bc17a86d3250d12f46..c14346f088c28fa88b0b434d4ef80d084634e979 100644 (file)
@@ -3,16 +3,17 @@ bin_PROGRAMS = sgen-grep-binprot
 AM_CPPFLAGS =  $(GLIB_CFLAGS) -I$(top_srcdir)
 
 noinst_LIBRARIES = libsgen-grep-binprot.a libsgen-grep-binprot32p.a libsgen-grep-binprot64p.a
-libsgen_grep_binprot_a_SOURCES = sgen-grep-binprot.c
+libsgen_grep_binprot_a_SOURCES = sgen-grep-binprot.c sgen-grep-binprot.h
 libsgen_grep_binprot_a_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
-libsgen_grep_binprot32p_a_SOURCES = sgen-grep-binprot.c
+libsgen_grep_binprot32p_a_SOURCES = sgen-grep-binprot.c sgen-grep-binprot.h
 libsgen_grep_binprot32p_a_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -DBINPROT_SIZEOF_VOID_P=4 -DBINPROT_HAS_HEADER
-libsgen_grep_binprot64p_a_SOURCES = sgen-grep-binprot.c
+libsgen_grep_binprot64p_a_SOURCES = sgen-grep-binprot.c sgen-grep-binprot.h
 libsgen_grep_binprot64p_a_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -DBINPROT_SIZEOF_VOID_P=8 -DBINPROT_HAS_HEADER
 
 sgen_grep_binprot_SOURCES = \
        sgen-grep-binprot-main.c        \
-       sgen-entry-stream.c
+       sgen-entry-stream.c     \
+       sgen-entry-stream.h
 
 sgen_grep_binprot_LDADD = \
        $(GLIB_LIBS) $(LIBICONV) libsgen-grep-binprot.a libsgen-grep-binprot32p.a libsgen-grep-binprot64p.a
index 93251ef2bae707f156cf36eb9b132cca82ec48ff..27eb6276fadbd15d1166548a14c936d4b4928a4d 100755 (executable)
@@ -11,21 +11,25 @@ import subprocess
 
 parser = OptionParser (usage = "Usage: %prog [options] BINARY-PROTOCOL")
 parser.add_option ('--histogram', action = 'store_true', dest = 'histogram', help = "pause time histogram")
+parser.add_option ('--scatter', action = 'store_true', dest = 'scatter', help = "pause time scatterplot")
 parser.add_option ('--minor', action = 'store_true', dest = 'minor', help = "only show minor collections in histogram")
 parser.add_option ('--major', action = 'store_true', dest = 'major', help = "only show major collections in histogram")
 (options, files) = parser.parse_args ()
 
 show_histogram = False
+show_scatter = False
 show_minor = True
 show_major = True
 if options.minor:
-    show_histogram = True
     show_major = False
 if options.major:
-    show_histogram = True
     show_minor = False
 if options.histogram:
     show_histogram = True
+if options.scatter:
+    show_scatter = True
+if (options.minor or options.major) and not options.scatter:
+    show_histogram = True
 
 script_path = os.path.realpath (__file__)
 sgen_grep_path = os.path.join (os.path.dirname (script_path), 'sgen-grep-binprot')
@@ -160,14 +164,33 @@ def parse_major_gcs(data):
         event_group, i = maybe_event_group
         major_gc_events.append(event_group)
 
-if show_histogram:
+if show_histogram or show_scatter:
     bin_data_minor = []
     bin_data_both = []
     bin_data_major = []
     bin_names = []
 
+    timeline_x = []
+    timeline_y = []
+    timeline_c = []
+
     for rec in data:
         pause = rec.stop - rec.start
+
+        color = None
+        if rec.major_work:
+            if rec.minor_work:
+                color = 'purple'
+            else:
+                color = 'red' if show_major else None
+        else:
+            color = 'blue' if show_minor else None
+
+        if color:
+            timeline_x.append(rec.start)
+            timeline_y.append(pause)
+            timeline_c.append(color)
+
         for i in range(100):
             time = (1.3)**(i+6)
             prev_time = 0 if i==0 else (1.3)**(i+5)
@@ -190,18 +213,22 @@ if show_histogram:
     bin_data_both=np.array(bin_data_both)
     bin_data_major=np.array(bin_data_major)
 
-    if show_minor:
-        plt.bar(range(len(bin_data_minor)), bin_data_minor, color='blue', label="minor")  #, align='center')
-        plt.bar(range(len(bin_data_both)), bin_data_both, bottom=bin_data_minor, color='purple', label="minor & major")
-        if show_major:
-            plt.bar(range(len(bin_data_major)), bin_data_major, bottom=(bin_data_minor+bin_data_both), color='red', label="only major")
+    if show_scatter:
+        plt.scatter(timeline_x, timeline_y, c=timeline_c)
     else:
-        plt.bar(range(len(bin_data_major)), bin_data_major, color='red')
-    plt.xticks(range(len(bin_names)), bin_names)
-    plt.ylabel('Cumulative time spent in GC pauses (ms)')
-    plt.xlabel('GC pause length')
-    plt.xticks(rotation=60)
-    plt.legend(loc='upper left')
+        if show_minor:
+            plt.bar(range(len(bin_data_minor)), bin_data_minor, color='blue', label="minor")  #, align='center')
+            plt.bar(range(len(bin_data_both)), bin_data_both, bottom=bin_data_minor, color='purple', label="minor & major")
+            if show_major:
+                plt.bar(range(len(bin_data_major)), bin_data_major, bottom=(bin_data_minor+bin_data_both), color='red', label="only major")
+        else:
+            plt.bar(range(len(bin_data_both)), bin_data_both, color='purple', label="minor & major")
+            plt.bar(range(len(bin_data_major)), bin_data_major, bottom=bin_data_both, color='red')
+        plt.xticks(range(len(bin_names)), bin_names)
+        plt.ylabel('Cumulative time spent in GC pauses (ms)')
+        plt.xlabel('GC pause length')
+        plt.xticks(rotation=60)
+        plt.legend(loc='upper left')
 else:
     major_gc_event_groups = parse_major_gcs(data)