Merge pull request #3968 from BrzVlad/fix-monitor-exception
authorVlad Brezae <brezaevlad@gmail.com>
Thu, 17 Nov 2016 18:40:14 +0000 (20:40 +0200)
committerGitHub <noreply@github.com>
Thu, 17 Nov 2016 18:40:14 +0000 (20:40 +0200)
[runtime] Fix monitor exception throwing

642 files changed:
.gitmodules
acceptance-tests/SUBMODULES.json
acceptance-tests/ms-test-suite.mk
data/net_1_1/machine.config
data/net_2_0/machine.config
data/net_4_0/machine.config
data/net_4_5/machine.config
eglib/src/Makefile.am
eglib/src/gfile-unix.c
eglib/src/glib.h
eglib/src/gmisc-win32-uwp.c [new file with mode: 0644]
eglib/src/gmisc-win32.c
eglib/src/gmodule-win32-internals.h [new file with mode: 0644]
eglib/src/gmodule-win32-uwp.c [new file with mode: 0644]
eglib/src/gmodule-win32.c
eglib/src/gunicode-win32-uwp.c [new file with mode: 0644]
eglib/src/gunicode-win32.c [new file with mode: 0644]
eglib/src/gunicode.c
eglib/winconfig.h
external/bockbuild
external/linker [new submodule]
mcs/build/library.make
mcs/build/rules.make
mcs/class/Accessibility/Accessibility-net_4_x.csproj
mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng-net_4_x.csproj
mcs/class/Cscompmgd/Cscompmgd-net_4_x.csproj
mcs/class/CustomMarshalers/CustomMarshalers-net_4_x.csproj
mcs/class/Facades/Microsoft.Win32.Primitives/Facades_Microsoft.Win32.Primitives-net_4_x.csproj
mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/Facades_Microsoft.Win32.Registry.AccessControl-net_4_x.csproj
mcs/class/Facades/Microsoft.Win32.Registry/Facades_Microsoft.Win32.Registry-net_4_x.csproj
mcs/class/Facades/System.AppContext/Facades_System.AppContext-net_4_x.csproj
mcs/class/Facades/System.Collections.Concurrent/Facades_System.Collections.Concurrent-net_4_x.csproj
mcs/class/Facades/System.Collections.NonGeneric/Facades_System.Collections.NonGeneric-net_4_x.csproj
mcs/class/Facades/System.Collections.Specialized/Facades_System.Collections.Specialized-net_4_x.csproj
mcs/class/Facades/System.Collections/Facades_System.Collections-net_4_x.csproj
mcs/class/Facades/System.ComponentModel.Annotations/Facades_System.ComponentModel.Annotations-net_4_x.csproj
mcs/class/Facades/System.ComponentModel.EventBasedAsync/Facades_System.ComponentModel.EventBasedAsync-net_4_x.csproj
mcs/class/Facades/System.ComponentModel.Primitives/Facades_System.ComponentModel.Primitives-net_4_x.csproj
mcs/class/Facades/System.ComponentModel.TypeConverter/Facades_System.ComponentModel.TypeConverter-net_4_x.csproj
mcs/class/Facades/System.ComponentModel/Facades_System.ComponentModel-net_4_x.csproj
mcs/class/Facades/System.Console/Facades_System.Console-net_4_x.csproj
mcs/class/Facades/System.Data.Common/Facades_System.Data.Common-net_4_x.csproj
mcs/class/Facades/System.Data.SqlClient/Facades_System.Data.SqlClient-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Contracts/Facades_System.Diagnostics.Contracts-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Debug/Facades_System.Diagnostics.Debug-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.FileVersionInfo/Facades_System.Diagnostics.FileVersionInfo-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Process/Facades_System.Diagnostics.Process-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.StackTrace/Facades_System.Diagnostics.StackTrace-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.TextWriterTraceListener/Facades_System.Diagnostics.TextWriterTraceListener-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Tools/Facades_System.Diagnostics.Tools-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.TraceEvent/Facades_System.Diagnostics.TraceEvent-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.TraceSource/Facades_System.Diagnostics.TraceSource-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Tracing/Facades_System.Diagnostics.Tracing-net_4_x.csproj
mcs/class/Facades/System.Drawing.Primitives/Facades_System.Drawing.Primitives-net_4_x.csproj
mcs/class/Facades/System.Dynamic.Runtime/Facades_System.Dynamic.Runtime-net_4_x.csproj
mcs/class/Facades/System.Globalization.Calendars/Facades_System.Globalization.Calendars-net_4_x.csproj
mcs/class/Facades/System.Globalization.Extensions/Facades_System.Globalization.Extensions-net_4_x.csproj
mcs/class/Facades/System.Globalization/Facades_System.Globalization-net_4_x.csproj
mcs/class/Facades/System.IO.Compression.ZipFile/Facades_System.IO.Compression.ZipFile-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem.AccessControl/Facades_System.IO.FileSystem.AccessControl-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem.DriveInfo/Facades_System.IO.FileSystem.DriveInfo-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem.Primitives/Facades_System.IO.FileSystem.Primitives-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem.Watcher/Facades_System.IO.FileSystem.Watcher-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem/Facades_System.IO.FileSystem-net_4_x.csproj
mcs/class/Facades/System.IO.IsolatedStorage/Facades_System.IO.IsolatedStorage-net_4_x.csproj
mcs/class/Facades/System.IO.MemoryMappedFiles/Facades_System.IO.MemoryMappedFiles-net_4_x.csproj
mcs/class/Facades/System.IO.Pipes/Facades_System.IO.Pipes-net_4_x.csproj
mcs/class/Facades/System.IO.UnmanagedMemoryStream/Facades_System.IO.UnmanagedMemoryStream-net_4_x.csproj
mcs/class/Facades/System.IO/Facades_System.IO-net_4_x.csproj
mcs/class/Facades/System.Linq.Expressions/Facades_System.Linq.Expressions-net_4_x.csproj
mcs/class/Facades/System.Linq.Parallel/Facades_System.Linq.Parallel-net_4_x.csproj
mcs/class/Facades/System.Linq.Queryable/Facades_System.Linq.Queryable-net_4_x.csproj
mcs/class/Facades/System.Linq/Facades_System.Linq-net_4_x.csproj
mcs/class/Facades/System.Net.AuthenticationManager/Facades_System.Net.AuthenticationManager-net_4_x.csproj
mcs/class/Facades/System.Net.Cache/Facades_System.Net.Cache-net_4_x.csproj
mcs/class/Facades/System.Net.HttpListener/Facades_System.Net.HttpListener-net_4_x.csproj
mcs/class/Facades/System.Net.Mail/Facades_System.Net.Mail-net_4_x.csproj
mcs/class/Facades/System.Net.NameResolution/Facades_System.Net.NameResolution-net_4_x.csproj
mcs/class/Facades/System.Net.NetworkInformation/Facades_System.Net.NetworkInformation-net_4_x.csproj
mcs/class/Facades/System.Net.Primitives/Facades_System.Net.Primitives-net_4_x.csproj
mcs/class/Facades/System.Net.Requests/Facades_System.Net.Requests-net_4_x.csproj
mcs/class/Facades/System.Net.Security/Facades_System.Net.Security-net_4_x.csproj
mcs/class/Facades/System.Net.ServicePoint/Facades_System.Net.ServicePoint-net_4_x.csproj
mcs/class/Facades/System.Net.Sockets/Facades_System.Net.Sockets-net_4_x.csproj
mcs/class/Facades/System.Net.Utilities/Facades_System.Net.Utilities-net_4_x.csproj
mcs/class/Facades/System.Net.WebHeaderCollection/Facades_System.Net.WebHeaderCollection-net_4_x.csproj
mcs/class/Facades/System.Net.WebSockets.Client/Facades_System.Net.WebSockets.Client-net_4_x.csproj
mcs/class/Facades/System.Net.WebSockets/Facades_System.Net.WebSockets-net_4_x.csproj
mcs/class/Facades/System.ObjectModel/Facades_System.ObjectModel-net_4_x.csproj
mcs/class/Facades/System.Reflection.Emit.ILGeneration/Facades_System.Reflection.Emit.ILGeneration-net_4_x.csproj
mcs/class/Facades/System.Reflection.Emit.Lightweight/Facades_System.Reflection.Emit.Lightweight-net_4_x.csproj
mcs/class/Facades/System.Reflection.Emit/Facades_System.Reflection.Emit-net_4_x.csproj
mcs/class/Facades/System.Reflection.Extensions/Facades_System.Reflection.Extensions-net_4_x.csproj
mcs/class/Facades/System.Reflection.Primitives/Facades_System.Reflection.Primitives-net_4_x.csproj
mcs/class/Facades/System.Reflection.TypeExtensions/Facades_System.Reflection.TypeExtensions-net_4_x.csproj
mcs/class/Facades/System.Reflection/Facades_System.Reflection-net_4_x.csproj
mcs/class/Facades/System.Resources.ReaderWriter/Facades_System.Resources.ReaderWriter-net_4_x.csproj
mcs/class/Facades/System.Resources.ResourceManager/Facades_System.Resources.ResourceManager-net_4_x.csproj
mcs/class/Facades/System.Runtime.CompilerServices.VisualC/Facades_System.Runtime.CompilerServices.VisualC-net_4_x.csproj
mcs/class/Facades/System.Runtime.Extensions/Facades_System.Runtime.Extensions-net_4_x.csproj
mcs/class/Facades/System.Runtime.Handles/Facades_System.Runtime.Handles-net_4_x.csproj
mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/Facades_System.Runtime.InteropServices.WindowsRuntime-net_4_x.csproj
mcs/class/Facades/System.Runtime.InteropServices/Facades_System.Runtime.InteropServices-net_4_x.csproj
mcs/class/Facades/System.Runtime.Numerics/Facades_System.Runtime.Numerics-net_4_x.csproj
mcs/class/Facades/System.Runtime.Serialization.Json/Facades_System.Runtime.Serialization.Json-net_4_x.csproj
mcs/class/Facades/System.Runtime.Serialization.Primitives/Facades_System.Runtime.Serialization.Primitives-net_4_x.csproj
mcs/class/Facades/System.Runtime.Serialization.Xml/Facades_System.Runtime.Serialization.Xml-net_4_x.csproj
mcs/class/Facades/System.Runtime/Facades_System.Runtime-net_4_x.csproj
mcs/class/Facades/System.Security.AccessControl/Facades_System.Security.AccessControl-net_4_x.csproj
mcs/class/Facades/System.Security.Claims/Facades_System.Security.Claims-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.DeriveBytes/Facades_System.Security.Cryptography.DeriveBytes-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encoding/Facades_System.Security.Cryptography.Encoding-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encryption.Aes/Facades_System.Security.Cryptography.Encryption.Aes-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encryption.ECDiffieHellman/Facades_System.Security.Cryptography.Encryption.ECDiffieHellman-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encryption.ECDsa/Facades_System.Security.Cryptography.Encryption.ECDsa-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encryption/Facades_System.Security.Cryptography.Encryption-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Hashing.Algorithms/Facades_System.Security.Cryptography.Hashing.Algorithms-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Hashing/Facades_System.Security.Cryptography.Hashing-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Primitives/Facades_System.Security.Cryptography.Primitives-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.ProtectedData/Facades_System.Security.Cryptography.ProtectedData-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.RSA/Facades_System.Security.Cryptography.RSA-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.RandomNumberGenerator/Facades_System.Security.Cryptography.RandomNumberGenerator-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.X509Certificates/Facades_System.Security.Cryptography.X509Certificates-net_4_x.csproj
mcs/class/Facades/System.Security.Principal.Windows/Facades_System.Security.Principal.Windows-net_4_x.csproj
mcs/class/Facades/System.Security.Principal/Facades_System.Security.Principal-net_4_x.csproj
mcs/class/Facades/System.Security.SecureString/Facades_System.Security.SecureString-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.Duplex/Facades_System.ServiceModel.Duplex-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.Http/Facades_System.ServiceModel.Http-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.NetTcp/Facades_System.ServiceModel.NetTcp-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.Primitives/Facades_System.ServiceModel.Primitives-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.Security/Facades_System.ServiceModel.Security-net_4_x.csproj
mcs/class/Facades/System.ServiceProcess.ServiceController/Facades_System.ServiceProcess.ServiceController-net_4_x.csproj
mcs/class/Facades/System.Text.Encoding.CodePages/Facades_System.Text.Encoding.CodePages-net_4_x.csproj
mcs/class/Facades/System.Text.Encoding.Extensions/Facades_System.Text.Encoding.Extensions-net_4_x.csproj
mcs/class/Facades/System.Text.Encoding/Facades_System.Text.Encoding-net_4_x.csproj
mcs/class/Facades/System.Text.RegularExpressions/Facades_System.Text.RegularExpressions-net_4_x.csproj
mcs/class/Facades/System.Threading.AccessControl/Facades_System.Threading.AccessControl-net_4_x.csproj
mcs/class/Facades/System.Threading.Overlapped/Facades_System.Threading.Overlapped-net_4_x.csproj
mcs/class/Facades/System.Threading.Tasks.Parallel/Facades_System.Threading.Tasks.Parallel-net_4_x.csproj
mcs/class/Facades/System.Threading.Tasks/Facades_System.Threading.Tasks-net_4_x.csproj
mcs/class/Facades/System.Threading.Thread/Facades_System.Threading.Thread-net_4_x.csproj
mcs/class/Facades/System.Threading.ThreadPool/Facades_System.Threading.ThreadPool-net_4_x.csproj
mcs/class/Facades/System.Threading.Timer/Facades_System.Threading.Timer-net_4_x.csproj
mcs/class/Facades/System.Threading/Facades_System.Threading-net_4_x.csproj
mcs/class/Facades/System.Xml.ReaderWriter/Facades_System.Xml.ReaderWriter-net_4_x.csproj
mcs/class/Facades/System.Xml.XDocument/Facades_System.Xml.XDocument-net_4_x.csproj
mcs/class/Facades/System.Xml.XPath.XDocument/Facades_System.Xml.XPath.XDocument-net_4_x.csproj
mcs/class/Facades/System.Xml.XPath/Facades_System.Xml.XPath-net_4_x.csproj
mcs/class/Facades/System.Xml.XmlDocument/Facades_System.Xml.XmlDocument-net_4_x.csproj
mcs/class/Facades/System.Xml.XmlSerializer/Facades_System.Xml.XmlSerializer-net_4_x.csproj
mcs/class/Facades/System.Xml.Xsl.Primitives/Facades_System.Xml.Xsl.Primitives-net_4_x.csproj
mcs/class/I18N/CJK/I18N.CJK-net_4_x.csproj
mcs/class/I18N/Common/I18N-net_4_x.csproj
mcs/class/I18N/MidEast/I18N.MidEast-net_4_x.csproj
mcs/class/I18N/Other/I18N.Other-net_4_x.csproj
mcs/class/I18N/Rare/I18N.Rare-net_4_x.csproj
mcs/class/I18N/West/I18N.West-net_4_x.csproj
mcs/class/IBM.Data.DB2/IBM.Data.DB2-net_4_x.csproj
mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib-net_4_x.csproj
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItem.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_x.csproj
mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework-net_4_x.csproj
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks-net_4_x.csproj
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities-net_4_x.csproj
mcs/class/Microsoft.Build/Microsoft.Build-net_4_x.csproj
mcs/class/Microsoft.CSharp/Microsoft.CSharp-net_4_x.csproj
mcs/class/Microsoft.VisualC/Microsoft.VisualC-net_4_x.csproj
mcs/class/Microsoft.Web.Infrastructure/Microsoft.Web.Infrastructure-net_4_x.csproj
mcs/class/Mono.Btls.Interface/Mono.Btls.Interface-net_4_x.csproj
mcs/class/Mono.C5/Mono.C5-net_4_x.csproj
mcs/class/Mono.CSharp/Mono.CSharp-net_4_x.csproj
mcs/class/Mono.Cairo/Mono.Cairo-net_4_x.csproj
mcs/class/Mono.Cecil.Mdb/Mono.Cecil.Mdb-net_4_x.csproj
mcs/class/Mono.CodeContracts/Mono.CodeContracts-net_4_x.csproj
mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter-net_4_x.csproj
mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite-net_4_x.csproj
mcs/class/Mono.Data.Tds/Mono.Data.Tds-net_4_x.csproj
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft-net_4_x.csproj
mcs/class/Mono.Http/Mono.Http-net_4_x.csproj
mcs/class/Mono.Management/Mono.Management-net_4_x.csproj
mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ-net_4_x.csproj
mcs/class/Mono.Messaging/Mono.Messaging-net_4_x.csproj
mcs/class/Mono.Options/Mono.Options-net_4_x.csproj
mcs/class/Mono.Parallel/Mono.Parallel-net_4_x.csproj
mcs/class/Mono.Posix/Mono.Posix-net_4_x.csproj
mcs/class/Mono.Posix/Mono.Unix.Native/Stdlib.cs
mcs/class/Mono.Posix/Mono.Unix/StdioFileStream.cs
mcs/class/Mono.Security.Win32/Mono.Security.Win32-net_4_x.csproj
mcs/class/Mono.Security/Mono.Security-net_4_x.csproj
mcs/class/Mono.Simd/Mono.Simd-net_4_x.csproj
mcs/class/Mono.Tasklets/Mono.Tasklets-net_4_x.csproj
mcs/class/Mono.WebBrowser/Mono.WebBrowser-net_4_x.csproj
mcs/class/Mono.XBuild.Tasks/Mono.XBuild.Tasks-net_4_x.csproj
mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_x.csproj
mcs/class/PEAPI/PEAPI-net_4_x.csproj
mcs/class/RabbitMQ.Client/src/apigen/RabbitMQ.Client.Apigen-net_4_x.csproj
mcs/class/RabbitMQ.Client/src/client/RabbitMQ.Client-net_4_x.csproj
mcs/class/SMDiagnostics/SMDiagnostics-net_4_x.csproj
mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition-net_4_x.csproj
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_x.csproj
mcs/class/System.Configuration.Install/System.Configuration.Install-net_4_x.csproj
mcs/class/System.Configuration/System.Configuration-net_4_x.csproj
mcs/class/System.Core/System.Core-net_4_x.csproj
mcs/class/System.Core/System.Core-plaincore-net_4_x.csproj
mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions-net_4_x.csproj
mcs/class/System.Data.Entity/System.Data.Entity-net_4_x.csproj
mcs/class/System.Data.Linq/System.Data.Linq-net_4_x.csproj
mcs/class/System.Data.OracleClient/System.Data.OracleClient-net_4_x.csproj
mcs/class/System.Data.Services.Client/System.Data.Services.Client-net_4_x.csproj
mcs/class/System.Data.Services/System.Data.Services-net_4_x.csproj
mcs/class/System.Data/System.Data-net_4_x.csproj
mcs/class/System.Deployment/System.Deployment-net_4_x.csproj
mcs/class/System.Design/System.Design-net_4_x.csproj
mcs/class/System.Design/System.Design-plaindesign-net_4_x.csproj
mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols-net_4_x.csproj
mcs/class/System.DirectoryServices/System.DirectoryServices-net_4_x.csproj
mcs/class/System.Drawing.Design/System.Drawing.Design-net_4_x.csproj
mcs/class/System.Drawing/System.Drawing-net_4_x.csproj
mcs/class/System.Dynamic/System.Dynamic-net_4_x.csproj
mcs/class/System.EnterpriseServices/System.EnterpriseServices-net_4_x.csproj
mcs/class/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem-net_4_x.csproj
mcs/class/System.IO.Compression/System.IO.Compression-net_4_x.csproj
mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors-net_4_x.csproj
mcs/class/System.IdentityModel/System.IdentityModel-net_4_x.csproj
mcs/class/System.Json.Microsoft/System.Json.Microsoft-net_4_x.csproj
mcs/class/System.Json/System.Json-net_4_x.csproj
mcs/class/System.Management/System.Management-net_4_x.csproj
mcs/class/System.Messaging/System.Messaging-net_4_x.csproj
mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_x.csproj
mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest-net_4_x.csproj
mcs/class/System.Net.Http/System.Net.Http-net_4_x.csproj
mcs/class/System.Net/System.Net-net_4_x.csproj
mcs/class/System.Numerics.Vectors/System.Numerics.Vectors-net_4_x.csproj
mcs/class/System.Numerics/System.Numerics-net_4_x.csproj
mcs/class/System.Reactive.Core/System.Reactive.Core-net_4_x.csproj
mcs/class/System.Reactive.Debugger/System.Reactive.Debugger-net_4_x.csproj
mcs/class/System.Reactive.Experimental/System.Reactive.Experimental-net_4_x.csproj
mcs/class/System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_x.csproj
mcs/class/System.Reactive.Linq/System.Reactive.Linq-net_4_x.csproj
mcs/class/System.Reactive.Observable.Aliases/System.Reactive.Observable.Aliases-net_4_x.csproj
mcs/class/System.Reactive.PlatformServices/System.Reactive.PlatformServices-net_4_x.csproj
mcs/class/System.Reactive.Providers/System.Reactive.Providers-net_4_x.csproj
mcs/class/System.Reactive.Runtime.Remoting/System.Reactive.Runtime.Remoting-net_4_x.csproj
mcs/class/System.Reactive.Windows.Forms/System.Reactive.Windows.Forms-net_4_x.csproj
mcs/class/System.Reactive.Windows.Threading/System.Reactive.Windows.Threading-net_4_x.csproj
mcs/class/System.Reflection.Context/System.Reflection.Context-net_4_x.csproj
mcs/class/System.Runtime.Caching/System.Runtime.Caching-net_4_x.csproj
mcs/class/System.Runtime.DurableInstancing/System.Runtime.DurableInstancing-net_4_x.csproj
mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices.RuntimeInformation-net_4_x.csproj
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting-net_4_x.csproj
mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap-net_4_x.csproj
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization-net_4_x.csproj
mcs/class/System.Security/System.Security-net_4_x.csproj
mcs/class/System.ServiceModel.Activation/System.ServiceModel.Activation-net_4_x.csproj
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery-net_4_x.csproj
mcs/class/System.ServiceModel.Internals/System.ServiceModel.Internals-net_4_x.csproj
mcs/class/System.ServiceModel.Routing/System.ServiceModel.Routing-net_4_x.csproj
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web-net_4_x.csproj
mcs/class/System.ServiceModel/System.ServiceModel-net_4_x.csproj
mcs/class/System.ServiceModel/System.ServiceModel-plainservice-net_4_x.csproj
mcs/class/System.ServiceProcess/System.ServiceProcess-net_4_x.csproj
mcs/class/System.ServiceProcess/System.ServiceProcess/Win32ServiceController.cs
mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerTest.cs
mcs/class/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow-net_4_x.csproj
mcs/class/System.Transactions/System.Transactions-net_4_x.csproj
mcs/class/System.Web.Abstractions/System.Web.Abstractions-net_4_x.csproj
mcs/class/System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_x.csproj
mcs/class/System.Web.DynamicData/System.Web.DynamicData-net_4_x.csproj
mcs/class/System.Web.Extensions.Design/System.Web.Extensions.Design-net_4_x.csproj
mcs/class/System.Web.Extensions/System.Web.Extensions-net_4_x.csproj
mcs/class/System.Web.Http.SelfHost/System.Web.Http.SelfHost-net_4_x.csproj
mcs/class/System.Web.Http.WebHost/System.Web.Http.WebHost-net_4_x.csproj
mcs/class/System.Web.Http/System.Web.Http-net_4_x.csproj
mcs/class/System.Web.Mobile/System.Web.Mobile-net_4_x.csproj
mcs/class/System.Web.Mvc3/System.Web.Mvc3-net_4_x.csproj
mcs/class/System.Web.Razor/System.Web.Razor-net_4_x.csproj
mcs/class/System.Web.RegularExpressions/System.Web.RegularExpressions-net_4_x.csproj
mcs/class/System.Web.Routing/System.Web.Routing-net_4_x.csproj
mcs/class/System.Web.Services/System.Web.Services-net_4_x.csproj
mcs/class/System.Web.WebPages.Deployment/System.Web.WebPages.Deployment-net_4_x.csproj
mcs/class/System.Web.WebPages.Razor/System.Web.WebPages.Razor-net_4_x.csproj
mcs/class/System.Web.WebPages/System.Web.WebPages-net_4_x.csproj
mcs/class/System.Web/System.Web-net_4_x.csproj
mcs/class/System.Web/System.Web-plainweb-net_4_x.csproj
mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization-net_4_x.csproj
mcs/class/System.Windows.Forms/System.Windows.Forms-net_4_x.csproj
mcs/class/System.Windows/System.Windows-net_4_x.csproj
mcs/class/System.Workflow.Activities/System.Workflow.Activities-net_4_x.csproj
mcs/class/System.Workflow.ComponentModel/System.Workflow.ComponentModel-net_4_x.csproj
mcs/class/System.Workflow.Runtime/System.Workflow.Runtime-net_4_x.csproj
mcs/class/System.XML/System.Xml-bare-net_4_x.csproj
mcs/class/System.XML/System.Xml-net_4_x.csproj
mcs/class/System.XML/System.Xml.Serialization/TypeData.cs
mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs
mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs
mcs/class/System.Xaml/System.Xaml-net_4_x.csproj
mcs/class/System.Xml.Linq/System.Xml.Linq-net_4_x.csproj
mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
mcs/class/System.Xml.Serialization/System.Xml.Serialization-net_4_x.csproj
mcs/class/System/Mono.Btls/MonoBtlsContext.cs
mcs/class/System/Mono.Btls/MonoBtlsSsl.cs
mcs/class/System/Mono.Net.Security/MobileTlsContext.cs
mcs/class/System/System-bare-net_4_x.csproj
mcs/class/System/System-net_4_x.csproj
mcs/class/System/System-secxml-net_4_x.csproj
mcs/class/System/System.Net.NetworkInformation/IPInterfaceProperties.cs
mcs/class/System/System.Net.NetworkInformation/UnicastIPAddressInformation.cs
mcs/class/SystemWebTestShim/SystemWebTestShim-net_4_x.csproj
mcs/class/WebMatrix.Data/WebMatrix.Data-net_4_x.csproj
mcs/class/WindowsBase/WindowsBase-net_4_x.csproj
mcs/class/aot-compiler/Makefile
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
mcs/class/corlib/System.Security.Cryptography/IncrementalHash.cs
mcs/class/corlib/corlib-net_4_x.csproj
mcs/class/legacy/Mono.Cecil/Mono.Cecil-net_4_x.csproj
mcs/class/monodoc/monodoc-net_4_x.csproj
mcs/ilasm/ilasm-net_4_x.csproj
mcs/mcs/ecore.cs
mcs/mcs/mcs-net_4_x.csproj
mcs/mcs/membercache.cs
mcs/nunit24/ClientUtilities/util/nunit.util-net_4_x.csproj
mcs/nunit24/ConsoleRunner/nunit-console-exe/Class1.cs
mcs/nunit24/ConsoleRunner/nunit-console-exe/nunit-console-net_4_x.csproj
mcs/nunit24/ConsoleRunner/nunit-console/nunit-console-runner-net_4_x.csproj
mcs/nunit24/NUnitCore/core/nunit.core-net_4_x.csproj
mcs/nunit24/NUnitCore/interfaces/nunit.core.interfaces-net_4_x.csproj
mcs/nunit24/NUnitExtensions/core/nunit.core.extensions-net_4_x.csproj
mcs/nunit24/NUnitExtensions/framework/nunit.framework.extensions-net_4_x.csproj
mcs/nunit24/NUnitFramework/framework/NUnit.Framework-net_4_x.csproj
mcs/nunit24/NUnitFramework/framework/TestFixtureAttribute.cs
mcs/nunit24/NUnitMocks/mocks/nunit.mocks-net_4_x.csproj
mcs/tests/gtest-640.cs [new file with mode: 0644]
mcs/tests/gtest-optional-40.cs [new file with mode: 0644]
mcs/tests/ver-il-net_4_x.xml
mcs/tools/Makefile
mcs/tools/al/al-net_4_x.csproj
mcs/tools/browsercaps-updater/browsercaps-updater-net_4_x.csproj
mcs/tools/btls/btls-cert-sync-net_4_x.csproj
mcs/tools/cccheck/cccheck-net_4_x.csproj
mcs/tools/ccrewrite/ccrewrite-net_4_x.csproj
mcs/tools/cil-stringreplacer/cil-stringreplacer-net_4_x.csproj
mcs/tools/cil-strip/mono-cil-strip-net_4_x.csproj
mcs/tools/commoncryptogenerator/commoncryptogenerator-net_4_x.csproj
mcs/tools/compiler-tester/compiler-tester-net_4_x.csproj
mcs/tools/corcompare/mono-api-info-net_4_x.csproj
mcs/tools/csharp/csharp-net_4_x.csproj
mcs/tools/culevel/culevel-net_4_x.csproj
mcs/tools/disco/disco-net_4_x.csproj
mcs/tools/dtd2rng/dtd2rng-net_4_x.csproj
mcs/tools/dtd2xsd/dtd2xsd-net_4_x.csproj
mcs/tools/gacutil/gacutil-net_4_x.csproj
mcs/tools/genxs/genxs-net_4_x.csproj
mcs/tools/ictool/ictool-net_4_x.csproj
mcs/tools/ikdasm/ikdasm-net_4_x.csproj
mcs/tools/installutil/installutil-net_4_x.csproj
mcs/tools/installvst/installvst-net_4_x.csproj
mcs/tools/lc/lc-net_4_x.csproj
mcs/tools/linker-analyzer/linkeranalyzer-net_4_x.csproj
mcs/tools/linker/AUTHORS [deleted file]
mcs/tools/linker/MIT.X11 [deleted file]
mcs/tools/linker/Mono.Linker.Steps/BaseStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/BlacklistStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/CleanStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/IStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/LoadI18nAssemblies.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/LoadReferencesStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/OutputStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/RegenerateGuidStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/ResolveFromAssemblyStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/ResolveFromXApiStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/ResolveFromXmlStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/ResolveStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs [deleted file]
mcs/tools/linker/Mono.Linker.csproj [deleted file]
mcs/tools/linker/Mono.Linker/Annotations.cs [deleted file]
mcs/tools/linker/Mono.Linker/AssemblyAction.cs [deleted file]
mcs/tools/linker/Mono.Linker/AssemblyInfo.cs [deleted file]
mcs/tools/linker/Mono.Linker/AssemblyResolver.cs [deleted file]
mcs/tools/linker/Mono.Linker/Driver.cs [deleted file]
mcs/tools/linker/Mono.Linker/I18nAssemblies.cs [deleted file]
mcs/tools/linker/Mono.Linker/IXApiVisitor.cs [deleted file]
mcs/tools/linker/Mono.Linker/LinkContext.cs [deleted file]
mcs/tools/linker/Mono.Linker/MethodAction.cs [deleted file]
mcs/tools/linker/Mono.Linker/Pipeline.cs [deleted file]
mcs/tools/linker/Mono.Linker/TypePreserve.cs [deleted file]
mcs/tools/linker/Mono.Linker/XApiReader.cs [deleted file]
mcs/tools/linker/README [deleted file]
mcs/tools/linker/Tests/Libs/nunit-console-runner.dll [deleted file]
mcs/tools/linker/Tests/Libs/nunit-console.exe [deleted file]
mcs/tools/linker/Tests/Libs/nunit-console.exe.config [deleted file]
mcs/tools/linker/Tests/Libs/nunit.core.dll [deleted file]
mcs/tools/linker/Tests/Libs/nunit.framework.dll [deleted file]
mcs/tools/linker/Tests/Libs/nunit.util.dll [deleted file]
mcs/tools/linker/Tests/Makefile [deleted file]
mcs/tools/linker/Tests/Mono.Linker.Tests.csproj [deleted file]
mcs/tools/linker/Tests/Mono.Linker.Tests/AbstractLinkingTestFixture.cs [deleted file]
mcs/tools/linker/Tests/Mono.Linker.Tests/AbstractTestFixture.cs [deleted file]
mcs/tools/linker/Tests/Mono.Linker.Tests/AssemblyInfo.cs [deleted file]
mcs/tools/linker/Tests/Mono.Linker.Tests/AssemblyLinkingTestFixture.cs [deleted file]
mcs/tools/linker/Tests/Mono.Linker.Tests/IntegrationTestFixture.cs [deleted file]
mcs/tools/linker/Tests/Mono.Linker.Tests/XmlLinkingTestFixture.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Integration/Crypto/Test.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Integration/Crypto/Test.exe [deleted file]
mcs/tools/linker/Tests/TestCases/Integration/HelloWorld/Test.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Integration/HelloWorld/Test.exe [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Generics/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Generics/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Generics/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Generics/desc.xml [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Interface/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Interface/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Interface/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Interface/desc.xml [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Bar.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Bar.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Baz.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Baz.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Foo.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Foo.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/NotLinkedAttribute.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/NotLinkedAttribute.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Program.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Program.exe [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/NestedNested/desc.xml [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/desc.xml [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/LibLib.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/LibLib.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/desc.xml [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/desc.xml [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Simple/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Simple/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Simple/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Simple/Program.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/Simple/Program.exe [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/desc.xml [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Program.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Program.exe [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Library.cs [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Library.dll [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Makefile [deleted file]
mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/desc.xml [deleted file]
mcs/tools/linker/Tests/TestCases/config.make [deleted file]
mcs/tools/linker/configure [deleted file]
mcs/tools/linker/monolinker-net_4_x.csproj
mcs/tools/linker/monolinker.exe.sources
mcs/tools/linker/monolinker.in [deleted file]
mcs/tools/linker/profiler/Makefile [deleted file]
mcs/tools/linker/profiler/link.c [deleted file]
mcs/tools/linker/standalone.make [deleted file]
mcs/tools/macpack/macpack-net_4_x.csproj
mcs/tools/mconfig/mconfig-net_4_x.csproj
mcs/tools/mdbrebase/mdbrebase-net_4_x.csproj
mcs/tools/mdoc/mdoc-net_4_x.csproj
mcs/tools/mkbundle/mkbundle-net_4_x.csproj
mcs/tools/mod/mod-net_4_x.csproj
mcs/tools/mono-api-html/mono-api-html-net_4_x.csproj
mcs/tools/mono-configuration-crypto/cli/mono-configuration-crypto-net_4_x.csproj
mcs/tools/mono-configuration-crypto/lib/Mono.Configuration.Crypto-net_4_x.csproj
mcs/tools/mono-service/mono-service-net_4_x.csproj
mcs/tools/mono-shlib-cop/mono-shlib-cop-net_4_x.csproj
mcs/tools/mono-symbolicate/mono-symbolicate-net_4_x.csproj
mcs/tools/mono-xmltool/mono-xmltool-net_4_x.csproj
mcs/tools/mono-xsd/xsd-net_4_x.csproj
mcs/tools/monop/monop-net_4_x.csproj
mcs/tools/nunitreport/nunitreport-net_4_x.csproj
mcs/tools/pdb2mdb/pdb2mdb-net_4_x.csproj
mcs/tools/resgen/resgen-net_4_x.csproj
mcs/tools/sgen/sgen-net_4_x.csproj
mcs/tools/soapsuds/soapsuds-net_4_x.csproj
mcs/tools/sqlmetal/sqlmetal-net_4_x.csproj
mcs/tools/sqlsharp/sqlsharp-net_4_x.csproj
mcs/tools/svcutil/svcutil-net_4_x.csproj
mcs/tools/tuner/Makefile [deleted file]
mcs/tools/tuner/Mono.Tuner-net_4_x.csproj [deleted file]
mcs/tools/tuner/Mono.Tuner.csproj [deleted file]
mcs/tools/tuner/Mono.Tuner.dll.sources [deleted file]
mcs/tools/tuner/Mono.Tuner/AdjustVisibility.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/ApplyPreserveAttributeBase.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/CecilRocks.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/CheckVisibility.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/CustomizeActions.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/Dispatcher.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/Extensions.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/FilterAttributes.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/FixModuleFlags.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/InjectSecurityAttributes.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/MarkNSObjectsBase.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/MoonlightA11yApiMarker.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/MoonlightA11yAssemblyStep.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/MoonlightA11yDescriptorGenerator.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/MoonlightA11yProcessor.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/MoonlightA11yUsageInspectionStep.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/MoonlightAssemblyStep.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/PreserveCrypto.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/PreserveHttps.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/PreserveSoapHttpClients.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/PrintStatus.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/PrintTypeMap.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/Profile.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/RemoveAttributesBase.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/RemoveResources.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/RemoveSecurity.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/RemoveSerialization.cs [deleted file]
mcs/tools/tuner/Mono.Tuner/TunerAnnotations.cs [deleted file]
mcs/tools/tuner/MonoMac.Tuner/ApplyPreserveAttribute.cs [deleted file]
mcs/tools/tuner/MonoMac.Tuner/Extensions.cs [deleted file]
mcs/tools/tuner/MonoMac.Tuner/MarkNSObjects.cs [deleted file]
mcs/tools/tuner/MonoMac.Tuner/MethodMapInjection.cs [deleted file]
mcs/tools/tuner/MonoMac.Tuner/MonoMac.xml [deleted file]
mcs/tools/tuner/MonoMac.Tuner/MonoMacProfile.cs [deleted file]
mcs/tools/tuner/MonoMac.Tuner/RemoveSelectors.cs [deleted file]
mcs/tools/wsdl/wsdl-net_4_x.csproj
mono/btls/CMakeLists.txt
mono/btls/btls-ssl.c
mono/btls/btls-ssl.h
mono/io-layer/io.c
mono/io-layer/sockets.c
mono/metadata/Makefile.am
mono/metadata/boehm-gc.c
mono/metadata/class-accessors.c
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/console-win32-uwp.c
mono/metadata/coree-windows-uwp.c
mono/metadata/custom-attrs.c
mono/metadata/file-io-internals.h
mono/metadata/file-io-windows-uwp.c
mono/metadata/file-io.c
mono/metadata/file-mmap-windows.c
mono/metadata/icall-windows-uwp.c
mono/metadata/icall.c
mono/metadata/loader.h
mono/metadata/lock-tracer.c
mono/metadata/marshal-windows-uwp.c
mono/metadata/marshal.c
mono/metadata/metadata-internals.h
mono/metadata/metadata.c
mono/metadata/mono-endian.c
mono/metadata/mono-security-windows-uwp.c
mono/metadata/null-gc.c
mono/metadata/property-bag.c [new file with mode: 0644]
mono/metadata/property-bag.h [new file with mode: 0644]
mono/metadata/reflection.c
mono/metadata/sre-save.c
mono/metadata/sre.c
mono/metadata/threads.c
mono/metadata/w32event-unix.c
mono/metadata/w32handle-namespace.c
mono/metadata/w32handle.c
mono/metadata/w32handle.h
mono/metadata/w32mutex-unix.c
mono/metadata/w32process-win32-internals.h
mono/metadata/w32process-win32-uwp.c
mono/metadata/w32semaphore-unix.c
mono/mini/abcremoval.c
mono/mini/alias-analysis.c
mono/mini/aot-compiler.c
mono/mini/branch-opts.c
mono/mini/cpu-ppc64.md
mono/mini/decompose.c
mono/mini/dwarfwriter.c
mono/mini/graph.c
mono/mini/linear-scan.c
mono/mini/liveness.c
mono/mini/local-propagation.c
mono/mini/main.c
mono/mini/method-to-ir.c
mono/mini/mini-amd64.c
mono/mini/mini-amd64.h
mono/mini/mini-arm64.c
mono/mini/mini-runtime.c
mono/mini/mini-windows-uwp.c
mono/mini/mini.c
mono/mini/mini.h
mono/mini/ssa.c
mono/sgen/sgen-layout-stats.c
mono/tests/Makefile.am
mono/utils/Makefile.am
mono/utils/atomic.c
mono/utils/mono-compiler.h
mono/utils/mono-dl-windows-internals.h [new file with mode: 0644]
mono/utils/mono-dl-windows-uwp.c
mono/utils/mono-dl-windows.c
mono/utils/mono-dl-windows.h [deleted file]
mono/utils/mono-io-portability.c
mono/utils/mono-mmap-windows-internals.h [new file with mode: 0644]
mono/utils/mono-mmap-windows-uwp.c
mono/utils/mono-mmap-windows.c
mono/utils/mono-mmap-windows.h [deleted file]
mono/utils/mono-proclib-windows-internals.h [new file with mode: 0644]
mono/utils/mono-proclib-windows-uwp.c
mono/utils/mono-proclib-windows.h [deleted file]
mono/utils/mono-rand-windows-internals.h [new file with mode: 0644]
mono/utils/mono-rand-windows-uwp.c
mono/utils/mono-rand-windows.c
mono/utils/mono-rand-windows.h [deleted file]
mono/utils/networking-missing.c
mono/utils/os-event-unix.c
mono/utils/os-event.h
msvc/eglib.vcxproj
msvc/eglib.vcxproj.filters
msvc/libmono-static.vcxproj
msvc/libmono-static.vcxproj.filters
msvc/libmonoruntime.vcxproj
msvc/libmonoruntime.vcxproj.filters
msvc/libmonoutils.vcxproj
msvc/libmonoutils.vcxproj.filters
msvc/monoposixhelper.def
msvc/scripts/csproj.tmpl
msvc/scripts/order.xml
net_4_x.sln
scripts/ci/run-jenkins.sh
scripts/ci/run-test-default.sh
support/map.h
support/stdio.c
support/stdlib.c
tools/offsets-tool/.gitignore
tools/offsets-tool/Makefile
tools/offsets-tool/MonoAotOffsetsDumper.cs
winconfig.h

index 337fbe06c0b3ca4df54eaf18e0818d83c718667b..20d831d7e4a2c43ca89426e015f01a2a5b2de344 100644 (file)
@@ -49,3 +49,6 @@
 [submodule "external/bockbuild"]
        path = external/bockbuild
        url = git://github.com/mono/bockbuild.git
+[submodule "external/linker"]
+       path = external/linker
+       url = git://github.com/mono/linker.git
index 01faee39c981b1215ef68e84e38aa97446d09c14..9df7b8a5811328aafe3a0a58c0def29cf80ec5bb 100644 (file)
@@ -18,7 +18,7 @@
   {
     "name": "ms-test-suite", 
     "url": "git@github.com:xamarin/ms-test-suite.git", 
-    "rev": "eb7cd709549bffe170653a50805f1593d66ea81e", 
+    "rev": "55b6637eb1de61c743323ec82db1e0cadfee5b32", 
     "remote-branch": "origin/master", 
     "branch": "master", 
     "directory": "ms-test-suite"
@@ -31,4 +31,4 @@
     "branch": "master", 
     "directory": "benchmarker"
   }
-]
+]
\ No newline at end of file
index bd85bd494bd3b5e960de1e90ffc6c07330dbeb88..1516dc61db68079b727791a9af45918375955c7a 100644 (file)
@@ -1,10 +1,13 @@
-check-ms-test-suite:
+check-ms-test-suite: $(CLASS)/nunitlite.dll
        @if $(MAKE) validate-ms-test-suite RESET_VERSIONS=1; then \
-               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug -t:library -warn:1 -r:nunit.framework" && \
-               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-console.exe -nologo -exclude=MonoBug,BadTest" NUNIT_XML_RESULT=$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml || EXIT_CODE=1; \
+               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
+               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml" || EXIT_CODE=1; \
                $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug -warn:1" && \
                $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run MONO="$(RUNTIME)" || EXIT_CODE=1; \
                exit $$EXIT_CODE; \
        else \
                echo "*** [ms-test-suite] Getting the repository failed, you probably don't have access to this Xamarin-internal resource. Skipping."; \
        fi
+
+$(CLASS)/nunitlite.dll:
+       $(MAKE) -C $(mcs_topdir)/tools/nunit-lite
index 2e346ad3a88796d3edda11ca11b8ab43c96a227c..2dfec5f02035f14e40680df0e734e240e1563c44 100644 (file)
@@ -74,9 +74,6 @@
                        <add prefix="https" type="System.Net.HttpRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                        <add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                </webRequestModules>
-               <settings>
-                       <ipv6 enabled="false"/>
-               </settings>
        </system.net>
        <system.web>
                <httpHandlers>
index c6d1b2c0fa37b35bddf2a83acacd5ba879e38278..2f8090f028844be1164b5fc55788231b305a42ad 100644 (file)
                        <add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                        <add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                </webRequestModules>
-               <settings>
-                       <ipv6 enabled="false"/>
-               </settings>
        </system.net>
        
        <system.runtime.remoting>
index b98a4d3e0072addc1580372fa666ec045a5e0568..30bc2105f3afba38b6ccfc3e99991b770ea41f30 100644 (file)
                        <add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                        <add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                </webRequestModules>
-               <settings>
-                       <ipv6 enabled="false"/>
-               </settings>
        </system.net>
        
        <system.runtime.remoting>
index 8f7e56a4facce6876d87fe6238a4dbe43bed3575..df27ec4003ef4d05ecda25d5590c4139d6be7ff3 100644 (file)
                        <add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                        <add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                </webRequestModules>
-               <settings>
-                       <ipv6 enabled="false"/>
-               </settings>
        </system.net>
        
        <system.runtime.remoting>
index 1527ba26d30452bb70aa7403d6cbc1281ad5ec78..f89138ba851b49bb5ad317571536be5f3af3d632 100644 (file)
@@ -5,7 +5,7 @@ AM_CFLAGS = $(WERROR_CFLAGS)
 win_files  = \
        eglib-config.hw \
        gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
-       gmodule-win32.c gtimer-win32.c
+       gmodule-win32.c gtimer-win32.c gunicode-win32.c
 
 unix_files = \
        gdate-unix.c  gdir-unix.c  gfile-unix.c  gmisc-unix.c   \
index 4e17a089b5444b040cb92ed2562f4df52d365eb6..9c34d8756930f4fa7e898995c1d02329843f1be9 100644 (file)
@@ -78,3 +78,11 @@ g_file_test (const gchar *filename, GFileTest test)
        }
        return FALSE;
 }
+
+gchar *
+g_mkdtemp (char *tmp_template)
+{
+       char *template_copy = g_strdup (tmp_template);
+
+       return mkdtemp (template_copy);
+}
index 1bc8506310edfa9ea570c94ccbed620266ead00c..8ceec487041d6bb7c3a2a72d3f8e85cfd2ecaa78 100644 (file)
@@ -887,11 +887,7 @@ gboolean   g_file_test (const gchar *filename, GFileTest test);
 #define g_ascii_strtod strtod
 #define g_ascii_isalnum isalnum
 
-#ifdef WIN32
 gchar *g_mkdtemp (gchar *tmpl);
-#else
-#define g_mkdtemp mkdtemp
-#endif
 
 /*
  * Pattern matching
diff --git a/eglib/src/gmisc-win32-uwp.c b/eglib/src/gmisc-win32-uwp.c
new file mode 100644 (file)
index 0000000..cdf5896
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * gmisc-win32-uwp.c: UWP misc support.
+ *
+ * Copyright 2016 Microsoft
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+*/
+#include <config.h>
+#include <glib.h>
+
+#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
+#include <windows.h>
+#include <assert.h>
+
+gchar*
+g_win32_getlocale(void)
+{
+       gunichar2 buf[19];
+       gint ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO639LANGNAME, buf, 9);
+       assert (ccBuf <= 9);
+       if (ccBuf != 0) {
+               buf[ccBuf - 1] = L'-';
+               ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
+               assert (ccBuf <= 9);
+       }
+
+       // Check for GetLocaleInfoEx failure.
+       if (ccBuf == 0)
+               buf[0] = L'\0';
+
+       return u16to8 (buf);
+}
+
+#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
+
+#ifdef _MSC_VER
+// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+void __mono_win32_gmisc_win32_uwp_quiet_lnk4221(void) {}
+#endif
+#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index f9fdb668f2d89d842c411e7af76d9d4a410ccfb9..4aac0ef69460fe70c432dfb78f8fcfd2bd931f5a 100644 (file)
@@ -101,27 +101,6 @@ g_win32_getlocale(void)
        ccBuf += GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
        return g_strdup (buf);
 }
-
-#else /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
-
-gchar*
-g_win32_getlocale(void)
-{
-       gunichar2 buf[19];
-       gint ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO639LANGNAME, buf, 9);
-       assert (ccBuf <= 9);
-       if (ccBuf != 0) {
-               buf[ccBuf - 1] = L'-';
-               ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
-               assert (ccBuf <= 9);
-       }
-
-       // Check for GetLocaleInfoEx failure.
-       if (ccBuf == 0)
-               buf[0] = L'\0';
-
-       return u16to8 (buf);
-}
 #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
 
 gboolean
@@ -142,20 +121,35 @@ g_path_is_absolute (const char *filename)
        return FALSE;
 }
 
-const gchar *
-g_get_home_dir (void)
-{
-       gchar *home_dir = NULL;
-
 #if _MSC_VER && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+static gchar*
+g_get_known_folder_path (void)
+{
+       gchar *folder_path = NULL;
        PWSTR profile_path = NULL;
        HRESULT hr = SHGetKnownFolderPath (&FOLDERID_Profile, KF_FLAG_DEFAULT, NULL, &profile_path);
        if (SUCCEEDED(hr)) {
-               home_dir = u16to8 (profile_path);
+               folder_path = u16to8 (profile_path);
                CoTaskMemFree (profile_path);
        }
+
+       return folder_path;
+}
+
+#else
+
+static inline gchar *
+g_get_known_folder_path (void)
+{
+       return NULL;
+}
 #endif
 
+const gchar *
+g_get_home_dir (void)
+{
+       gchar *home_dir = g_get_known_folder_path ();
+
        if (!home_dir) {
                home_dir = (gchar *) g_getenv ("USERPROFILE");
        }
diff --git a/eglib/src/gmodule-win32-internals.h b/eglib/src/gmodule-win32-internals.h
new file mode 100644 (file)
index 0000000..d18e27f
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef __G_MODULE_WINDOWS_INTERNALS_H__
+#define __G_MODULE_WINDOWS_INTERNALS_H__
+
+#include <config.h>
+#include <glib.h>
+
+#ifdef G_OS_WIN32
+#include <gmodule.h>
+
+gpointer
+w32_find_symbol (const gchar *symbol_name);
+#endif /* G_OS_WIN32 */
+#endif /* __G_MODULE_WINDOWS_INTERNALS_H__ */
diff --git a/eglib/src/gmodule-win32-uwp.c b/eglib/src/gmodule-win32-uwp.c
new file mode 100644 (file)
index 0000000..5117e3b
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * gmodule-win32-uwp.c: UWP gmodule support.
+ *
+ * Copyright 2016 Microsoft
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+*/
+#include <config.h>
+#include <glib.h>
+
+#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
+#include <windows.h>
+#include <gmodule-win32-internals.h>
+
+gpointer
+w32_find_symbol (const gchar *symbol_name)
+{
+       g_unsupported_api ("EnumProcessModules");
+       SetLastError (ERROR_NOT_SUPPORTED);
+       return NULL;
+}
+
+const gchar *
+g_module_error (void)
+{
+       gchar *ret = NULL;
+       TCHAR buf [1024];
+       DWORD code = GetLastError ();
+
+       if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
+               code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, G_N_ELEMENTS (buf) - 1, NULL) )
+               buf[0] = TEXT('\0');
+
+       ret = u16to8 (buf);
+       return ret;
+}
+
+#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
+
+#ifdef _MSC_VER
+// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+void __mono_win32_gmodule_win32_uwp_quiet_lnk4221(void) {}
+#endif
+#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index d1dca5303eb7d174fa98c154a35901844105dd5b..72eaca32fb7d96ea29316af51ba14c61c793a570 100644 (file)
@@ -30,9 +30,9 @@
  */
 #include <config.h>
 #include <glib.h>
-#include <gmodule.h>
 #include <windows.h>
 #include <psapi.h>
+#include <gmodule-win32-internals.h>
 
 #define LIBSUFFIX ".dll"
 #define LIBPREFIX ""
@@ -70,7 +70,7 @@ g_module_open (const gchar *file, GModuleFlags flags)
 }
 
 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
-static gpointer
+gpointer
 w32_find_symbol (const gchar *symbol_name)
 {
        HMODULE *modules;
@@ -116,16 +116,6 @@ w32_find_symbol (const gchar *symbol_name)
        g_free (modules);
        return NULL;
 }
-
-#else /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
-
-static gpointer
-w32_find_symbol (const gchar *symbol_name)
-{
-       g_unsupported_api ("EnumProcessModules");
-       SetLastError (ERROR_NOT_SUPPORTED);
-       return NULL;
-}
 #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
 
 gboolean
@@ -164,34 +154,6 @@ g_module_error (void)
 
        return ret;
 }
-
-#elif G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)   /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
-
-const gchar *
-g_module_error (void)
-{
-       gchar* ret = NULL;
-       TCHAR buf[1024];
-       DWORD code = GetLastError ();
-
-       if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
-               code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, G_N_ELEMENTS(buf) - 1, NULL) )
-               buf[0] = TEXT('\0');
-
-       ret = u16to8 (buf);
-       return ret;
-}
-
-#else
-
-const gchar *
-g_module_error (void)
-{
-       g_unsupported_api ("FormatMessage");
-       SetLastError (ERROR_NOT_SUPPORTED);
-       return NULL;
-}
-
 #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
 
 gboolean
diff --git a/eglib/src/gunicode-win32-uwp.c b/eglib/src/gunicode-win32-uwp.c
new file mode 100644 (file)
index 0000000..ef36ffc
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * gunicode-win32-uwp.c: UWP unicode support.
+ *
+ * Copyright 2016 Microsoft
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+*/
+#include <config.h>
+#include <glib.h>
+
+#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
+#define CODESET 1
+#include <windows.h>
+
+extern const char *my_charset;
+static gboolean is_utf8;
+
+gboolean
+g_get_charset (G_CONST_RETURN char **charset)
+{
+       if (my_charset == NULL) {
+               static char buf [14];
+               CPINFOEXA cp_info;
+
+               GetCPInfoExA (CP_ACP, 0, &cp_info);
+               sprintf (buf, "CP%u", cp_info.CodePage);
+               my_charset = buf;
+               is_utf8 = FALSE;
+       }
+       
+       if (charset != NULL)
+               *charset = my_charset;
+
+       return is_utf8;
+}
+
+#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
+
+#ifdef _MSC_VER
+// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+void __mono_win32_gunicode_win32_uwp_quiet_lnk4221(void) {}
+#endif
+#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
diff --git a/eglib/src/gunicode-win32.c b/eglib/src/gunicode-win32.c
new file mode 100644 (file)
index 0000000..a35cfcd
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * gunicode-win32.c: Windows unicode support.
+ *
+ * Copyright 2016 Microsoft
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+*/
+#include <config.h>
+#include <glib.h>
+
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+#define CODESET 1
+#include <windows.h>
+
+extern const char *my_charset;
+static gboolean is_utf8;
+
+gboolean
+g_get_charset (G_CONST_RETURN char **charset)
+{
+       if (my_charset == NULL) {
+               static char buf [14];
+               sprintf (buf, "CP%u", GetACP ());
+               my_charset = buf;
+               is_utf8 = FALSE;
+       }
+       
+       if (charset != NULL)
+               *charset = my_charset;
+
+       return is_utf8;
+}
+
+#else /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
+
+#ifdef _MSC_VER
+// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+void __mono_win32_mono_gunicode_win32_quiet_lnk4221(void) {}
+#endif
+#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
index f979f429ff7d4306c3b4a826c2c45712d2f37af4..c1280f9b8bf287517374552620b1b3e2f87fff4d 100644 (file)
 #include <unicode-data.h>
 #include <errno.h>
 
-#if defined(_MSC_VER) || defined(G_OS_WIN32)
-/* FIXME */
-#  define CODESET 1
-#  include <windows.h>
-#else
+#ifndef G_OS_WIN32
 #    ifdef HAVE_LOCALCHARSET_H
 #       include <localcharset.h>
 #    endif
 #endif
 
-static const char *my_charset;
-static gboolean is_utf8;
+const char *my_charset;
 
 /*
  * Character set conversion
@@ -205,31 +200,8 @@ g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gs
        return res;
 }
 
-#ifdef G_OS_WIN32
-extern WINBASEAPI UINT WINAPI GetACP(void);
-gboolean
-g_get_charset (G_CONST_RETURN char **charset)
-{
-       if (my_charset == NULL) {
-               static char buf [14];
-#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-               CPINFOEXA cp_info;
-               GetCPInfoExA (CP_ACP, 0, &cp_info);
-               sprintf (buf, "CP%u", cp_info.CodePage);
-#else
-               sprintf (buf, "CP%u", GetACP ());
-#endif
-               my_charset = buf;
-               is_utf8 = FALSE;
-       }
-       
-       if (charset != NULL)
-               *charset = my_charset;
-
-       return is_utf8;
-}
-
-#else /* G_OS_WIN32 */
+#ifndef G_OS_WIN32
+static gboolean is_utf8;
 
 gboolean
 g_get_charset (G_CONST_RETURN char **charset)
index 3a64e217ef0c7a82c260e789a8ece0c13d41cc5d..238250bba05455b75186c920c11dc70efd3d983d 100755 (executable)
 #elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
        #define HAVE_CLASSIC_WINAPI_SUPPORT 0
        #define HAVE_UWP_WINAPI_SUPPORT 1
+#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
+       #error Unsupported WINAPI family
+#endif
 #else
        #define HAVE_CLASSIC_WINAPI_SUPPORT 0
        #define HAVE_UWP_WINAPI_SUPPORT 0
+#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
+       #error Unsupported WINAPI family
+#endif
 #endif
 
 #endif
index cc441a606b409159d1704d5ee78c88e06e0d5332..f42561e9ff8e60483897bb54e2191344556de94e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit cc441a606b409159d1704d5ee78c88e06e0d5332
+Subproject commit f42561e9ff8e60483897bb54e2191344556de94e
diff --git a/external/linker b/external/linker
new file mode 160000 (submodule)
index 0000000..e4d9784
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit e4d9784ac37b9ebf4757175c92bc7a3ec9fd867a
index e0c16f48e90558609352e080ed67c54f4e64b43e..e604beb8f75e5cdcf411a963970d3423f2f377c6 100644 (file)
@@ -316,8 +316,6 @@ endif
 library_CLEAN_FILES += $(PROFILE)_aot.log
 
 ifdef PLATFORM_AOT_SUFFIX
-Q_AOT=$(if $(V),,@echo "AOT     [$(PROFILE)] $(notdir $(@))";)
-
 $(the_lib)$(PLATFORM_AOT_SUFFIX): $(the_lib)
        $(Q_AOT) MONO_PATH='$(the_libdir_base)' > $(PROFILE)_$(LIBRARY_NAME)_aot.log 2>&1 $(RUNTIME) $(AOT_BUILD_FLAGS) --debug $(the_lib)
 
index d25eb35f6e8f9a3510bcb3f2fdd6c527538601b0..18e2739bb8686c2a0825af71c4b00c80fac53a49 100644 (file)
@@ -23,6 +23,7 @@ VERSION = 0.93
 Q=$(if $(V),,@)
 # echo -e "\\t" does not work on some systems, so use 5 spaces
 Q_MCS=$(if $(V),,@echo "MCS     [$(intermediate)$(PROFILE)] $(notdir $(@))";)
+Q_AOT=$(if $(V),,@echo "AOT     [$(intermediate)$(PROFILE)] $(notdir $(@))";)
 
 ifndef BUILD_TOOLS_PROFILE
 BUILD_TOOLS_PROFILE = build
@@ -163,7 +164,6 @@ STD_TARGETS = test run-test run-test-ondotnet clean install uninstall doc-update
 $(STD_TARGETS): %: do-%
 
 ifdef PLATFORM_AOT_SUFFIX
-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
@@ -174,18 +174,16 @@ do-all-aot:
 # 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))
+AOT_PROFILE_ASSEMBLIES := $(sort $(patsubst .//%,%,$(filter-out %bare% %plaincore% %secxml% %Facades% %ilasm%,$(filter %.dll %.exe,$(wildcard $(topdir)/class/lib/$(PROFILE)/*)))))
 
 # This can run in parallel
 .PHONY: aot-all-profile
-aot-all-profile: $(patsubst %,$(topdir)/class/lib/$(PROFILE)/%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_ASSEMBLIES))
+aot-all-profile: $(patsubst %,%$(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_tmp $* >> $(PROFILE)-aot.log
-       @ rm -rf $(topdir)/class/lib/$(PROFILE)/$*_bitcode_tmp
+%$(PLATFORM_AOT_SUFFIX): %
+       @ mkdir -p $*_bitcode_tmp
+       $(Q_AOT) MONO_PATH="$(dir $*)" $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS),temp-path=$*_bitcode_tmp --verbose $* > $@.aot-log
+       @ rm -rf $*_bitcode_tmp
 
 endif #ifneq ("$(wildcard $(topdir)/class/lib/$(PROFILE))","")
 
index 845a5848fef9ee1d8dd2e2d970c189bd7228e8ce..6c2d3e78933177af0d432f38c23d704a831480b4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 08e26fc92cbcfcf9ccb786a567bac855aea8c019..49b15881e839cab6fa8b19408236f3537905b209 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 93838aac814242c54952d04a5831c30a4838dc8a..4170af9dbc75aa3ecde29b204ecda5a56b64dad7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 04b96a98159707cc3a7bd51ffa06199b13a02739..9aa53511751087a1ff89825377feccb99978f4c1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index fe2088a1e888b201f19c9e9115450bb5b4f70993..d42d2f56aceb3fe7f040738faffd02922d11908b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2a7617ed84279a496b4d8be2661af2da25c1da2a..a595068c811769babbad596ace775d60fda0cda4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 71432f258587cbac65e1f329f5042849cf6fd3be..96fdc26a70b2259eb17cdd7a338d21473f68cffa 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1ec1696d4f3bd76370ea136ef079465bc1c61cbb..a1905271772d135403e2954b823faa25072bc7c5 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 79c3744a85e4684a9ab777ae9747a7e7d8934398..45a6552cf0f829a07df1c24ec823d4aa2805f3b3 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index df03b0e481ea8c6085321c9f6917266469c70f8b..00b42fe684edb27eb45129ea4ed3f28020ed906d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a3c00e1a979b06495f60a772e50b730d08d456ed..cecbabf92374825b92445c53dce1b76be5ccc42d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6a1cc99f6a4cd3eef1c1b307f058dce0b1247fa5..847b7db67153187d2b5f3a51508c08f27c577146 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 966515166d418119f87b6c6aec873ec3206a2125..2b0e3d7a0f30b760615c21f5a7b4a5a68797544c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 98e71d7655fe4083ff54397d3c1868250853ef1e..cb34e0aa7978f4e4990df8ed2ce09c62d85eea3f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index dd46e98eea72d8740f39b30710041580779a636d..c6931fd8deb2d6abb1e0fd349788face494dd397 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 0588ebb780e4f129a6d0da0183e892e1077ef9a2..4124bc5e6fd11fe432cb0df78badbf06a5f2e804 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 07dd4fb126992cb61f926ec5a181c7c63a5f96a6..5dcdc33d6fe44ca99870b389712e393ab3684ee8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b06202172a2bfb6e659a95305d4bec024ea32fd0..92f6b22bf9aa674b39eff137cfb9d54279312183 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 69def9bbbe2458bac1675754fc5c0766f76a28e8..6644d0f7dc5c5f32a6fb9792bce69ba4b817d619 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index edc7b8fe699b01d33587496eb89baf6956a1f8bf..293f05c3ee9b4585d3b4a89cab17d5e905c462fa 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8e4f486a2c48857be932025cfa09f3283da02e81..e0a1c56c40135b7e6a378f1cf84851813f85aa53 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 895379b7f20ffb5354d90e17722c7647d11474ae..66611591bff0db877014215b974941200ae48684 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2e69a33fb6997487b9b37bcce541ac44aaecadfb..2ddf7e98eb2e61df75968869bd74d42dc2b709ea 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8dd7a8481b853e4373b220f15aaceb198597c5d9..daa2f78a5ea628532d0429e35aa8cf24d549cb6b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index db4db23b4df9df58110867b215f537cdcec3f165..bd145c9ef3a49c7cfbfb812c18491788ba52d056 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b09e80bd573b763bc2aaca1356fa09188420a9b2..5508fbdf3c55c6bc81bacbc25209a6b7af7ef1f3 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d72e1ade937adb47e2b9cfc737b504eb7a32e74b..a3cfde6c2e1d0dd0f96f9f8f9b099e240f2e4cfb 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 04b6b9adcfd6ae248521b08e0f661bd6677b1f94..00aa1cf01c5438357d17733fd2f5dacae02537a3 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4ae49afc0e9fc821841b931779910eef475003d0..d8d91f90f017b2526cc02046382ee356f145c8a5 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8e7866cdebbdd3282fdca441f83e063364c299a2..14b559585dd00979f180f0341dde767e5b0f0749 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 26a60548ddde8f8f6835855efcef618c7d1681f5..2dcbe5788a6d8337f47e1ba3f7cecbf1abaff78a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1d5958c3158c58cd4de857816bceae5dca4970c6..a2700a7220645f3e64a375b1575ccea2f0f94ef1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b747686d4c5001085a2d36c8538dffdedd797ae5..d213697785c1891055288a0924d1fce6a761f3a9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6a3f8bfd5ee29d9fc252023f58f2d4146fd43cde..b7d9e785a5d485a737b7d55be5c89369aa443dc8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a6a4f30af618d6dd71404b4c92a656ca59f6283e..cc423937805497e2be25f638c22ea620ae841bb1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index c08cf3fd3bed39d36dfafd70b59379a7278caec2..12fa724778888c8e4cdab7cd86dd43477f8a45b0 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index dccdebd9f84c0e11ee09eca5d784296649000a59..f4091941d7ec1b698811c5da684188dfc0666ed6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a8b7b70e84d9a542f510f00a59810fb89900c879..04dd9296063812c09422178eba8cfb49161e2072 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9f3bcaf5af9c659c4f58febf0948b391574cf1dc..aa4e67663420a015422c5d26a7a75b7c3c1210f5 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e209498693b24eb726d345de1b1bac93f9ab8da8..034d4b0622f4ed595ff1129f9999eadd147b4e7e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 08ccb1f95a0d5db3d0f9bd575c0fe896078bbe27..d7a1c1a302e5018cdc31a7f31855d1659cf5121e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 85faf1692ae20c869f77fed3d55042c0b23b21cf..5b536287b3ce943cf6ff61a5e3a659814707e713 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 24ac01a7e84074dad62cb2e075c54365f90c17a9..837abbb60c26aa930cfd0a3a632e9e3cda475517 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 32645894fbb5478009c9c03664cbfd4fb8910921..36b10921a0430aaa0c0ae108a386abf44fb54423 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1b3f735a43dcc9bd6be2080dc3e6209686f0f6b9..d29a8e64ae8346ecc0dd9e7b0b04e61d7afb3a22 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7bc83b0720282e7f87e084ac66514122a3dbe863..405420df34294708b5bd9b8e0e15deb4c2f57c9a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5d4da853465142c00ccb057c9ef147ba6e1c95da..00be9add982011140299632de9f58ce97f6c9b64 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index c18a05cba15190bd511ae85bcf3927b121dec5ba..f2713341989018b68dc127339b547970069f10b1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 613b555874f90f15a8d68d585db845d778ecf188..22ea547e6680c6d2e4efce49e8e53e33a41bf779 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6c0aebd9f2bf47d6f7ffd6d526871806627f761a..40bcaee9233eca10e425d5024ad89a6a52c15b70 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f9fa183e77c9e43a3ab1662b1377b1499657e9c7..f65bf881df02b1d0afc8b4aee89e925e11545ef9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e677311dafbdadfdbbaf9ef0bfdedd0bffcceed8..4ae4bfd23f1d88fba1ec492b2fec697577223d35 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d6d99f4238dc896a24887611a47543999e6e8d2a..d28fccfab73c8ac4859c3bd8b0b5cc1ff04d41c9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ba50678a084d2fc33e60c06ec287029384863566..2185b99006bb59201e437ce1445cacbf53682d7f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1041cd3aef86074407b572bd882d1bc3b4f9f5d3..be4d1f8bf9920c91ca7ad3804b214b93f1f6f41d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 94ef17bbb21b3c004e5d1094c3aedb8072c74814..92978cdf378c151c9d4df0f17bf3345daa460273 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index c816242887a700736a78659a93b1cff090db6156..d9946d004caa6070dabc97be00a9ffca80e4e75c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index cc3308f21f88e5ff6d50e50128e8c0743e28e0ca..f4df4890d27c6e95c73ca291b36884cc55fe3b56 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8fb16c66c75bb39e633c178658b21085fe52f4e4..7a122c3ba3b8d1988c0a22403a67d20ddf2dcfb0 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e671aa08efa02ff0c0ab9183a01ba95c07ae40d0..39768cc784dc3efa8ff04397466b2ed5469127d4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index cbf77602dab39714d52f89326bfaa9b9e284f267..29de027958f0b48a0138fe24c7d79cc36597036a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index bea84dd5788873b3032ef3290734f676e00acd70..547a249ed6b5f9e6ce5f6c7f3d4193cb8713e0a2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ce6d13adb77c945751802e968e72ae11de4d2877..235fccd7523278f65cd4d5b7ba1412decff16c2a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f7678177902fb38078bf8e2568f786762324fd99..9c8cdc598c166650b0b2cddb23d03ede1975f567 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 40a37aeb12c38d7e253ae6f561158e3a88b04840..434cb97e887c4ef4ccefef57c6db68c7b0a1b25a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index deed21a42709d19d8888660e50a20bc6f5402565..f09b67456af2a160db77550b3c34c10d52697d29 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 35c2126075f86571082791a1ec166a8b10877c49..5c638d1138dbcc0c8ac61ef1df02b04e3e491c57 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 91adc7ebf431c18ae85c2e5c7862a773ea1fef6d..94414cdca10d7e905cf445ee8269c95e07ff4379 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4ef67c8ecb07472986eb290d16573e0d88a02ded..2414792a1bc61fbe9f88a906213e81dd3e540215 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 09ab692a66a8ac2a0da7b1d6f472dd9400ba64b4..c0fd89780ec8f608f29574874cb54b6b19593df8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9bfa6a1d6e4ac1d97257a23c5434a1f714f899b5..bb0034319643e4df5719ebeba902580eef6250eb 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e5baae2577a116d6153779c9502fedd5bfd77a8d..08fbc861da352571d3d293779d556bc6ec070a23 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5276a6875ed3e1bf08a7ab496dd7479776c5b24c..a7cea643721db6f89a1aeac92f21c893fdca99f3 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4cd416be48f8d0067cb6f4eead0a35b2e62fd6b5..9ecbd892aa52b6d0de04b7a689c5c49985f464ef 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e233a440cb7b78093b5e5ee639e88237ee4ccf93..2c33abedf3b38d1383a4e92f731936285300451f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5d7394e6a1e4f13929972770491a112e90aeb674..d8689a5402b44cce6ffa273b3adafcd0de7e61b5 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f95909bbdf1618f0051e3d0bf932fa34513a3b25..48177dcea8d87bf2feb34ffa26842b5f2026678a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 03aeae7a131f7f4290662340d8a65c39357322ac..3de001c94a3cb43ad38ea0b614101d8a35ea68fd 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b05a19aec3f3d1da7032f48ecedd0e3ff0bba83e..a5e8e4802fe78f76437c0ae27c25ecbe42909c77 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6e1d3bd39b85016b2147518c293ce688bf2e8aa2..04c6b684710b09620895846d4e81075d918bbbdb 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 74cbc371b55b6ac9a1ebaaf7cb663b3ece3a39fd..c6a5d2f2032e268f77ef453aabcd3211fb38e954 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b8f70d0fd035eadbf027f20dbaa55818422a4762..6d1e37cfb6ed0ae8470bc05a9a85dd7b8aa654f9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 68dfcfcfeb9f5c5442e59a4af36bbcc2489d6d1b..da81f5d106c1d3a06dbc0b39f38bdbe026eef4f2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3a0ce443bfe7412116fceab5b931060af1bd76ad..6fd12c8ca4b8c78dce367ed2a79a465368514e07 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 69af050fefc130349132f4e564ebd726f68e7365..d31e708ecff2553f6799b9adf887c8736777813f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6e12be8de0a53a9f8560a60b9cbed6187c874729..dbd68e93933b6bb824f84172b320dcc9a2febc78 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index c82cbb03c6377cd14418919b3e2f0668346111dc..c99535c6ea5293481042840973fe655734af2273 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index eeb8939d6552cf87dd88490abd285a987592052e..b95c6d9cc632f8d7045cbce8d833f6bcf7550064 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 96b297f3c0d7513c77064d93e12154b9ac7ba8bd..fb417c923d5c49813a96d36f6e7e7bf876295e84 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ed1146ccbfc1ee61638401cad79ecd4dcb6f1f8d..3d5217932ea9bf5bf700df83d590e675ee4eb086 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b56dd888af4dcf419eb18a7e731ad4c90f228779..71acd0d43f6ce28088072ce02608ffed2acfe1c9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f11c8143a262abf2a8b9413a0ffe9aa9bcb4951b..66c5636cbdd9160fb8351bd30c9b78cf770a2b53 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 901e93689406db2ae3f6f0b52fc5ea5ed26cc78a..935d24713c578390559eb377d78876fcb03fd594 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 80ca5e8ada054d568c9598682d7cfede06f65556..7a47f7f2c8d606f38ca65d3b4da6ceb6a95cc2f7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f1f938a8371a048619cadd3c56e0cfa48f2ef383..85ec31d33c03bea3ba88d355bc5bbf5d315a4fe4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d0f681b92b85e4fc78f15305523545d481e3a051..861c82616fcd3b315554ef572e2fac68e4c96156 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a09663524d75cc7d7cf5413e21a5c2597930a7be..71bbfb4497af5a038cad7f2e75a7556ce0bb54fe 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 199082affd9b1ae1caa63536d98131d9b07e4a48..d6fee2805006df4e073cbe74189c2f7dcf4bfc6f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index c1189dbb2b3317a95ea3d6e09ee504c8ddff5e92..996edbfafdc27e648163c31feb0dad3da16c032d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d7bb4038ee20beeecbc3f527c94f2ee4f43a90a2..aa8360ca4c583eb12e6f0ad0540351691b8492a8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1b0acb79e5d1545771f641da821e1005aa92d495..b405e5d8b5f089ada8c4049b145c2b7bde707105 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9a152577383272a78394046f90eccb27a888eff9..d0d85ae5e386308b4d8c608ae0838c0e0e9cafc2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1d82a34207583d8953f0f90897b0249598eab42c..dfa35af23b9f078d91b0c0adc0916f0928b42dc6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9de0f00e86d5da974478c7fcdf622d3ece5f0aed..36cda8836d3eb12e1166120fde3e5bee51a282b2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 03e5d43cd10cdfa5b9502ec7c01a5613548b7d1a..001b5b3e4dd2ee6e769108e0d235189f236ec172 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 31da316a1d2032ff4935b80a9033c4c8b2dfd165..c11821d4869759c887e49693aba9435ad7b66ef8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a8da1af476095477df3d76d28397d366093cb8d9..87d9672136f91d156c1e34f8f8971864baa2e757 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 209fc0aa8404accad2ceb8bedb51ee55f7a4b7cd..5650c020eec97a4018a5d064ddb91b001f24af75 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 0a81b7822053c39b483aef54af52adf25fe69fe5..414a299a75aa5791d5e0ee825ac58ee139eca783 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index eb203092a2b43f19df92eff638f2f01de8c906d1..c9170bc390e08da8d5395b5dbc3fb0d1011e7090 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index dffbbe8c6375e7a4ffed0eef85893dfce1548980..325ec1b29b57f5a24d8d76705963a537783bf573 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index fb72efbf238e7a849fb1e4f3bdae2b1bdb5ab521..e7b870a1e248c514ee26dcf2b421d6b0566a81c0 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8b835f18954846fc26276c2ef1878d144cd86c3c..e0e59c2333fc39446ada8d660edc4ec124d31ed5 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3c7f244fbfa09aab9af9d3ccb0dc23a9be3e48a1..322a7111685308d12bd57968625f9d9ae3e75478 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 09aacb0e2027d123a8d79b586bd3b007e2f7f57c..2b41fcc9c4c76fd4010044e9edf7baaab4bf242a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7fc15edf07a70dd1d7b051ce91eefc0e836a029f..0a2521ced3bfa25d9e8788997ffacec595efdd3c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 54c9f33eeaf813203e064a224e4a3bc2f830f0fc..7d9cfea31b01c4df93b7881cd74ffaecf4c4d410 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 513873e0b0449cea8a2fa6365a4b14de168fcd22..be99c95e703daeb51af81ef0bc232287bbadf14a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ef1fd27179929ea7f3ab7ca34b4c103e0271d14b..1b49810afb6af14fcd869d1c54b6a0bbadb1f04e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f4b3cb8f54101812bfa5973046b057db541de376..eff86d643a0517d00145d52578611f790d7a0047 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 581325f3c02a50c4fc6f6c9db3ba0e953fce531e..3fd99d910efbcbaa32b0dbe76b7efbb6bd68c8bc 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7c5cad4cc9dc3d59c35f58861f3e4e0ba2a3c318..3913f87471c38918d09f9476f94cc448fc7e536f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e21eb63e1cba347579f7dc163c8074ca290f4fcc..93396e1f4deaf82999de42ba16abc05f1d5aae7a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d3867b2f8f1ec5c4f259623fdadbbb1cc0bf0c11..9415690d83a602e979d12b3a19d195fec6b80ec0 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 27be070dcbd977b4866d2a70c421cba88ba25be5..142dadf2e09ff684b19725da59771ff3b6c24e01 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index cf936f4dfa01ce5646b9304c42839fb22146be2c..1b44a72f297141d071aa09f75e2b374ab413acb9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 51feef5417fa132e27f3cdd8ae8f1d0d6123ec4a..f7a9166192585803e76e73fc1b28e1cab6473623 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f5c1f0d4aced0334afd72c140051b372820f6f1e..92e86ad195c8ae6be61c3fe11a8a0656a4d8dad8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a817736b55e93da531d14363fe50106b82f5d45e..eee63365fff6f05a7bfc9ee5d189ac686f22f15b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5aab806bafb0679917aba15562d3fdd4918f734a..5aa9618abbcbcadff36fa76b46b470da31e92f19 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 075a8541cbef21c6c9a250e8475c34dd65eedf11..3cca6e37a6d2a137472748e9d9ef9e5e05677f75 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 761a2b3db35e9ce91b890ef14fde0567c731481c..4053be10d18cb08af1c8dccc70ac2bd581ed8fa7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 06777d0e19b366cb19ad273d03304b3948bd0daf..bc50dbf9f698ca94ffd3051003b8f8ab1a8f7fed 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 457d7b0e25fbdc3969157827f3db68057e0aceec..3ea76be294c91e8833cf8e7e138b20cc90ccea1b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 057e211f15af6054ee819f2164cb154baf2dddff..c911a981b714b8674a268da389c10fc669efb26b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7f4d41265e66fe490e5259b27ce7db23778c8034..c1f6ac9253dbbf42c2ec47ca11c3658867390065 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f663120bf798730223c944db359caa7873771dc5..82af83b15232988b1fd1d50b1b18e80d2bc09536 100644 (file)
@@ -226,6 +226,14 @@ namespace Microsoft.Build.BuildEngine {
                public void SetMetadata (string metadataName,
                                         string metadataValue,
                                         bool treatMetadataValueAsLiteral)
+               {
+                       SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral, false);
+               }
+
+               void SetMetadata (string metadataName,
+                                        string metadataValue,
+                                        bool treatMetadataValueAsLiteral,
+                                        bool fromDynamicItem)
                {
                        if (metadataName == null)
                                throw new ArgumentNullException ("metadataName");
@@ -251,9 +259,11 @@ namespace Microsoft.Build.BuildEngine {
                        } else if (HasParentItem) {
                                if (parent_item.child_items.Count > 1)
                                        SplitParentItem ();
-                               parent_item.SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral);
+                               parent_item.SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral, fromDynamicItem);
                        }
-                       if (FromXml || HasParentItem) {
+
+                       // We don't want to reevalute the project for dynamic items
+                       if (!fromDynamicItem && !IsDynamic && (FromXml || HasParentItem)) {
                                parent_item_group.ParentProject.MarkProjectAsDirty ();
                                parent_item_group.ParentProject.NeedToReevaluate ();
                        }
@@ -374,7 +384,7 @@ namespace Microsoft.Build.BuildEngine {
                                        continue;
                                
                                foreach (string name in evaluatedMetadata.Keys) {
-                                       item.SetMetadata (name, (string)evaluatedMetadata [name]);
+                                       item.SetMetadata (name, (string)evaluatedMetadata [name], false, IsDynamic);
                                }
 
                                AddAndRemoveMetadata (project, item);
index 33aad3dea63adebda939e6604a84411ba36560dc..b4ed8562382595c92f99c2b474a5c9ecc4043757 100644 (file)
@@ -374,10 +374,8 @@ namespace Microsoft.Build.BuildEngine {
                                return false;
 
                        ITaskItem[] outputs;
-                       if (ParentEngine.BuiltTargetsOutputByName.TryGetValue (key, out outputs)) {
-                               if (targetOutputs != null)
-                                       targetOutputs.Add (target_name, outputs);
-                       }
+                       if (targetOutputs != null && ParentEngine.BuiltTargetsOutputByName.TryGetValue (key, out outputs))
+                               targetOutputs [target_name] = outputs;
                        return true;
                }
 
index 9f0cb945b655b4819197705526ac013680bd54ba..561ece2a3d31bed76f62e44120dc40827a8d46b8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 459bb66e6d5cd3cde9d2007433d0e8aaecb1a480..d36ae158701c0db1fa8a9243e154b77e399d63bd 100644 (file)
@@ -285,6 +285,51 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
                        t [0].RemoveTask (null);
                }
 
+               [Test]
+               public void TestRunTargetTwice ()
+               {
+                       string documentString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                       <Target Name=""Foo"">
+                               <Message Text=""Foo ran""/>
+                       </Target>
+                       <Target Name=""Main"">
+                               <MSBuild Projects=""$(MSBuildProjectFile)"" Targets=""Foo;Foo"" />
+                       </Target>
+
+               </Project>";
+
+                       var filepath = Path.GetTempFileName ();
+                       try {
+                               File.WriteAllText (filepath, documentString);
+
+                               var engine = new Engine (Consts.BinPath);
+                               var project = engine.CreateNewProject ();
+                               project.Load (filepath);
+
+                               var logger = new TestMessageLogger ();
+                               engine.RegisterLogger (logger);
+
+                               var result = project.Build ("Main");
+                               if (!result) {
+                                       logger.DumpMessages ();
+                                       Assert.Fail ("Build failed, see the logs");
+                               }
+
+                               Assert.AreEqual(1, logger.NormalMessageCount, "Expected number of messages");
+                               logger.CheckLoggedMessageHead ("Foo ran", "A1");
+
+                               Assert.AreEqual(0, logger.NormalMessageCount, "Extra messages found");
+                               Assert.AreEqual(0, logger.WarningMessageCount, "Extra warning messages found");
+
+                               Assert.AreEqual(2, logger.TargetStarted, "TargetStarted count");
+                               Assert.AreEqual(2, logger.TargetFinished, "TargetFinished count");
+
+                               Assert.IsTrue (result);
+                       } finally {
+                               File.Delete (filepath);
+                       }
+               }
+
                [Test]
                public void TestTargetOutputs1 ()
                {
@@ -698,6 +743,33 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
                                </Project>", "D");
                }
 
+               [Test]
+               public void ItemGroupInsideTarget_UpdateMetadata ()
+               {
+                       ItemGroupInsideTarget (
+                               @"<Project ToolsVersion=""4.0"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <ItemGroup>
+                                               <ProjectReference Include='xyz'/>
+                                       </ItemGroup>
+
+                                       <Target Name='Main' DependsOnTargets='CreateBar'>
+                                               <Message Text='Before: $(Bar)'/>
+                                               <ItemGroup>
+                                                       <ProjectReference>
+                                                               <AdditionalProperties>A=b</AdditionalProperties>
+                                                       </ProjectReference>
+                                               </ItemGroup>
+                                               <Message Text='After: $(Bar)'/>
+                                       </Target>
+
+                                       <Target Name='CreateBar'>
+                                               <PropertyGroup>
+                                                       <Bar>Bar01</Bar>
+                                               </PropertyGroup>
+                                       </Target>
+                               </Project>", 2, "Before: Bar01", "After: Bar01");
+               }
+
                [Test]
                public void ItemGroupInsideTarget_Batching ()
                {
index 96d7dfd03ae37413f44bf5fcdb150523bd63bfb0..d79f429e9a55c79ccb2e4dd507260c64ad827f04 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e1e1697945b9a63fc04ac8552297f5854b58a4fe..3e09d9948ddde8321df983181125d8285081e1f4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 984105992aea810f6eb488ea44aab0cc7e72581e..bc6b36a67abdfdbc2ad97a9e95adf70dd1ef71d2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index cd6b46ec0fca0acc8df6920733c69e54a021473f..372afa7f5c578c8a1da9b1088db303b208f25318 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a41fd8bb3a0f43be43daacc34905efafe8272f6b..74a38e30ef22d225913d48b85867e4d95abe92be 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 79a6bc4a358b18dc736af74a19e49f4a54b8dd77..076bf42e56dd59700858ea4026fbfe59f2eaf104 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 41408f75d936f3148270a1b8f801c4ae46d2241e..8bfd05df65c2c6e9274a96fb1aa67a94a99d953f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3c4a9fd21f0c909b82bab8e2f89c54f69dd3a5b9..b141a5560fc0cec756fb511d19197e18662f216c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4212c2096c6cc4e09f382d2b0f65950b679552ac..a262391989b81b504b2ab4a0f1843ceeee11fd51 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1f6bfa31b8e889c123a5f468e31482e902aa3993..38b09b4f05f5cea62cb0244624e5378bef98f429 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 46fd8e762a4842fdde7d8fefb2a5f5f81ee6f350..23f16885730d463b2573cfdd8dc0936c8ecd49ea 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index bdedbfe2d8d2646a7b9baf1afa78a1f98607fada..80b7d1aec757556dcd1e0568cadb755890a814a1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b5b78a1ccd7e4d2802e43b84ce003e60a711abf8..a497f4b62ff89d124fd7089982132c0082e2a6bb 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index bf1742c2c893bdc2f19e32863945c1880378eaa1..7009825f298fa2e0caa78acb06527202ef39cf31 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ecfde0841c77d3dabf55514b42506b47822aa805..68b8199972c39cc9aefc7b17e324330983d236be 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 31fa4f21023ce2958e5c91395073bb24967cb015..bbd4da09f77dddfd312f823c24184f808948ba9d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5666c1f992162270969936e4ef728aed75e0c18c..5d1f3e7554654c2f96bea87b6881d6b4be780e82 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2ca9b10f3bad65c3a3e310a79e01f0f75d2907cf..e99fba0cfa4cc6e8665d84ae867b5fe14d815265 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6769331369f7e5aef16a2c305c15df1b0d130a31..2cd63b068243800bf740413c2b2d74a98a1f080d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 07983e35f214303ba057f6a4622528a51f75736b..3f75b4c374739e16afdf6f807737a91f8f359cda 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 443dbcc2ab04d7932ebdd6159ecfe94d388f9227..35d36d22cc04bfa8d2a4441c77d1d4744a57d005 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 46188abafc692fe8fab44a90cde9c654e4745f88..6269cc1d4c3fd0292b6dad0640f438fa1c0c811e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2ae4c0eb1f2d5a1c698f4c70fad2e49158b4df62..f6ff6cfff287631136bb5930dbb631a26aa09968 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index cb7699e774f9af2d4da4d1dbaea80267521c30eb..c0606e3fecdbd38e00e86531fec860a174ac67bb 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e4c34cba317f28629d885cb370e536fc3cabb29f..86cdb7126fe305d62a5283fc7bed694d3ec264b2 100644 (file)
@@ -675,7 +675,8 @@ namespace Mono.Unix.Native {
                                [MarshalAs (UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileNameMarshaler))]
                                string newpath);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_tmpfile")]
                public static extern IntPtr tmpfile ();
 
                private static object tmpnam_lock = new object ();
@@ -704,18 +705,22 @@ namespace Mono.Unix.Native {
                        }
                }
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_fclose")]
                public static extern int fclose (IntPtr stream);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_fflush")]
                public static extern int fflush (IntPtr stream);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_fopen")]
                public static extern IntPtr fopen (
                                [MarshalAs (UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileNameMarshaler))]
                                string path, string mode);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_freopen")]
                public static extern IntPtr freopen (
                                [MarshalAs (UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileNameMarshaler))]
                                string path, string mode, IntPtr stream);
@@ -741,8 +746,8 @@ namespace Mono.Unix.Native {
                        return setvbuf (stream, (IntPtr) buf, mode, size);
                }
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl,
-                               EntryPoint="fprintf")]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               EntryPoint="Mono_Posix_Stdlib_fprintf")]
                private static extern int sys_fprintf (IntPtr stream, string format, string message);
 
                public static int fprintf (IntPtr stream, string message)
@@ -846,11 +851,12 @@ namespace Mono.Unix.Native {
                 *    vsscanf(3)
                 */
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_fgetc")]
                public static extern int fgetc (IntPtr stream);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl,
-                               SetLastError=true, EntryPoint="fgets")]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_fgets")]
                private static extern IntPtr sys_fgets (StringBuilder sb, int size, IntPtr stream);
 
                public static StringBuilder fgets (StringBuilder sb, int size, IntPtr stream)
@@ -866,22 +872,28 @@ namespace Mono.Unix.Native {
                        return fgets (sb, sb.Capacity, stream);
                }
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_fputc")]
                public static extern int fputc (int c, IntPtr stream);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_fputs")]
                public static extern int fputs (string s, IntPtr stream);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
-               public static extern int getc (IntPtr stream);
+               public static int getc (IntPtr stream)
+               {
+                       return fgetc (stream);
+               }
 
                [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
                public static extern int getchar ();
 
                /* SKIP: gets(3) */
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
-               public static extern int putc (int c, IntPtr stream);
+               public static int putc (int c, IntPtr stream)
+               {
+                       return fputc (c, stream);
+               }
 
                [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
                public static extern int putchar (int c);
@@ -889,7 +901,8 @@ namespace Mono.Unix.Native {
                [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
                public static extern int puts (string s);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_ungetc")]
                public static extern int ungetc (int c, IntPtr stream);
 
                [CLSCompliant (false)]
@@ -993,10 +1006,12 @@ namespace Mono.Unix.Native {
                                SetLastError=true, EntryPoint="Mono_Posix_Stdlib_clearerr")]
                public static extern int clearerr (IntPtr stream);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_feof")]
                public static extern int feof (IntPtr stream);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               SetLastError=true, EntryPoint="Mono_Posix_Stdlib_ferror")]
                public static extern int ferror (IntPtr stream);
 
                [DllImport (MPH, CallingConvention=CallingConvention.Cdecl, 
@@ -1050,7 +1065,8 @@ namespace Mono.Unix.Native {
                                SetLastError=true, EntryPoint="Mono_Posix_Stdlib_calloc")]
                public static extern IntPtr calloc (ulong nmemb, ulong size);
 
-               [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl)]
+               [DllImport (MPH, CallingConvention=CallingConvention.Cdecl,
+                               EntryPoint="Mono_Posix_Stdlib_free")]
                public static extern void free (IntPtr ptr);
 
                // malloc(3):
index 7eed08157b0748ff075ad7bcc362aa8709d4b74a..1d0ef97e9f7e5aeb081304271e8211a586084abe 100644 (file)
@@ -60,35 +60,43 @@ namespace Mono.Unix {
 
                public StdioFileStream (string path)
                {
+                       if (path == null)
+                               throw new ArgumentNullException ("path");
                        InitStream (Fopen (path, "rb"), true);
                }
 
                public StdioFileStream (string path, string mode)
                {
+                       if (path == null)
+                               throw new ArgumentNullException ("path");
                        InitStream (Fopen (path, mode), true);
                }
 
                public StdioFileStream (string path, FileMode mode)
                {
+                       if (path == null)
+                               throw new ArgumentNullException ("path");
                        InitStream (Fopen (path, ToFopenMode (path, mode)), true);
                }
 
                public StdioFileStream (string path, FileAccess access)
                {
+                       if (path == null)
+                               throw new ArgumentNullException ("path");
                        InitStream (Fopen (path, ToFopenMode (path, access)), true);
                        InitCanReadWrite (access);
                }
 
                public StdioFileStream (string path, FileMode mode, FileAccess access)
                {
+                       if (path == null)
+                               throw new ArgumentNullException ("path");
                        InitStream (Fopen (path, ToFopenMode (path, mode, access)), true);
                        InitCanReadWrite (access);
                }
 
                private static IntPtr Fopen (string path, string mode)
                {
-                       if (path == null)
-                               throw new ArgumentNullException ("path");
                        if (path.Length == 0)
                                throw new ArgumentException ("path");
                        if (mode == null)
index aa57e2b27bc3c93f51bd535dd917a1db64225423..f1d5e78befe533293c1d0fd220be30bc5e6173b7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1be4163a2c46a5f544a70cdfca357fb73789ca0f..9c02550eca2719a40bbc41ddc41a2e60f87efb07 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6d6b92bee922c1b2e56aac554bdc485d2f52b457..e904d162f830610e267282a3cc9649c9d7f021cc 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1bce2b5be3708c8f39d5de22c9d15db817d3947b..61e1e3e6ace92929580a173f1eb78afc3049e354 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 776ef028fc49bf9d58290f75249d904cc2b3bd1c..5c5e3ef046a9f4a1fbbdae59e1345380fb86aa56 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6137f29f18371f4b9ae9f7ca588b9e75695070c4..88fb6132b1e49dccfd0ff4d13c9526ee254f471e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index c9edbef3e54917271af2f291c23b603385b852bc..85023f8c15f1c6018c15ed8ad27ab440b258a8d9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e51c82af0c27304fa53e65c97b43d93b778f9b17..512068a6a1bd2a3ac612f6c6cf8733c008a0f157 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index aee8ec025ae0790d84731fde774ab23ba25cfbde..e5d478024a1ab1578dbb3d56bd98b64ef16895e5 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ce10fe9758b560ae82e2bf194c195b97d22bc8b3..a479277657a59484fe8fa73d2cf940384e9cfef1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b803fffae2b86be78e178c95f119c093f52859fb..9172432afe18bea81497ea8196107fcd5d5905e2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6ddc1e2e4fd5571fddd940ef5cbfdccf2b028787..2ba8941c832636c91cbd2eb6472a3bbbd66c0106 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4cfe283b41373a931b90bf142755592b09a105e7..92b24b992ee80ee0b6f5f6a70a3517f547d6bb99 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9b8a501002a973e9af8c63e6b0e5204888ea7d27..2e929fdbe321bec5fd34ec06808d20130a2e6b02 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3953b0e110dcead28c612ee94a7cd2288a5d7e0e..0bfbadd5ea387f6de3a6ce8e04a1dd8ddc4fc1de 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e05da6cf2f53ca01a425e19b8d78e2599c65ca55..00322d47801c24fe02ab1c1b23e5b947f569e9e7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 65cc4052217dad1da21a3d6ab0cc2a0925745fc2..4ee13c996168fce7f282e77c01c78637b85da4c8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d6958bca3fa5761b258abc1d1121a53caeffbbc2..e47575986e7e9f076c13226d6cb355c71402a0ab 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index dc165127bd83fff5641e55be96766bd6ff5e5ee0..cc05f509439d1aafb03e8e11a557530ce857ab08 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index c0eb66afad1a05430ca9a236ad54810858110097..1a9d4ea388bea975c998dbc941705964b4de32b6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f89fb0af11754b9260be1b91e07f162fe8a4d487..092f11382bb2942f726449daee6ae36f53b4c3b2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a9e205525356c63a8688e0e26b73bd1c7bfa1fa0..29a16573c7c7a53852b64c7f53ab16dedf4a3365 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a947e731770b7816f680719a227d30d68261c328..116bd6fa73d4f4891efa67c706abaf0ef67a5bf7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 42dfed2e6c20406796ab78dd7d0732b3bed6bf71..5bb4f1f25cab109f64ef53c241349f873b26a927 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d06374c67875912395091323f3294e3eaf911ae2..ca3f827e707e55166ec49106e6854a3f8d40b4e2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ce54f69b32a40ce417170be19940088825de3096..898766badccef0d14240cd77b6e32d3b4eff420f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b059968dac2b850b55f9d2e0366bda2bc60ced82..eec7610ece0300d5774cc5a050e6c6a60198a5a6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 216ae2b7df3d669c5d55cac66d7a794cafba6da7..6174a09878fa726cb00747d9ce8f2b5a10544f92 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 97dc20d62a9e28accbc30d19ad351ee276af48f6..8ee4b099b920014dd786ec0c07c03478fc743fbb 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 37222ca58faac37434f7767328a7220075140981..a89191b814f2da54b812a595515c4175cb5b8bbb 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 938e2b01a51246c143ba4b882b83aea50bf323b7..f46f7c3a73ef629983676940537673a87286abd6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index eaacbe91d7c2b38d824282c9f12e3cec7ba9a245..263ed4b1afb20bba0a13dad1da4d54d2b99c30b4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7cc3ea8d445374f9a2776c55f496b513f888be0d..0bc9d350f98f38430added9f081f5a1543afff51 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f21ba16949c447bf5509e1e92f2b20c84d84b55b..44bcdd9a644b601bb0c17327ef0a2ac5de5399de 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2b1811484591ade28ed00bd2bac3f5d99f975122..2b43b04be5e04277894087e3f4f56b7f787aaada 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 390ff284a07aed56ad6e0b04335e9811ac6518f6..7142a657ba0e4474d444018ce9aefa8a8430fb65 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a467a2793dd760842fe2b55197f645deb92b094b..e77c915f1ff9f818b67d0eefba0fff895fcf0d63 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1756a091db0006ad40bed2e14dda5b2cb5bb9efe..f1f3da90e103829f20b8cbd9f6641361d582bb90 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ebe0749a1be533c86648018d0cb5f4eb759ee4d5..089c3056c1abf3d797cc83f9e63030c6bcb130e7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4e6ea46d7d48357746c79b0188cc1705229038d7..b41b80068cf4f41deedf1af31748004be0db3faa 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3feed2f79e2593baa2798cbd87f5b14c800c68ed..74446b38cb8bdb4e9dfeedb838ed5300c922aae4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3b027182cbe1a6520099e804504b885415eef900..48defdeb71fc94283af391573abe2b81f66842a7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8ee95a0c5a5baae247fe22719178ca78e3aa8040..2a8218cb70d7aed07e1c4662bf0dd30f04b07814 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d45e1736538a9536b7cbb468a77bf12afac5f262..f4cd00da2bf9d21ad96eedb6d03a916742cf2ae6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8cc8e04b29d645f8474fc57590eb48b918a7631a..d1b87a5741a7ad73d94d771abfa324ac1042b4e3 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7bb07efaa8b76b0731c853aaf726f87125c33b5e..622801b60a8365814dcd2b087d78be391dffbe6d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 94317ab6408f2e5b5631365c7e34ee5458bb7389..7281ba9fca9f38328b07b57aa6fff6c13dde71c8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6b0dbaca5d2ef5287cdcc5c7cf09dc835ed96a94..7140954c4c4c9f6d64b0e6b1600bf1ca7c323185 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index cb27faa61c7f5ecf6be316f69729f12156e93686..a291406715980f6b0f6b7d5cedbfa1e621bbf26a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 44760b5389103e268aa0544c480408c81be96ac8..532517ae77a9e59eedd51887c7ed04d9f817c72e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d1a1329ac13683699d8d8cb6d0e15c220a9b5114..583a3cb2ca7eb4965443e6454b7ff388673c604e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 35aef2e86f86bb56aecff367604500dbba2c2b6f..4967b9c1c5b14b51a08097b825942e6701a6b467 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d19f139fb27c2424a74f3ab628848c30cb84aadc..3f4b1fb89a7948dfca0f9b9c9ff3e0ea5accbc05 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index bff3efa656d4c93ca7ec54f4ede0af120afb63bb..1aeaee173c6aff75dc3a4ff12ae79b6600db6108 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index abb9c1df6b8b5fe136aebb21785978c94ebaefc4..49678ecfa408635cea70b94efd32c20b4e44e0b4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 428bdde1984999a6910031ddd29a6a2c0ec698c2..7268b7a376c6c433bcc17ecf88249673efcd6b98 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4aef05e14557262d5e07ae4063f80bf1c5571f8e..9b36305b41894f102020a3c696bbeddd86a4237d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3470db4220eccb36bb50eae85607b853899ffb33..d79683bf974d84f8e21ec5a6d1e1ebca2bde5fe2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9cdf129ea88c172f30b0af0359d04569cef3e3c7..41317af6c73098b5214e376da6d9ee79924f3ac0 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 62e55d55d22e900868fb842a324a9c0003225c21..52c7a97872c7bc4ff046574d9b0cc9b8eb38574a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index fc8dd7f22587e51ccb96c81ab399f0de0da76dbe..2534e9c8a83d14576ba26d0403dd848127841151 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7493504c40f9ebc6168b0757132ff71003e6033f..dda5c768626075b7f2b5d90836d039cab7016b13 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2b3eb08330ba3fe77ccdba40c2f2847a1a712a74..9a8cb2a5f9c7d30c07641f3d882218ce5284cb0c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 85b88dc5e00a44912ba51bb54e19ce4c15657417..6f52faac5a89b232d5f1801eb2223c492688f085 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 41d0ca69a6ea4845db282f30db287e3e14523797..f0198c0ada57881b59b93e2896ecf3c37369b715 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index bbe95fc7dadc08a3e4cd61aeae9a356cdffcfd99..f32de28306fa3000f2c45302b1f2b473390be16c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 872a55bc055313c5aaf13f88bb641d6b37a81af5..1431413d014ba3deae0db4135b3380f6e5da2d5c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e6c52711f482c4fa64db3d4f9438ca7c0948fe39..f487f95633cfdbdd4013dfe1292769451d91c3c5 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 80a51f65d3df310a392584ecc8d170354d12d2ed..b9c5a9d97fb4d4ed5574106a79bd0508f780e1b8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e77846e4b0f76ec871e880da362bdd2c6f664de9..b8809b9423f17e4d8fc0ab3df0d7702205def875 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6eb906063d51b7df79493908d7472c47a86541a7..037fbec4ef6b76cf8df434c49e71bb1ee84154a7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b54ee17594caf755ee9b18fbdb429247b377ee4a..9927f67bbb0eeb9767a0b1de21bb48c424ff23e2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9b138be6a040d4acc4594622cd75939cc8150feb..80ad61bc32b4a06b076de59bd87c5d935feb50d0 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5f8af6c9b30b51310a3bf1558dfa49e0cc09b028..1efcefe3f864e2966d4b225ad005e934dced8f6e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index fee6147202eec4b96a90408dce6fe7519b55cfc1..11a62dd6529ccb39aaf2717850500d883de7f0a6 100644 (file)
@@ -390,17 +390,17 @@ namespace System.ServiceProcess
                                                        throw new Win32Exception (err);
                                                }
                                        } else {
-                                               int iPtr = buffer.ToInt32 ();
+                                               IntPtr iPtr = buffer;
 
                                                services = new ServiceController [servicesReturned];
                                                for (int i = 0; i < servicesReturned; i++) {
                                                        ENUM_SERVICE_STATUS serviceStatus = (ENUM_SERVICE_STATUS) Marshal.PtrToStructure (
-                                                               new IntPtr (iPtr), typeof (ENUM_SERVICE_STATUS));
+                                                               iPtr, typeof (ENUM_SERVICE_STATUS));
                                                        // TODO: use internal ctor that takes displayname too ?
                                                        services [i] = new ServiceController (serviceStatus.pServiceName,
                                                                machineName);
                                                        // move on to the next services
-                                                       iPtr += ENUM_SERVICE_STATUS.SizeOf;
+                                                       iPtr = IntPtr.Add(iPtr, ENUM_SERVICE_STATUS.SizeOf);
                                                }
 
                                                // we're done, so exit the loop
@@ -611,17 +611,17 @@ namespace System.ServiceProcess
                                                        throw new Win32Exception (err);
                                                }
                                        } else {
-                                               int iPtr = buffer.ToInt32 ();
+                                               IntPtr iPtr = buffer;
 
                                                services = new ServiceController [servicesReturned];
                                                for (int i = 0; i < servicesReturned; i++) {
                                                        ENUM_SERVICE_STATUS_PROCESS serviceStatus = (ENUM_SERVICE_STATUS_PROCESS) Marshal.PtrToStructure (
-                                                               new IntPtr (iPtr), typeof (ENUM_SERVICE_STATUS_PROCESS));
+                                                               iPtr, typeof (ENUM_SERVICE_STATUS_PROCESS));
                                                        // TODO: use internal ctor that takes displayname too
                                                        services [i] = new ServiceController (serviceStatus.pServiceName,
                                                                machineName);
                                                        // move on to the next services
-                                                       iPtr += ENUM_SERVICE_STATUS_PROCESS.SizeOf;
+                                                       iPtr = IntPtr.Add(iPtr, ENUM_SERVICE_STATUS_PROCESS.SizeOf);
                                                }
 
                                                // we're done, so exit the loop
index 8f5b8f6000b50c1927c8e79c4b36e834fa09ca5b..9f5ae98d470b75b5c838143b69fda659de97fce2 100644 (file)
@@ -31,6 +31,7 @@
 // - Start
 
 using System;
+using System.Collections.Generic;
 using System.ComponentModel;
 using System.ServiceProcess;
 using TimeoutException = System.ServiceProcess.TimeoutException;
@@ -42,6 +43,58 @@ namespace MonoTests.System.ServiceProcess
        [TestFixture]
        public class ServiceControllerTest
        {
+               class ServiceInfo
+               {
+                       public string ServiceName;
+                       public string DisplayName;
+                       public ServiceType ServiceType = ServiceType.Win32ShareProcess;
+                       public string[] Dependents = new string[] {};
+                       public string[] DependedOn = new string[] {};
+               }
+
+               static ServiceInfo DISK_DRIVER_SERVICE = new ServiceInfo { ServiceName = "disk", DisplayName = "Disk Driver", ServiceType = ServiceType.KernelDriver };
+               static ServiceInfo ROUTING_AND_REMOTE_ACCESS_SERVICE = new ServiceInfo { ServiceName = "RemoteAccess", DisplayName = "Routing and Remote Access", DependedOn = new [] { "bfe", "http", "rasman", "rpcss" } };
+               static ServiceInfo SECONDARY_LOGON_SERVICE = new ServiceInfo { ServiceName = "seclogon", DisplayName = "Secondary Logon", Dependents = new [] { "te.service" } };
+               static ServiceInfo SECURITY_ACCOUNTS_MANAGER_SERVICE = new ServiceInfo { ServiceName = "SamSs", DisplayName = "Security Accounts Manager", Dependents = new [] { "browser", "ktmrm", "lanmanserver", "msdtc" }, DependedOn = new [] { "rpcss" } };
+               static ServiceInfo WINDOWS_IMAGE_ACQUISITION_SERVICE = new ServiceInfo { ServiceName = "stisvc", DisplayName = "Windows Image Acquisition (WIA)", ServiceType = ServiceType.Win32OwnProcess, DependedOn = new [] { "rpcss" } };
+               static ServiceInfo WINDOWS_SEARCH_SERVICE = new ServiceInfo { ServiceName = "WSearch", DisplayName = "Windows Search", ServiceType = ServiceType.Win32OwnProcess, Dependents = new [] { "wmpnetworksvc", "workfolderssvc" }, DependedOn = new [] { "rpcss" } };
+               static ServiceInfo WINDOWS_TIME_SERVICE = new ServiceInfo { ServiceName = "W32Time", DisplayName = "Windows Time" };
+               static ServiceInfo WINDOWS_UPDATE_SERVICE = new ServiceInfo { ServiceName = "wuauserv", DisplayName = "Windows Update", DependedOn = new [] { "rpcss" } };
+               static ServiceInfo WORKSTATION_SERVICE = new ServiceInfo { ServiceName = "LanmanWorkstation", DisplayName = "Workstation", Dependents = new [] { "browser", "netlogon", "sessionenv" }, DependedOn = new [] { "bowser", "mrxsmb20", "nsi" } };
+
+               // A service which is expected to be disabled by default on all supported Windows versions.
+               static ServiceInfo DISABLED_SERVICE = ROUTING_AND_REMOTE_ACCESS_SERVICE;
+               // A service which is running by default and can be stopped/paused by the current user when running with admin rights.
+               static ServiceInfo CONTROLLABLE_SERVICE = WINDOWS_IMAGE_ACQUISITION_SERVICE;
+               // A service which cannot be stopped/paused.
+               static ServiceInfo UNCONTROLLABLE_SERVICE = SECURITY_ACCOUNTS_MANAGER_SERVICE;
+               // A service with ServiceType == KernelDriver
+               static ServiceInfo KERNEL_SERVICE = DISK_DRIVER_SERVICE;
+               // A service with ServiceType == Win32ShareProcess.
+               static ServiceInfo SHARE_PROCESS_SERVICE = WORKSTATION_SERVICE;
+
+               static ServiceInfo SERVICE_1_WITH_DEPENDENTS_AND_DEPENDED_ON = SECURITY_ACCOUNTS_MANAGER_SERVICE;
+               static ServiceInfo SERVICE_2_WITH_DEPENDENTS_AND_DEPENDED_ON = WINDOWS_SEARCH_SERVICE;
+               static ServiceInfo SERVICE_3_WITH_DEPENDENTS_AND_DEPENDED_ON = WORKSTATION_SERVICE;
+
+               static ServiceInfo SERVICE_WITH_MANY_DEPENDENTS = WORKSTATION_SERVICE;
+               static ServiceInfo SERVICE_WITH_ONE_DEPENDENT = SECONDARY_LOGON_SERVICE;
+               static ServiceInfo SERVICE_WITH_NO_DEPENDENTS = WINDOWS_TIME_SERVICE;
+
+               static ServiceInfo SERVICE_WITH_MANY_DEPENDED_ON = WORKSTATION_SERVICE;
+               static ServiceInfo SERVICE_WITH_ONE_DEPENDED_ON = WINDOWS_UPDATE_SERVICE;
+               static ServiceInfo SERVICE_WITH_NO_DEPENDED_ON = WINDOWS_TIME_SERVICE;
+
+               [TestFixtureSetUp]
+               public void FixtureSetUp ()
+               {
+                       try {
+                               EnsureServiceIsRunning (new ServiceController (CONTROLLABLE_SERVICE.ServiceName));
+                       } catch {
+                               Assert.Ignore ($"Failed to start the service '{CONTROLLABLE_SERVICE.DisplayName}'. Ensure you are running the tests with admin privileges.");
+                       }
+               }
+
                [Test]
                public void Constructor1 ()
                {
@@ -164,7 +217,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("lanmanworkstation");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName);
 
                        Assert.IsTrue (sc.CanPauseAndContinue, "#A1");
                        Assert.IsTrue (sc.CanShutdown, "#B1");
@@ -175,10 +228,10 @@ namespace MonoTests.System.ServiceProcess
 
                        ServiceController [] dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#D1");
-                       Assert.IsTrue (dependentServices.Length > 1, "#D2");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.Dependents, ServiceNames (dependentServices), "#D2");
 
                        Assert.IsNotNull (sc.DisplayName, "#E1");
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#E2");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.DisplayName, sc.DisplayName, "#E2");
 
                        Assert.IsNotNull (sc.MachineName, "#F1");
                        Assert.AreEqual (".", sc.MachineName, "#F2");
@@ -186,13 +239,13 @@ namespace MonoTests.System.ServiceProcess
                        sc.Refresh ();
 
                        Assert.IsNotNull (sc.ServiceName, "#G1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#G2");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.ServiceName, sc.ServiceName, "#G2");
 
                        ServiceController [] servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#H1");
-                       Assert.AreEqual (0, servicesDependedOn.Length, "#H2");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.DependedOn, ServiceNames (servicesDependedOn), "#H2");
 
-                       Assert.AreEqual (ServiceType.Win32ShareProcess, sc.ServiceType, "#I1");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.ServiceType, sc.ServiceType, "#I1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#J1");
                }
 
@@ -219,7 +272,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("workstation");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.DisplayName);
 
                        Assert.IsTrue (sc.CanPauseAndContinue, "#A1");
                        Assert.IsTrue (sc.CanShutdown, "#B1");
@@ -249,7 +302,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("lanmanworkstation");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName);
 
                        Assert.IsTrue (sc.CanPauseAndContinue, "#A1");
                        Assert.IsTrue (sc.CanShutdown, "#B1");
@@ -262,7 +315,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("lanmanworkstation",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                Environment.MachineName);
 
                        Assert.IsTrue (sc.CanPauseAndContinue, "#A1");
@@ -274,10 +327,10 @@ namespace MonoTests.System.ServiceProcess
 
                        ServiceController [] dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#D1");
-                       Assert.IsTrue (dependentServices.Length > 1, "#D2");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.Dependents, ServiceNames (dependentServices), "#D2");
 
                        Assert.IsNotNull (sc.DisplayName, "#E1");
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#E2");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.DisplayName, sc.DisplayName, "#E2");
 
                        Assert.IsNotNull (sc.MachineName, "#F1");
                        Assert.AreEqual (Environment.MachineName, sc.MachineName, "#F2");
@@ -285,13 +338,13 @@ namespace MonoTests.System.ServiceProcess
                        sc.Refresh ();
 
                        Assert.IsNotNull (sc.ServiceName, "#G1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#G2");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.ServiceName, sc.ServiceName, "#G2");
 
                        ServiceController [] servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#H1");
-                       Assert.AreEqual (0, servicesDependedOn.Length, "#H2");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.DependedOn, ServiceNames (servicesDependedOn), "#H2");
 
-                       Assert.AreEqual (ServiceType.Win32ShareProcess, sc.ServiceType, "#I1");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.ServiceType, sc.ServiceType, "#I1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#J1");
                }
 
@@ -299,7 +352,7 @@ namespace MonoTests.System.ServiceProcess
                public void Constructor3_MachineName_Empty ()
                {
                        try {
-                               new ServiceController ("alerter", string.Empty);
+                               new ServiceController (CONTROLLABLE_SERVICE.ServiceName, string.Empty);
                                Assert.Fail ("#1");
                        } catch (ArgumentException ex) {
                                // MachineName value  is invalid
@@ -316,7 +369,7 @@ namespace MonoTests.System.ServiceProcess
                public void Constructor3_MachineName_Null ()
                {
                        try {
-                               new ServiceController ("alerter", null);
+                               new ServiceController (CONTROLLABLE_SERVICE.ServiceName, null);
                                Assert.Fail ("#1");
                        } catch (ArgumentException ex) {
                                // MachineName value  is invalid
@@ -369,11 +422,11 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.IsTrue (sc.CanPauseAndContinue, "#1");
-                       sc.ServiceName = "SamSs";
+                       sc.ServiceName = UNCONTROLLABLE_SERVICE.ServiceName;
                        Assert.IsFalse (sc.CanPauseAndContinue, "#2");
-                       sc.DisplayName = "Workstation";
+                       sc.DisplayName = CONTROLLABLE_SERVICE.DisplayName;
                        Assert.IsTrue (sc.CanPauseAndContinue, "#3");
                        sc.MachineName = "doesnotexist";
                        try {
@@ -403,7 +456,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                bool canPauseAndContinue = sc.CanPauseAndContinue;
@@ -432,7 +485,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("NetDDE", ".");
+                       ServiceController sc1 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
                        Assert.IsFalse (sc1.CanPauseAndContinue);
                }
 
@@ -470,7 +523,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("SamSs", ".");
+                       ServiceController sc1 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.IsFalse (sc1.CanPauseAndContinue);
                }
 
@@ -480,7 +533,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#1");
                        Assert.IsTrue (sc.CanPauseAndContinue, "#2");
                }
@@ -491,8 +544,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -528,8 +581,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -584,11 +637,11 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.IsTrue (sc.CanShutdown, "#1");
-                       sc.ServiceName = "SamSs";
+                       sc.ServiceName = UNCONTROLLABLE_SERVICE.ServiceName;
                        Assert.IsFalse (sc.CanShutdown, "#2");
-                       sc.DisplayName = "Workstation";
+                       sc.DisplayName = CONTROLLABLE_SERVICE.DisplayName;
                        Assert.IsTrue (sc.CanShutdown, "#3");
                        sc.MachineName = "doesnotexist";
                        try {
@@ -618,7 +671,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                bool canShutdown = sc.CanShutdown;
@@ -647,7 +700,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("NetDDE", ".");
+                       ServiceController sc1 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
                        Assert.IsFalse (sc1.CanShutdown);
                }
 
@@ -685,7 +738,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("SamSs", ".");
+                       ServiceController sc1 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.IsFalse (sc1.CanShutdown);
                }
 
@@ -695,7 +748,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#1");
                        Assert.IsTrue (sc.CanShutdown, "#2");
                }
@@ -706,8 +759,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -743,8 +796,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -799,11 +852,11 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.IsTrue (sc.CanStop, "#1");
-                       sc.ServiceName = "SamSs";
+                       sc.ServiceName = UNCONTROLLABLE_SERVICE.ServiceName;
                        Assert.IsFalse (sc.CanStop, "#2");
-                       sc.DisplayName = "Workstation";
+                       sc.DisplayName = CONTROLLABLE_SERVICE.DisplayName;
                        Assert.IsTrue (sc.CanStop, "#3");
                        sc.MachineName = "doesnotexist";
                        try {
@@ -833,7 +886,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                bool canStop = sc.CanStop;
@@ -862,7 +915,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("NetDDE", ".");
+                       ServiceController sc1 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
                        Assert.IsFalse (sc1.CanStop);
                }
 
@@ -900,7 +953,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("SamSs", ".");
+                       ServiceController sc1 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.IsFalse (sc1.CanStop);
                }
 
@@ -910,7 +963,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#1");
                        Assert.IsTrue (sc.CanStop, "#2");
                }
@@ -921,8 +974,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -958,8 +1011,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -1014,8 +1067,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -1052,7 +1105,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                sc.Continue ();
@@ -1081,8 +1134,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("NetDDE", ".");
-                       ServiceController sc2 = new ServiceController ("NetDDE", ".");
+                       ServiceController sc1 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Stopped, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Stopped, sc2.Status, "#A2");
@@ -1094,7 +1147,7 @@ namespace MonoTests.System.ServiceProcess
                                // Cannot resume NetDDE service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                Assert.IsNotNull (ex.Message, "#B3");
-                               Assert.IsTrue (ex.Message.IndexOf ("NetDDE") != -1, "#B4");
+                               Assert.IsTrue (ex.Message.IndexOf (DISABLED_SERVICE.ServiceName) != -1, "#B4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -1145,8 +1198,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("SamSs", ".");
-                       ServiceController sc2 = new ServiceController ("SamSs", ".");
+                       ServiceController sc1 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -1155,10 +1208,10 @@ namespace MonoTests.System.ServiceProcess
                                sc1.Continue ();
                                Assert.Fail ("#B1");
                        } catch (InvalidOperationException ex) {
-                               // Cannot resume SamSs service on computer '.'
+                               // Cannot resume service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                Assert.IsNotNull (ex.Message, "#B3");
-                               Assert.IsTrue (ex.Message.IndexOf ("SamSs") != -1, "#B4");
+                               Assert.IsTrue (ex.Message.IndexOf (UNCONTROLLABLE_SERVICE.ServiceName) != -1, "#B4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -1181,8 +1234,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -1199,8 +1252,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -1219,10 +1272,10 @@ namespace MonoTests.System.ServiceProcess
                                sc1.Continue ();
                                Assert.Fail ("#D1");
                        } catch (InvalidOperationException ex) {
-                               // Cannot resume Schedule service on computer '.'
+                               // Cannot resume the service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#D2");
                                Assert.IsNotNull (ex.Message, "#D3");
-                               Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#D4");
+                               Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#D4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#D5");
                                Assert.IsNotNull (ex.InnerException, "#D6");
 
@@ -1271,52 +1324,52 @@ namespace MonoTests.System.ServiceProcess
                        ServiceController [] dependentServices = null;
 
                        // single dependent service
-                       sc = new ServiceController ("dmserver", ".");
+                       sc = new ServiceController (SERVICE_WITH_ONE_DEPENDENT.ServiceName, ".");
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#A1");
                        Assert.AreEqual (1, dependentServices.Length, "#A2");
-                       Assert.AreEqual ("dmadmin", dependentServices [0].ServiceName, "#A3");
+                       Assert.AreEqual (SERVICE_WITH_ONE_DEPENDENT.Dependents, ServiceNames (dependentServices), "#A3");
 
                        // modifying ServiceName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.ServiceName = "alerter";
+                       sc.ServiceName = SERVICE_WITH_NO_DEPENDENTS.ServiceName;
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#B1");
                        Assert.AreEqual (1, dependentServices.Length, "#B2");
-                       Assert.AreEqual ("dmadmin", dependentServices [0].ServiceName, "#B3");
+                       Assert.AreEqual (SERVICE_WITH_ONE_DEPENDENT.Dependents, ServiceNames (dependentServices), "#B3");
 
                        // modifying DisplayName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.DisplayName = "Spooler";
+                       sc.DisplayName = SERVICE_WITH_MANY_DEPENDENTS.DisplayName;
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#C1");
                        Assert.AreEqual (1, dependentServices.Length, "#C2");
-                       Assert.AreEqual ("dmadmin", dependentServices [0].ServiceName, "#C3");
+                       Assert.AreEqual (SERVICE_WITH_ONE_DEPENDENT.Dependents, ServiceNames (dependentServices), "#C3");
 
                        // modifying MachineName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
                        sc.MachineName = "doesnotexist";
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#D1");
-                       Assert.AreEqual (1, dependentServices.Length, "#D2");
-                       Assert.AreEqual ("dmadmin", dependentServices [0].ServiceName, "#D3");
+                       Assert.AreEqual (1, dependentServices.Length, "#D");
+                       Assert.AreEqual (SERVICE_WITH_ONE_DEPENDENT.Dependents, ServiceNames (dependentServices), "#D3");
 
                        // no dependent services
-                       sc = new ServiceController ("alerter", ".");
+                       sc = new ServiceController (SERVICE_WITH_NO_DEPENDENTS.ServiceName, ".");
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#E1");
                        Assert.AreEqual (0, dependentServices.Length, "#E2");
 
                        // modifying ServiceName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.ServiceName = "dmserver";
+                       sc.ServiceName = SERVICE_WITH_MANY_DEPENDENTS.ServiceName;
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#F1");
                        Assert.AreEqual (0, dependentServices.Length, "#F2");
 
                        // modifying DisplayName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.DisplayName = "Workstation";
+                       sc.DisplayName = SERVICE_WITH_ONE_DEPENDENT.DisplayName;
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#G1");
                        Assert.AreEqual (0, dependentServices.Length, "#G2");
@@ -1329,39 +1382,35 @@ namespace MonoTests.System.ServiceProcess
                        Assert.AreEqual (0, dependentServices.Length, "#H2");
 
                        // multiple dependent services
-                       sc = new ServiceController ("TapiSrv", ".");
+                       sc = new ServiceController (SERVICE_WITH_MANY_DEPENDENTS.ServiceName, ".");
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#I1");
-                       Assert.AreEqual (2, dependentServices.Length, "#I2");
-                       Assert.AreEqual ("RasAuto", dependentServices [0].ServiceName, "#I3");
-                       Assert.AreEqual ("RasMan", dependentServices [1].ServiceName, "#I4");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDENTS.Dependents.Length, dependentServices.Length, "#I2");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDENTS.Dependents, ServiceNames (dependentServices), "#I3");
 
                        // modifying ServiceName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.ServiceName = "spooler";
+                       sc.ServiceName = SERVICE_WITH_NO_DEPENDENTS.ServiceName;
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#J1");
-                       Assert.AreEqual (2, dependentServices.Length, "#J3");
-                       Assert.AreEqual ("RasAuto", dependentServices [0].ServiceName, "#J4");
-                       Assert.AreEqual ("RasMan", dependentServices [1].ServiceName, "#J5");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDENTS.Dependents.Length, dependentServices.Length, "#J3");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDENTS.Dependents, ServiceNames (dependentServices), "#J3");
 
                        // modifying DisplayName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.DisplayName = "Alerter";
+                       sc.DisplayName = SERVICE_WITH_ONE_DEPENDENT.DisplayName;
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#K1");
-                       Assert.AreEqual (2, dependentServices.Length, "#K2");
-                       Assert.AreEqual ("RasAuto", dependentServices [0].ServiceName, "#K3");
-                       Assert.AreEqual ("RasMan", dependentServices [1].ServiceName, "#K4");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDENTS.Dependents.Length, dependentServices.Length, "#K2");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDENTS.Dependents, ServiceNames (dependentServices), "#K3");
 
                        // modifying MachineName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
                        sc.MachineName = Environment.MachineName;
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#L1");
-                       Assert.AreEqual (2, dependentServices.Length, "#L2");
-                       Assert.AreEqual ("RasAuto", dependentServices [0].ServiceName, "#L3");
-                       Assert.AreEqual ("RasMan", dependentServices [1].ServiceName, "#L4");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDENTS.Dependents.Length, dependentServices.Length, "#L2");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDENTS.Dependents, ServiceNames (dependentServices), "#L3");
                }
 
                [Test]
@@ -1370,7 +1419,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("dmserver",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                ServiceController [] dependenServices = sc.DependentServices;
@@ -1399,11 +1448,10 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("NetDDE", ".");
+                       ServiceController sc = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
                        ServiceController [] dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#1");
-                       Assert.AreEqual (1, dependentServices.Length, "#2");
-                       Assert.AreEqual ("ClipSrv", dependentServices [0].ServiceName, "#3");
+                       Assert.AreEqual (DISABLED_SERVICE.Dependents, ServiceNames (dependentServices), "#2");
                }
 
                [Test]
@@ -1459,36 +1507,39 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
+                       var s1 = WORKSTATION_SERVICE;
+                       var s2 = WINDOWS_SEARCH_SERVICE;
+
                        ServiceController sc = new ServiceController ();
-                       sc.DisplayName = "workstation";
-                       Assert.AreEqual ("workstation", sc.DisplayName, "#A1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#A2");
+                       sc.DisplayName = s1.DisplayName.ToLower ();
+                       Assert.AreEqual (s1.DisplayName.ToLower (), sc.DisplayName, "#A1");
+                       Assert.AreEqual (s1.ServiceName, sc.ServiceName, "#A2");
 
-                       sc.DisplayName = "alerter";
-                       Assert.AreEqual ("alerter", sc.DisplayName, "#B1");
-                       Assert.AreEqual ("Alerter", sc.ServiceName, "#B2");
+                       sc.DisplayName = s2.DisplayName.ToLower ();
+                       Assert.AreEqual (s2.DisplayName.ToLower (), sc.DisplayName, "#B1");
+                       Assert.AreEqual (s2.ServiceName, sc.ServiceName, "#B2");
 
-                       sc = new ServiceController ("workstation");
-                       sc.DisplayName = "alerter";
-                       Assert.AreEqual ("alerter", sc.DisplayName, "#C1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#C2");
-                       Assert.AreEqual ("workstation", sc.DisplayName, "#C3");
+                       sc = new ServiceController (s1.DisplayName.ToLower ());
+                       sc.DisplayName = s2.DisplayName.ToLower ();
+                       Assert.AreEqual (s2.DisplayName.ToLower (), sc.DisplayName, "#C1");
+                       Assert.AreEqual (s1.ServiceName, sc.ServiceName, "#C2");
+                       Assert.AreEqual (s1.DisplayName.ToLower (), sc.DisplayName, "#C3");
 
-                       sc.DisplayName = "alerter";
-                       Assert.AreEqual ("alerter", sc.DisplayName, "#D1");
-                       Assert.AreEqual ("Alerter", sc.ServiceName, "#D2");
+                       sc.DisplayName = s2.DisplayName.ToLower ();
+                       Assert.AreEqual (s2.DisplayName.ToLower (), sc.DisplayName, "#D1");
+                       Assert.AreEqual (s2.ServiceName, sc.ServiceName, "#D2");
 
-                       sc.DisplayName = "workstation";
-                       Assert.AreEqual ("workstation", sc.DisplayName, "#E1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#E2");
+                       sc.DisplayName = s1.DisplayName;
+                       Assert.AreEqual (s1.DisplayName, sc.DisplayName, "#E1");
+                       Assert.AreEqual (s1.ServiceName, sc.ServiceName, "#E2");
 
-                       sc = new ServiceController ("workstation");
-                       Assert.AreEqual ("workstation", sc.DisplayName, "#F1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#F2");
+                       sc = new ServiceController (s1.DisplayName.ToLower ());
+                       Assert.AreEqual (s1.DisplayName.ToLower (), sc.DisplayName, "#F1");
+                       Assert.AreEqual (s1.ServiceName, sc.ServiceName, "#F2");
 
-                       sc.DisplayName = "Workstation";
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#G1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#G2");
+                       sc.DisplayName = s1.DisplayName;
+                       Assert.AreEqual (s1.DisplayName, sc.DisplayName, "#G1");
+                       Assert.AreEqual (s1.ServiceName, sc.ServiceName, "#G2");
                }
 
                [Test]
@@ -1497,7 +1548,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("dmserver",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                string displayName = sc.DisplayName;
@@ -1526,8 +1577,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("NetDDE", ".");
-                       Assert.AreEqual ("Network DDE", sc.DisplayName);
+                       ServiceController sc = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
+                       Assert.AreEqual (DISABLED_SERVICE.DisplayName, sc.DisplayName);
                }
 
                [Test]
@@ -1565,9 +1616,9 @@ namespace MonoTests.System.ServiceProcess
                                Assert.Ignore ("Running on Unix.");
 
                        ServiceController sc = new ServiceController ();
-                       sc.DisplayName = "workstation";
-                       Assert.AreEqual ("workstation", sc.DisplayName, "#A1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#A2");
+                       sc.DisplayName = WORKSTATION_SERVICE.DisplayName.ToLower ();
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName.ToLower (), sc.DisplayName, "#A1");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#A2");
                }
 
                [Test]
@@ -1611,10 +1662,10 @@ namespace MonoTests.System.ServiceProcess
                        Assert.AreEqual (string.Empty, sc.DisplayName, "#A1");
                        Assert.AreEqual (string.Empty, sc.ServiceName, "#A2");
 
-                       sc.DisplayName = "WorkStation";
+                       sc.DisplayName = WORKSTATION_SERVICE.DisplayName;
 
-                       Assert.AreEqual ("WorkStation", sc.DisplayName, "#B1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#B2");
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName, sc.DisplayName, "#B1");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#B2");
 
                        sc.DisplayName = string.Empty;
 
@@ -1629,7 +1680,7 @@ namespace MonoTests.System.ServiceProcess
                                Assert.Ignore ("Running on Unix.");
 
                        ServiceController sc = new ServiceController ();
-                       sc.DisplayName = "Alerter";
+                       sc.DisplayName = CONTROLLABLE_SERVICE.DisplayName;
                        try {
                                sc.DisplayName = null;
                                Assert.Fail ("#1");
@@ -1640,7 +1691,7 @@ namespace MonoTests.System.ServiceProcess
                                Assert.AreEqual ("value", ex.ParamName, "#5");
                                Assert.IsNull (ex.InnerException, "#6");
                        }
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#7");
+                       Assert.AreEqual (CONTROLLABLE_SERVICE.DisplayName, sc.DisplayName, "#7");
                }
 
                [Test]
@@ -1650,10 +1701,10 @@ namespace MonoTests.System.ServiceProcess
                                Assert.Ignore ("Running on Unix.");
 
                        ServiceController sc = new ServiceController ();
-                       sc.DisplayName = "lanmanworkstation";
-                       Assert.AreEqual ("lanmanworkstation", sc.DisplayName, "#A1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#A2");
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#A3");
+                       sc.DisplayName = WORKSTATION_SERVICE.ServiceName;
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.DisplayName, "#A1");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#A2");
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName, sc.DisplayName, "#A3");
                }
 
                [Test]
@@ -1662,7 +1713,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Disk", ".");
+                       ServiceController sc = new ServiceController (DISK_DRIVER_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        try {
@@ -1670,10 +1721,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_CONTINUE);
                                        Assert.Fail ("#B1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                        Assert.IsNotNull (ex.Message, "#B3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#B4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#B4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                        Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -1690,10 +1741,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_DEVICEEVENT);
                                        Assert.Fail ("#C1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
                                        Assert.IsNotNull (ex.Message, "#C3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#C4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#C4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#C5");
                                        Assert.IsNotNull (ex.InnerException, "#C6");
 
@@ -1710,10 +1761,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_HARDWAREPROFILECHANGE);
                                        Assert.Fail ("#D1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#D2");
                                        Assert.IsNotNull (ex.Message, "#D3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#D4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#D4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#D5");
                                        Assert.IsNotNull (ex.InnerException, "#D6");
 
@@ -1730,10 +1781,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_INTERROGATE);
                                        Assert.Fail ("#E1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#E2");
                                        Assert.IsNotNull (ex.Message, "#E3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#E4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#E4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#E5");
                                        Assert.IsNotNull (ex.InnerException, "#E6");
 
@@ -1750,10 +1801,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_NETBINDADD);
                                        Assert.Fail ("#F1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#F2");
                                        Assert.IsNotNull (ex.Message, "#F3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#F4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#F4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#F5");
                                        Assert.IsNotNull (ex.InnerException, "#F6");
 
@@ -1770,10 +1821,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_NETBINDDISABLE);
                                        Assert.Fail ("#G1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#G2");
                                        Assert.IsNotNull (ex.Message, "#G3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#G4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#G4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#G5");
                                        Assert.IsNotNull (ex.InnerException, "#G6");
 
@@ -1790,10 +1841,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_NETBINDENABLE);
                                        Assert.Fail ("#H1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#H2");
                                        Assert.IsNotNull (ex.Message, "#H3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#H4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#H4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#H5");
                                        Assert.IsNotNull (ex.InnerException, "#H6");
 
@@ -1810,10 +1861,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_NETBINDREMOVE);
                                        Assert.Fail ("#I1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#I2");
                                        Assert.IsNotNull (ex.Message, "#I3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#I4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#I4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#I5");
                                        Assert.IsNotNull (ex.InnerException, "#I6");
 
@@ -1830,10 +1881,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_PARAMCHANGE);
                                        Assert.Fail ("#J1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#J2");
                                        Assert.IsNotNull (ex.Message, "#J3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#J4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#J4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#J5");
                                        Assert.IsNotNull (ex.InnerException, "#J6");
 
@@ -1850,10 +1901,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_PAUSE);
                                        Assert.Fail ("#K1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#K2");
                                        Assert.IsNotNull (ex.Message, "#K3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#K4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#K4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#K5");
                                        Assert.IsNotNull (ex.InnerException, "#K6");
 
@@ -1870,10 +1921,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_POWEREVENT);
                                        Assert.Fail ("#L1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#L2");
                                        Assert.IsNotNull (ex.Message, "#L3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#L4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#L4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#L5");
                                        Assert.IsNotNull (ex.InnerException, "#L6");
 
@@ -1890,10 +1941,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_SESSIONCHANGE);
                                        Assert.Fail ("#M1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#M2");
                                        Assert.IsNotNull (ex.Message, "#M3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#M4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#M4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#M5");
                                        Assert.IsNotNull (ex.InnerException, "#M6");
 
@@ -1910,10 +1961,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_SHUTDOWN);
                                        Assert.Fail ("#N1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#N2");
                                        Assert.IsNotNull (ex.Message, "#N3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#N4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#N4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#N5");
                                        Assert.IsNotNull (ex.InnerException, "#N6");
 
@@ -1930,10 +1981,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_STOP);
                                        Assert.Fail ("#O1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#O2");
                                        Assert.IsNotNull (ex.Message, "#O3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Disk") != -1, "#O4");
+                                       Assert.IsTrue (ex.Message.IndexOf (DISK_DRIVER_SERVICE.ServiceName) != -1, "#O4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#O5");
                                        Assert.IsNotNull (ex.InnerException, "#O6");
 
@@ -1958,7 +2009,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_PAUSE);
@@ -1987,7 +2038,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        try {
@@ -1995,10 +2046,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (127);
                                        Assert.Fail ("#B1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                        Assert.IsNotNull (ex.Message, "#B3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#B4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#B4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                        Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -2018,10 +2069,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (256);
                                        Assert.Fail ("#C1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
                                        Assert.IsNotNull (ex.Message, "#C3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#C4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#C4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#C5");
                                        Assert.IsNotNull (ex.InnerException, "#C6");
 
@@ -2046,7 +2097,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        sc.Pause ();
@@ -2063,10 +2114,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (127);
                                        Assert.Fail ("#C1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
                                        Assert.IsNotNull (ex.Message, "#C3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#C4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#C4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#C5");
                                        Assert.IsNotNull (ex.InnerException, "#C6");
 
@@ -2091,7 +2142,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        try {
@@ -2099,10 +2150,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_CONTINUE);
                                        Assert.Fail ("#B1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                        Assert.IsNotNull (ex.Message, "#B3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#B4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#B4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                        Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -2119,10 +2170,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_DEVICEEVENT);
                                        Assert.Fail ("#C1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
                                        Assert.IsNotNull (ex.Message, "#C3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#C4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#C4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#C5");
                                        Assert.IsNotNull (ex.InnerException, "#C6");
 
@@ -2139,10 +2190,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_HARDWAREPROFILECHANGE);
                                        Assert.Fail ("#D1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#D2");
                                        Assert.IsNotNull (ex.Message, "#D3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#D4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#D4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#D5");
                                        Assert.IsNotNull (ex.InnerException, "#D6");
 
@@ -2159,10 +2210,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_INTERROGATE);
                                        Assert.Fail ("#E1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#E2");
                                        Assert.IsNotNull (ex.Message, "#E3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#E4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#E4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#E5");
                                        Assert.IsNotNull (ex.InnerException, "#E6");
 
@@ -2179,10 +2230,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_NETBINDADD);
                                        Assert.Fail ("#F1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#F2");
                                        Assert.IsNotNull (ex.Message, "#F3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#F4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#F4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#F5");
                                        Assert.IsNotNull (ex.InnerException, "#F6");
 
@@ -2199,10 +2250,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_NETBINDDISABLE);
                                        Assert.Fail ("#G1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#G2");
                                        Assert.IsNotNull (ex.Message, "#G3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#G4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#G4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#G5");
                                        Assert.IsNotNull (ex.InnerException, "#G6");
 
@@ -2219,10 +2270,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_NETBINDENABLE);
                                        Assert.Fail ("#H1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#H2");
                                        Assert.IsNotNull (ex.Message, "#H3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#H4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#H4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#H5");
                                        Assert.IsNotNull (ex.InnerException, "#H6");
 
@@ -2239,10 +2290,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_NETBINDREMOVE);
                                        Assert.Fail ("#I1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#I2");
                                        Assert.IsNotNull (ex.Message, "#I3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#I4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#I4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#I5");
                                        Assert.IsNotNull (ex.InnerException, "#I6");
 
@@ -2259,10 +2310,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_PARAMCHANGE);
                                        Assert.Fail ("#J1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#J2");
                                        Assert.IsNotNull (ex.Message, "#J3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#J4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#J4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#J5");
                                        Assert.IsNotNull (ex.InnerException, "#J6");
 
@@ -2279,10 +2330,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_PAUSE);
                                        Assert.Fail ("#K1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#K2");
                                        Assert.IsNotNull (ex.Message, "#K3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#K4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#K4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#K5");
                                        Assert.IsNotNull (ex.InnerException, "#K6");
 
@@ -2299,10 +2350,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_POWEREVENT);
                                        Assert.Fail ("#L1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#L2");
                                        Assert.IsNotNull (ex.Message, "#L3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#L4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#L4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#L5");
                                        Assert.IsNotNull (ex.InnerException, "#L6");
 
@@ -2319,10 +2370,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_SESSIONCHANGE);
                                        Assert.Fail ("#M1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#M2");
                                        Assert.IsNotNull (ex.Message, "#M3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#M4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#M4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#M5");
                                        Assert.IsNotNull (ex.InnerException, "#M6");
 
@@ -2339,10 +2390,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_SHUTDOWN);
                                        Assert.Fail ("#N1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#N2");
                                        Assert.IsNotNull (ex.Message, "#N3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#N4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#N4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#N5");
                                        Assert.IsNotNull (ex.InnerException, "#N6");
 
@@ -2359,10 +2410,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand ((int) SERVICE_CONTROL_TYPE.SERVICE_CONTROL_STOP);
                                        Assert.Fail ("#O1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#O2");
                                        Assert.IsNotNull (ex.Message, "#O3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#O4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#O4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#O5");
                                        Assert.IsNotNull (ex.InnerException, "#O6");
 
@@ -2415,7 +2466,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        sc.Pause ();
@@ -2440,7 +2491,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        sc.Pause ();
@@ -2452,10 +2503,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (127);
                                        Assert.Fail ("#B1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                        Assert.IsNotNull (ex.Message, "#B3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#B4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#B4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                        Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -2480,7 +2531,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        sc.Stop ();
@@ -2495,10 +2546,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (127);
                                        Assert.Fail ("#C1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
                                        Assert.IsNotNull (ex.Message, "#C3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#C4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#C4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#C5");
                                        Assert.IsNotNull (ex.InnerException, "#C6");
 
@@ -2515,10 +2566,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (128);
                                        Assert.Fail ("#D1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#D2");
                                        Assert.IsNotNull (ex.Message, "#D3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#D4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#D4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#D5");
                                        Assert.IsNotNull (ex.InnerException, "#D6");
 
@@ -2543,7 +2594,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        sc.Stop ();
@@ -2556,10 +2607,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (127);
                                        Assert.Fail ("#C1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                        Assert.IsNotNull (ex.Message, "#C3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#C4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#C4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#C5");
                                        Assert.IsNotNull (ex.InnerException, "#C6");
 
@@ -2576,10 +2627,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (128);
                                        Assert.Fail ("#D1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#D2");
                                        Assert.IsNotNull (ex.Message, "#D3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#D4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#D4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#D5");
                                        Assert.IsNotNull (ex.InnerException, "#D6");
 
@@ -2604,7 +2655,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule", ".");
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A");
 
                        sc.Stop ();
@@ -2614,10 +2665,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (127);
                                        Assert.Fail ("#B1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                        Assert.IsNotNull (ex.Message, "#B3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#B4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#B4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                        Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -2634,10 +2685,10 @@ namespace MonoTests.System.ServiceProcess
                                        sc.ExecuteCommand (128);
                                        Assert.Fail ("#C1");
                                } catch (InvalidOperationException ex) {
-                                       // Cannot control Schedule service on computer '.'
+                                       // Cannot control XXX service on computer '.'
                                        Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
                                        Assert.IsNotNull (ex.Message, "#C3");
-                                       Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#C4");
+                                       Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#C4");
                                        Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#C5");
                                        Assert.IsNotNull (ex.InnerException, "#C6");
 
@@ -2686,46 +2737,40 @@ namespace MonoTests.System.ServiceProcess
                        devices = ServiceController.GetDevices ();
                        Assert.IsNotNull (devices, "#A1");
 
-                       bool foundDisk = false;
-                       bool foundAlerter = false;
+                       bool foundKernelService = false;
+                       bool foundShareProcessService = false;
 
                        foreach (ServiceController sc in devices) {
-                               switch (sc.ServiceName) {
-                               case "Disk":
-                                       Assert.AreEqual ("Disk Driver", sc.DisplayName, "#A2");
+                               if (sc.ServiceName.ToLower () == KERNEL_SERVICE.ServiceName.ToLower ()) {
+                                       Assert.AreEqual (KERNEL_SERVICE.DisplayName, sc.DisplayName, "#A2");
                                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#A3");
-                                       foundDisk = true;
-                                       break;
-                               case "Alerter":
-                                       foundAlerter = true;
-                                       break;
+                                       foundKernelService = true;
+                               } else if (sc.ServiceName.ToLower () == SHARE_PROCESS_SERVICE.ServiceName.ToLower ()) {
+                                       foundShareProcessService = true;
                                }
                        }
 
-                       Assert.IsTrue (foundDisk, "#A4");
-                       Assert.IsFalse (foundAlerter, "#A5");
+                       Assert.IsTrue (foundKernelService, "#A4");
+                       Assert.IsFalse (foundShareProcessService, "#A5");
 
                        devices = ServiceController.GetDevices (Environment.MachineName);
                        Assert.IsNotNull (devices, "#B1");
 
-                       foundDisk = false;
-                       foundAlerter = false;
+                       foundKernelService = false;
+                       foundShareProcessService = false;
 
                        foreach (ServiceController sc in devices) {
-                               switch (sc.ServiceName) {
-                               case "Disk":
-                                       Assert.AreEqual ("Disk Driver", sc.DisplayName, "#B2");
+                               if (sc.ServiceName.ToLower () == KERNEL_SERVICE.ServiceName.ToLower ()) {
+                                       Assert.AreEqual (KERNEL_SERVICE.DisplayName, sc.DisplayName, "#B2");
                                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#B3");
-                                       foundDisk = true;
-                                       break;
-                               case "Alerter":
-                                       foundAlerter = true;
-                                       break;
+                                       foundKernelService = true;
+                               } else if (sc.ServiceName.ToLower () == SHARE_PROCESS_SERVICE.ServiceName.ToLower ()) {
+                                       foundShareProcessService = true;
                                }
                        }
 
-                       Assert.IsTrue (foundDisk, "#B4");
-                       Assert.IsFalse (foundAlerter, "#B5");
+                       Assert.IsTrue (foundKernelService, "#B4");
+                       Assert.IsFalse (foundShareProcessService, "#B5");
                }
 
                [Test]
@@ -2800,44 +2845,38 @@ namespace MonoTests.System.ServiceProcess
                        services = ServiceController.GetServices ();
                        Assert.IsNotNull (services, "#A1");
 
-                       bool foundDisk = false;
-                       bool foundWorkstation = false;
+                       bool foundKernelService = false;
+                       bool foundShareProcessService = false;
 
                        foreach (ServiceController sc in services) {
-                               switch (sc.ServiceName) {
-                               case "Disk":
-                                       foundDisk = true;
-                                       break;
-                               case "lanmanworkstation":
-                                       foundWorkstation = true;
-                                       break;
+                               if (sc.ServiceName.ToLower () == KERNEL_SERVICE.ServiceName.ToLower ()) {
+                                       foundKernelService = true;
+                               } else if (sc.ServiceName.ToLower () == SHARE_PROCESS_SERVICE.ServiceName.ToLower ()) {
+                                       foundShareProcessService = true;
                                }
                        }
 
-                       Assert.IsFalse (foundDisk, "#A4");
-                       Assert.IsTrue (foundWorkstation, "#A5");
+                       Assert.IsFalse (foundKernelService, "#A4");
+                       Assert.IsTrue (foundShareProcessService, "#A5");
 
                        services = ServiceController.GetServices (Environment.MachineName);
                        Assert.IsNotNull (services, "#B1");
 
-                       foundDisk = false;
-                       foundWorkstation = false;
+                       foundKernelService = false;
+                       foundShareProcessService = false;
 
                        foreach (ServiceController sc in services) {
-                               switch (sc.ServiceName) {
-                               case "Disk":
-                                       foundDisk = true;
-                                       break;
-                               case "lanmanworkstation":
-                                       Assert.AreEqual ("Workstation", sc.DisplayName, "#B2");
+                               if (sc.ServiceName.ToLower () == KERNEL_SERVICE.ServiceName.ToLower ()) {
+                                       foundKernelService = true;
+                               } else if (sc.ServiceName.ToLower () == SHARE_PROCESS_SERVICE.ServiceName.ToLower ()) {
+                                       Assert.AreEqual (SHARE_PROCESS_SERVICE.DisplayName, sc.DisplayName, "#B2");
                                        Assert.AreEqual (ServiceControllerStatus.Running, sc.Status, "#B3");
-                                       foundWorkstation = true;
-                                       break;
+                                       foundShareProcessService = true;
                                }
                        }
 
-                       Assert.IsFalse (foundDisk, "#B4");
-                       Assert.IsTrue (foundWorkstation, "#B5");
+                       Assert.IsFalse (foundKernelService, "#B4");
+                       Assert.IsTrue (foundShareProcessService, "#B5");
                }
 
                [Test]
@@ -2908,25 +2947,25 @@ namespace MonoTests.System.ServiceProcess
                                Assert.Ignore ("Running on Unix.");
 
                        ServiceController sc = new ServiceController ();
-                       sc.ServiceName = "alerter";
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#A1");
+                       sc.ServiceName = WORKSTATION_SERVICE.ServiceName;
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName, sc.DisplayName, "#A1");
                        Assert.AreEqual (".", sc.MachineName, "#A2");
-                       Assert.AreEqual ("alerter", sc.ServiceName, "#A3");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#A3");
 
                        sc.MachineName = Environment.MachineName;
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#B1");
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName, sc.DisplayName, "#B1");
                        Assert.AreEqual (Environment.MachineName, sc.MachineName, "#B2");
-                       Assert.AreEqual ("alerter", sc.ServiceName, "#B3");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#B3");
 
                        sc.MachineName = "doesnotexist";
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#C1");
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName, sc.DisplayName, "#C1");
                        Assert.AreEqual ("doesnotexist", sc.MachineName, "#C2");
-                       Assert.AreEqual ("alerter", sc.ServiceName, "#C3");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#C3");
 
                        sc.MachineName = "DoesNotExist";
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#D1");
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName, sc.DisplayName, "#D1");
                        Assert.AreEqual ("DoesNotExist", sc.MachineName, "#D2");
-                       Assert.AreEqual ("alerter", sc.ServiceName, "#D3");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#D3");
                }
 
                [Test]
@@ -2981,8 +3020,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -3012,7 +3051,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                sc.Pause ();
@@ -3041,8 +3080,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("NetDDE", ".");
-                       ServiceController sc2 = new ServiceController ("NetDDE", ".");
+                       ServiceController sc1 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Stopped, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Stopped, sc2.Status, "#A2");
@@ -3054,7 +3093,7 @@ namespace MonoTests.System.ServiceProcess
                                // Cannot pause NetDDE service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                Assert.IsNotNull (ex.Message, "#B3");
-                               Assert.IsTrue (ex.Message.IndexOf ("NetDDE") != -1, "#B4");
+                               Assert.IsTrue (ex.Message.IndexOf (DISABLED_SERVICE.ServiceName) != -1, "#B4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -3105,8 +3144,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("SamSs", ".");
-                       ServiceController sc2 = new ServiceController ("SamSs", ".");
+                       ServiceController sc1 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -3115,10 +3154,10 @@ namespace MonoTests.System.ServiceProcess
                                sc1.Pause ();
                                Assert.Fail ("#B1");
                        } catch (InvalidOperationException ex) {
-                               // Cannot pause SamSs service on computer '.'
+                               // Cannot pause XXX service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                Assert.IsNotNull (ex.Message, "#B3");
-                               Assert.IsTrue (ex.Message.IndexOf ("SamSs") != -1, "#B4");
+                               Assert.IsTrue (ex.Message.IndexOf (UNCONTROLLABLE_SERVICE.ServiceName) != -1, "#B4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -3141,8 +3180,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -3177,8 +3216,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -3197,10 +3236,10 @@ namespace MonoTests.System.ServiceProcess
                                sc1.Pause ();
                                Assert.Fail ("#D1");
                        } catch (InvalidOperationException ex) {
-                               // Cannot pause Schedule service on computer '.'
+                               // Cannot pause XXX service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#D2");
                                Assert.IsNotNull (ex.Message, "#D3");
-                               Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#D4");
+                               Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#D4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#D5");
                                Assert.IsNotNull (ex.InnerException, "#D6");
 
@@ -3249,39 +3288,32 @@ namespace MonoTests.System.ServiceProcess
                        ServiceController [] dependentServices = null;
                        ServiceController [] servicesDependedOn = null;
 
-                       sc = new ServiceController ("NetDDE", ".");
+                       sc = new ServiceController (SERVICE_1_WITH_DEPENDENTS_AND_DEPENDED_ON.ServiceName, ".");
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#A1");
-                       Assert.AreEqual (1, dependentServices.Length, "#A2");
-                       Assert.AreEqual ("ClipSrv", dependentServices [0].ServiceName, "#A3");
+                       Assert.AreEqual (SERVICE_1_WITH_DEPENDENTS_AND_DEPENDED_ON.Dependents, ServiceNames (dependentServices), "#A2");
                        servicesDependedOn = sc.ServicesDependedOn;
-                       Assert.IsNotNull (servicesDependedOn, "#A4");
-                       Assert.AreEqual (1, servicesDependedOn.Length, "#A5");
-                       Assert.AreEqual ("NetDDEDSDM", servicesDependedOn [0].ServiceName, "#A6");
+                       Assert.AreEqual (SERVICE_1_WITH_DEPENDENTS_AND_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#A3");
 
-                       sc.ServiceName = "rasman";
+                       sc.ServiceName = SERVICE_2_WITH_DEPENDENTS_AND_DEPENDED_ON.ServiceName;
                        sc.Refresh ();
 
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#B1");
-                       Assert.AreEqual (1, dependentServices.Length, "#B2");
-                       Assert.AreEqual ("RasAuto", dependentServices [0].ServiceName, "#B3");
+                       Assert.AreEqual (SERVICE_2_WITH_DEPENDENTS_AND_DEPENDED_ON.Dependents, ServiceNames (dependentServices), "#B2");
                        servicesDependedOn = sc.ServicesDependedOn;
-                       Assert.IsNotNull (servicesDependedOn, "#B4");
-                       Assert.AreEqual (1, servicesDependedOn.Length, "#B5");
-                       Assert.AreEqual ("Tapisrv", servicesDependedOn [0].ServiceName, "#B6");
+                       Assert.IsNotNull (servicesDependedOn, "#B3");
+                       Assert.AreEqual (SERVICE_2_WITH_DEPENDENTS_AND_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#A4");
 
-                       sc.DisplayName = "NetDDE";
+                       sc.DisplayName = SERVICE_3_WITH_DEPENDENTS_AND_DEPENDED_ON.ServiceName;
                        sc.Refresh ();
 
                        dependentServices = sc.DependentServices;
                        Assert.IsNotNull (dependentServices, "#C1");
-                       Assert.AreEqual (1, dependentServices.Length, "#C2");
-                       Assert.AreEqual ("ClipSrv", dependentServices [0].ServiceName, "#C3");
+                       Assert.AreEqual (SERVICE_3_WITH_DEPENDENTS_AND_DEPENDED_ON.Dependents, ServiceNames (dependentServices), "#C2");
                        servicesDependedOn = sc.ServicesDependedOn;
-                       Assert.IsNotNull (servicesDependedOn, "#C4");
-                       Assert.AreEqual (1, servicesDependedOn.Length, "#C5");
-                       Assert.AreEqual ("NetDDEDSDM", servicesDependedOn [0].ServiceName, "#C6");
+                       Assert.IsNotNull (servicesDependedOn, "#C3");
+                       Assert.AreEqual (SERVICE_3_WITH_DEPENDENTS_AND_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#C4");
                }
 
                [Test]
@@ -3290,7 +3322,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        sc.Refresh ();
                }
@@ -3311,8 +3343,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -3352,8 +3384,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -3404,8 +3436,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -3450,36 +3482,40 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
+                       var s1 = WORKSTATION_SERVICE;
+                       var s2 = WINDOWS_SEARCH_SERVICE;
+
                        ServiceController sc = new ServiceController ();
-                       sc.ServiceName = "lanmanworkstation";
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#A1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#A2");
+                       sc.ServiceName = s1.ServiceName;
+                       Assert.AreEqual (s1.DisplayName, sc.DisplayName, "#A1");
+                       Assert.AreEqual (s1.ServiceName, sc.ServiceName, "#A2");
 
-                       sc.ServiceName = "alerter";
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#B1");
-                       Assert.AreEqual ("alerter", sc.ServiceName, "#B2");
+                       sc.ServiceName = s2.ServiceName;
+                       Assert.AreEqual (s2.DisplayName, sc.DisplayName, "#B1");
+                       Assert.AreEqual (s2.ServiceName, sc.ServiceName, "#B2");
 
-                       sc = new ServiceController ("lanmanworkstation");
-                       sc.ServiceName = "alerter";
-                       Assert.AreEqual ("alerter", sc.ServiceName, "#C1");
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#C2");
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#C3");
+                       sc = new ServiceController (s1.ServiceName);
+                       sc.ServiceName = s2.ServiceName;
+                       Assert.AreEqual (s2.ServiceName, sc.ServiceName, "#C1");
+                       Assert.AreEqual (s2.DisplayName, sc.DisplayName, "#C2");
+                       Assert.AreEqual (s2.DisplayName, sc.DisplayName, "#C3");
 
-                       sc.ServiceName = "alerter";
-                       Assert.AreEqual ("alerter", sc.ServiceName, "#D1");
-                       Assert.AreEqual ("Alerter", sc.DisplayName, "#D2");
+                       sc.ServiceName = s2.ServiceName;
+                       Assert.AreEqual (s2.ServiceName, sc.ServiceName, "#D1");
+                       Assert.AreEqual (s2.DisplayName, sc.DisplayName, "#D2");
 
-                       sc.ServiceName = "lanmanworkstation";
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#E1");
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#E2");
+                       sc.ServiceName = s1.ServiceName;
+                       Assert.AreEqual (s1.ServiceName, sc.ServiceName, "#E1");
+                       Assert.AreEqual (s1.DisplayName, sc.DisplayName, "#E2");
 
-                       sc = new ServiceController ("lanmanWorkstation");
-                       Assert.AreEqual ("lanmanWorkstation", sc.ServiceName, "#F1");
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#F2");
+                       sc = new ServiceController (s1.ServiceName.ToUpper ());
+                       Assert.AreEqual (s1.ServiceName.ToUpper (), sc.ServiceName, "#F1");
+                       Assert.AreEqual (s1.DisplayName, sc.DisplayName, "#F2");
 
-                       sc.ServiceName = "LanManWorkstation";
-                       Assert.AreEqual ("LanManWorkstation", sc.ServiceName, "#G1");
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#G2");
+                       var serviceName = s1.ServiceName [0].ToString ().ToUpper () + s1.ServiceName.Substring (1).ToLower ();
+                       sc.ServiceName = serviceName;
+                       Assert.AreEqual (serviceName, sc.ServiceName, "#G1");
+                       Assert.AreEqual (s1.DisplayName, sc.DisplayName, "#G2");
                }
 
                [Test]
@@ -3488,7 +3524,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("dmserver",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                string serviceName = sc.ServiceName;
@@ -3517,8 +3553,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("NetDDE", ".");
-                       Assert.AreEqual ("NetDDE", sc.ServiceName);
+                       ServiceController sc = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
+                       Assert.AreEqual (DISABLED_SERVICE.ServiceName, sc.ServiceName);
                }
 
                [Test]
@@ -3556,9 +3592,9 @@ namespace MonoTests.System.ServiceProcess
                                Assert.Ignore ("Running on Unix.");
 
                        ServiceController sc = new ServiceController ();
-                       sc.ServiceName = "lanmanworkstation";
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#2");
+                       sc.ServiceName = WORKSTATION_SERVICE.ServiceName;
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName, sc.DisplayName, "#1");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#2");
                }
 
                [Test]
@@ -3601,10 +3637,10 @@ namespace MonoTests.System.ServiceProcess
                        Assert.AreEqual (string.Empty, sc.DisplayName, "#A1");
                        Assert.AreEqual (string.Empty, sc.ServiceName, "#A2");
 
-                       sc.ServiceName = "lanmanworkstation";
+                       sc.ServiceName = WORKSTATION_SERVICE.ServiceName;
 
-                       Assert.AreEqual ("Workstation", sc.DisplayName, "#B1");
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#B2");
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName, sc.DisplayName, "#B1");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#B2");
 
                        try {
                                sc.ServiceName = string.Empty;
@@ -3628,7 +3664,7 @@ namespace MonoTests.System.ServiceProcess
                                Assert.Ignore ("Running on Unix.");
 
                        ServiceController sc = new ServiceController ();
-                       sc.ServiceName = "lanmanworkstation";
+                       sc.ServiceName = WORKSTATION_SERVICE.ServiceName;
                        try {
                                sc.ServiceName = null;
                                Assert.Fail ("#1");
@@ -3640,7 +3676,7 @@ namespace MonoTests.System.ServiceProcess
                                Assert.IsNull (ex.InnerException, "#6");
                        }
 
-                       Assert.AreEqual ("lanmanworkstation", sc.ServiceName, "#7");
+                       Assert.AreEqual (WORKSTATION_SERVICE.ServiceName, sc.ServiceName, "#7");
                }
 
                [Test]
@@ -3650,16 +3686,16 @@ namespace MonoTests.System.ServiceProcess
                                Assert.Ignore ("Running on Unix.");
 
                        ServiceController sc = new ServiceController ();
-                       sc.ServiceName = "workstation";
+                       sc.ServiceName = WORKSTATION_SERVICE.DisplayName.ToLower ();
                        try {
                                string displayName = sc.DisplayName;
                                Assert.Fail ("#1: " + displayName);
                        } catch (InvalidOperationException ex) {
-                               // Display name could not be retrieved for service workstation
+                               // Display name could not be retrieved for service XXX
                                // on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2");
                                Assert.IsNotNull (ex.Message, "#3");
-                               Assert.IsTrue (ex.Message.IndexOf ("workstation") != -1, "#4");
+                               Assert.IsTrue (ex.Message.IndexOf (WORKSTATION_SERVICE.DisplayName.ToLower ()) != -1, "#4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#5");
                                Assert.IsNotNull (ex.InnerException, "#6");
 
@@ -3671,7 +3707,7 @@ namespace MonoTests.System.ServiceProcess
                                Assert.AreEqual (1060, win32Error.NativeErrorCode, "#10");
                                Assert.IsNull (win32Error.InnerException, "#11");
                        }
-                       Assert.AreEqual ("workstation", sc.ServiceName, "#12");
+                       Assert.AreEqual (WORKSTATION_SERVICE.DisplayName.ToLower (), sc.ServiceName, "#12");
                }
 
                [Test]
@@ -3684,27 +3720,27 @@ namespace MonoTests.System.ServiceProcess
                        ServiceController [] servicesDependedOn = null;
 
                        // single depended service
-                       sc = new ServiceController ("spooler", ".");
+                       sc = new ServiceController (SERVICE_WITH_ONE_DEPENDED_ON.ServiceName, ".");
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#A1");
                        Assert.AreEqual (1, servicesDependedOn.Length, "#A2");
-                       Assert.AreEqual ("RPCSS", servicesDependedOn [0].ServiceName, "#A3");
+                       Assert.AreEqual (SERVICE_WITH_ONE_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#A3");
 
                        // modifying ServiceName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.ServiceName = "lanmanworkstation";
+                       sc.ServiceName = SERVICE_WITH_NO_DEPENDED_ON.ServiceName;
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#B1");
                        Assert.AreEqual (1, servicesDependedOn.Length, "#B2");
-                       Assert.AreEqual ("RPCSS", servicesDependedOn [0].ServiceName, "#B3");
+                       Assert.AreEqual (SERVICE_WITH_ONE_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#B3");
 
                        // modifying DisplayName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.DisplayName = "alerter";
+                       sc.DisplayName = SERVICE_WITH_MANY_DEPENDED_ON.DisplayName;
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#C1");
                        Assert.AreEqual (1, servicesDependedOn.Length, "#C2");
-                       Assert.AreEqual ("RPCSS", servicesDependedOn [0].ServiceName, "#C3");
+                       Assert.AreEqual (SERVICE_WITH_ONE_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#C3");
 
                        // modifying MachineName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
@@ -3712,24 +3748,24 @@ namespace MonoTests.System.ServiceProcess
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#D1");
                        Assert.AreEqual (1, servicesDependedOn.Length, "#D2");
-                       Assert.AreEqual ("RPCSS", servicesDependedOn [0].ServiceName, "#D3");
+                       Assert.AreEqual (SERVICE_WITH_ONE_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#D3");
 
                        // no depended services
-                       sc = new ServiceController ("lanmanworkstation", ".");
+                       sc = new ServiceController (SERVICE_WITH_NO_DEPENDED_ON.ServiceName, ".");
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#E1");
                        Assert.AreEqual (0, servicesDependedOn.Length, "#E2");
 
                        // modifying ServiceName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.ServiceName = "spooler";
+                       sc.ServiceName = SERVICE_WITH_MANY_DEPENDED_ON.ServiceName;
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#F1");
                        Assert.AreEqual (0, servicesDependedOn.Length, "#F2");
 
                        // modifying DisplayName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.DisplayName = "Alerter";
+                       sc.DisplayName = SERVICE_WITH_ONE_DEPENDED_ON.DisplayName;
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#G1");
                        Assert.AreEqual (0, servicesDependedOn.Length, "#G2");
@@ -3742,47 +3778,35 @@ namespace MonoTests.System.ServiceProcess
                        Assert.AreEqual (0, servicesDependedOn.Length, "#H2");
 
                        // multiple depended services
-                       sc = new ServiceController ("dmadmin", ".");
+                       sc = new ServiceController (SERVICE_WITH_MANY_DEPENDED_ON.ServiceName, ".");
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#I1");
-                       Assert.AreEqual (3, servicesDependedOn.Length, "#I2");
-                       // do not rely on the order of the services
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "RpcSs"), "#I3");
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "PlugPlay"), "#I4");
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "DmServer"), "#I5");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDED_ON.DependedOn.Length, servicesDependedOn.Length, "#I2");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#I3");
 
                        // modifying ServiceName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.ServiceName = "spooler";
+                       sc.ServiceName = SERVICE_WITH_NO_DEPENDED_ON.ServiceName;
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#J1");
-                       Assert.AreEqual (3, servicesDependedOn.Length, "#J2");
-                       // do not rely on the order of the services
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "RpcSs"), "#J3");
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "PlugPlay"), "#J4");
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "DmServer"), "#J5");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDED_ON.DependedOn.Length, servicesDependedOn.Length, "#J2");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#J3");
 
                        // modifying DisplayName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
-                       sc.DisplayName = "Alerter";
+                       sc.DisplayName = SERVICE_WITH_ONE_DEPENDED_ON.DisplayName;
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#K1");
-                       Assert.AreEqual (3, servicesDependedOn.Length, "#K2");
-                       // do not rely on the order of the services
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "RpcSs"), "#K3");
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "PlugPlay"), "#K4");
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "DmServer"), "#K5");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDED_ON.DependedOn.Length, servicesDependedOn.Length, "#K2");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#K3");
 
                        // modifying MachineName does not cause cache to be cleared:
                        // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=201762
                        sc.MachineName = Environment.MachineName;
                        servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#L1");
-                       Assert.AreEqual (3, servicesDependedOn.Length, "#L2");
-                       // do not rely on the order of the services
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "RpcSs"), "#L3");
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "PlugPlay"), "#L4");
-                       Assert.IsTrue (ContainsService (servicesDependedOn, "DmServer"), "#L5");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDED_ON.DependedOn.Length, servicesDependedOn.Length, "#L2");
+                       Assert.AreEqual (SERVICE_WITH_MANY_DEPENDED_ON.DependedOn, ServiceNames (servicesDependedOn), "#L3");
                }
 
                [Test]
@@ -3791,7 +3815,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("dmserver",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                ServiceController [] servicesDependedOn = sc.ServicesDependedOn;
@@ -3820,11 +3844,10 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("ClipSrv", ".");
+                       ServiceController sc = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
                        ServiceController [] servicesDependedOn = sc.ServicesDependedOn;
                        Assert.IsNotNull (servicesDependedOn, "#1");
-                       Assert.AreEqual (1, servicesDependedOn.Length, "#2");
-                       Assert.AreEqual ("NetDDE", servicesDependedOn [0].ServiceName, "#3");
+                       Assert.AreEqual (DISABLED_SERVICE.DependedOn, ServiceNames (servicesDependedOn), "#2");
                }
 
                [Test]
@@ -3882,11 +3905,11 @@ namespace MonoTests.System.ServiceProcess
 
                        ServiceController sc = null;
                        
-                       sc = new ServiceController ("dmserver", ".");
+                       sc = new ServiceController (SHARE_PROCESS_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceType.Win32ShareProcess, sc.ServiceType, "#A1");
-                       sc.ServiceName = "Disk";
+                       sc.ServiceName = KERNEL_SERVICE.ServiceName;
                        Assert.AreEqual (ServiceType.KernelDriver, sc.ServiceType, "#A2");
-                       sc.DisplayName = "Workstation";
+                       sc.DisplayName = SHARE_PROCESS_SERVICE.ServiceName;
                        Assert.AreEqual (ServiceType.Win32ShareProcess, sc.ServiceType, "#A3");
                        sc.MachineName = "doesnotexist";
                        try {
@@ -3909,13 +3932,13 @@ namespace MonoTests.System.ServiceProcess
                                Assert.IsNull (win32Error.InnerException, "#A13");
                        }
 
-                       sc = new ServiceController ("Disk", ".");
+                       sc = new ServiceController (KERNEL_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceType.KernelDriver, sc.ServiceType, "#B1");
-                       sc.DisplayName = "Alerter";
+                       sc.DisplayName = SHARE_PROCESS_SERVICE.DisplayName;
                        Assert.AreEqual (ServiceType.Win32ShareProcess, sc.ServiceType, "#B2");
                        sc.MachineName = Environment.MachineName;
                        Assert.AreEqual (ServiceType.Win32ShareProcess, sc.ServiceType, "#B3");
-                       sc.ServiceName = "Disk";
+                       sc.ServiceName = KERNEL_SERVICE.ServiceName;
                        Assert.AreEqual (ServiceType.KernelDriver, sc.ServiceType, "#B4");
                }
 
@@ -3925,7 +3948,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("dmserver",
+                       ServiceController sc = new ServiceController (SHARE_PROCESS_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                ServiceType serviceType = sc.ServiceType;
@@ -3954,7 +3977,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("NetDDE", ".");
+                       ServiceController sc = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
                        Assert.AreEqual (ServiceType.Win32ShareProcess, sc.ServiceType);
                }
 
@@ -3995,11 +4018,11 @@ namespace MonoTests.System.ServiceProcess
                        ServiceController sc = null;
 
                        sc = new ServiceController ();
-                       sc.DisplayName = "workstation";
+                       sc.DisplayName = SHARE_PROCESS_SERVICE.DisplayName.ToLower ();
                        Assert.AreEqual (ServiceType.Win32ShareProcess, sc.ServiceType, "#1");
 
                        sc = new ServiceController ();
-                       sc.DisplayName = "disk driver";
+                       sc.DisplayName = KERNEL_SERVICE.DisplayName.ToLower ();
                        Assert.AreEqual (ServiceType.KernelDriver, sc.ServiceType, "#2");
                }
 
@@ -4023,8 +4046,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -4054,7 +4077,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                sc.Stop ();
@@ -4083,8 +4106,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("NetDDE", ".");
-                       ServiceController sc2 = new ServiceController ("NetDDE", ".");
+                       ServiceController sc1 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Stopped, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Stopped, sc2.Status, "#A2");
@@ -4096,7 +4119,7 @@ namespace MonoTests.System.ServiceProcess
                                // Cannot stop NetDDE service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                Assert.IsNotNull (ex.Message, "#B3");
-                               Assert.IsTrue (ex.Message.IndexOf ("NetDDE") != -1, "#B4");
+                               Assert.IsTrue (ex.Message.IndexOf (DISABLED_SERVICE.ServiceName) != -1, "#B4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -4147,8 +4170,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("SamSs", ".");
-                       ServiceController sc2 = new ServiceController ("SamSs", ".");
+                       ServiceController sc1 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -4157,10 +4180,10 @@ namespace MonoTests.System.ServiceProcess
                                sc1.Stop ();
                                Assert.Fail ("#B1");
                        } catch (InvalidOperationException ex) {
-                               // Cannot stop SamSs service on computer '.'
+                               // Cannot stop XXX service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2");
                                Assert.IsNotNull (ex.Message, "#B3");
-                               Assert.IsTrue (ex.Message.IndexOf ("SamSs") != -1, "#B4");
+                               Assert.IsTrue (ex.Message.IndexOf (UNCONTROLLABLE_SERVICE.ServiceName) != -1, "#B4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#B5");
                                Assert.IsNotNull (ex.InnerException, "#B6");
 
@@ -4183,8 +4206,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -4224,8 +4247,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -4244,10 +4267,10 @@ namespace MonoTests.System.ServiceProcess
                                sc1.Stop ();
                                Assert.Fail ("#D1");
                        } catch (InvalidOperationException ex) {
-                               // Cannot stop Schedule service on computer '.'
+                               // Cannot stop XXX service on computer '.'
                                Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#D2");
                                Assert.IsNotNull (ex.Message, "#D3");
-                               Assert.IsTrue (ex.Message.IndexOf ("Schedule") != -1, "#D4");
+                               Assert.IsTrue (ex.Message.IndexOf (CONTROLLABLE_SERVICE.ServiceName) != -1, "#D4");
                                Assert.IsTrue (ex.Message.IndexOf ("'.'") != -1, "#D5");
                                Assert.IsNotNull (ex.InnerException, "#D6");
 
@@ -4292,8 +4315,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -4338,7 +4361,7 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc = new ServiceController ("Schedule",
+                       ServiceController sc = new ServiceController (CONTROLLABLE_SERVICE.ServiceName,
                                "doesnotexist");
                        try {
                                sc.WaitForStatus (ServiceControllerStatus.Stopped,
@@ -4368,8 +4391,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("NetDDE", ".");
-                       ServiceController sc2 = new ServiceController ("NetDDE", ".");
+                       ServiceController sc1 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (DISABLED_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Stopped, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Stopped, sc2.Status, "#A2");
@@ -4428,8 +4451,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("SamSs", ".");
-                       ServiceController sc2 = new ServiceController ("SamSs", ".");
+                       ServiceController sc1 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (UNCONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -4480,8 +4503,8 @@ namespace MonoTests.System.ServiceProcess
                        if (RunningOnUnix)
                                Assert.Ignore ("Running on Unix.");
 
-                       ServiceController sc1 = new ServiceController ("Schedule", ".");
-                       ServiceController sc2 = new ServiceController ("Schedule", ".");
+                       ServiceController sc1 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
+                       ServiceController sc2 = new ServiceController (CONTROLLABLE_SERVICE.ServiceName, ".");
 
                        Assert.AreEqual (ServiceControllerStatus.Running, sc1.Status, "#A1");
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#A2");
@@ -4503,6 +4526,28 @@ namespace MonoTests.System.ServiceProcess
                        Assert.AreEqual (ServiceControllerStatus.Running, sc2.Status, "#C2");
                }
 
+               // Run this on .NET to generate ServiceInfo objects for services on the current machine
+//             [Test]
+               public static void DumpServices ()
+               {
+                       foreach (ServiceController sc in ServiceController.GetServices ()) {
+                               try {
+                                       var si = new ServiceInfo { ServiceName = sc.ServiceName, DisplayName = sc.DisplayName, ServiceType = sc.ServiceType, Dependents = ServiceNames (sc.DependentServices), DependedOn = ServiceNames (sc.ServicesDependedOn) };
+                                       var l = new List<string> ();
+                                       l.Add ($"ServiceName = \"{si.ServiceName}\"");
+                                       l.Add ($"DisplayName = \"{si.DisplayName}\"");
+                                       if (si.ServiceType != ServiceType.Win32ShareProcess)
+                                               l.Add ($"ServiceType = ServiceType.{si.ServiceType}");
+                                       if (si.Dependents.Length > 0)
+                                               l.Add ("Dependents = new [] { \"" + String.Join ("\", \"", si.Dependents) + "\" }");
+                                       if (si.DependedOn.Length > 0)
+                                               l.Add ("DependedOn = new [] { \"" + String.Join ("\", \"", si.DependedOn) + "\" }");
+                                       Console.WriteLine ("static ServiceInfo " + si.DisplayName.ToUpper ().Replace (' ', '_').Replace ('-', '_') + "_SERVICE = new ServiceInfo { " + String.Join (", ", l) + " };");
+                               } catch {
+                               }
+                       }
+               }
+
                private static void EnsureServiceIsRunning (ServiceController sc)
                {
                        sc.Refresh ();
@@ -4543,6 +4588,15 @@ namespace MonoTests.System.ServiceProcess
                        return false;
                }
 
+               private static string[] ServiceNames (ServiceController [] services)
+               {
+                       var result = new string [services.Length];
+                       for (var i = 0; i < result.Length; i++)
+                               result [i] = services [i].ServiceName.ToLower ();
+                       Array.Sort<string> (result);
+                       return result;
+               }
+
                private bool RunningOnUnix
                {
                        get {
index 977b84676916a8b7f0fadae410922be528ebf84d..605835807d85e8a95a8669b17b01e61d19fa8a60 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7fc1e4031e645ed566fa3f170f70906775fab958..f41504c857ec237691508e4f5363609aba14dc9b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3a4f38fddcd6c549bda23ff6aa2930ca1d03354c..ab01576214c284bf011e4b6981b612a013712d76 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9eff14306ed65165ab4353063b860e4abda82498..f9a9fb250f87cfb52c985e3037676f19d4edc093 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9cc4aaa72a4f2d47a234b7934fc2682a1eebba7c..ebd674760cc8a02bc30c8906665e343940f658f2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d0077c929239e4887fbcf5e6e0a08cde329bb7c7..ce6be88aa1424c5b8c0889c59a7756364f51472b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7a209dc6184b928bc09dfe48d27cd010948d5e24..67dc8fdf46681bdd4a72e018241a16ed0b10f965 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 22fbfe51f01e67ca6dc5b87514281508b6aa81e7..f22283343a92f66e00475acccf8aea07714a62e7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index eafaa10d63401c343089072c780fe7e5c24cd2fc..01aa27d48e3b8809c7313d3dc4ef348e6508bc59 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4e373d375e763289a8d9c98e190e9eb2ce092646..560bd38bf071e1cc5ab99aacff0ab70807d46e84 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2fd69b6fb98cefcfa87405bb581a4f92cfd1d30e..9725f7b56f2538c3f0afbdcbb1eea8e9274c5ec2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3a19781b61d6feac27b225cea852c5a0aa4adb2a..e5c1fa6b2f81272e6fda9e948d919dd5c01224d2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index db96ee83d51a27647f9a99da78b52e80174cce51..0cb68b46eedaed337ea34262b049edaa2e0a0ecd 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index c8ee4200e76d8760ac75512cbf2540217b13562c..e69a280b041ed17efab8290d979d60d3f392343e 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 0e4835c786ffe93ffdbdd37d60f6534fecea67f6..7f1c39753d952c12ea7d80c5462b924226f30ea6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 26fa6cc83db22cdf220bb54115cfc31d78c597da..1dd86dcc1130c434b48c5fad2829c889ba34ec09 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index da48eae1e67684ae60d3767c4ccbbabbed4a2c69..1f047d204fba57afbe17fc9fc0a14a4ee950eadc 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index eb59c16adb7ab1eb9e8baf77d61fff3cb21ed275..ddeedce17b93474d74818bed04518e83eb9e3b49 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4cd3951bc0a04448a94534d0098745777cb7679c..c61327be0e5f8bf2db733c8f98fd45fe22069193 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 0daea63410459ef0484304ff72fb5d7b3c9257ec..d79222b2568b4116cbbd893a5fa383f446a859bd 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8a5e692384cb60d0ada8f86203459afdc805f888..a4fc142507f8fb172f0fffe32673cc35c1bda716 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ef0b5e703eb9134b5ca08019942341a2472b1b85..1a523884ce95053f0ee2affae05252ef95013f22 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2485b04370899bb546cf5007ffca070c1a5c007b..2f8b7fd1318f8b91eaf2448eab1ea7a15f28a3cc 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index dc8cff9041ea086fea60039cb4cbda18ca124a2b..8ecaa25e3df7ad48e4f810ddcd8b1d18dbba0c89 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1192e64e36682bc13fbed443fcc47bc30c00d0dd..7a56cecb473c1c3c74b7f0f58608d509e9b19da3 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index af61a000c5ef17f54c2c795989048fc7d65abbbb..8f04dff8786694af28eaa08009a9d9c6e9eda4ae 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 07b190c018b71ef9f9e56494b2d26b84f198ac6a..1130cf15ff59395838371f4c649f7af04ad9e44b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 060d3f8ded07c592c15d096aeca58ce24d168a49..559fe4fd245f4e9515b2fe3380932b1224b44d72 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8d3b9a7c82e1e69ccb293f71b9f852b78925a3b0..917ebd0b54caa29fcd6c69e354d494e6e595b265 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f32bb39e09182b6d88559c0758c6af511e14cddc..55de52a77844e4a891fafbbc60cafa9476b45199 100644 (file)
@@ -135,10 +135,16 @@ namespace System.Xml.Serialization
 
                void LookupTypeConvertor ()
                {
-                       // We only need this for System.Xml.Linq.
-                       var convertor = type.GetCustomAttribute<XmlTypeConvertorAttribute> ();
-                       if (convertor != null)
-                               typeConvertor = type.GetMethod (convertor.Method, BindingFlags.Static | BindingFlags.NonPublic);
+                       // We only need this for System.Xml.Linq
+                       var t = type;
+                       // HACK: because interpreter array handling is so bad
+                       if (t.IsArray)
+                               t = t.GetElementType ();
+
+                       var convertor = t.GetCustomAttribute<XmlTypeConvertorAttribute> ();
+                       if (convertor != null) {
+                               typeConvertor = t.GetMethod (convertor.Method, BindingFlags.Static | BindingFlags.NonPublic);
+                       }
                }
 
                internal void ConvertForAssignment (ref object value)
index 5d9e4b24f341cd6a2054bb8d1ab9aea3d18342e5..d03dea1ff01228e237db86dfc4a9a7028f2da73e 100644 (file)
@@ -737,7 +737,8 @@ namespace System.Xml.Serialization
                        Type type = listType.Type;
                        if (type.IsArray)
                        {
-                               list = EnsureArrayIndex ((Array)list, index, type.GetElementType());
+                               list = EnsureArrayIndex ((Array)list, index, type.GetElementType ());
+                               listType.ConvertForAssignment (ref value);
                                ((Array)list).SetValue (value, index);
                        }
                        else    // Must be IEnumerable
index 24c8f106523b44cf958527f49371d9414ba3d042..61835e709a09541daa56c89b501efc256c0ba3c1 100644 (file)
@@ -161,14 +161,12 @@ namespace MonoTests.System.XmlSerialization
                }
 
                // test constructors
-#if USE_VERSION_1_1    // It doesn't pass on MS.NET 1.1.
                [Test]
+               [ExpectedException (typeof (ArgumentNullException))]
                public void TestConstructor()
                {
                        XmlSerializer ser = new XmlSerializer (null, "");
                }
-#else
-#endif
 
                // test basic types ////////////////////////////////////////////////////////
                [Test]
index b2743f40fa72307f79512e9fe6d7a499625677fa..190dbdbe5e05ff385392643855eeee4952013f80 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index be665cdd36eb4ec60f61067baed6d37a222f350b..10ca891ef7cc469897ed47d49be4580242697ccd 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5415ff8e50a4beb760cc5825406fd6e49e7a3989..f93bbabc3d88e21bca92fc48e741c150f261a945 100644 (file)
@@ -2099,6 +2099,27 @@ namespace MonoTests.System.Xml.Linq
                        Assert.AreEqual (xe.Content.ToString (), "<Data />", "#3");
                }
 
+               [XmlType ("Root")]
+               public class DeserializeXElementArray_Data
+               {
+                       [XmlAnyElement]
+                       public XElement[] Content;
+               }
+
+               [Test]
+               public void DeserializeXElementArray ()
+               {
+                       var xmlString = "<Root><Data /></Root>";
+
+                       var serializer = new XmlSerializer (typeof (DeserializeXElementArray_Data));
+                       var res = serializer.Deserialize (new StringReader (xmlString));
+
+                       Assert.IsNotNull (res, "#1");
+                       Assert.AreEqual (typeof (DeserializeXElementArray_Data), res.GetType (), "#2");
+                       var xe = (DeserializeXElementArray_Data)res;
+                       Assert.AreEqual (xe.Content [0].ToString (), "<Data />", "#3");
+               }
+
                [Test] // Bug #20151
                public void XElementFromArrayWithNullValuesAsObject ()
                {
index 7c265e46d040b2a47d131dab92196a6b52e4d0f8..fa1bdd68c392c865451da9c9e2b6db2690ac2e02 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e4054a173c8d3e5c221b5bbb2f6a4995a52f2237..343ecc47e45759d2347c4e8d98b6e019eb3e8a6e 100644 (file)
@@ -135,7 +135,7 @@ namespace Mono.Btls
                        if (IsServer) {
                                SetPrivateCertificate (nativeServerCertificate);
                        } else {
-                               ssl.SetServerName (TargetHost);
+                               ssl.SetServerName (ServerName);
                        }
                }
 
@@ -233,14 +233,7 @@ namespace Mono.Btls
                        if (!IsServer)
                                ctx.SetSelectCallback (SelectCallback);
 
-                       var host = TargetHost;
-                       if (!string.IsNullOrEmpty (host)) {
-                               var pos = TargetHost.IndexOf (':');
-                               if (pos > 0)
-                                       host = host.Substring (0, pos);
-                       }
-
-                       ctx.SetVerifyParam (MonoBtlsProvider.GetVerifyParam (host, IsServer));
+                       ctx.SetVerifyParam (MonoBtlsProvider.GetVerifyParam (ServerName, IsServer));
 
                        TlsProtocolCode minProtocol, maxProtocol;
                        GetProtocolVersions (out minProtocol, out maxProtocol);
@@ -277,11 +270,13 @@ namespace Mono.Btls
 
                        var cipher = (CipherSuiteCode)ssl.GetCipher ();
                        var protocol = (TlsProtocolCode)ssl.GetVersion ();
+                       var serverName = ssl.GetServerName ();
                        Debug ("GET CONNECTION INFO: {0:x}:{0} {1:x}:{1} {2}", cipher, protocol, (TlsProtocolCode)protocol);
 
                        connectionInfo = new MonoTlsConnectionInfo {
                                CipherSuiteCode = cipher,
-                               ProtocolVersion = GetProtocol (protocol)
+                               ProtocolVersion = GetProtocol (protocol),
+                               PeerDomainName = serverName
                        };
                }
 
index d7510901357fdb925c7cd32cd7df98e6794cf912..8ef902f3a1ce41404460b053a85b8df59ed44063 100644 (file)
@@ -124,6 +124,9 @@ namespace Mono.Btls
                [DllImport (BTLS_DYLIB)]
                extern static int mono_btls_ssl_set_server_name (IntPtr handle, IntPtr name);
 
+               [DllImport (BTLS_DYLIB)]
+               extern static IntPtr mono_btls_ssl_get_server_name (IntPtr handle);
+
                static BoringSslHandle Create_internal (MonoBtlsSslCtx ctx)
                {
                        var handle = mono_btls_ssl_new (ctx.Handle.DangerousGetHandle ());
@@ -409,6 +412,16 @@ namespace Mono.Btls
                        }
                }
 
+               public string GetServerName ()
+               {
+                       CheckThrow ();
+                       var namePtr = mono_btls_ssl_get_server_name (
+                               Handle.DangerousGetHandle ());
+                       if (namePtr == IntPtr.Zero)
+                               return null;
+                       return Marshal.PtrToStringAnsi (namePtr);
+               }
+
                protected override void Close ()
                {
                        mono_btls_ssl_close (Handle.DangerousGetHandle ());
index f051a5fcbc2c04ca406f2edebcf63019cc0af693..79f0468d4619aee415b238d9171366fe801abb8e 100644 (file)
@@ -35,6 +35,7 @@ namespace Mono.Net.Security
                MobileAuthenticatedStream parent;
                bool serverMode;
                string targetHost;
+               string serverName;
                SslProtocols enabledProtocols;
                X509Certificate serverCertificate;
                X509CertificateCollection clientCertificates;
@@ -54,6 +55,13 @@ namespace Mono.Net.Security
                        this.clientCertificates = clientCertificates;
                        this.askForClientCert = askForClientCert;
 
+                       serverName = targetHost;
+                       if (!string.IsNullOrEmpty (serverName)) {
+                               var pos = serverName.IndexOf (':');
+                               if (pos > 0)
+                                       serverName = serverName.Substring (0, pos);
+                       }
+
                        certificateValidator = CertificateValidationHelper.GetInternalValidator (
                                parent.Settings, parent.Provider);
                }
@@ -92,6 +100,10 @@ namespace Mono.Net.Security
                        get { return targetHost; }
                }
 
+               protected string ServerName {
+                       get { return serverName; }
+               }
+
                protected bool AskForClientCertificate {
                        get { return askForClientCert; }
                }
index 6d6ee2b5d237c077793bed3840d6984f672da2d3..40c5df098af3cfbd73a090ecac7874bb2683afb5 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8e045c3da847c7730f5d0d35115d7d9f09e20388..c02b60fcc01de334d5140209855d985ac79eec67 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1f644f32d70ddb234dd5dfc55aee7dd6682f31cc..dcaca1cff413a3bd8d0a1959922589674bc64634 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9a8560a92b58275149f51640218549c4c1a15652..af9fbec33bef62230039b5cefe5983203eb9ca64 100644 (file)
@@ -406,17 +406,17 @@ namespace System.Net.NetworkInformation {
                        get {
                                Win32_IP_ADAPTER_INFO ai = Win32NetworkInterface2.GetAdapterInfoByIndex (mib4.Index);
                                // FIXME: should ipv6 DhcpServer be considered?
-                               return ai != null ? Win32FromUnicast ((int) ai.Index, addr.FirstUnicastAddress) : new UnicastIPAddressInformationCollection ();
+                               return ai != null ? Win32FromUnicast (addr.FirstUnicastAddress) : new UnicastIPAddressInformationCollection ();
                        }
                }
 
-               static UnicastIPAddressInformationCollection Win32FromUnicast (int ifIndex, IntPtr ptr)
+               static UnicastIPAddressInformationCollection Win32FromUnicast (IntPtr ptr)
                {
                        UnicastIPAddressInformationCollection c = new UnicastIPAddressInformationCollection ();
                        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.InternalAdd (new Win32UnicastIPAddressInformation (ifIndex, a));
+                               c.InternalAdd (new Win32UnicastIPAddressInformation (a));
                        }
                        return c;
                }
index 439cab07cf091c553d92b9ba5565fdd1d81bb0dc..17710c420fd9c5188fef8dfcef54222bf74c250c 100644 (file)
 using System;
 using System.Runtime.InteropServices;
 using System.Net.Sockets;
+using System.Diagnostics.Contracts;
 
 namespace System.Net.NetworkInformation {
 #if !MOBILE
        class Win32UnicastIPAddressInformation : UnicastIPAddressInformation 
        {
-               int if_index;
                Win32_IP_ADAPTER_UNICAST_ADDRESS info;
+               IPAddress ipv4Mask;
 
-               public Win32UnicastIPAddressInformation (int ifIndex, Win32_IP_ADAPTER_UNICAST_ADDRESS info)
+               public Win32UnicastIPAddressInformation (Win32_IP_ADAPTER_UNICAST_ADDRESS info)
                {
-                       this.if_index = ifIndex;
                        this.info = info;
+                       IPAddress ipAddress = info.Address.GetIPAddress ();
+                       // IPv6 returns 0.0.0.0 for consistancy with XP
+                       if (ipAddress.AddressFamily == AddressFamily.InterNetwork) {
+                               ipv4Mask = PrefixLengthToSubnetMask (info.OnLinkPrefixLength, ipAddress.AddressFamily);
+                       }
                }
 
                public override IPAddress Address {
@@ -74,27 +79,15 @@ namespace System.Net.NetworkInformation {
                        get { return info.DadState; }
                }
 
-               public override IPAddress IPv4Mask {
+               public override IPAddress IPv4Mask{
                        get {
-                               Win32_IP_ADAPTER_INFO ai = Win32NetworkInterface2.GetAdapterInfoByIndex (if_index);
-                               if (ai == null)
-                                       throw new Exception ("huh? " + if_index);
-                               if (this.Address == null)
-                                       return null;
-                               string expected = this.Address.ToString ();
-                               unsafe {
-                                       Win32_IP_ADDR_STRING p = ai.IpAddressList;
-                                       while (true) {
-                                               if (p.IpAddress == expected)
-                                                       return IPAddress.Parse (p.IpMask);
-                                               if (p.Next == IntPtr.Zero)
-                                                       break;
-                                               p = (Win32_IP_ADDR_STRING) Marshal.PtrToStructure (p.Next, typeof (Win32_IP_ADDR_STRING));
-                                       }
-
-                                       // Or whatever it should be...
-                                       return null;
+                               // The IPv6 equivilant was never available on XP, and we've kept this behavior for legacy reasons.
+                               // For IPv6 use PrefixLength instead.
+                               if (Address.AddressFamily != AddressFamily.InterNetwork) {
+                                       return IPAddress.Any;
                                }
+
+                               return ipv4Mask;
                        }
                }
 
@@ -105,6 +98,28 @@ namespace System.Net.NetworkInformation {
                public override SuffixOrigin SuffixOrigin {
                        get { return info.SuffixOrigin; }
                }
+
+               // Convert a CIDR prefix length to a subnet mask "255.255.255.0" format
+               private static IPAddress PrefixLengthToSubnetMask (byte prefixLength, AddressFamily family) {
+                       Contract.Requires ((0 <= prefixLength) && (prefixLength <= 126));
+                       Contract.Requires ((family == AddressFamily.InterNetwork) || (family == AddressFamily.InterNetworkV6));
+
+                       byte[] addressBytes;
+                       if (family == AddressFamily.InterNetwork) {
+                               addressBytes = new byte [4];
+                       } else { // v6
+                               addressBytes = new byte [16];
+                       }
+
+                       Contract.Assert (prefixLength < (addressBytes.Length * 8));
+
+                       // Enable bits one at a time from left/high to right/low
+                       for (int bit = 0; bit < prefixLength; bit++) {
+                               addressBytes [bit / 8] |= (byte) (0x80 >> (bit % 8));
+                       }
+
+                       return new IPAddress (addressBytes);
+               }
        }
 #endif
 
index 4b3ee173ef9abc5c2655d33352c05dc0dd39fbff..22edb63a4c4e85b59fdae28b2bff4daa4e858c72 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7eea4a2bc955a8747fc012f671017e6005fa9d72..3f87398b1606e3e6b69664f2f85440cef7d6da84 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 6b9b6e376a6a095113547d5f32f9a17ec13e8c67..ed09cea235c246e046c531991e357ce1276e2505 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3f22e653c194bb21bb73162180d68468beb1be8e..f01e0b18164ae532270648e0c0d9ca2a3144a347 100644 (file)
@@ -28,7 +28,6 @@ LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
 ifndef SKIP_AOT
 
 ifdef PLATFORM_AOT_SUFFIX
-Q_AOT=$(if $(V),,@echo "AOT     [$(PROFILE)] $(notdir $(@))";)
 $(mcs_aot_image): $(mcs_exe) $(mscorlib_dll) $(runtime_dep)
        $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(mcs_aot_image) --debug $(mcs_exe) || cat $(PROFILE)_aot.log || (cat $(PROFILE)_aot.log; exit 1)
 
index d2b99281c3b4143b74566ab73fb8965b321b516f..815c1ba7e73727e93d0d58ca15d81976c08fe14d 100644 (file)
@@ -808,45 +808,15 @@ namespace System.Runtime.Remoting
                [SecurityPermission (SecurityAction.Assert, SerializationFormatter = true)] // FIXME: to be reviewed
                internal static byte[] SerializeExceptionData (Exception ex)
                {
+                       byte[] result = null;
                        try {
-                               int retry = 4;
-                               
-                               do {
-                                       try {
-                                               MemoryStream ms = new MemoryStream ();
-                                               _serializationFormatter.Serialize (ms, ex);
-                                               return ms.ToArray ();
-                                       }
-                                       catch (Exception e) {
-                                               if (e is ThreadAbortException) {
-#if MONO_FEATURE_THREAD_ABORT
-                                                       Thread.ResetAbort ();
-#endif
-                                                       retry = 5;
-                                                       ex = e;
-                                               }
-                                               else if (retry == 2) {
-                                                       ex = new Exception ();
-                                                       ex.SetMessage (e.Message);
-                                                       ex.SetStackTrace (e.StackTrace);
-                                               }
-                                               else
-                                                       ex = e;
-                                       }
-                                       retry--;
-                               }
-                               while (retry > 0);
-                               
-                               return null;
-                       }
-                       catch (Exception tex)
-                       {
-                               byte[] data = SerializeExceptionData (tex);
-#if MONO_FEATURE_THREAD_ABORT
-                               Thread.ResetAbort ();
-#endif
-                               return data;
+                               /* empty - we're only interested in the protected block */
+                       } finally {
+                               MemoryStream ms = new MemoryStream ();
+                               _serializationFormatter.Serialize (ms, ex);
+                               result = ms.ToArray ();
                        }
+                       return result;
                }
                
                internal static object GetDomainProxy(AppDomain domain) 
index d52ed93facf33d27df5138f04fb8b40406d786b8..14c895e597a9cd4a1297218e0c03a649bd95296d 100644 (file)
@@ -32,7 +32,7 @@ namespace System.Security.Cryptography
 {
     public sealed class IncrementalHash : IDisposable
     {
-        public IncrementalHash () { }
+        private IncrementalHash () { }
         public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
         public void AppendData (byte[] data) { }
         public void AppendData (byte[] data, int offset, int count) { }
index 5b3d72dee38d4b94c7c4c2c16179b9d4f6cb729f..760f646ebdf3ee6fd8029f16d9c5a18d5a52cc91 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a22a07e2db0297c7d41bc221a8df9c6220e5d1af..b00c0418222dd5f0e0e89960f2fa316bb25cb441 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8fd26ed2f5bdf1956fddd2c64da3524d7f43a45e..a356d2789c0cf2f2550e61f1de38a102d2d61205 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 428219143c5322d193c5552912b1e1a3d84d1309..1b1d6536e8eb3e843512750a0d7c378f8db812a3 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ad4faf3ce242d67a81f170f9c4620b757e438fac..8475a9e489428c0d98d91267b7b40954a54be3c2 100644 (file)
@@ -4781,12 +4781,18 @@ namespace Mono.CSharp {
 
                                //
                                // A candidate with no default parameters is still better when there
-                               // is no better expression conversion
+                               // is no better expression conversion and does not have more parameters
                                //
                                if (candidate_pd.Count < best_pd.Count) {
-                                       if (!candidate_params && !candidate_pd.FixedParameters [j - 1].HasDefaultValue) {
+                                       if (candidate_params)
+                                               return false;
+                                       
+                                       if (!candidate_pd.FixedParameters [j - 1].HasDefaultValue)
                                                return true;
-                                       }
+
+                                       if (best_pd.FixedParameters [j].HasDefaultValue)
+                                               return true;
+                                       
                                } else if (candidate_pd.Count == best_pd.Count) {
                                        if (candidate_params)
                                                return false;
index ea9b5ddf7683b4eedc56075232f1cedb481a4231..e55c24010023a99993a9405eab3a4f41de5663d9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 27b7f586932c7d01e355f5bc2745512d5cb07a1a..d3b0f86d8164bd2338d66fe6ca7a8df689bf07cc 100644 (file)
@@ -1024,6 +1024,7 @@ namespace Mono.CSharp {
                                                                                shared_list = false;
                                                                                prev = new List<MemberSpec> (found.Count + 1);
                                                                                prev.AddRange (found);
+                                                                               found = prev;
                                                                        } else {
                                                                                prev = (List<MemberSpec>) found;
                                                                        }
index 69bdc23a5cbebf3f966a8ab11ee6e2c221944b0f..03a62053464fb317d4772e9908df2ffc10af643a 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4c55206a32b037e0e3f1e0da3e5e4b813702e430..ff2129e0ca0e6d86b79e6bf697e2e02ed95d3de8 100644 (file)
@@ -19,6 +19,9 @@ namespace NUnit.ConsoleRunner
                [STAThread]\r
                public static int Main(string[] args)\r
                {\r
+                       Console.ForegroundColor = ConsoleColor.Red;\r
+                       Console.WriteLine ("Note: nunit-console shipped with Mono is deprecated, please use the NUnit NuGet package or some other form of acquiring NUnit.");\r
+                       Console.ResetColor ();\r
                        return Runner.Main( args );\r
                }\r
        }\r
index d5bfd0df4c15ed391be07e1faf7d2718ce4d5b92..abcc7acfceda781eec1ef3239f282df650a3f0e6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index cf81560c25eef121eab252ae3d0a9c095829f415..62491e1b318175b53b13240c44cfe7f21dc64b21 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 32ce8c4aaca3c92cf078e5de457dfe4fc31a95de..4b503806ab9d1f13d969cb6faff3b19adb692225 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9490955247751f02db92bdbcf4ba7e52a906b4c8..b6d6ae1754761bbefbb7f757402d411a83cc3599 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1b1ac55efa39ce80bdb10d3b2518789bf252795c..01d141732770fd48e1a7fe5aebe5fbcd2c0b86e8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index bd69477f36e482535b83f72a69ff8f5bfbfe428a..f6fa9cfe62a2855abcd745def43477328c416000 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9f5de981862e8b6f78ff6cdeeb6a0ef9a79fc90e..2ed6ce9136e5ef5b0812babcb91580876c531b2b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 06794aa8b128d0533ecc6aedff760cf286f00f61..9fb55fb9d965b19a5f6b84321738cbd96ff886f9 100644 (file)
@@ -14,6 +14,7 @@ namespace NUnit.Framework
        /// {}\r
        /// </example>\r
        [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=true)]\r
+       [Obsolete ("The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.", true)]\r
        public class TestFixtureAttribute : Attribute\r
        {\r
                private string description;\r
index eaab4d6360bda4518990f9fb5a0b1180e054f203..48413a8456eee84db44476dded2a8db5206ff909 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
diff --git a/mcs/tests/gtest-640.cs b/mcs/tests/gtest-640.cs
new file mode 100644 (file)
index 0000000..2aeebb4
--- /dev/null
@@ -0,0 +1,39 @@
+using System;
+
+public struct Test
+{
+       public static Test op_Addition<T>(Test p1, T p2)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static int op_Addition<T>(T p1, int p2)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static Test operator +(Test p1, Test p2)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static long operator +(Test p1, int p2)
+       {
+               return 4;
+       }
+}
+
+public class Program
+{
+       public static int Main ()
+       {
+               var t = new Test ();
+
+               int p2 = 20;
+               var res = t + p2;
+               if (res != 4)
+                       return 1;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-optional-40.cs b/mcs/tests/gtest-optional-40.cs
new file mode 100644 (file)
index 0000000..e554fa7
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+
+internal class Program
+{
+       public static void Main ()
+       {
+               AttributeOrDefault ("firstItem", null); 
+       }
+       
+       public static string AttributeOrDefault (string attribute, string defaultValue = null)
+       {
+               return "";
+       }
+
+       public static string AttributeOrDefault (string attribute, bool? klass, string defaultValue = null)
+       {
+               throw new ApplicationException ();
+       }
+}
index f9c8f8b2465c7c00ddc1831c311422c9785ad594..ddb13732d045f93741bf1e5899a1ef29903e6590 100644 (file)
       </method>
     </type>
   </test>
+  <test name="gtest-640.cs">
+    <type name="Test">
+      <method name="Test op_Addition[T](Test, T)" attrs="150">
+        <size>7</size>
+      </method>
+      <method name="Int32 op_Addition[T](T, Int32)" attrs="150">
+        <size>7</size>
+      </method>
+      <method name="Test op_Addition(Test, Test)" attrs="2198">
+        <size>7</size>
+      </method>
+      <method name="Int64 op_Addition(Test, Int32)" attrs="2198">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Main()" attrs="150">
+        <size>44</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-anontype-01.cs">
     <type name="Test">
       <method name="Int32 Main()" attrs="150">
       </method>
     </type>
   </test>
+  <test name="gtest-optional-40.cs">
+    <type name="Program">
+      <method name="Void Main()" attrs="150">
+        <size>14</size>
+      </method>
+      <method name="System.String AttributeOrDefault(System.String, System.String)" attrs="150">
+        <size>14</size>
+      </method>
+      <method name="System.String AttributeOrDefault(System.String, System.Nullable`1[System.Boolean], System.String)" attrs="150">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-partial-01.cs">
     <type name="B`1[U]">
       <method name="Void .ctor()" attrs="6278">
index af120d403ed56646c67d8ad8299c5779f5a6cb12..60600a30a325741f01915bcfef2b9706338f0267 100644 (file)
@@ -3,7 +3,6 @@ thisdir = tools
 net_4_5_dirs := \
        al              \
        linker          \
-       tuner           \
        culevel         \
        genxs           \
        mkbundle        \
index 367ec7d557e04179cadd7d97addaca5515b2e78b..20582303172ab9a33103073d73b7832fb85e6127 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 718e3460246144bc96475cf337a0a5a51a8127b6..a9b1e46cba089a277538dad6b3961e245ec14c4f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 1b50d52ccaf7c664f6e8d5210440657cba89152e..907573451ebad1bc1823bd63171af0c234f9ea51 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 047a651f16e142cd45404d3bdb126e4f8887595c..b5f730ceb01065cf768ed4b3b3d65bd56b88c3a4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 145193e09935fba8954c01171d7c428839c1befe..ae7efa8697c9b0dc85142bc7b6d8bdbbb2a28baa 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2aba4c7303ff70f0f0c7a040beab01b283eded6a..96bbd89f8589480f3f36898d94cb989c1c0e8db4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index cd477b6ce7f076698909ca5389bc1ebe5591c22e..524b7cec7ad3ec4bfaf0b4d86af141f1d4e388f7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3aab24e89b1a7e712e2c8a7715bf7664e937487e..0ade887e5b1e6d2f582e4dcffa79ec5cea9e6d21 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5fa2fece9d2fca5f43637f77d931e946687eb7e4..e7ad8f6d4c71a961d1c2fcb02cfd7efe5989bd7b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 26a6f176a7367b87b2e6f1e19983f8c314f11ad6..2fe5b02961889c70e20ae3870e33f0dce1555732 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index deee27c5f76159ae5f55eebc56792f76860df388..e29fe61a1756bcb8d68764e76ab6a2b77097ed7d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 0f6d7fc49cc5f8b5a004793e0873f5ef8aec9fcd..9049faba66a9d15d36cf21b130d19182afc24623 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 65a0dc9cd56fb0dd977e81a464aee9204ac83b55..a1907c4617c665f14fd61cff44839ebc5bf7526d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3a717b1ba3600377a88a64e468e93afc122ac77b..2d254d6f33d60c7c8b1b35ddaec5f32c731df857 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b30fdc956a865f8db8ae59522bcfa615014ba8fd..c5d2c39107df69e30b7f88fbaac04d9d1f559bef 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a9772c9dabef3b28b9d80f6d3852b1a6fa1b1fc1..314a5481ddbd2cb62b4cc212a4a900ea111574f2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9a55c06ea2febc77ff70986d960eb1e73610d622..7cb491a46954009798da0eb0699efe2b8db70511 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index ea02fed745fd5d08e388a74e78e7a7476b6d29df..698e8cd2321e545a18f5f283bd6f05d23ea0aa41 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f732e730710622ec84bf5b0b9bdeca308a1fe0bf..766f8249bfb759af45e977d5c2057bf66870c644 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 66658de08ee969a1e55331b9b0b920edc8780e1a..522a2afcf0aa47801f947533da531a492ce902d1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 57749e90accaf6f98a35efef377046af7031398a..4fa01f15b4cb3953bdc9c76bb1502072850ad517 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index e9c398e72ad90446e7e25670f0d5398bdae0978a..938623a3fda720afd039d3bef14589dd0f5831d7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index b4566bada084cacd2adcfe62729a42003c8f6221..7c539e9ef51b320292ed9fa39f90944676ef90d4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
diff --git a/mcs/tools/linker/AUTHORS b/mcs/tools/linker/AUTHORS
deleted file mode 100644 (file)
index 4af5896..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Jb Evain <jbevain@novell.com>
diff --git a/mcs/tools/linker/MIT.X11 b/mcs/tools/linker/MIT.X11
deleted file mode 100644 (file)
index d2d78ee..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2007 Novell, Inc and the individuals listed on the
-ChangeLog entries.
-
-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.
diff --git a/mcs/tools/linker/Mono.Linker.Steps/BaseStep.cs b/mcs/tools/linker/Mono.Linker.Steps/BaseStep.cs
deleted file mode 100644 (file)
index 13cf468..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-//
-// BaseStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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 Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public abstract class BaseStep : IStep {
-
-               private LinkContext _context;
-
-               public LinkContext Context {
-                       get { return _context; }
-               }
-
-               public AnnotationStore Annotations {
-                       get { return _context.Annotations; }
-               }
-
-               public void Process (LinkContext context)
-               {
-                       _context = context;
-
-                       if (!ConditionToProcess ())
-                               return;
-
-                       Process ();
-
-                       foreach (AssemblyDefinition assembly in context.GetAssemblies ())
-                               ProcessAssembly (assembly);
-
-                       EndProcess ();
-               }
-
-               protected virtual bool ConditionToProcess ()
-               {
-                       return true;
-               }
-
-               protected virtual void Process ()
-               {
-               }
-
-               protected virtual void EndProcess ()
-               {
-               }
-
-               protected virtual void ProcessAssembly (AssemblyDefinition assembly)
-               {
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/BlacklistStep.cs b/mcs/tools/linker/Mono.Linker.Steps/BlacklistStep.cs
deleted file mode 100644 (file)
index 6c6344b..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-//
-// Blacklist.cs
-//
-// Author:
-//   Jb Evain (jb@nurv.fr)
-//
-// (C) 2007 Novell 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.Linq;
-using System.IO;
-using System.Reflection;
-using System.Xml;
-using System.Xml.XPath;
-
-using Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class BlacklistStep : BaseStep {
-
-               protected override bool ConditionToProcess()
-               {
-                       return Context.CoreAction == AssemblyAction.Link;
-               }
-
-               protected override void Process ()
-               {
-                       foreach (string name in Assembly.GetExecutingAssembly ().GetManifestResourceNames ()) {
-                               if (!name.EndsWith (".xml", StringComparison.OrdinalIgnoreCase) || !IsReferenced (GetAssemblyName (name)))
-                                       continue;
-
-                               try {
-                                       if (Context.LogInternalExceptions)
-                                               Console.WriteLine ("Processing resource linker descriptor: {0}", name);
-                                       Context.Pipeline.AddStepAfter (typeof (TypeMapStep), GetResolveStep (name));
-                               } catch (XmlException ex) {
-                                       /* This could happen if some broken XML file is included. */
-                                       if (Context.LogInternalExceptions)
-                                               Console.WriteLine ("Error processing {0}: {1}", name, ex);
-                               }
-                       }
-
-                       foreach (var asm in Context.GetAssemblies ()) {
-                               foreach (var rsc in asm.Modules
-                                                                       .SelectMany (mod => mod.Resources)
-                                                                       .Where (res => res.ResourceType == ResourceType.Embedded)
-                                                                       .Where (res => res.Name.EndsWith (".xml", StringComparison.OrdinalIgnoreCase))
-                                                                       .Where (res => IsReferenced (GetAssemblyName (res.Name)))
-                                                                       .Cast<EmbeddedResource> ()) {
-                                       try {
-                                               if (Context.LogInternalExceptions)
-                                                       Console.WriteLine ("Processing embedded resource linker descriptor: {0}", rsc.Name);
-
-                                               Context.Pipeline.AddStepAfter (typeof (TypeMapStep), GetExternalResolveStep (rsc, asm));
-                                       } catch (XmlException ex) {
-                                               /* This could happen if some broken XML file is embedded. */
-                                               if (Context.LogInternalExceptions)
-                                                       Console.WriteLine ("Error processing {0}: {1}", rsc.Name, ex);
-                                       }
-                               }
-                       }
-               }
-
-               static string GetAssemblyName (string descriptor)
-               {
-                       int pos = descriptor.LastIndexOf ('.');
-                       if (pos == -1)
-                               return descriptor;
-
-                       return descriptor.Substring (0, pos);
-               }
-
-               bool IsReferenced (string name)
-               {
-                       foreach (AssemblyDefinition assembly in Context.GetAssemblies ())
-                               if (assembly.Name.Name == name)
-                                       return true;
-
-                       return false;
-               }
-
-               static ResolveFromXmlStep GetExternalResolveStep (EmbeddedResource resource, AssemblyDefinition assembly)
-               {
-                       return new ResolveFromXmlStep (GetExternalDescriptor (resource), "resource " + resource.Name + " in " + assembly.FullName);
-               }
-
-               static ResolveFromXmlStep GetResolveStep (string descriptor)
-               {
-                       return new ResolveFromXmlStep (GetDescriptor (descriptor), "descriptor " + descriptor + " from " + Assembly.GetExecutingAssembly ().FullName);
-               }
-
-               static XPathDocument GetExternalDescriptor (EmbeddedResource resource)
-               {
-                       using (var sr = new StreamReader (resource.GetResourceStream ())) {
-                               return new XPathDocument (new StringReader (sr.ReadToEnd ()));
-                       }
-               }
-
-               static XPathDocument GetDescriptor (string descriptor)
-               {
-                       using (StreamReader sr = new StreamReader (GetResource (descriptor))) {
-                               return new XPathDocument (new StringReader (sr.ReadToEnd ()));
-                       }
-               }
-
-               static Stream GetResource (string descriptor)
-               {
-                       return Assembly.GetExecutingAssembly ().GetManifestResourceStream (descriptor);
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/CleanStep.cs b/mcs/tools/linker/Mono.Linker.Steps/CleanStep.cs
deleted file mode 100644 (file)
index ccc34cb..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// CleanStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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;
-
-using Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class CleanStep : BaseStep {
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) == AssemblyAction.Link)
-                               CleanAssembly (assembly);
-               }
-
-               static void CleanAssembly (AssemblyDefinition asm)
-               {
-                       foreach (TypeDefinition type in asm.MainModule.Types)
-                               CleanType (type);
-               }
-
-               static void CleanType (TypeDefinition type)
-               {
-                       if (type.HasProperties)
-                               CleanProperties (type);
-                       if (type.HasEvents)
-                               CleanEvents (type);
-
-                       if (type.HasNestedTypes)
-                               foreach (var nested in type.NestedTypes)
-                                       CleanType (nested);
-               }
-
-               static MethodDefinition CheckMethod (TypeDefinition type, MethodDefinition method)
-               {
-                       if (method == null)
-                               return null;
-
-                       return type.Methods.Contains (method) ? method : null;
-               }
-
-               static void CleanEvents (TypeDefinition type)
-               {
-                       var events = type.Events;
-
-                       for (int i = 0; i < events.Count; i++) {
-                               var evt = events [i];
-                               evt.AddMethod = CheckMethod (type, evt.AddMethod);
-                               evt.InvokeMethod = CheckMethod (type, evt.InvokeMethod);
-                               evt.RemoveMethod = CheckMethod (type, evt.RemoveMethod);
-
-                               if (!IsEventUsed (evt))
-                                       events.RemoveAt (i--);
-                       }
-               }
-
-               static bool IsEventUsed (EventDefinition evt)
-               {
-                       return evt.AddMethod != null || evt.InvokeMethod != null || evt.RemoveMethod != null;
-               }
-
-               static void CleanProperties (TypeDefinition type)
-               {
-                       var properties = type.Properties;
-
-                       for (int i = 0; i < properties.Count; i++) {
-                               var prop = properties [i];
-                               prop.GetMethod = CheckMethod (type, prop.GetMethod);
-                               prop.SetMethod = CheckMethod (type, prop.SetMethod);
-
-                               if (!IsPropertyUsed (prop))
-                                       properties.RemoveAt (i--);
-                       }
-               }
-
-               static bool IsPropertyUsed (PropertyDefinition prop)
-               {
-                       return prop.GetMethod != null || prop.SetMethod != null;
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/IStep.cs b/mcs/tools/linker/Mono.Linker.Steps/IStep.cs
deleted file mode 100644 (file)
index c01ef1e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// IStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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 Mono.Linker.Steps {
-
-       public interface IStep {
-               void Process (LinkContext context);
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/LoadI18nAssemblies.cs b/mcs/tools/linker/Mono.Linker.Steps/LoadI18nAssemblies.cs
deleted file mode 100644 (file)
index 45ac924..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// LoadI18nAssemblies.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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 Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class LoadI18nAssemblies : BaseStep {
-
-               static readonly byte [] _pktoken = new byte [] {0x07, 0x38, 0xeb, 0x9f, 0x13, 0x2e, 0xd7, 0x56};
-
-               I18nAssemblies _assemblies;
-
-               public LoadI18nAssemblies (I18nAssemblies assemblies)
-               {
-                       _assemblies = assemblies;
-               }
-
-               protected override bool ConditionToProcess ()
-               {
-                       return _assemblies != I18nAssemblies.None &&
-                               Type.GetType ("System.MonoType") != null;
-               }
-
-               protected override void Process()
-               {
-                       LoadAssembly (GetAssemblyName (I18nAssemblies.Base));
-
-                       LoadI18nAssembly (I18nAssemblies.CJK);
-                       LoadI18nAssembly (I18nAssemblies.MidEast);
-                       LoadI18nAssembly (I18nAssemblies.Other);
-                       LoadI18nAssembly (I18nAssemblies.Rare);
-                       LoadI18nAssembly (I18nAssemblies.West);
-               }
-
-               bool ShouldCopyAssembly (I18nAssemblies current)
-               {
-                       return (current & _assemblies) != 0;
-               }
-
-               void LoadI18nAssembly (I18nAssemblies asm)
-               {
-                       if (!ShouldCopyAssembly (asm))
-                               return;
-
-                       AssemblyNameReference name = GetAssemblyName (asm);
-                       LoadAssembly (name);
-               }
-
-               void LoadAssembly (AssemblyNameReference name)
-               {
-                       AssemblyDefinition assembly = Context.Resolve (name);
-                       ResolveFromAssemblyStep.ProcessLibrary (Context, assembly);
-               }
-
-               AssemblyNameReference GetAssemblyName (I18nAssemblies assembly)
-               {
-                       AssemblyNameReference name = new AssemblyNameReference ("I18N", GetCorlibVersion ());
-                       if (assembly != I18nAssemblies.Base)
-                               name.Name += "." + assembly;
-
-                       name.PublicKeyToken = _pktoken;
-                       return name;
-               }
-
-               Version GetCorlibVersion ()
-               {
-                       foreach (AssemblyDefinition assembly in Context.GetAssemblies ())
-                               if (assembly.Name.Name == "mscorlib")
-                                       return assembly.Name.Version;
-
-                       return new Version ();
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/LoadReferencesStep.cs b/mcs/tools/linker/Mono.Linker.Steps/LoadReferencesStep.cs
deleted file mode 100644 (file)
index a55fd1d..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// LoadReferencesStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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.Collections;
-
-using Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class LoadReferencesStep : BaseStep {
-
-               IDictionary _references = new Hashtable ();
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       ProcessReferences (assembly);
-               }
-
-               void ProcessReferences (AssemblyDefinition assembly)
-               {
-                       if (_references.Contains (assembly.Name))
-                               return;
-
-                       _references.Add (assembly.Name, assembly);
-
-                       foreach (AssemblyNameReference reference in assembly.MainModule.AssemblyReferences)
-                               ProcessReferences (Context.Resolve (reference));
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
deleted file mode 100644 (file)
index 9bf293d..0000000
+++ /dev/null
@@ -1,1150 +0,0 @@
-//
-// MarkStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-// (C) 2007 Novell, 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;
-using System.Linq;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Linker.Steps {
-
-       public class MarkStep : IStep {
-
-               protected LinkContext _context;
-               protected Queue _methods;
-               protected ArrayList _virtual_methods;
-
-               public AnnotationStore Annotations {
-                       get { return _context.Annotations; }
-               }
-
-               public MarkStep ()
-               {
-                       _methods = new Queue ();
-                       _virtual_methods = new ArrayList ();
-               }
-
-               public virtual void Process (LinkContext context)
-               {
-                       _context = context;
-
-                       Initialize ();
-                       Process ();
-               }
-
-               void Initialize ()
-               {
-                       foreach (AssemblyDefinition assembly in _context.GetAssemblies ())
-                               InitializeAssembly (assembly);
-               }
-
-               protected virtual void InitializeAssembly (AssemblyDefinition assembly)
-               {
-                       MarkAssembly (assembly);
-
-                       foreach (TypeDefinition type in assembly.MainModule.Types)
-                               InitializeType (type);
-               }
-
-               void InitializeType (TypeDefinition type)
-               {
-                       if (type.HasNestedTypes) {
-                               foreach (var nested in type.NestedTypes)
-                                       InitializeType (nested);
-                       }
-
-                       if (!Annotations.IsMarked (type))
-                               return;
-
-                       MarkType (type);
-
-                       if (type.HasFields)
-                               InitializeFields (type);
-                       if (type.HasMethods)
-                               InitializeMethods (type.Methods);
-               }
-
-               void InitializeFields (TypeDefinition type)
-               {
-                       foreach (FieldDefinition field in type.Fields)
-                               if (Annotations.IsMarked (field))
-                                       MarkField (field);
-               }
-
-               void InitializeMethods (ICollection methods)
-               {
-                       foreach (MethodDefinition method in methods)
-                               if (Annotations.IsMarked (method))
-                                       EnqueueMethod (method);
-               }
-
-               void Process ()
-               {
-                       if (QueueIsEmpty ())
-                               throw new InvalidOperationException ("No entry methods");
-
-                       while (!QueueIsEmpty ()) {
-                               ProcessQueue ();
-                               ProcessVirtualMethods ();
-                       }
-               }
-
-               void ProcessQueue ()
-               {
-                       while (!QueueIsEmpty ()) {
-                               MethodDefinition method = (MethodDefinition) _methods.Dequeue ();
-                               Annotations.Push (method);
-                               ProcessMethod (method);
-                               Annotations.Pop ();
-                       }
-               }
-
-               bool QueueIsEmpty ()
-               {
-                       return _methods.Count == 0;
-               }
-
-               protected virtual void EnqueueMethod (MethodDefinition method)
-               {
-                       _methods.Enqueue (method);
-               }
-
-               void ProcessVirtualMethods ()
-               {
-                       foreach (MethodDefinition method in _virtual_methods) {
-                               Annotations.Push (method);
-                               ProcessVirtualMethod (method);
-                               Annotations.Pop ();
-                       }
-               }
-
-               void ProcessVirtualMethod (MethodDefinition method)
-               {
-                       IList overrides = Annotations.GetOverrides (method);
-                       if (overrides == null)
-                               return;
-
-                       foreach (MethodDefinition @override in overrides)
-                               ProcessOverride (@override);
-               }
-
-               void ProcessOverride (MethodDefinition method)
-               {
-                       if (!Annotations.IsMarked (method.DeclaringType))
-                               return;
-
-                       if (Annotations.IsProcessed (method))
-                               return;
-
-                       if (Annotations.IsMarked (method))
-                               return;
-
-                       MarkMethod (method);
-                       ProcessVirtualMethod (method);
-               }
-
-               void MarkMarshalSpec (IMarshalInfoProvider spec)
-               {
-                       if (!spec.HasMarshalInfo)
-                               return;
-
-                       var marshaler = spec.MarshalInfo as CustomMarshalInfo;
-                       if (marshaler == null)
-                               return;
-
-                       MarkType (marshaler.ManagedType);
-               }
-
-               void MarkCustomAttributes (ICustomAttributeProvider provider)
-               {
-                       if (!provider.HasCustomAttributes)
-                               return;
-
-                       foreach (CustomAttribute ca in provider.CustomAttributes)
-                               MarkCustomAttribute (ca);
-               }
-
-               protected virtual void MarkCustomAttribute (CustomAttribute ca)
-               {
-                       Annotations.Push (ca);
-                       MarkMethod (ca.Constructor);
-
-                       MarkCustomAttributeArguments (ca);
-
-                       TypeReference constructor_type = ca.Constructor.DeclaringType;
-                       TypeDefinition type = constructor_type.Resolve ();
-                       if (type == null) {
-                               Annotations.Pop ();
-                               throw new ResolutionException (constructor_type);
-                       }
-
-                       MarkCustomAttributeProperties (ca, type);
-                       MarkCustomAttributeFields (ca, type);
-                       Annotations.Pop ();
-               }
-
-               protected void MarkSecurityDeclarations (ISecurityDeclarationProvider provider)
-               {
-                       // most security declarations are removed (if linked) but user code might still have some
-                       // and if the attribtues references types then they need to be marked too
-                       if ((provider == null) || !provider.HasSecurityDeclarations)
-                               return;
-
-                       foreach (var sd in provider.SecurityDeclarations)
-                               MarkSecurityDeclaration (sd);
-               }
-
-               protected virtual void MarkSecurityDeclaration (SecurityDeclaration sd)
-               {
-                       if (!sd.HasSecurityAttributes)
-                               return;
-                       
-                       foreach (var sa in sd.SecurityAttributes)
-                               MarkSecurityAttribute (sa);
-               }
-
-               protected virtual void MarkSecurityAttribute (SecurityAttribute sa)
-               {
-                       TypeReference security_type = sa.AttributeType;
-                       TypeDefinition type = security_type.Resolve ();
-                       if (type == null)
-                               throw new ResolutionException (security_type);
-                       
-                       MarkType (security_type);
-                       MarkSecurityAttributeProperties (sa, type);
-                       MarkSecurityAttributeFields (sa, type);
-               }
-
-               protected void MarkSecurityAttributeProperties (SecurityAttribute sa, TypeDefinition attribute)
-               {
-                       if (!sa.HasProperties)
-                               return;
-
-                       foreach (var named_argument in sa.Properties)
-                               MarkCustomAttributeProperty (named_argument, attribute);
-               }
-
-               protected void MarkSecurityAttributeFields (SecurityAttribute sa, TypeDefinition attribute)
-               {
-                       if (!sa.HasFields)
-                               return;
-
-                       foreach (var named_argument in sa.Fields)
-                               MarkCustomAttributeField (named_argument, attribute);
-               }
-
-               protected void MarkCustomAttributeProperties (CustomAttribute ca, TypeDefinition attribute)
-               {
-                       if (!ca.HasProperties)
-                               return;
-
-                       foreach (var named_argument in ca.Properties)
-                               MarkCustomAttributeProperty (named_argument, attribute);
-               }
-
-               protected void MarkCustomAttributeProperty (CustomAttributeNamedArgument namedArgument, TypeDefinition attribute)
-               {
-                       PropertyDefinition property = GetProperty (attribute, namedArgument.Name);
-                       Annotations.Push (property);
-                       if (property != null)
-                               MarkMethod (property.SetMethod);
-
-                       MarkIfType (namedArgument.Argument);
-                       Annotations.Pop ();
-               }
-
-               PropertyDefinition GetProperty (TypeDefinition type, string propertyname)
-               {
-                       while (type != null) {
-                               PropertyDefinition property = type.Properties.FirstOrDefault (p => p.Name == propertyname);
-                               if (property != null)
-                                       return property;
-
-                               type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null;
-                       }
-
-                       return null;
-               }
-
-               protected void MarkCustomAttributeFields (CustomAttribute ca, TypeDefinition attribute)
-               {
-                       if (!ca.HasFields)
-                               return;
-
-                       foreach (var named_argument in ca.Fields)
-                               MarkCustomAttributeField (named_argument, attribute);
-               }
-
-               protected void MarkCustomAttributeField (CustomAttributeNamedArgument namedArgument, TypeDefinition attribute)
-               {
-                       FieldDefinition field = GetField (attribute, namedArgument.Name);
-                       if (field != null)
-                               MarkField (field);
-
-                       MarkIfType (namedArgument.Argument);
-               }
-
-               FieldDefinition GetField (TypeDefinition type, string fieldname)
-               {
-                       while (type != null) {
-                               FieldDefinition field = type.Fields.FirstOrDefault (f => f.Name == fieldname);
-                               if (field != null)
-                                       return field;
-
-                               type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null;
-                       }
-
-                       return null;
-               }
-
-               void MarkCustomAttributeArguments (CustomAttribute ca)
-               {
-                       if (!ca.HasConstructorArguments)
-                               return;
-
-                       foreach (var argument in ca.ConstructorArguments)
-                               MarkIfType (argument);
-               }
-
-               void MarkIfType (CustomAttributeArgument argument)
-               {
-                       var at = argument.Type;
-                       if (at.IsArray) {
-                               var et = at.GetElementType ();
-                               if (et.Namespace != "System" || et.Name != "Type")
-                                       return;
-
-                               MarkType (et);
-                               if (argument.Value == null)
-                                       return;
-
-                               foreach (var cac in (CustomAttributeArgument[]) argument.Value)
-                                       MarkWithResolvedScope ((TypeReference) cac.Value);
-                       } else if (at.Namespace == "System" && at.Name == "Type") {
-                               MarkType (argument.Type);
-                               MarkWithResolvedScope ((TypeReference) argument.Value);
-                       }
-               }
-
-               // custom attributes encoding means it's possible to have a scope that will point into a PCL facade
-               // even if we (just before saving) will resolve all type references (bug #26752)
-               void MarkWithResolvedScope (TypeReference type)
-               {
-                       if (type == null)
-                               return;
-
-                       // a GenericInstanceType can could contains generic arguments with scope that
-                       // needs to be updated out of the PCL facade (bug #28823)
-                       var git = (type as GenericInstanceType);
-                       if ((git != null) && git.HasGenericArguments) {
-                               foreach (var ga in git.GenericArguments)
-                                       MarkWithResolvedScope (ga);
-                       }
-                       // we cannot set the Scope of a TypeSpecification but it's element type can be set
-                       // e.g. System.String[] -> System.String
-                       var ts = (type as TypeSpecification);
-                       if (ts != null) {
-                               MarkWithResolvedScope (ts.GetElementType ());
-                               return;
-                       }
-
-                       var td = type.Resolve ();
-                       if (td != null)
-                               type.Scope = td.Scope;
-                       MarkType (type);
-               }
-
-               protected bool CheckProcessed (IMetadataTokenProvider provider)
-               {
-                       if (Annotations.IsProcessed (provider))
-                               return true;
-
-                       Annotations.Processed (provider);
-                       return false;
-               }
-
-               protected void MarkAssembly (AssemblyDefinition assembly)
-               {
-                       if (CheckProcessed (assembly))
-                               return;
-
-                       ProcessModule (assembly);
-
-                       MarkCustomAttributes (assembly);
-                       MarkSecurityDeclarations (assembly);
-
-                       foreach (ModuleDefinition module in assembly.Modules)
-                               MarkCustomAttributes (module);
-               }
-
-               void ProcessModule (AssemblyDefinition assembly)
-               {
-                       // Pre-mark <Module> if there is any methods as they need to be executed 
-                       // at assembly load time
-                       foreach (TypeDefinition type in assembly.MainModule.Types)
-                       {
-                               if (type.Name == "<Module>" && type.HasMethods)
-                               {
-                                       MarkType (type);
-                                       break;
-                               }
-                       }
-               }
-
-               protected void MarkField (FieldReference reference)
-               {
-//                     if (IgnoreScope (reference.DeclaringType.Scope))
-//                             return;
-
-                       if (reference.DeclaringType is GenericInstanceType)
-                               MarkType (reference.DeclaringType);
-
-                       FieldDefinition field = ResolveFieldDefinition (reference);
-
-                       if (field == null)
-                               throw new ResolutionException (reference);
-
-                       if (CheckProcessed (field))
-                               return;
-
-                       MarkType (field.DeclaringType);
-                       MarkType (field.FieldType);
-                       MarkCustomAttributes (field);
-                       MarkMarshalSpec (field);
-
-                       Annotations.Mark (field);
-               }
-
-               protected virtual bool IgnoreScope (IMetadataScope scope)
-               {
-                       AssemblyDefinition assembly = ResolveAssembly (scope);
-                       return Annotations.GetAction (assembly) != AssemblyAction.Link;
-               }
-
-               FieldDefinition ResolveFieldDefinition (FieldReference field)
-               {
-                       FieldDefinition fd = field as FieldDefinition;
-                       if (fd == null)
-                               fd = field.Resolve ();
-
-                       return fd;
-               }
-
-               void MarkScope (IMetadataScope scope)
-               {
-                       var provider = scope as IMetadataTokenProvider;
-                       if (provider == null)
-                               return;
-
-                       Annotations.Mark (provider);
-               }
-
-               protected virtual void MarkSerializable (TypeDefinition type)
-               {
-                       MarkDefaultConstructor (type);
-                       MarkMethodsIf (type.Methods, IsSpecialSerializationConstructorPredicate);
-               }
-
-               protected virtual TypeDefinition MarkType (TypeReference reference)
-               {
-                       if (reference == null)
-                               return null;
-
-                       reference = GetOriginalType (reference);
-
-                       if (reference is GenericParameter)
-                               return null;
-
-//                     if (IgnoreScope (reference.Scope))
-//                             return;
-
-                       TypeDefinition type = ResolveTypeDefinition (reference);
-
-                       if (type == null)
-                               throw new ResolutionException (reference);
-
-                       if (CheckProcessed (type))
-                               return null;
-
-                       Annotations.Push (type);
-
-                       MarkScope (type.Scope);
-                       MarkType (type.BaseType);
-                       MarkType (type.DeclaringType);
-                       MarkCustomAttributes (type);
-                       MarkSecurityDeclarations (type);
-
-                       if (IsMulticastDelegate (type)) {
-                               MarkMethodCollection (type.Methods);
-                       }
-
-                       if (IsSerializable (type))
-                               MarkSerializable (type);
-
-                       MarkTypeSpecialCustomAttributes (type);
-
-                       MarkGenericParameterProvider (type);
-
-                       // keep fields for value-types and for classes with LayoutKind.Sequential or Explicit
-                       if (type.IsValueType || !type.IsAutoLayout)
-                               MarkFields (type, type.IsEnum);
-
-                       if (type.HasInterfaces) {
-                               foreach (var iface in type.Interfaces)
-                                       MarkType (iface.InterfaceType);
-                       }
-
-                       if (type.HasMethods) {
-                               MarkMethodsIf (type.Methods, IsVirtualAndHasPreservedParent);
-                               MarkMethodsIf (type.Methods, IsStaticConstructorPredicate);
-                               MarkMethodsIf (type.Methods, HasSerializationAttribute);
-                       }
-
-                       DoAdditionalTypeProcessing (type);
-
-                       Annotations.Pop ();
-
-                       Annotations.Mark (type);
-
-                       ApplyPreserveInfo (type);
-
-                       return type;
-               }
-
-               // Allow subclassers to mark additional things when marking a method
-               protected virtual void DoAdditionalTypeProcessing (TypeDefinition method)
-               {
-               }
-
-               void MarkTypeSpecialCustomAttributes (TypeDefinition type)
-               {
-                       if (!type.HasCustomAttributes)
-                               return;
-
-                       foreach (CustomAttribute attribute in type.CustomAttributes) {
-                               switch (attribute.Constructor.DeclaringType.FullName) {
-                               case "System.Xml.Serialization.XmlSchemaProviderAttribute":
-                                       MarkXmlSchemaProvider (type, attribute);
-                                       break;
-                               }
-                       }
-               }
-
-               void MarkMethodSpecialCustomAttributes (MethodDefinition method)
-               {
-                       if (!method.HasCustomAttributes)
-                               return;
-
-                       foreach (CustomAttribute attribute in method.CustomAttributes) {
-                               switch (attribute.Constructor.DeclaringType.FullName) {
-                               case "System.Web.Services.Protocols.SoapHeaderAttribute":
-                                       MarkSoapHeader (method, attribute);
-                                       break;
-                               }
-                       }
-               }
-
-               void MarkXmlSchemaProvider (TypeDefinition type, CustomAttribute attribute)
-               {
-                       string method_name;
-                       if (!TryGetStringArgument (attribute, out method_name))
-                               return;
-
-                       MarkNamedMethod (type, method_name);
-               }
-
-               static bool TryGetStringArgument (CustomAttribute attribute, out string argument)
-               {
-                       argument = null;
-
-                       if (attribute.ConstructorArguments.Count < 1)
-                               return false;
-
-                       argument = attribute.ConstructorArguments [0].Value as string;
-
-                       return argument != null;
-               }
-
-               protected int MarkNamedMethod (TypeDefinition type, string method_name)
-               {
-                       if (!type.HasMethods)
-                               return 0;
-
-                       int count = 0;
-                       foreach (MethodDefinition method in type.Methods) {
-                               if (method.Name != method_name)
-                                       continue;
-
-                               MarkMethod (method);
-                               count++;
-                       }
-
-                       return count;
-               }
-
-               void MarkSoapHeader (MethodDefinition method, CustomAttribute attribute)
-               {
-                       string member_name;
-                       if (!TryGetStringArgument (attribute, out member_name))
-                               return;
-
-                       MarkNamedField (method.DeclaringType, member_name);
-                       MarkNamedProperty (method.DeclaringType, member_name);
-               }
-
-               void MarkNamedField (TypeDefinition type, string field_name)
-               {
-                       if (!type.HasFields)
-                               return;
-
-                       foreach (FieldDefinition field in type.Fields) {
-                               if (field.Name != field_name)
-                                       continue;
-
-                               MarkField (field);
-                       }
-               }
-
-               void MarkNamedProperty (TypeDefinition type, string property_name)
-               {
-                       if (!type.HasProperties)
-                               return;
-
-                       foreach (PropertyDefinition property in type.Properties) {
-                               if (property.Name != property_name)
-                                       continue;
-
-                               Annotations.Push (property);
-                               MarkMethod (property.GetMethod);
-                               MarkMethod (property.SetMethod);
-                               Annotations.Pop ();
-                       }
-               }
-
-               void MarkGenericParameterProvider (IGenericParameterProvider provider)
-               {
-                       if (!provider.HasGenericParameters)
-                               return;
-
-                       foreach (GenericParameter parameter in provider.GenericParameters)
-                               MarkGenericParameter (parameter);
-               }
-
-               void MarkGenericParameter (GenericParameter parameter)
-               {
-                       MarkCustomAttributes (parameter);
-                       foreach (TypeReference constraint in parameter.Constraints)
-                               MarkType (constraint);
-               }
-
-               bool IsVirtualAndHasPreservedParent (MethodDefinition method)
-               {
-                       if (!method.IsVirtual)
-                               return false;
-
-                       var base_list = Annotations.GetBaseMethods (method);
-                       if (base_list == null)
-                               return false;
-
-                       foreach (MethodDefinition @base in base_list) {
-                               if (IgnoreScope (@base.DeclaringType.Scope))
-                                       return true;
-
-                               if (IsVirtualAndHasPreservedParent (@base))
-                                       return true;
-                       }
-
-                       return false;
-               }
-
-               static MethodPredicate IsSpecialSerializationConstructorPredicate = new MethodPredicate (IsSpecialSerializationConstructor);
-
-               static bool IsSpecialSerializationConstructor (MethodDefinition method)
-               {
-                       if (!IsConstructor (method))
-                               return false;
-
-                       var parameters = method.Parameters;
-                       if (parameters.Count != 2)
-                               return false;
-
-                       return parameters [0].ParameterType.Name == "SerializationInfo" &&
-                               parameters [1].ParameterType.Name == "StreamingContext";
-               }
-
-               delegate bool MethodPredicate (MethodDefinition method);
-
-               void MarkMethodsIf (ICollection methods, MethodPredicate predicate)
-               {
-                       foreach (MethodDefinition method in methods)
-                               if (predicate (method)) {
-                                       Annotations.Push (predicate);
-                                       MarkMethod (method);
-                                       Annotations.Pop ();
-                               }
-               }
-
-               static MethodPredicate IsDefaultConstructorPredicate = new MethodPredicate (IsDefaultConstructor);
-
-               static bool IsDefaultConstructor (MethodDefinition method)
-               {
-                       return IsConstructor (method) && !method.HasParameters;
-               }
-
-               static bool IsConstructor (MethodDefinition method)
-               {
-                       return method.IsConstructor && !method.IsStatic;
-               }
-
-               protected void MarkDefaultConstructor (TypeDefinition type)
-               {
-                       if ((type == null) || !type.HasMethods)
-                               return;
-
-                       MarkMethodsIf (type.Methods, IsDefaultConstructorPredicate);
-               }
-
-               static MethodPredicate IsStaticConstructorPredicate = new MethodPredicate (IsStaticConstructor);
-
-               static bool IsStaticConstructor (MethodDefinition method)
-               {
-                       return method.IsConstructor && method.IsStatic;
-               }
-
-               static bool HasSerializationAttribute (MethodDefinition method)
-               {
-                       if (!method.HasCustomAttributes)
-                               return false;
-                       foreach (var ca in method.CustomAttributes) {
-                               var cat = ca.AttributeType;
-                               if (cat.Namespace != "System.Runtime.Serialization")
-                                       continue;
-                               switch (cat.Name) {
-                               case "OnDeserializedAttribute":
-                               case "OnDeserializingAttribute":
-                               case "OnSerializedAttribute":
-                               case "OnSerializingAttribute":
-                                       return true;
-                               }
-                       }
-                       return false;
-               }
-
-               static bool IsSerializable (TypeDefinition td)
-               {
-                       return (td.Attributes & TypeAttributes.Serializable) != 0;
-               }
-
-               static bool IsMulticastDelegate (TypeDefinition td)
-               {
-                       return td.BaseType != null && td.BaseType.FullName == "System.MulticastDelegate";
-               }
-
-               protected TypeDefinition ResolveTypeDefinition (TypeReference type)
-               {
-                       TypeDefinition td = type as TypeDefinition;
-                       if (td == null)
-                               td = type.Resolve ();
-
-                       return td;
-               }
-
-               protected TypeReference GetOriginalType (TypeReference type)
-               {
-                       while (type is TypeSpecification) {
-                               GenericInstanceType git = type as GenericInstanceType;
-                               if (git != null)
-                                       MarkGenericArguments (git);
-
-                               var mod = type as IModifierType;
-                               if (mod != null)
-                                       MarkModifierType (mod);
-
-                               type = ((TypeSpecification) type).ElementType;
-                       }
-
-                       return type;
-               }
-
-               void MarkModifierType (IModifierType mod)
-               {
-                       MarkType (mod.ModifierType);
-               }
-
-               void MarkGenericArguments (IGenericInstance instance)
-               {
-                       foreach (TypeReference argument in instance.GenericArguments)
-                               MarkType (argument);
-
-                       MarkGenericArgumentConstructors (instance);
-               }
-
-               void MarkGenericArgumentConstructors (IGenericInstance instance)
-               {
-                       var arguments = instance.GenericArguments;
-
-                       var generic_element = GetGenericProviderFromInstance (instance);
-                       if (generic_element == null)
-                               return;
-
-                       var parameters = generic_element.GenericParameters;
-
-                       if (arguments.Count != parameters.Count)
-                               return;
-
-                       for (int i = 0; i < arguments.Count; i++) {
-                               var argument = arguments [i];
-                               var parameter = parameters [i];
-
-                               if (!parameter.HasDefaultConstructorConstraint)
-                                       continue;
-
-                               var argument_definition = ResolveTypeDefinition (argument);
-                               if (argument_definition == null)
-                                       continue;
-
-                               MarkMethodsIf (argument_definition.Methods, ctor => !ctor.IsStatic && !ctor.HasParameters);
-                       }
-               }
-
-               IGenericParameterProvider GetGenericProviderFromInstance (IGenericInstance instance)
-               {
-                       var method = instance as GenericInstanceMethod;
-                       if (method != null)
-                               return ResolveMethodDefinition (method.ElementMethod);
-
-                       var type = instance as GenericInstanceType;
-                       if (type != null)
-                               return ResolveTypeDefinition (type.ElementType);
-
-                       return null;
-               }
-
-               void ApplyPreserveInfo (TypeDefinition type)
-               {
-                       ApplyPreserveMethods (type);
-
-                       if (!Annotations.IsPreserved (type))
-                               return;
-
-                       switch (Annotations.GetPreserve (type)) {
-                       case TypePreserve.All:
-                               MarkFields (type, true);
-                               MarkMethods (type);
-                               break;
-                       case TypePreserve.Fields:
-                               MarkFields (type, true);
-                               break;
-                       case TypePreserve.Methods:
-                               MarkMethods (type);
-                               break;
-                       }
-               }
-
-               void ApplyPreserveMethods (TypeDefinition type)
-               {
-                       var list = Annotations.GetPreservedMethods (type);
-                       if (list == null)
-                               return;
-
-                       MarkMethodCollection (list);
-               }
-
-               void ApplyPreserveMethods (MethodDefinition method)
-               {
-                       var list = Annotations.GetPreservedMethods (method);
-                       if (list == null)
-                               return;
-
-                       MarkMethodCollection (list);
-               }
-
-               protected void MarkFields (TypeDefinition type, bool includeStatic)
-               {
-                       if (!type.HasFields)
-                               return;
-
-                       foreach (FieldDefinition field in type.Fields) {
-                               if (!includeStatic && field.IsStatic)
-                                       continue;
-                               MarkField (field);
-                       }
-               }
-
-               protected virtual void MarkMethods (TypeDefinition type)
-               {
-                       if (type.HasMethods)
-                               MarkMethodCollection (type.Methods);
-               }
-
-               void MarkMethodCollection (IEnumerable methods)
-               {
-                       foreach (MethodDefinition method in methods)
-                               MarkMethod (method);
-               }
-
-               protected virtual MethodDefinition MarkMethod (MethodReference reference)
-               {
-                       reference = GetOriginalMethod (reference);
-
-                       if (reference.DeclaringType is ArrayType)
-                               return null;
-
-                       Annotations.Push (reference);
-                       if (reference.DeclaringType is GenericInstanceType)
-                               MarkType (reference.DeclaringType);
-
-//                     if (IgnoreScope (reference.DeclaringType.Scope))
-//                             return;
-
-                       MethodDefinition method = ResolveMethodDefinition (reference);
-
-                       if (method == null) {
-                               Annotations.Pop ();
-                               throw new ResolutionException (reference);
-                       }
-
-                       if (Annotations.GetAction (method) == MethodAction.Nothing)
-                               Annotations.SetAction (method, MethodAction.Parse);
-
-                       EnqueueMethod (method);
-
-                       Annotations.Pop ();
-                       Annotations.AddDependency (method);
-
-                       return method;
-               }
-
-               AssemblyDefinition ResolveAssembly (IMetadataScope scope)
-               {
-                       AssemblyDefinition assembly = _context.Resolve (scope);
-                       MarkAssembly (assembly);
-                       return assembly;
-               }
-
-               protected MethodReference GetOriginalMethod (MethodReference method)
-               {
-                       while (method is MethodSpecification) {
-                               GenericInstanceMethod gim = method as GenericInstanceMethod;
-                               if (gim != null)
-                                       MarkGenericArguments (gim);
-
-                               method = ((MethodSpecification) method).ElementMethod;
-                       }
-
-                       return method;
-               }
-
-               MethodDefinition ResolveMethodDefinition (MethodReference method)
-               {
-                       MethodDefinition md = method as MethodDefinition;
-                       if (md == null)
-                               md = method.Resolve ();
-
-                       return md;
-               }
-
-               protected virtual void ProcessMethod (MethodDefinition method)
-               {
-                       if (CheckProcessed (method))
-                               return;
-
-                       Annotations.Push (method);
-                       MarkType (method.DeclaringType);
-                       MarkCustomAttributes (method);
-                       MarkSecurityDeclarations (method);
-
-                       MarkGenericParameterProvider (method);
-
-                       if (IsPropertyMethod (method))
-                               MarkProperty (GetProperty (method));
-                       else if (IsEventMethod (method))
-                               MarkEvent (GetEvent (method));
-
-                       if (method.HasParameters) {
-                               foreach (ParameterDefinition pd in method.Parameters) {
-                                       MarkType (pd.ParameterType);
-                                       MarkCustomAttributes (pd);
-                                       MarkMarshalSpec (pd);
-                               }
-                       }
-
-                       if (method.HasOverrides) {
-                               foreach (MethodReference ov in method.Overrides)
-                                       MarkMethod (ov);
-                       }
-
-                       MarkMethodSpecialCustomAttributes (method);
-
-                       if (method.IsVirtual)
-                               _virtual_methods.Add (method);
-
-                       MarkBaseMethods (method);
-
-                       MarkType (method.ReturnType);
-                       MarkCustomAttributes (method.MethodReturnType);
-                       MarkMarshalSpec (method.MethodReturnType);
-
-                       if (ShouldParseMethodBody (method))
-                               MarkMethodBody (method.Body);
-
-                       DoAdditionalMethodProcessing (method);
-
-                       Annotations.Mark (method);
-
-                       ApplyPreserveMethods (method);
-                       Annotations.Pop ();
-               }
-
-               // Allow subclassers to mark additional things when marking a method
-               protected virtual void DoAdditionalMethodProcessing (MethodDefinition method)
-               {
-               }
-
-               void MarkBaseMethods (MethodDefinition method)
-               {
-                       IList base_methods = Annotations.GetBaseMethods (method);
-                       if (base_methods == null)
-                               return;
-
-                       foreach (MethodDefinition base_method in base_methods) {
-                               if (base_method.DeclaringType.IsInterface && !method.DeclaringType.IsInterface)
-                                       continue;
-
-                               MarkMethod (base_method);
-                               MarkBaseMethods (base_method);
-                       }
-               }
-
-               bool ShouldParseMethodBody (MethodDefinition method)
-               {
-                       if (!method.HasBody)
-                               return false;
-
-                       AssemblyDefinition assembly = ResolveAssembly (method.DeclaringType.Scope);
-                       return (Annotations.GetAction (method) == MethodAction.ForceParse ||
-                               (Annotations.GetAction (assembly) == AssemblyAction.Link && Annotations.GetAction (method) == MethodAction.Parse));
-               }
-
-               static internal bool IsPropertyMethod (MethodDefinition md)
-               {
-                       return (md.SemanticsAttributes & MethodSemanticsAttributes.Getter) != 0 ||
-                               (md.SemanticsAttributes & MethodSemanticsAttributes.Setter) != 0;
-               }
-
-               static bool IsEventMethod (MethodDefinition md)
-               {
-                       return (md.SemanticsAttributes & MethodSemanticsAttributes.AddOn) != 0 ||
-                               (md.SemanticsAttributes & MethodSemanticsAttributes.Fire) != 0 ||
-                               (md.SemanticsAttributes & MethodSemanticsAttributes.RemoveOn) != 0;
-               }
-
-               static internal PropertyDefinition GetProperty (MethodDefinition md)
-               {
-                       TypeDefinition declaringType = (TypeDefinition) md.DeclaringType;
-                       foreach (PropertyDefinition prop in declaringType.Properties)
-                               if (prop.GetMethod == md || prop.SetMethod == md)
-                                       return prop;
-
-                       return null;
-               }
-
-               static EventDefinition GetEvent (MethodDefinition md)
-               {
-                       TypeDefinition declaringType = (TypeDefinition) md.DeclaringType;
-                       foreach (EventDefinition evt in declaringType.Events)
-                               if (evt.AddMethod == md || evt.InvokeMethod == md || evt.RemoveMethod == md)
-                                       return evt;
-
-                       return null;
-               }
-
-               protected void MarkProperty (PropertyDefinition prop)
-               {
-                       MarkCustomAttributes (prop);
-               }
-
-               protected void MarkEvent (EventDefinition evt)
-               {
-                       MarkCustomAttributes (evt);
-                       MarkMethodIfNotNull (evt.AddMethod);
-                       MarkMethodIfNotNull (evt.InvokeMethod);
-                       MarkMethodIfNotNull (evt.RemoveMethod);
-               }
-
-               void MarkMethodIfNotNull (MethodReference method)
-               {
-                       if (method == null)
-                               return;
-
-                       MarkMethod (method);
-               }
-
-               protected virtual void MarkMethodBody (MethodBody body)
-               {
-                       foreach (VariableDefinition var in body.Variables)
-                               MarkType (var.VariableType);
-
-                       foreach (ExceptionHandler eh in body.ExceptionHandlers)
-                               if (eh.HandlerType == ExceptionHandlerType.Catch)
-                                       MarkType (eh.CatchType);
-
-                       foreach (Instruction instruction in body.Instructions)
-                               MarkInstruction (instruction);
-               }
-
-               protected virtual void MarkInstruction (Instruction instruction)
-               {
-                       switch (instruction.OpCode.OperandType) {
-                       case OperandType.InlineField:
-                               MarkField ((FieldReference) instruction.Operand);
-                               break;
-                       case OperandType.InlineMethod:
-                               MarkMethod ((MethodReference) instruction.Operand);
-                               break;
-                       case OperandType.InlineTok:
-                               object token = instruction.Operand;
-                               if (token is TypeReference)
-                                       MarkType ((TypeReference) token);
-                               else if (token is MethodReference)
-                                       MarkMethod ((MethodReference) token);
-                               else
-                                       MarkField ((FieldReference) token);
-                               break;
-                       case OperandType.InlineType:
-                               MarkType ((TypeReference) instruction.Operand);
-                               break;
-                       default:
-                               break;
-                       }
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/OutputStep.cs b/mcs/tools/linker/Mono.Linker.Steps/OutputStep.cs
deleted file mode 100644 (file)
index 0ae94de..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-//
-// OutputStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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.IO;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Linker.Steps {
-
-       public class OutputStep : BaseStep {
-
-               protected override void Process ()
-               {
-                       CheckOutputDirectory ();
-                       Annotations.SaveDependencies ();
-               }
-
-               void CheckOutputDirectory ()
-               {
-                       if (Directory.Exists (Context.OutputDirectory))
-                               return;
-
-                       Directory.CreateDirectory (Context.OutputDirectory);
-               }
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       OutputAssembly (assembly);
-               }
-
-               void OutputAssembly (AssemblyDefinition assembly)
-               {
-                       string directory = Context.OutputDirectory;
-
-                       CopyConfigFileIfNeeded (assembly, directory);
-
-                       switch (Annotations.GetAction (assembly)) {
-                       case AssemblyAction.Save:
-                       case AssemblyAction.Link:
-                               Context.Annotations.AddDependency (assembly);
-                               assembly.Write (GetAssemblyFileName (assembly, directory), SaveSymbols (assembly));
-                               break;
-                       case AssemblyAction.Copy:
-                               Context.Annotations.AddDependency (assembly);
-                               CloseSymbols (assembly);
-                               CopyAssembly (GetOriginalAssemblyFileInfo (assembly), directory, Context.LinkSymbols);
-                               break;
-                       case AssemblyAction.Delete:
-                               CloseSymbols (assembly);
-                               var target = GetAssemblyFileName (assembly, directory);
-                               if (File.Exists (target)) {
-                                       File.Delete (target);
-                                       File.Delete (target + ".mdb");
-                                       File.Delete (GetConfigFile (target));
-                               }
-                               break;
-                       default:
-                               CloseSymbols (assembly);
-                               break;
-                       }
-               }
-
-               void CloseSymbols (AssemblyDefinition assembly)
-               {
-                       Annotations.CloseSymbolReader (assembly);
-               }
-
-               WriterParameters SaveSymbols (AssemblyDefinition assembly)
-               {
-                       var parameters = new WriterParameters ();
-                       if (!Context.LinkSymbols)
-                               return parameters;
-
-                       if (!assembly.MainModule.HasSymbols)
-                               return parameters;
-
-                       if (Context.SymbolWriterProvider != null)
-                               parameters.SymbolWriterProvider = Context.SymbolWriterProvider;
-                       else
-                               parameters.WriteSymbols = true;
-                       return parameters;
-               }
-
-               static void CopyConfigFileIfNeeded (AssemblyDefinition assembly, string directory)
-               {
-                       string config = GetConfigFile (GetOriginalAssemblyFileInfo (assembly).FullName);
-                       if (!File.Exists (config))
-                               return;
-
-                       string target = Path.GetFullPath (GetConfigFile (GetAssemblyFileName (assembly, directory)));
-
-                       if (config == target)
-                               return;
-
-                       File.Copy (config, GetConfigFile (GetAssemblyFileName (assembly, directory)), true);
-               }
-
-               static string GetConfigFile (string assembly)
-               {
-                       return assembly + ".config";
-               }
-
-               static FileInfo GetOriginalAssemblyFileInfo (AssemblyDefinition assembly)
-               {
-                       return new FileInfo (assembly.MainModule.FileName);
-               }
-
-               static void CopyAssembly (FileInfo fi, string directory, bool symbols)
-               {
-                       string target = Path.GetFullPath (Path.Combine (directory, fi.Name));
-                       string source = fi.FullName;
-                       if (source == target)
-                               return;
-
-                       File.Copy (source, target, true);
-
-                       if (!symbols)
-                               return;
-
-                       source += ".mdb";
-                       if (!File.Exists (source))
-                               return;
-                       File.Copy (source, target + ".mdb", true);
-               }
-
-               static string GetAssemblyFileName (AssemblyDefinition assembly, string directory)
-               {
-                       string file = assembly.Name.Name + (assembly.MainModule.Kind == ModuleKind.Dll ? ".dll" : ".exe");
-                       return Path.Combine (directory, file);
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/RegenerateGuidStep.cs b/mcs/tools/linker/Mono.Linker.Steps/RegenerateGuidStep.cs
deleted file mode 100644 (file)
index 6b2558e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// CleanStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2008 Novell, Inc. (http://www.novell.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 Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class RegenerateGuidStep : BaseStep {
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) == AssemblyAction.Link)
-                               RegenerateGuid (assembly);
-               }
-
-               static void RegenerateGuid (AssemblyDefinition asm)
-               {
-                       asm.MainModule.Mvid = Guid.NewGuid ();
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/ResolveFromAssemblyStep.cs b/mcs/tools/linker/Mono.Linker.Steps/ResolveFromAssemblyStep.cs
deleted file mode 100644 (file)
index 6219bc9..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-//
-// ResolveFromAssemblyStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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;
-using Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class ResolveFromAssemblyStep : ResolveStep {
-
-               AssemblyDefinition _assembly;
-               string _file;
-
-               public ResolveFromAssemblyStep (string assembly)
-               {
-                       _file = assembly;
-               }
-
-               public ResolveFromAssemblyStep (AssemblyDefinition assembly)
-               {
-                       _assembly = assembly;
-               }
-
-               protected override void Process ()
-               {
-                       if (_assembly != null)
-                               Context.Resolver.CacheAssembly (_assembly);
-
-                       AssemblyDefinition assembly = _assembly ?? Context.Resolve (_file);
-
-                       switch (assembly.MainModule.Kind) {
-                       case ModuleKind.Dll:
-                               ProcessLibrary (Context, assembly);
-                               break;
-                       default:
-                               ProcessExecutable (assembly);
-                               break;
-                       }
-               }
-
-               static void SetAction (LinkContext context, AssemblyDefinition assembly, AssemblyAction action)
-               {
-                       TryReadSymbols (context, assembly);
-
-                       context.Annotations.SetAction (assembly, action);
-               }
-
-               static void TryReadSymbols (LinkContext context, AssemblyDefinition assembly)
-               {
-                       context.SafeReadSymbols (assembly);
-               }
-
-               public static void ProcessLibrary (LinkContext context, AssemblyDefinition assembly)
-               {
-                       SetAction (context, assembly, AssemblyAction.Copy);
-
-                       context.Annotations.Push (assembly);
-
-                       foreach (TypeDefinition type in assembly.MainModule.Types)
-                               MarkType (context, type);
-
-                       context.Annotations.Pop ();
-               }
-
-               static void MarkType (LinkContext context, TypeDefinition type)
-               {
-                       context.Annotations.Mark (type);
-
-                       context.Annotations.Push (type);
-
-                       if (type.HasFields)
-                               MarkFields (context, type.Fields);
-                       if (type.HasMethods)
-                               MarkMethods (context, type.Methods);
-                       if (type.HasNestedTypes)
-                               foreach (var nested in type.NestedTypes)
-                                       MarkType (context, nested);
-
-                       context.Annotations.Pop ();
-               }
-
-               void ProcessExecutable (AssemblyDefinition assembly)
-               {
-                       SetAction (Context, assembly, AssemblyAction.Link);
-
-                       Annotations.Push (assembly);
-
-                       Annotations.Mark (assembly.EntryPoint.DeclaringType);
-                       MarkMethod (Context, assembly.EntryPoint, MethodAction.Parse);
-
-                       Annotations.Pop ();
-               }
-
-               static void MarkFields (LinkContext context, ICollection fields)
-               {
-                       foreach (FieldDefinition field in fields)
-                               context.Annotations.Mark (field);
-               }
-
-               static void MarkMethods (LinkContext context, ICollection methods)
-               {
-                       foreach (MethodDefinition method in methods)
-                               MarkMethod (context, method, MethodAction.ForceParse);
-               }
-
-               static void MarkMethod (LinkContext context, MethodDefinition method, MethodAction action)
-               {
-                       context.Annotations.Mark (method);
-                       context.Annotations.SetAction (method, action);
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/ResolveFromXApiStep.cs b/mcs/tools/linker/Mono.Linker.Steps/ResolveFromXApiStep.cs
deleted file mode 100644 (file)
index c4ce86d..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-//
-// ResolveFromXApiStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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.Xml.XPath;
-
-using Mono.Linker;
-
-using Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class ResolveFromXApiStep : ResolveStep, IXApiVisitor {
-
-               static readonly string _name = "name";
-               static readonly string _ns = string.Empty;
-
-               XPathDocument _document;
-
-               public ResolveFromXApiStep (XPathDocument document)
-               {
-                       _document = document;
-               }
-
-               protected override void Process ()
-               {
-                       XApiReader reader = new XApiReader (_document, this);
-                       reader.Process (Context);
-               }
-
-               public void OnAssembly (XPathNavigator nav, AssemblyDefinition assembly)
-               {
-               }
-
-               public void OnAttribute (XPathNavigator nav)
-               {
-                       string name = GetName (nav);
-
-                       TypeDefinition type = Context.GetType (name);
-                       if (type != null)
-                               MarkType (type);
-               }
-
-               public void OnClass (XPathNavigator nav, TypeDefinition type)
-               {
-                       MarkType (type);
-               }
-
-               public void OnInterface (XPathNavigator nav, TypeDefinition type)
-               {
-                       MarkType (type);
-               }
-
-               public void OnField (XPathNavigator nav, FieldDefinition field)
-               {
-                       MarkField (field);
-               }
-
-               public void OnMethod (XPathNavigator nav, MethodDefinition method)
-               {
-                       MarkMethod (method);
-               }
-
-               public void OnConstructor (XPathNavigator nav, MethodDefinition method)
-               {
-                       MarkMethod (method);
-               }
-
-               public void OnProperty (XPathNavigator nav, PropertyDefinition property)
-               {
-               }
-
-               public void OnEvent (XPathNavigator nav, EventDefinition evt)
-               {
-                       if (evt.AddMethod != null)
-                               MarkMethod (evt.AddMethod);
-                       if (evt.InvokeMethod != null)
-                               MarkMethod (evt.InvokeMethod);
-                       if (evt.RemoveMethod != null)
-                               MarkMethod (evt.RemoveMethod);
-               }
-
-               static string GetName (XPathNavigator nav)
-               {
-                       return GetAttribute (nav, _name);
-               }
-
-               static string GetAttribute (XPathNavigator nav, string attribute)
-               {
-                       return nav.GetAttribute (attribute, _ns);
-               }
-
-               void MarkType (TypeDefinition type)
-               {
-                       InternalMark (type);
-               }
-
-               void MarkField (FieldDefinition field)
-               {
-                       InternalMark (field);
-               }
-
-               void InternalMark (IMetadataTokenProvider provider)
-               {
-                       Annotations.Mark (provider);
-                       Annotations.SetPublic (provider);
-               }
-
-               void MarkMethod (MethodDefinition method)
-               {
-                       InternalMark (method);
-                       Annotations.SetAction (method, MethodAction.Parse);
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/ResolveFromXmlStep.cs b/mcs/tools/linker/Mono.Linker.Steps/ResolveFromXmlStep.cs
deleted file mode 100644 (file)
index aa4f6af..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-//
-// ResolveFromXmlStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-// (C) 2007 Novell, Inc.
-// Copyright 2013 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 SR = System.Reflection;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Xml.XPath;
-
-using Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class XmlResolutionException : Exception {
-               public XmlResolutionException (string message, Exception innerException)
-                       : base (message, innerException)
-               {
-               }
-       }
-
-       public class ResolveFromXmlStep : ResolveStep {
-
-               static readonly string _signature = "signature";
-               static readonly string _fullname = "fullname";
-               static readonly string _required = "required";
-               static readonly string _preserve = "preserve";
-               static readonly string _ns = string.Empty;
-
-               XPathDocument _document;
-               string _xmlDocumentLocation;
-
-               public ResolveFromXmlStep (XPathDocument document, string xmlDocumentLocation = "<unspecified>")
-               {
-                       _document = document;
-                       _xmlDocumentLocation = xmlDocumentLocation;
-               }
-
-               protected override void Process ()
-               {
-                       XPathNavigator nav = _document.CreateNavigator ();
-                       nav.MoveToFirstChild ();
-
-                       // This step can be created with XML files that aren't necessarily
-                       // linker descriptor files. So bail if we don't have a <linker> element.
-                       if (nav.LocalName != "linker")
-                               return;
-
-                       try {
-                               ProcessAssemblies (Context, nav.SelectChildren ("assembly", _ns));
-                       } catch (Exception ex) {
-                               throw new XmlResolutionException (string.Format ("Failed to process XML description: {0}", _xmlDocumentLocation), ex);
-                       }
-               }
-
-               void ProcessAssemblies (LinkContext context, XPathNodeIterator iterator)
-               {
-                       while (iterator.MoveNext ()) {
-                               AssemblyDefinition assembly = GetAssembly (context, GetFullName (iterator.Current));
-                               ProcessTypes (assembly, iterator.Current.SelectChildren ("type", _ns));
-                               ProcessNamespaces (assembly, iterator.Current.SelectChildren ("namespace", _ns));
-                       }
-               }
-
-               void ProcessNamespaces (AssemblyDefinition assembly, XPathNodeIterator iterator)
-               {
-                       while (iterator.MoveNext ()) {
-                               string fullname = GetFullName (iterator.Current);
-                               foreach (TypeDefinition type in assembly.MainModule.Types) {
-                                       if (type.Namespace != fullname)
-                                               continue;
-
-                                       MarkAndPreserveAll (type);
-                               }
-                       }
-               }
-
-               void MarkAndPreserveAll (TypeDefinition type)
-               {
-                       Annotations.Mark (type);
-                       Annotations.SetPreserve (type, TypePreserve.All);
-
-                       if (!type.HasNestedTypes)
-                               return;
-
-                       foreach (TypeDefinition nested in type.NestedTypes)
-                               MarkAndPreserveAll (nested);
-               }
-
-               void ProcessTypes (AssemblyDefinition assembly, XPathNodeIterator iterator)
-               {
-                       while (iterator.MoveNext ()) {
-                               XPathNavigator nav = iterator.Current;
-                               string fullname = GetFullName (nav);
-
-                               if (IsTypePattern (fullname)) {
-                                       ProcessTypePattern (fullname, assembly, nav);
-                                       continue;
-                               }
-
-                               TypeDefinition type = assembly.MainModule.GetType (fullname);
-                               if (type == null)
-                                       continue;
-
-                               ProcessType (type, nav);
-                       }
-               }
-
-               static bool IsTypePattern (string fullname)
-               {
-                       return fullname.IndexOf ("*") != -1;
-               }
-
-               static Regex CreateRegexFromPattern (string pattern)
-               {
-                       return new Regex (pattern.Replace(".", @"\.").Replace("*", "(.*)"));
-               }
-
-               void MatchType (TypeDefinition type, Regex regex, XPathNavigator nav)
-               {
-                       if (regex.Match (type.FullName).Success)
-                               ProcessType (type, nav);
-
-                       if (!type.HasNestedTypes)
-                               return;
-
-                       foreach (var nt in type.NestedTypes)
-                               MatchType (nt, regex, nav);
-               }
-
-               void ProcessTypePattern (string fullname, AssemblyDefinition assembly, XPathNavigator nav)
-               {
-                       Regex regex = CreateRegexFromPattern (fullname);
-
-                       foreach (TypeDefinition type in assembly.MainModule.Types) {
-                               MatchType (type, regex, nav);
-                       }
-               }
-
-               void ProcessType (TypeDefinition type, XPathNavigator nav)
-               {
-                       TypePreserve preserve = GetTypePreserve (nav);
-
-                       if (!IsRequired (nav)) {
-                               Annotations.SetPreserve (type, preserve);
-                               return;
-                       }
-
-                       Annotations.Mark (type);
-
-                       if (type.IsNested) {
-                               var parent = type;
-                               while (parent.IsNested) {
-                                       parent = parent.DeclaringType;
-                                       Annotations.Mark (parent);
-                               }
-                       }
-
-                       switch (preserve) {
-                       case TypePreserve.Nothing:
-                               if (!nav.HasChildren)
-                                       Annotations.SetPreserve (type, TypePreserve.All);
-                               break;
-                       default:
-                               Annotations.SetPreserve (type, preserve);
-                               break;
-                       }
-
-                       if (nav.HasChildren) {
-                               MarkSelectedFields (nav, type);
-                               MarkSelectedMethods (nav, type);
-                       }
-               }
-
-               void MarkSelectedFields (XPathNavigator nav, TypeDefinition type)
-               {
-                       XPathNodeIterator fields = nav.SelectChildren ("field", _ns);
-                       if (fields.Count == 0)
-                               return;
-
-                       ProcessFields (type, fields);
-               }
-
-               void MarkSelectedMethods (XPathNavigator nav, TypeDefinition type)
-               {
-                       XPathNodeIterator methods = nav.SelectChildren ("method", _ns);
-                       if (methods.Count == 0)
-                               return;
-
-                       ProcessMethods (type, methods);
-               }
-
-               static TypePreserve GetTypePreserve (XPathNavigator nav)
-               {
-                       string attribute = GetAttribute (nav, _preserve);
-                       if (attribute == null || attribute.Length == 0)
-                               return TypePreserve.Nothing;
-
-                       try {
-                               return (TypePreserve) Enum.Parse (typeof (TypePreserve), attribute, true);
-                       } catch {
-                               return TypePreserve.Nothing;
-                       }
-               }
-
-               void ProcessFields (TypeDefinition type, XPathNodeIterator iterator)
-               {
-                       while (iterator.MoveNext ()) {
-                               string value = GetSignature (iterator.Current);
-                               if (!String.IsNullOrEmpty (value))
-                                       ProcessFieldSignature (type, value);
-
-                               value = GetAttribute (iterator.Current, "name");
-                               if (!String.IsNullOrEmpty (value))
-                                       ProcessFieldName (type, value);
-                       }
-               }
-
-               void ProcessFieldSignature (TypeDefinition type, string signature)
-               {
-                       FieldDefinition field = GetField (type, signature);
-                       MarkField (type, field, signature);
-               }
-
-               void MarkField (TypeDefinition type, FieldDefinition field, string signature)
-               {
-                       if (field != null)
-                               Annotations.Mark (field);
-                       else
-                               AddUnresolveMarker (string.Format ("T: {0}; F: {1}", type, signature));
-               }
-
-               void ProcessFieldName (TypeDefinition type, string name)
-               {
-                       if (!type.HasFields)
-                               return;
-
-                       foreach (FieldDefinition field in type.Fields)
-                               if (field.Name == name)
-                                       MarkField (type, field, name);
-               }
-
-               static FieldDefinition GetField (TypeDefinition type, string signature)
-               {
-                       if (!type.HasFields)
-                               return null;
-
-                       foreach (FieldDefinition field in type.Fields)
-                               if (signature == GetFieldSignature (field))
-                                       return field;
-
-                       return null;
-               }
-
-               static string GetFieldSignature (FieldDefinition field)
-               {
-                       return field.FieldType.FullName + " " + field.Name;
-               }
-
-               void ProcessMethods (TypeDefinition type, XPathNodeIterator iterator)
-               {
-                       while (iterator.MoveNext()) {
-                               string value = GetSignature (iterator.Current);
-                               if (!String.IsNullOrEmpty (value))
-                                       ProcessMethodSignature (type, value);
-
-                               value = GetAttribute (iterator.Current, "name");
-                               if (!String.IsNullOrEmpty (value))
-                                       ProcessMethodName (type, value);
-                       }
-               }
-
-               void ProcessMethodSignature (TypeDefinition type, string signature)
-               {
-                       MethodDefinition meth = GetMethod (type, signature);
-                       MarkMethod (type, meth, signature);
-               }
-
-               void MarkMethod (TypeDefinition type, MethodDefinition method, string signature)
-               {
-                       if (method != null) {
-                               Annotations.Mark (method);
-                               Annotations.SetAction (method, MethodAction.Parse);
-                       } else
-                               AddUnresolveMarker (string.Format ("T: {0}; M: {1}", type, signature));
-               }
-
-               void ProcessMethodName (TypeDefinition type, string name)
-               {
-                       if (!type.HasMethods)
-                               return;
-
-                       foreach (MethodDefinition method in type.Methods)
-                               if (name == method.Name)
-                                       MarkMethod (type, method, name);
-               }
-
-               static MethodDefinition GetMethod (TypeDefinition type, string signature)
-               {
-                       if (type.HasMethods)
-                               foreach (MethodDefinition meth in type.Methods)
-                                       if (signature == GetMethodSignature (meth))
-                                               return meth;
-
-                       return null;
-               }
-
-               static string GetMethodSignature (MethodDefinition meth)
-               {
-                       StringBuilder sb = new StringBuilder ();
-                       sb.Append (meth.ReturnType.FullName);
-                       sb.Append (" ");
-                       sb.Append (meth.Name);
-                       sb.Append ("(");
-                       if (meth.HasParameters) {
-                               for (int i = 0; i < meth.Parameters.Count; i++) {
-                                       if (i > 0)
-                                               sb.Append (",");
-
-                                       sb.Append (meth.Parameters [i].ParameterType.FullName);
-                               }
-                       }
-                       sb.Append (")");
-                       return sb.ToString ();
-               }
-
-               static AssemblyDefinition GetAssembly (LinkContext context, string assemblyName)
-               {
-                       AssemblyNameReference reference = AssemblyNameReference.Parse (assemblyName);
-                       AssemblyDefinition assembly;
-
-                       assembly = context.Resolve (reference);
-
-                       ProcessReferences (assembly, context);
-                       return assembly;
-               }
-
-               static void ProcessReferences (AssemblyDefinition assembly, LinkContext context)
-               {
-                       foreach (AssemblyNameReference name in assembly.MainModule.AssemblyReferences)
-                               context.Resolve (name);
-               }
-
-               static bool IsRequired (XPathNavigator nav)
-               {
-                       string attribute = GetAttribute (nav, _required);
-                       if (attribute == null || attribute.Length == 0)
-                               return true;
-
-                       return TryParseBool (attribute);
-               }
-
-               static bool TryParseBool (string s)
-               {
-                       try {
-                               return bool.Parse (s);
-                       } catch {
-                               return false;
-                       }
-               }
-
-               static string GetSignature (XPathNavigator nav)
-               {
-                       return GetAttribute (nav, _signature);
-               }
-
-               static string GetFullName (XPathNavigator nav)
-               {
-                       return GetAttribute (nav, _fullname);
-               }
-
-               static string GetAttribute (XPathNavigator nav, string attribute)
-               {
-                       return nav.GetAttribute (attribute, _ns);
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/ResolveStep.cs b/mcs/tools/linker/Mono.Linker.Steps/ResolveStep.cs
deleted file mode 100644 (file)
index b17bf5c..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// ResolveStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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 Mono.Linker.Steps {
-
-       using System.Collections;
-
-       public abstract class ResolveStep : BaseStep {
-
-               ArrayList _unResolved;
-
-               internal ResolveStep ()
-               {
-                       _unResolved = new ArrayList ();
-               }
-
-               public bool AllMarkerResolved
-               {
-                       get { return _unResolved.Count == 0; }
-               }
-
-               public string [] GetUnresolvedMarkers ()
-               {
-                       return _unResolved.ToArray (typeof (string)) as string [];
-               }
-
-               protected void AddUnresolveMarker (string signature)
-               {
-                       _unResolved.Add (signature);
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs b/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs
deleted file mode 100644 (file)
index 73c89cc..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-//
-// SweepStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-// (C) 2007 Novell, 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.Collections;
-using System.Collections.Generic;
-using Mono.Cecil;
-using Mono.Collections.Generic;
-
-namespace Mono.Linker.Steps {
-
-       public class SweepStep : BaseStep {
-
-               AssemblyDefinition [] assemblies;
-               HashSet<AssemblyDefinition> resolvedTypeReferences;
-
-               protected override void Process ()
-               {
-                       assemblies = Context.GetAssemblies ();
-                       foreach (var assembly in assemblies) {
-                               SweepAssembly (assembly);
-                               if (Annotations.GetAction (assembly) == AssemblyAction.Copy) {
-                                       // Copy assemblies can still contain Type references with
-                                       // type forwarders from Delete assemblies
-                                       // thus try to resolve all the type references and see
-                                       // if some changed the scope. if yes change the action to Save
-                                       if (ResolveAllTypeReferences (assembly))
-                                               Annotations.SetAction (assembly, AssemblyAction.Save);
-                               }
-                       }
-               }
-
-               void SweepAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       if (!IsMarkedAssembly (assembly)) {
-                               RemoveAssembly (assembly);
-                               return;
-                       }
-
-                       var types = new List<TypeDefinition> ();
-
-                       foreach (TypeDefinition type in assembly.MainModule.Types) {
-                               if (Annotations.IsMarked (type)) {
-                                       SweepType (type);
-                                       types.Add (type);
-                                       continue;
-                               }
-
-                               if (type.Name == "<Module>")
-                                       types.Add (type);
-                       }
-
-                       assembly.MainModule.Types.Clear ();
-                       foreach (TypeDefinition type in types)
-                               assembly.MainModule.Types.Add (type);
-               }
-
-               bool IsMarkedAssembly (AssemblyDefinition assembly)
-               {
-                       return Annotations.IsMarked (assembly.MainModule);
-               }
-
-               void RemoveAssembly (AssemblyDefinition assembly)
-               {
-                       Annotations.SetAction (assembly, AssemblyAction.Delete);
-
-                       SweepReferences (assembly);
-               }
-
-               void SweepReferences (AssemblyDefinition target)
-               {
-                       foreach (var assembly in assemblies)
-                               SweepReferences (assembly, target);
-               }
-
-               void SweepReferences (AssemblyDefinition assembly, AssemblyDefinition target)
-               {
-                       if (assembly == target)
-                               return;
-
-                       var references = assembly.MainModule.AssemblyReferences;
-                       for (int i = 0; i < references.Count; i++) {
-                               var reference = references [i];
-                               var r = Context.Resolver.Resolve (reference);
-                               if (!AreSameReference (r.Name, target.Name))
-                                       continue;
-
-                               references.RemoveAt (i);
-                               // Removing the reference does not mean it will be saved back to disk!
-                               // That depends on the AssemblyAction set for the `assembly`
-                               switch (Annotations.GetAction (assembly)) {
-                               case AssemblyAction.Copy:
-                                       // Copy means even if "unlinked" we still want that assembly to be saved back 
-                                       // to disk (OutputStep) without the (removed) reference
-                                       Annotations.SetAction (assembly, AssemblyAction.Save);
-                                       ResolveAllTypeReferences (assembly);
-                                       break;
-
-                               case AssemblyAction.Save:
-                               case AssemblyAction.Link:
-                                       ResolveAllTypeReferences (assembly);
-                                       break;
-                               }
-                               return;
-                       }
-               }
-
-               bool ResolveAllTypeReferences (AssemblyDefinition assembly)
-               {
-                       if (resolvedTypeReferences == null)
-                               resolvedTypeReferences = new HashSet<AssemblyDefinition> ();
-                       if (resolvedTypeReferences.Contains (assembly))
-                               return false;
-                       resolvedTypeReferences.Add (assembly);
-
-                       var hash = new Dictionary<TypeReference,IMetadataScope> ();
-                       bool changes = false;
-
-                       foreach (TypeReference tr in assembly.MainModule.GetTypeReferences ()) {
-                               if (hash.ContainsKey (tr))
-                                       continue;
-                               var td = tr.Resolve ();
-                               IMetadataScope scope = tr.Scope;
-                               // at this stage reference might include things that can't be resolved
-                               // and if it is (resolved) it needs to be kept only if marked (#16213)
-                               if ((td != null) && Annotations.IsMarked (td)) {
-                                       scope = assembly.MainModule.ImportReference (td).Scope;
-                                       if (tr.Scope != scope)
-                                               changes = true;
-                                       hash.Add (tr, scope);
-                               }
-                       }
-                       if (assembly.MainModule.HasExportedTypes) {
-                               foreach (var et in assembly.MainModule.ExportedTypes) {
-                                       var td = et.Resolve ();
-                                       IMetadataScope scope = et.Scope;
-                                       if ((td != null) && Annotations.IsMarked (td)) {
-                                               scope = assembly.MainModule.ImportReference (td).Scope;
-                                               hash.Add (td, scope);
-                                       }
-                               }
-                       }
-
-                       // Resolve everything first before updating scopes.
-                       // If we set the scope to null, then calling Resolve() on any of its
-                       // nested types would crash.
-
-                       foreach (var e in hash) {
-                               e.Key.Scope = e.Value;
-                       }
-
-                       return changes;
-               }
-
-               void SweepType (TypeDefinition type)
-               {
-                       if (type.HasFields)
-                               SweepCollection (type.Fields);
-
-                       if (type.HasMethods)
-                               SweepCollection (type.Methods);
-
-                       if (type.HasNestedTypes)
-                               SweepNestedTypes (type);
-               }
-
-               void SweepNestedTypes (TypeDefinition type)
-               {
-                       for (int i = 0; i < type.NestedTypes.Count; i++) {
-                               var nested = type.NestedTypes [i];
-                               if (Annotations.IsMarked (nested)) {
-                                       SweepType (nested);
-                               } else {
-                                       type.NestedTypes.RemoveAt (i--);
-                               }
-                       }
-               }
-
-               void SweepCollection (IList list)
-               {
-                       for (int i = 0; i < list.Count; i++)
-                               if (!Annotations.IsMarked ((IMetadataTokenProvider) list [i]))
-                                       list.RemoveAt (i--);
-               }
-
-               static bool AreSameReference (AssemblyNameReference a, AssemblyNameReference b)
-               {
-                       if (a == b)
-                               return true;
-
-                       if (a.Name != b.Name)
-                               return false;
-
-                       if (a.Version > b.Version)
-                               return false;
-
-                       return true;
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs b/mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs
deleted file mode 100644 (file)
index 3fe12ae..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-//
-// TypeMapStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2009 Novell, 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;
-using System.Collections.Generic;
-
-using Mono.Cecil;
-
-namespace Mono.Linker.Steps {
-
-       public class TypeMapStep : BaseStep {
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       foreach (TypeDefinition type in assembly.MainModule.Types)
-                               MapType (type);
-               }
-
-               protected virtual void MapType (TypeDefinition type)
-               {
-                       MapVirtualMethods (type);
-                       MapInterfaceMethodsInTypeHierarchy (type);
-
-                       if (!type.HasNestedTypes)
-                               return;
-
-                       foreach (var nested in type.NestedTypes)
-                               MapType (nested);
-               }
-
-               void MapInterfaceMethodsInTypeHierarchy (TypeDefinition type)
-               {
-                       if (!type.HasInterfaces)
-                               return;
-
-                       foreach (var @interface in type.Interfaces) {
-                               var iface = @interface.InterfaceType.Resolve ();
-                               if (iface == null || !iface.HasMethods)
-                                       continue;
-
-                               foreach (MethodDefinition method in iface.Methods) {
-                                       if (TryMatchMethod (type, method) != null)
-                                               continue;
-
-                                       var @base = GetBaseMethodInTypeHierarchy (type, method);
-                                       if (@base == null)
-                                               continue;
-
-                                       Annotations.AddPreservedMethod (type, @base);
-                               }
-                       }
-               }
-
-               void MapVirtualMethods (TypeDefinition type)
-               {
-                       if (!type.HasMethods)
-                               return;
-
-                       foreach (MethodDefinition method in type.Methods) {
-                               if (!method.IsVirtual)
-                                       continue;
-
-                               MapVirtualMethod (method);
-
-                               if (method.HasOverrides)
-                                       MapOverrides (method);
-                       }
-               }
-
-               void MapVirtualMethod (MethodDefinition method)
-               {
-                       MapVirtualBaseMethod (method);
-                       MapVirtualInterfaceMethod (method);
-               }
-
-               void MapVirtualBaseMethod (MethodDefinition method)
-               {
-                       MethodDefinition @base = GetBaseMethodInTypeHierarchy (method);
-                       if (@base == null)
-                               return;
-
-                       AnnotateMethods (@base, method);
-               }
-
-               void MapVirtualInterfaceMethod (MethodDefinition method)
-               {
-                       foreach (MethodDefinition @base in GetBaseMethodsInInterfaceHierarchy (method))
-                               AnnotateMethods (@base, method);
-               }
-
-               void MapOverrides (MethodDefinition method)
-               {
-                       foreach (MethodReference override_ref in method.Overrides) {
-                               MethodDefinition @override = override_ref.Resolve ();
-                               if (@override == null)
-                                       continue;
-
-                               AnnotateMethods (@override, method);
-                       }
-               }
-
-               void AnnotateMethods (MethodDefinition @base, MethodDefinition @override)
-               {
-                       Annotations.AddBaseMethod (@override, @base);
-                       Annotations.AddOverride (@base, @override);
-               }
-
-               static MethodDefinition GetBaseMethodInTypeHierarchy (MethodDefinition method)
-               {
-                       return GetBaseMethodInTypeHierarchy (method.DeclaringType, method);
-               }
-
-               static MethodDefinition GetBaseMethodInTypeHierarchy (TypeDefinition type, MethodDefinition method)
-               {
-                       TypeDefinition @base = GetBaseType (type);
-                       while (@base != null) {
-                               MethodDefinition base_method = TryMatchMethod (@base, method);
-                               if (base_method != null)
-                                       return base_method;
-
-                               @base = GetBaseType (@base);
-                       }
-
-                       return null;
-               }
-
-               static IEnumerable<MethodDefinition> GetBaseMethodsInInterfaceHierarchy (MethodDefinition method)
-               {
-                       return GetBaseMethodsInInterfaceHierarchy (method.DeclaringType, method);
-               }
-
-               static IEnumerable<MethodDefinition> GetBaseMethodsInInterfaceHierarchy (TypeDefinition type, MethodDefinition method)
-               {
-                       if (!type.HasInterfaces)
-                               yield break;
-
-                       foreach (var interface_ref in type.Interfaces) {
-                               TypeDefinition @interface = interface_ref.InterfaceType.Resolve ();
-                               if (@interface == null)
-                                       continue;
-
-                               MethodDefinition base_method = TryMatchMethod (@interface, method);
-                               if (base_method != null)
-                                       yield return base_method;
-
-                               foreach (MethodDefinition @base in GetBaseMethodsInInterfaceHierarchy (@interface, method))
-                                       yield return @base;
-                       }
-               }
-
-               static MethodDefinition TryMatchMethod (TypeDefinition type, MethodDefinition method)
-               {
-                       if (!type.HasMethods)
-                               return null;
-
-                       Dictionary<string,string> gp = null;
-                       foreach (MethodDefinition candidate in type.Methods) {
-                               if (MethodMatch (candidate, method, ref gp))
-                                       return candidate;
-                               if (gp != null)
-                                       gp.Clear ();
-                       }
-
-                       return null;
-               }
-
-               static bool MethodMatch (MethodDefinition candidate, MethodDefinition method, ref Dictionary<string,string> genericParameters)
-               {
-                       if (!candidate.IsVirtual)
-                               return false;
-
-                       if (candidate.HasParameters != method.HasParameters)
-                               return false;
-
-                       if (candidate.Name != method.Name)
-                               return false;
-
-                       if (candidate.HasGenericParameters != method.HasGenericParameters)
-                               return false;
-
-                       // we need to track what the generic parameter represent - as we cannot allow it to
-                       // differ between the return type or any parameter
-                       if (!TypeMatch (candidate.ReturnType, method.ReturnType, ref genericParameters))
-                               return false;
-
-                       if (!candidate.HasParameters)
-                               return true;
-
-                       var cp = candidate.Parameters;
-                       var mp = method.Parameters;
-                       if (cp.Count != mp.Count)
-                               return false;
-
-                       for (int i = 0; i < cp.Count; i++) {
-                               if (!TypeMatch (cp [i].ParameterType, mp [i].ParameterType, ref genericParameters))
-                                       return false;
-                       }
-
-                       return true;
-               }
-
-               static bool TypeMatch (IModifierType a, IModifierType b, ref Dictionary<string,string> gp)
-               {
-                       if (!TypeMatch (a.ModifierType, b.ModifierType, ref gp))
-                               return false;
-
-                       return TypeMatch (a.ElementType, b.ElementType, ref gp);
-               }
-
-               static bool TypeMatch (TypeSpecification a, TypeSpecification b, ref Dictionary<string,string> gp)
-               {
-                       var gita = a as GenericInstanceType;
-                       if (gita != null)
-                               return TypeMatch (gita, (GenericInstanceType) b, ref gp);
-
-                       var mta = a as IModifierType;
-                       if (mta != null)
-                               return TypeMatch (mta, (IModifierType) b, ref gp);
-
-                       return TypeMatch (a.ElementType, b.ElementType, ref gp);
-               }
-
-               static bool TypeMatch (GenericInstanceType a, GenericInstanceType b, ref Dictionary<string,string> gp)
-               {
-                       if (!TypeMatch (a.ElementType, b.ElementType, ref gp))
-                               return false;
-
-                       if (a.HasGenericArguments != b.HasGenericArguments)
-                               return false;
-
-                       if (!a.HasGenericArguments)
-                               return true;
-
-                       var gaa = a.GenericArguments;
-                       var gab = b.GenericArguments;
-                       if (gaa.Count != gab.Count)
-                               return false;
-
-                       for (int i = 0; i < gaa.Count; i++) {
-                               if (!TypeMatch (gaa [i], gab [i], ref gp))
-                                       return false;
-                       }
-
-                       return true;
-               }
-
-               static bool TypeMatch (TypeReference a, TypeReference b, ref Dictionary<string,string> gp)
-               {
-                       var gpa = a as GenericParameter;
-                       if (gpa != null) {
-                               if (gp == null)
-                                       gp = new Dictionary<string, string> ();
-                               string match;
-                               if (!gp.TryGetValue (gpa.FullName, out match)) {
-                                       // first use, we assume it will always be used this way
-                                       gp.Add (gpa.FullName, b.ToString ());
-                                       return true;
-                               }
-                               // re-use, it should match the previous usage
-                               return match == b.ToString ();
-                       }
-
-                       if (a is TypeSpecification || b is TypeSpecification) {
-                               if (a.GetType () != b.GetType ())
-                                       return false;
-
-                               return TypeMatch ((TypeSpecification) a, (TypeSpecification) b, ref gp);
-                       }
-
-                       return a.FullName == b.FullName;
-               }
-
-               static TypeDefinition GetBaseType (TypeDefinition type)
-               {
-                       if (type == null || type.BaseType == null)
-                               return null;
-
-                       return type.BaseType.Resolve ();
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker.csproj b/mcs/tools/linker/Mono.Linker.csproj
deleted file mode 100644 (file)
index 98f0737..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{DD28E2B1-057B-4B4D-A04D-B2EBD9E76E46}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Mono.Linker</RootNamespace>
-    <AssemblyName>monolinker</AssemblyName>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>True</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>False</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>True</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Mono.Linker.Steps\BaseStep.cs" />
-    <Compile Include="Mono.Linker.Steps\BlacklistStep.cs" />
-    <Compile Include="Mono.Linker.Steps\CleanStep.cs" />
-    <Compile Include="Mono.Linker.Steps\RegenerateGuidStep.cs" />
-    <Compile Include="Mono.Linker.Steps\LoadI18nAssemblies.cs" />
-    <Compile Include="Mono.Linker\IXApiVisitor.cs" />
-    <Compile Include="Mono.Linker\I18nAssemblies.cs" />
-    <Compile Include="Mono.Linker.Steps\IStep.cs" />
-    <Compile Include="Mono.Linker.Steps\LoadReferencesStep.cs" />
-    <Compile Include="Mono.Linker.Steps\MarkStep.cs" />
-    <Compile Include="Mono.Linker.Steps\OutputStep.cs" />
-    <Compile Include="Mono.Linker.Steps\ResolveFromXApiStep.cs" />
-    <Compile Include="Mono.Linker.Steps\ResolveFromAssemblyStep.cs" />
-    <Compile Include="Mono.Linker.Steps\ResolveFromXmlStep.cs" />
-    <Compile Include="Mono.Linker.Steps\ResolveStep.cs" />
-    <Compile Include="Mono.Linker.Steps\SweepStep.cs" />
-    <Compile Include="Mono.Linker\Annotations.cs" />
-    <Compile Include="Mono.Linker\AssemblyAction.cs" />
-    <Compile Include="Mono.Linker\AssemblyInfo.cs" />
-    <Compile Include="Mono.Linker\AssemblyResolver.cs" />
-    <Compile Include="Mono.Linker\Driver.cs" />
-    <Compile Include="Mono.Linker\LinkContext.cs" />
-    <Compile Include="Mono.Linker\MethodAction.cs" />
-    <Compile Include="Mono.Linker\Pipeline.cs" />
-    <Compile Include="Mono.Linker\TypePreserve.cs" />
-    <Compile Include="Mono.Linker\XApiReader.cs" />
-    <Compile Include="Mono.Linker.Steps\TypeMapStep.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Descriptors\mscorlib.xml">
-      <LogicalName>mscorlib.xml</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Descriptors\System.Web.xml">
-      <LogicalName>System.web.xml</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Descriptors\System.xml">
-      <LogicalName>System.xml</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Descriptors\Mono.Posix.xml">
-      <LogicalName>Mono.Posix.xml</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Descriptors\System.Drawing.xml">
-      <LogicalName>System.Drawing.xml</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Descriptors\System.Core.xml">
-      <LogicalName>System.Core.xml</LogicalName>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Makefile" />
-    <None Include="README" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\..\external\cecil\Mono.Cecil.csproj">
-      <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
-      <Name>Mono.Cecil</Name>
-    </ProjectReference>
-  </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/mcs/tools/linker/Mono.Linker/Annotations.cs b/mcs/tools/linker/Mono.Linker/Annotations.cs
deleted file mode 100644 (file)
index 72c59ba..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-//
-// Annotations.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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;
-using System.Collections.Generic;
-using System.IO;
-using System.IO.Compression;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Linker {
-
-       public class AnnotationStore {
-
-               readonly Dictionary<AssemblyDefinition, AssemblyAction> assembly_actions = new Dictionary<AssemblyDefinition, AssemblyAction> ();
-               readonly Dictionary<MethodDefinition, MethodAction> method_actions = new Dictionary<MethodDefinition, MethodAction> ();
-               readonly HashSet<IMetadataTokenProvider> marked = new HashSet<IMetadataTokenProvider> ();
-               readonly HashSet<IMetadataTokenProvider> processed = new HashSet<IMetadataTokenProvider> ();
-               readonly Dictionary<TypeDefinition, TypePreserve> preserved_types = new Dictionary<TypeDefinition, TypePreserve> ();
-               readonly Dictionary<IMemberDefinition, List<MethodDefinition>> preserved_methods = new Dictionary<IMemberDefinition, List<MethodDefinition>> ();
-               readonly HashSet<IMetadataTokenProvider> public_api = new HashSet<IMetadataTokenProvider> ();
-               readonly Dictionary<MethodDefinition, List<MethodDefinition>> override_methods = new Dictionary<MethodDefinition, List<MethodDefinition>> ();
-               readonly Dictionary<MethodDefinition, List<MethodDefinition>> base_methods = new Dictionary<MethodDefinition, List<MethodDefinition>> ();
-               readonly Dictionary<AssemblyDefinition, ISymbolReader> symbol_readers = new Dictionary<AssemblyDefinition, ISymbolReader> ();
-
-               readonly Dictionary<object, Dictionary<IMetadataTokenProvider, object>> custom_annotations = new Dictionary<object, Dictionary<IMetadataTokenProvider, object>> ();
-
-               Stack<object> dependency_stack;
-               System.Xml.XmlWriter writer;
-               GZipStream zipStream;
-
-               public void PrepareDependenciesDump ()
-               {
-                       PrepareDependenciesDump ("linker-dependencies.xml.gz");
-               }
-
-               public void PrepareDependenciesDump (string filename)
-               {
-                       dependency_stack = new Stack<object> ();
-                       System.Xml.XmlWriterSettings settings = new System.Xml.XmlWriterSettings();
-                       settings.Indent = true;
-                       settings.IndentChars = "\t";
-                       var depsFile = File.OpenWrite (filename);
-                       zipStream = new GZipStream (depsFile, CompressionMode.Compress);
-
-                       writer = System.Xml.XmlWriter.Create (zipStream, settings);
-                       writer.WriteStartDocument ();
-                       writer.WriteStartElement ("dependencies");
-                       writer.WriteStartAttribute ("version");
-                       writer.WriteString ("1.0");
-                       writer.WriteEndAttribute ();
-               }
-
-               public AssemblyAction GetAction (AssemblyDefinition assembly)
-               {
-                       AssemblyAction action;
-                       if (assembly_actions.TryGetValue (assembly, out action))
-                               return action;
-
-                       throw new NotSupportedException ();
-               }
-
-               public MethodAction GetAction (MethodDefinition method)
-               {
-                       MethodAction action;
-                       if (method_actions.TryGetValue (method, out action))
-                               return action;
-
-                       return MethodAction.Nothing;
-               }
-
-               public void SetAction (AssemblyDefinition assembly, AssemblyAction action)
-               {
-                       assembly_actions [assembly] = action;
-               }
-
-               public bool HasAction (AssemblyDefinition assembly)
-               {
-                       return assembly_actions.ContainsKey (assembly);
-               }
-
-               public void SetAction (MethodDefinition method, MethodAction action)
-               {
-                       method_actions [method] = action;
-               }
-
-               public void Mark (IMetadataTokenProvider provider)
-               {
-                       marked.Add (provider);
-                       AddDependency (provider);
-               }
-
-               public bool IsMarked (IMetadataTokenProvider provider)
-               {
-                       return marked.Contains (provider);
-               }
-
-               public void Processed (IMetadataTokenProvider provider)
-               {
-                       processed.Add (provider);
-               }
-
-               public bool IsProcessed (IMetadataTokenProvider provider)
-               {
-                       return processed.Contains (provider);
-               }
-
-               public bool IsPreserved (TypeDefinition type)
-               {
-                       return preserved_types.ContainsKey (type);
-               }
-
-               public void SetPreserve (TypeDefinition type, TypePreserve preserve)
-               {
-                       preserved_types [type] = preserve;
-               }
-
-               public TypePreserve GetPreserve (TypeDefinition type)
-               {
-                       TypePreserve preserve;
-                       if (preserved_types.TryGetValue (type, out preserve))
-                               return preserve;
-
-                       throw new NotSupportedException ();
-               }
-
-               public void SetPublic (IMetadataTokenProvider provider)
-               {
-                       public_api.Add (provider);
-               }
-
-               public bool IsPublic (IMetadataTokenProvider provider)
-               {
-                       return public_api.Contains (provider);
-               }
-
-               public void AddOverride (MethodDefinition @base, MethodDefinition @override)
-               {
-                       var methods = GetOverrides (@base);
-                       if (methods == null) {
-                               methods = new List<MethodDefinition> ();
-                               override_methods [@base] = methods;
-                       }
-
-                       methods.Add (@override);
-               }
-
-               public List<MethodDefinition> GetOverrides (MethodDefinition method)
-               {
-                       List<MethodDefinition> overrides;
-                       if (override_methods.TryGetValue (method, out overrides))
-                               return overrides;
-
-                       return null;
-               }
-
-               public void AddBaseMethod (MethodDefinition method, MethodDefinition @base)
-               {
-                       var methods = GetBaseMethods (method);
-                       if (methods == null) {
-                               methods = new List<MethodDefinition> ();
-                               base_methods [method] = methods;
-                       }
-
-                       methods.Add (@base);
-               }
-
-               public List<MethodDefinition> GetBaseMethods (MethodDefinition method)
-               {
-                       List<MethodDefinition> bases;
-                       if (base_methods.TryGetValue (method, out bases))
-                               return bases;
-
-                       return null;
-               }
-
-               public List<MethodDefinition> GetPreservedMethods (TypeDefinition type)
-               {
-                       return GetPreservedMethods (type as IMemberDefinition);
-               }
-
-               public void AddPreservedMethod (TypeDefinition type, MethodDefinition method)
-               {
-                       AddPreservedMethod (type as IMemberDefinition, method);
-               }
-
-               public List<MethodDefinition> GetPreservedMethods (MethodDefinition method)
-               {
-                       return GetPreservedMethods (method as IMemberDefinition);
-               }
-
-               public void AddPreservedMethod (MethodDefinition key, MethodDefinition method)
-               {
-                       AddPreservedMethod (key as IMemberDefinition, method);
-               }
-
-               List<MethodDefinition> GetPreservedMethods (IMemberDefinition definition)
-               {
-                       List<MethodDefinition> preserved;
-                       if (preserved_methods.TryGetValue (definition, out preserved))
-                               return preserved;
-
-                       return null;
-               }
-
-               void AddPreservedMethod (IMemberDefinition definition, MethodDefinition method)
-               {
-                       var methods = GetPreservedMethods (definition);
-                       if (methods == null) {
-                               methods = new List<MethodDefinition> ();
-                               preserved_methods [definition] = methods;
-                       }
-
-                       methods.Add (method);
-               }
-
-               public void AddSymbolReader (AssemblyDefinition assembly, ISymbolReader symbolReader)
-               {
-                       symbol_readers [assembly] = symbolReader;
-               }
-
-               public void CloseSymbolReader (AssemblyDefinition assembly)
-               {
-                       ISymbolReader symbolReader;
-                       if (!symbol_readers.TryGetValue (assembly, out symbolReader))
-                               return;
-
-                       symbol_readers.Remove (assembly);
-                       symbolReader.Dispose ();
-               }
-
-               public Dictionary<IMetadataTokenProvider, object> GetCustomAnnotations (object key)
-               {
-                       Dictionary<IMetadataTokenProvider, object> slots;
-                       if (custom_annotations.TryGetValue (key, out slots))
-                               return slots;
-
-                       slots = new Dictionary<IMetadataTokenProvider, object> ();
-                       custom_annotations.Add (key, slots);
-                       return slots;
-               }
-
-               public void AddDependency (object o)
-               {
-                       if (writer == null)
-                               return;
-
-                       KeyValuePair<object, object> pair = new KeyValuePair<object, object> (dependency_stack.Count > 0 ? dependency_stack.Peek () : null, o);
-                       writer.WriteStartElement ("edge");
-                       writer.WriteAttributeString ("b", TokenString (pair.Key));
-                       writer.WriteAttributeString ("e", TokenString (pair.Value));
-                       writer.WriteEndElement ();
-               }
-
-               public void Push (object o)
-               {
-                       if (writer == null)
-                               return;
-
-                       if (dependency_stack.Count > 0)
-                               AddDependency (o);
-                       dependency_stack.Push (o);
-               }
-
-               public void Pop ()
-               {
-                       if (writer == null)
-                               return;
-
-                       dependency_stack.Pop ();
-               }
-
-               string TokenString (object o)
-               {
-                       if (o == null)
-                               return "N:null";
-
-                       if (o is IMetadataTokenProvider)
-                               return (o as IMetadataTokenProvider).MetadataToken.TokenType + ":" + o;
-
-                       return "Other:" + o;
-               }
-
-               public void SaveDependencies ()
-               {
-                       if (writer == null)
-                               return;
-
-                       writer.WriteEndElement ();
-                       writer.WriteEndDocument ();
-                       writer.Flush ();
-                       writer.Close ();
-                       zipStream.Close ();
-
-                       writer.Dispose ();
-                       zipStream.Dispose ();
-                       writer = null;
-                       zipStream = null;
-                       dependency_stack = null;
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/AssemblyAction.cs b/mcs/tools/linker/Mono.Linker/AssemblyAction.cs
deleted file mode 100644 (file)
index 14282b3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// AssemblyAction.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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 Mono.Linker {
-
-       public enum AssemblyAction {
-               // Ignore the assembly
-               Skip,
-               // Copy the existing files, assembly and symbols, into the output destination. E.g. .dll and .mdb
-               // The linker still analyze the assemblies (to know what they require) but does not modify them
-               Copy,
-               // Link the assembly
-               Link,
-               // Remove the assembly from the output
-               Delete,
-               // Save the assembly/symbols in memory without linking it. 
-               // E.g. useful to remove unneeded assembly references (as done in SweepStep), 
-               //  resolving [TypeForwardedTo] attributes (like PCL) to their final location
-               Save
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/AssemblyInfo.cs b/mcs/tools/linker/Mono.Linker/AssemblyInfo.cs
deleted file mode 100644 (file)
index 348e29b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// AssemblyInfo.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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.InteropServices;
-
-[assembly: AssemblyTitle ("Mono.Linker")]
-[assembly: AssemblyDescription ("Mono CIL Linker")]
-[assembly: AssemblyConfiguration ("")]
-[assembly: AssemblyProduct ("")]
-[assembly: AssemblyCopyright ("(C) 2006, Jb Evain")]
-[assembly: AssemblyCulture ("")]
-
-[assembly: CLSCompliant (false)]
-[assembly: ComVisible (false)]
-
-[assembly: AssemblyVersion ("0.2.0.0")]
diff --git a/mcs/tools/linker/Mono.Linker/AssemblyResolver.cs b/mcs/tools/linker/Mono.Linker/AssemblyResolver.cs
deleted file mode 100644 (file)
index cb0646c..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// AssemblyResolver.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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;
-using System.IO;
-using Mono.Cecil;
-
-namespace Mono.Linker {
-
-       public class AssemblyResolver : BaseAssemblyResolver {
-
-               IDictionary _assemblies;
-
-               public IDictionary AssemblyCache {
-                       get { return _assemblies; }
-               }
-
-               public AssemblyResolver ()
-                       : this (new Hashtable ())
-               {
-               }
-
-               public AssemblyResolver (IDictionary assembly_cache)
-               {
-                       _assemblies = assembly_cache;
-               }
-
-               public override AssemblyDefinition Resolve (AssemblyNameReference name, ReaderParameters parameters)
-               {
-                       AssemblyDefinition asm = (AssemblyDefinition) _assemblies [name.Name];
-                       if (asm == null) {
-                               asm = base.Resolve (name, parameters);
-                               _assemblies [name.Name] = asm;
-                       }
-
-                       return asm;
-               }
-
-               public void CacheAssembly (AssemblyDefinition assembly)
-               {
-                       _assemblies [assembly.Name.Name] = assembly;
-                       base.AddSearchDirectory (Path.GetDirectoryName (assembly.MainModule.FileName));
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/Driver.cs b/mcs/tools/linker/Mono.Linker/Driver.cs
deleted file mode 100644 (file)
index 7d1963c..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-//
-// Driver.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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;
-using System.IO;
-using SR = System.Reflection;
-using System.Xml.XPath;
-
-using Mono.Linker.Steps;
-
-namespace Mono.Linker {
-
-       public class Driver {
-
-               static readonly string _linker = "Mono CIL Linker";
-
-               public static int Main (string [] args)
-               {
-                       if (args.Length == 0)
-                               Usage ("No parameters specified");
-
-                       try {
-
-                               Driver driver = new Driver (args);
-                               driver.Run ();
-
-                       } catch (Exception e) {
-                               Console.WriteLine ("Fatal error in {0}", _linker);
-                               Console.WriteLine (e);
-                               return 1;
-                       }
-
-                       return 0;
-               }
-
-               Queue _queue;
-
-               public Driver (string [] args)
-               {
-                       _queue = new Queue (args);
-               }
-
-               bool HaveMoreTokens ()
-               {
-                       return _queue.Count > 0;
-               }
-
-               void Run ()
-               {
-                       Pipeline p = GetStandardPipeline ();
-                       LinkContext context = GetDefaultContext (p);
-                       I18nAssemblies assemblies = I18nAssemblies.All;
-                       ArrayList custom_steps = new ArrayList ();
-
-                       bool resolver = false;
-                       while (HaveMoreTokens ()) {
-                               string token = GetParam ();
-                               if (token.Length < 2)
-                                       Usage ("Option is too short");
-
-                               if (! (token [0] == '-' || token [1] == '/'))
-                                       Usage ("Expecting an option, got instead: " + token);
-
-                               if (token [0] == '-' && token [1] == '-') {
-
-                                       if (token.Length < 3)
-                                               Usage ("Option is too short");
-
-                                       switch (token [2]) {
-                                       case 'v':
-                                               Version ();
-                                               break;
-                                       case 'a':
-                                               About ();
-                                               break;
-                                       default:
-                                               Usage (null);
-                                               break;
-                                       }
-                               }
-
-                               switch (token [1]) {
-                               case 'd': {
-                                       DirectoryInfo info = new DirectoryInfo (GetParam ());
-                                       context.Resolver.AddSearchDirectory (info.FullName);
-                                       break;
-                               }
-                               case 'o':
-                                       context.OutputDirectory = GetParam ();
-                                       break;
-                               case 'c':
-                                       context.CoreAction = ParseAssemblyAction (GetParam ());
-                                       break;
-                               case 'p':
-                                       AssemblyAction action = ParseAssemblyAction (GetParam ());
-                                       context.Actions [GetParam ()] = action;
-                                       break;
-                               case 's':
-                                       custom_steps.Add (GetParam ());
-                                       break;
-                               case 'x':
-                                       foreach (string file in GetFiles (GetParam ()))
-                                               p.PrependStep (new ResolveFromXmlStep (new XPathDocument (file)));
-                                       resolver = true;
-                                       break;
-                               case 'a':
-                                       foreach (string file in GetFiles (GetParam ()))
-                                               p.PrependStep (new ResolveFromAssemblyStep (file));
-                                       resolver = true;
-                                       break;
-                               case 'i':
-                                       foreach (string file in GetFiles (GetParam ()))
-                                               p.PrependStep (new ResolveFromXApiStep (new XPathDocument (file)));
-                                       resolver = true;
-                                       break;
-                               case 'l':
-                                       assemblies = ParseI18n (GetParam ());
-                                       break;
-                               case 'm':
-                                       context.SetParameter (GetParam (), GetParam ());
-                                       break;
-                               case 'b':
-                                       context.LinkSymbols = bool.Parse (GetParam ());
-                                       break;
-                               case 'g':
-                                       if (!bool.Parse (GetParam ()))
-                                               p.RemoveStep (typeof (RegenerateGuidStep));
-                                       break;
-                               default:
-                                       Usage ("Unknown option: `" + token [1] + "'");
-                                       break;
-                               }
-                       }
-
-                       if (!resolver)
-                               Usage ("No resolver was created (use -x, -a or -i)");
-
-                       foreach (string custom_step in custom_steps)
-                               AddCustomStep (p, custom_step);
-
-                       p.AddStepAfter (typeof (LoadReferencesStep), new LoadI18nAssemblies (assemblies));
-
-                       p.Process (context);
-               }
-
-               static void AddCustomStep (Pipeline pipeline, string arg)
-               {
-                       int pos = arg.IndexOf (":");
-                       if (pos == -1) {
-                               pipeline.AppendStep (ResolveStep (arg));
-                               return;
-                       }
-
-                       string [] parts = arg.Split (':');
-                       if (parts.Length != 2)
-                               Usage ("Step is specified as TYPE:STEP");
-
-                       if (parts [0].IndexOf (",") > -1)
-                               pipeline.AddStepBefore (FindStep (pipeline, parts [1]), ResolveStep (parts [0]));
-                       else if (parts [1].IndexOf (",") > -1)
-                               pipeline.AddStepAfter (FindStep (pipeline, parts [0]), ResolveStep (parts [1]));
-                       else
-                               Usage ("No comma separator in TYPE or STEP");
-               }
-
-               static Type FindStep (Pipeline pipeline, string name)
-               {
-                       foreach (IStep step in pipeline.GetSteps ()) {
-                               Type t = step.GetType ();
-                               if (t.Name == name)
-                                       return t;
-                       }
-
-                       return null;
-               }
-
-               static IStep ResolveStep (string type)
-               {
-                       Type step = Type.GetType (type, false);
-                       if (step == null)
-                               Usage (String.Format ("Step type '{0}' not found.", type));
-                       if (!typeof (IStep).IsAssignableFrom (step))
-                               Usage (String.Format ("Step type '{0}' does not implement IStep interface.", type));
-                       return (IStep) Activator.CreateInstance (step);
-               }
-
-               static string [] GetFiles (string param)
-               {
-                       if (param.Length < 1 || param [0] != '@')
-                               return new string [] {param};
-
-                       string file = param.Substring (1);
-                       return ReadLines (file);
-               }
-
-               static string [] ReadLines (string file)
-               {
-                       ArrayList lines = new ArrayList ();
-                       using (StreamReader reader = new StreamReader (file)) {
-                               string line;
-                               while ((line = reader.ReadLine ()) != null)
-                                       lines.Add (line);
-                       }
-                       return (string []) lines.ToArray (typeof (string));
-               }
-
-               static I18nAssemblies ParseI18n (string str)
-               {
-                       I18nAssemblies assemblies = I18nAssemblies.None;
-                       string [] parts = str.Split (',');
-                       foreach (string part in parts)
-                               assemblies |= (I18nAssemblies) Enum.Parse (typeof (I18nAssemblies), part.Trim (), true);
-
-                       return assemblies;
-               }
-
-               static AssemblyAction ParseAssemblyAction (string s)
-               {
-                       return (AssemblyAction) Enum.Parse (typeof (AssemblyAction), s, true);
-               }
-
-               string GetParam ()
-               {
-                       if (_queue.Count == 0)
-                               Usage ("Expecting a parameter");
-
-                       return (string) _queue.Dequeue ();
-               }
-
-               static LinkContext GetDefaultContext (Pipeline pipeline)
-               {
-                       LinkContext context = new LinkContext (pipeline);
-                       context.CoreAction = AssemblyAction.Skip;
-                       context.OutputDirectory = "output";
-                       return context;
-               }
-
-               static void Usage (string msg)
-               {
-                       Console.WriteLine (_linker);
-                       if (msg != null)
-                               Console.WriteLine ("Error: " + msg);
-                       Console.WriteLine ("monolinker [options] -x|-a|-i file");
-
-                       Console.WriteLine ("   --about     About the {0}", _linker);
-                       Console.WriteLine ("   --version   Print the version number of the {0}", _linker);
-                       Console.WriteLine ("   -out        Specify the output directory, default to `output'");
-                       Console.WriteLine ("   -c          Action on the core assemblies, skip, copy or link, default to skip");
-                       Console.WriteLine ("   -p          Action per assembly");
-                       Console.WriteLine ("   -s          Add a new step to the pipeline.");
-                       Console.WriteLine ("   -d          Add a directory where the linker will look for assemblies");
-                       Console.WriteLine ("   -b          Generate debug symbols for each linked module (true or false)");
-                       Console.WriteLine ("   -g          Generate a new unique guid for each linked module (true or false)");
-                       Console.WriteLine ("   -l          List of i18n assemblies to copy to the output directory");
-                       Console.WriteLine ("                 separated with a comma: none,all,cjk,mideast,other,rare,west");
-                       Console.WriteLine ("                 default is all");
-                       Console.WriteLine ("   -x          Link from an XML descriptor");
-                       Console.WriteLine ("   -a          Link from a list of assemblies");
-                       Console.WriteLine ("   -i          Link from an mono-api-info descriptor");
-                       Console.WriteLine ("");
-
-                       Environment.Exit (1);
-               }
-
-               static void Version ()
-               {
-                       Console.WriteLine ("{0} Version {1}",
-                               _linker,
-                           System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version);
-
-                       Environment.Exit(1);
-               }
-
-               static void About ()
-               {
-                       Console.WriteLine ("For more information, visit the project Web site");
-                       Console.WriteLine ("   http://www.mono-project.com/");
-
-                       Environment.Exit(1);
-               }
-
-               static Pipeline GetStandardPipeline ()
-               {
-                       Pipeline p = new Pipeline ();
-                       p.AppendStep (new LoadReferencesStep ());
-                       p.AppendStep (new BlacklistStep ());
-                       p.AppendStep (new TypeMapStep ());
-                       p.AppendStep (new MarkStep ());
-                       p.AppendStep (new SweepStep ());
-                       p.AppendStep (new CleanStep ());
-                       p.AppendStep (new RegenerateGuidStep ());
-                       p.AppendStep (new OutputStep ());
-                       return p;
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/I18nAssemblies.cs b/mcs/tools/linker/Mono.Linker/I18nAssemblies.cs
deleted file mode 100644 (file)
index a14c58f..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// I18nAssemblies.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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 Mono.Linker {
-
-       [Flags]
-       public enum I18nAssemblies {
-
-               None = 0,
-
-               CJK = 1,
-               MidEast = 2,
-               Other = 4,
-               Rare = 8,
-               West = 16,
-
-               All = CJK | MidEast | Other | Rare | West,
-               Base
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/IXApiVisitor.cs b/mcs/tools/linker/Mono.Linker/IXApiVisitor.cs
deleted file mode 100644 (file)
index 204d699..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// XApiVisitor.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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.Xml.XPath;
-
-using Mono.Cecil;
-
-namespace Mono.Linker {
-
-       public interface IXApiVisitor {
-
-               void OnAssembly (XPathNavigator nav, AssemblyDefinition assembly);
-               void OnAttribute (XPathNavigator nav);
-               void OnClass (XPathNavigator nav, TypeDefinition type);
-               void OnInterface (XPathNavigator nav, TypeDefinition type);
-               void OnField (XPathNavigator nav, FieldDefinition field);
-               void OnMethod (XPathNavigator nav, MethodDefinition method);
-               void OnConstructor (XPathNavigator nav, MethodDefinition method);
-               void OnProperty (XPathNavigator nav, PropertyDefinition property);
-               void OnEvent (XPathNavigator nav, EventDefinition evt);
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/LinkContext.cs b/mcs/tools/linker/Mono.Linker/LinkContext.cs
deleted file mode 100644 (file)
index 7d7908f..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-//
-// LinkContext.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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;
-using System.IO;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Linker {
-
-       public class LinkContext {
-
-               Pipeline _pipeline;
-               AssemblyAction _coreAction;
-               Hashtable _actions;
-               string _outputDirectory;
-               Hashtable _parameters;
-               bool _linkSymbols;
-
-               AssemblyResolver _resolver;
-
-               ReaderParameters _readerParameters;
-               ISymbolReaderProvider _symbolReaderProvider;
-               ISymbolWriterProvider _symbolWriterProvider;
-
-               AnnotationStore _annotations;
-
-               public Pipeline Pipeline {
-                       get { return _pipeline; }
-               }
-
-               public AnnotationStore Annotations {
-                       get { return _annotations; }
-               }
-
-               public string OutputDirectory {
-                       get { return _outputDirectory; }
-                       set { _outputDirectory = value; }
-               }
-
-               public AssemblyAction CoreAction {
-                       get { return _coreAction; }
-                       set { _coreAction = value; }
-               }
-
-               public bool LinkSymbols {
-                       get { return _linkSymbols; }
-                       set { _linkSymbols = value; }
-               }
-
-               public IDictionary Actions {
-                       get { return _actions; }
-               }
-
-               public AssemblyResolver Resolver {
-                       get { return _resolver; }
-               }
-
-               public ISymbolReaderProvider SymbolReaderProvider {
-                       get { return _symbolReaderProvider; }
-                       set { _symbolReaderProvider = value; }
-               }
-
-               public ISymbolWriterProvider SymbolWriterProvider {
-                       get { return _symbolWriterProvider; }
-                       set { _symbolWriterProvider = value; }
-               }
-
-               public bool LogInternalExceptions { get; set; } = false;
-
-               public LinkContext (Pipeline pipeline)
-                       : this (pipeline, new AssemblyResolver ())
-               {
-               }
-
-               public LinkContext (Pipeline pipeline, AssemblyResolver resolver)
-               {
-                       _pipeline = pipeline;
-                       _resolver = resolver;
-                       _actions = new Hashtable ();
-                       _parameters = new Hashtable ();
-                       _annotations = new AnnotationStore ();
-                       _readerParameters = new ReaderParameters {
-                               AssemblyResolver = _resolver,
-                       };
-               }
-
-               public TypeDefinition GetType (string fullName)
-               {
-                       int pos = fullName.IndexOf (",");
-                       fullName = fullName.Replace ("+", "/");
-                       if (pos == -1) {
-                               foreach (AssemblyDefinition asm in GetAssemblies ()) {
-                                       var type = asm.MainModule.GetType (fullName);
-                                       if (type != null)
-                                               return type;
-                               }
-
-                               return null;
-                       }
-
-                       string asmname = fullName.Substring (pos + 1);
-                       fullName = fullName.Substring (0, pos);
-                       AssemblyDefinition assembly = Resolve (AssemblyNameReference.Parse (asmname));
-                       return assembly.MainModule.GetType (fullName);
-               }
-
-               public AssemblyDefinition Resolve (string name)
-               {
-                       if (File.Exists (name)) {
-                               AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly (name, _readerParameters);
-                               _resolver.CacheAssembly (assembly);
-                               return assembly;
-                       }
-
-                       return Resolve (new AssemblyNameReference (name, new Version ()));
-               }
-
-               public AssemblyDefinition Resolve (IMetadataScope scope)
-               {
-                       AssemblyNameReference reference = GetReference (scope);
-                       try {
-                               AssemblyDefinition assembly = _resolver.Resolve (reference, _readerParameters);
-
-                               if (SeenFirstTime (assembly)) {
-                                       SafeReadSymbols (assembly);
-                                       SetAction (assembly);
-                               }
-
-                               return assembly;
-                       }
-                       catch {
-                               throw new AssemblyResolutionException (reference);
-                       }
-               }
-
-               bool SeenFirstTime (AssemblyDefinition assembly)
-               {
-                       return !_annotations.HasAction (assembly);
-               }
-
-               public void SafeReadSymbols (AssemblyDefinition assembly)
-               {
-                       if (!_linkSymbols)
-                               return;
-
-                       if (assembly.MainModule.HasSymbols)
-                               return;
-
-                       try {
-                               if (_symbolReaderProvider != null) {
-                                       var symbolReader = _symbolReaderProvider.GetSymbolReader (
-                                               assembly.MainModule,
-                                               assembly.MainModule.FileName);
-
-                                       _annotations.AddSymbolReader (assembly, symbolReader);
-                                       assembly.MainModule.ReadSymbols (symbolReader);
-                               } else
-                                       assembly.MainModule.ReadSymbols ();
-                       } catch {}
-               }
-
-               static AssemblyNameReference GetReference (IMetadataScope scope)
-               {
-                       AssemblyNameReference reference;
-                       if (scope is ModuleDefinition) {
-                               AssemblyDefinition asm = ((ModuleDefinition) scope).Assembly;
-                               reference = asm.Name;
-                       } else
-                               reference = (AssemblyNameReference) scope;
-
-                       return reference;
-               }
-
-               void SetAction (AssemblyDefinition assembly)
-               {
-                       AssemblyAction action = AssemblyAction.Link;
-
-                       AssemblyNameDefinition name = assembly.Name;
-
-                       if (_actions.Contains (name.Name))
-                               action = (AssemblyAction) _actions [name.Name];
-                       else if (IsCore (name))
-                               action = _coreAction;
-
-                       _annotations.SetAction (assembly, action);
-               }
-
-               static bool IsCore (AssemblyNameReference name)
-               {
-                       switch (name.Name) {
-                       case "mscorlib":
-                       case "Accessibility":
-                       case "Mono.Security":
-                               // WPF
-                       case "PresentationFramework":
-                       case "PresentationCore":
-                       case "WindowsBase":
-                       case "UIAutomationProvider":
-                       case "UIAutomationTypes":
-                       case "PresentationUI":
-                       case "ReachFramework":
-                               return true;
-                       default:
-                               return name.Name.StartsWith ("System")
-                                       || name.Name.StartsWith ("Microsoft");
-                       }
-               }
-
-               public AssemblyDefinition [] GetAssemblies ()
-               {
-                       IDictionary cache = _resolver.AssemblyCache;
-                       AssemblyDefinition [] asms = new AssemblyDefinition [cache.Count];
-                       cache.Values.CopyTo (asms, 0);
-                       return asms;
-               }
-
-               public void SetParameter (string key, string value)
-               {
-                       _parameters [key] = value;
-               }
-
-               public bool HasParameter (string key)
-               {
-                       return _parameters.Contains (key);
-               }
-
-               public string GetParameter (string key)
-               {
-                       return (string) _parameters [key];
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/MethodAction.cs b/mcs/tools/linker/Mono.Linker/MethodAction.cs
deleted file mode 100644 (file)
index f51587e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// MethodAction.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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 Mono.Linker {
-
-       public enum MethodAction {
-               Nothing,
-               Parse,
-               ForceParse
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/Pipeline.cs b/mcs/tools/linker/Mono.Linker/Pipeline.cs
deleted file mode 100644 (file)
index 7ae07d2..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-//
-// Pipeline.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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;
-using System.Diagnostics;
-
-using Mono.Linker.Steps;
-
-namespace Mono.Linker {
-
-       public class Pipeline {
-
-               ArrayList _steps;
-
-               public Pipeline ()
-               {
-                       _steps = new ArrayList();
-               }
-
-               public void PrependStep (IStep step)
-               {
-                       _steps.Insert (0, step);
-               }
-
-               public void AppendStep (IStep step)
-               {
-                       _steps.Add (step);
-               }
-
-               public void AddStepBefore (Type target, IStep step)
-               {
-                       for (int i = 0; i < _steps.Count; i++) {
-                               if (target.IsInstanceOfType (_steps [i])) {
-                                       _steps.Insert (i, step);
-                                       return;
-                               }
-                       }
-                       string msg = String.Format ("Step {0} could not be inserted before (not found) {1}", step, target);
-                       throw new InvalidOperationException (msg);
-               }
-
-               public void ReplaceStep (Type target, IStep step)
-               {
-                       AddStepBefore (target, step);
-                       RemoveStep (target);
-               }
-
-               public void AddStepAfter (Type target, IStep step)
-               {
-                       for (int i = 0; i < _steps.Count; i++) {
-                               if (target.IsInstanceOfType (_steps [i])) {
-                                       if (i == _steps.Count - 1)
-                                               _steps.Add (step);
-                                       else
-                                               _steps.Insert (i + 1, step);
-                                       return;
-                               }
-                       }
-                       string msg = String.Format ("Step {0} could not be inserted after (not found) {1}", step, target);
-                       throw new InvalidOperationException (msg);
-               }
-
-               public void AddStepAfter (IStep target, IStep step)
-               {
-                       for (int i = 0; i < _steps.Count; i++) {
-                               if (_steps [i] == target) {
-                                       if (i == _steps.Count - 1)
-                                               _steps.Add (step);
-                                       else
-                                               _steps.Insert (i + 1, step);
-                                       return;
-                               }
-                       }
-               }
-
-               public void RemoveStep (Type target)
-               {
-                       for (int i = 0; i < _steps.Count; i++) {
-                               if (_steps [i].GetType () != target)
-                                       continue;
-
-                               _steps.RemoveAt (i);
-                               break;
-                       }
-               }
-
-               public void Process (LinkContext context)
-               {
-                       while (_steps.Count > 0) {
-                               IStep step = (IStep) _steps [0];
-                               context.Annotations.Push (step);
-                               step.Process (context);
-                               context.Annotations.Pop ();
-                               _steps.Remove (step);
-                       }
-               }
-
-               public IStep [] GetSteps ()
-               {
-                       return (IStep []) _steps.ToArray (typeof (IStep));
-               }
-
-               public bool ContainsStep (Type type)
-               {
-                       foreach (IStep step in _steps)
-                               if (step.GetType () == type)
-                                       return true;
-
-                       return false;
-               }
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/TypePreserve.cs b/mcs/tools/linker/Mono.Linker/TypePreserve.cs
deleted file mode 100644 (file)
index 08e7b96..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// TypePreserve.cs
-//
-// Author:
-//   Jb Evain (jb@nurv.fr)
-//
-// (C) 2007 Novell, 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 Mono.Linker {
-
-       public enum TypePreserve {
-               Nothing,
-               All,
-               Fields,
-               Methods,
-       }
-}
diff --git a/mcs/tools/linker/Mono.Linker/XApiReader.cs b/mcs/tools/linker/Mono.Linker/XApiReader.cs
deleted file mode 100644 (file)
index bb16e21..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
-//
-// XApiReader.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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;
-using System.Linq;
-using System.Text;
-using System.Xml.XPath;
-
-using Mono.Cecil;
-
-namespace Mono.Linker {
-
-       public class XApiReader {
-
-               static readonly string _name = "name";
-               static readonly string _ns = string.Empty;
-
-               LinkContext _context;
-               XPathDocument _document;
-               IXApiVisitor _visitor;
-
-               AssemblyDefinition _assembly;
-               string _namespace;
-               Stack _types = new Stack ();
-               StringBuilder _signature;
-
-               public XApiReader (XPathDocument document, IXApiVisitor visitor)
-               {
-                       _document = document;
-                       _visitor = visitor;
-               }
-
-               public void Process (LinkContext context)
-               {
-                       _context = context;
-                       ProcessAssemblies (_document.CreateNavigator ());
-               }
-
-               void OnAssembly (XPathNavigator nav)
-               {
-                       _assembly = GetAssembly (nav);
-
-                       _visitor.OnAssembly (nav, _assembly);
-
-                       ProcessAttributes (nav);
-                       ProcessNamespaces (nav);
-               }
-
-               AssemblyDefinition GetAssembly (XPathNavigator nav)
-               {
-                       AssemblyNameReference name = new AssemblyNameReference (
-                               GetName (nav),
-                               new Version (GetAttribute (nav, "version")));
-
-                       AssemblyDefinition assembly = _context.Resolve (name);
-                       ProcessReferences (assembly);
-                       return assembly;
-               }
-
-               void ProcessReferences (AssemblyDefinition assembly)
-               {
-                       foreach (AssemblyNameReference name in assembly.MainModule.AssemblyReferences)
-                               _context.Resolve (name);
-               }
-
-               void OnAttribute (XPathNavigator nav)
-               {
-                       _visitor.OnAttribute (nav);
-               }
-
-               void PushType (TypeDefinition type)
-               {
-                       _types.Push (type);
-               }
-
-               TypeDefinition PeekType ()
-               {
-                       return (TypeDefinition) _types.Peek ();
-               }
-
-               TypeDefinition PopType ()
-               {
-                       return (TypeDefinition) _types.Pop ();
-               }
-
-               void OnNamespace (XPathNavigator nav)
-               {
-                       _namespace = GetName (nav);
-
-                       ProcessClasses (nav);
-               }
-
-               void OnClass (XPathNavigator nav)
-               {
-                       string name = GetClassName (nav);
-
-                       TypeDefinition type = _assembly.MainModule.GetType (name);
-                       if (type == null)
-                               return;
-
-                       _visitor.OnClass (nav, type);
-
-                       PushType (type);
-
-                       ProcessAttributes (nav);
-                       ProcessInterfaces (nav);
-                       ProcessFields (nav);
-                       ProcessMethods (nav);
-                       ProcessConstructors (nav);
-                       ProcessProperties (nav);
-                       ProcessEvents (nav);
-                       ProcessClasses (nav);
-
-                       PopType ();
-               }
-
-               string GetClassName (XPathNavigator nav)
-               {
-                       if (IsNestedClass ())
-                               return PeekType ().FullName + "/" + GetName (nav);
-
-                       return _namespace + "." + GetName (nav);
-               }
-
-               bool IsNestedClass ()
-               {
-                       return _types.Count > 0;
-               }
-
-               void OnField (XPathNavigator nav)
-               {
-                       TypeDefinition declaring = PeekType ();
-
-                       FieldDefinition field = declaring.Fields.FirstOrDefault (f => f.Name == GetName (nav));
-                       if (field != null)
-                               _visitor.OnField (nav, field);
-
-                       ProcessAttributes (nav);
-               }
-
-               void OnInterface (XPathNavigator nav)
-               {
-                       string name = GetName (nav);
-
-                       TypeDefinition type = _context.GetType (GetTypeName (name));
-                       if (type != null)
-                               _visitor.OnInterface (nav, type);
-               }
-
-               void OnMethod (XPathNavigator nav)
-               {
-                       InitMethodSignature (nav);
-
-                       ProcessParameters (nav);
-
-                       string signature = GetMethodSignature ();
-
-                       MethodDefinition method = GetMethod (signature);
-                       if (method != null)
-                               _visitor.OnMethod (nav, method);
-
-                       ProcessAttributes (nav);
-               }
-
-               MethodDefinition GetMethod (string signature)
-               {
-                       return GetMethod (PeekType ().Methods, signature);
-               }
-
-               static MethodDefinition GetMethod (ICollection methods, string signature)
-               {
-                       foreach (MethodDefinition method in methods)
-                               if (signature == GetSignature (method))
-                                       return method;
-
-                       return null;
-               }
-
-               static string GetSignature (MethodDefinition method)
-               {
-                       return method.ToString ().Replace ("<", "[").Replace (">", "]");
-               }
-
-               string GetMethodSignature ()
-               {
-                       _signature.Append (")");
-                       return _signature.ToString ();
-               }
-
-               void InitMethodSignature (XPathNavigator nav)
-               {
-                       _signature = new StringBuilder ();
-
-                       string returntype = GetAttribute (nav, "returntype");
-                       if (returntype == null || returntype.Length == 0)
-                               returntype = "System.Void";
-
-                       _signature.Append (NormalizeTypeName (returntype));
-                       _signature.Append (" ");
-                       _signature.Append (PeekType ().FullName);
-                       _signature.Append ("::");
-
-                       string name = GetName (nav);
-                       _signature.Append (GetMethodName (name));
-
-                       _signature.Append ("(");
-               }
-
-               static string GetMethodName (string name)
-               {
-                       return GetStringBefore (name, "(");
-               }
-
-               static string NormalizeTypeName (string name)
-               {
-                       return name.Replace ("+", "/").Replace ("<", "[").Replace (">", "]");
-               }
-
-               static string GetTypeName (string name)
-               {
-                       return GetStringBefore (NormalizeTypeName (name), "[");
-               }
-
-               static string GetStringBefore (string str, string marker)
-               {
-                       int pos = str.IndexOf (marker);
-                       if (pos == -1)
-                               return str;
-
-                       return str.Substring (0, pos);
-               }
-
-               void OnParameter (XPathNavigator nav)
-               {
-                       string type = GetAttribute (nav, "type");
-                       int pos = int.Parse (GetAttribute (nav, "position"));
-
-                       if (pos > 0)
-                               _signature.Append (",");
-                       _signature.Append (NormalizeTypeName (type));
-               }
-
-               void OnConstructor (XPathNavigator nav)
-               {
-                       InitMethodSignature (nav);
-
-                       ProcessParameters (nav);
-
-                       string signature = GetMethodSignature ();
-
-                       MethodDefinition ctor = GetMethod (signature);
-                       if (ctor != null)
-                               _visitor.OnConstructor (nav, ctor);
-
-                       ProcessAttributes (nav);
-               }
-
-               void OnProperty (XPathNavigator nav)
-               {
-                       string name = GetName (nav);
-                       TypeDefinition type = PeekType ();
-
-                       var property = type.Properties.FirstOrDefault (p => p.Name == name);
-                       if (property != null)
-                               _visitor.OnProperty (nav, property);
-
-                       ProcessAttributes (nav);
-                       ProcessMethods (nav);
-               }
-
-               void OnEvent (XPathNavigator nav)
-               {
-                       string name = GetName (nav);
-                       TypeDefinition type = PeekType ();
-
-                       EventDefinition evt = type.Events.FirstOrDefault (e => e.Name == name);
-                       if (evt != null)
-                               _visitor.OnEvent (nav, evt);
-
-                       ProcessAttributes (nav);
-               }
-
-               void ProcessAssemblies (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "assemblies//assembly", new OnChildren (OnAssembly));
-               }
-
-               void ProcessAttributes (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "attributes//attribute", new OnChildren (OnAttribute));
-               }
-
-               void ProcessNamespaces (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "namespaces//namespace", new OnChildren (OnNamespace));
-               }
-
-               void ProcessClasses (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "classes//class", new OnChildren (OnClass));
-               }
-
-               void ProcessInterfaces (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "intefaces//interface", new OnChildren (OnInterface));
-               }
-
-               void ProcessFields (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "fields//field", new OnChildren (OnField));
-               }
-
-               void ProcessMethods (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "methods//method", new OnChildren (OnMethod));
-               }
-
-               void ProcessConstructors (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "constructors//constructor", new OnChildren (OnConstructor));
-               }
-
-               void ProcessParameters (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "parameters//parameter", new OnChildren (OnParameter));
-               }
-
-               void ProcessProperties (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "properties//property", new OnChildren (OnProperty));
-               }
-
-               void ProcessEvents (XPathNavigator nav)
-               {
-                       ProcessChildren (nav, "events//event", new OnChildren (OnEvent));
-               }
-
-               static void ProcessChildren (XPathNavigator nav, string children, OnChildren action)
-               {
-                       XPathNodeIterator iterator = nav.Select (children);
-                       while (iterator.MoveNext ())
-                               action (iterator.Current);
-               }
-
-               delegate void OnChildren (XPathNavigator nav);
-
-               static string GetName (XPathNavigator nav)
-               {
-                       return GetAttribute (nav, _name);
-               }
-
-               static string GetAttribute (XPathNavigator nav, string attribute)
-               {
-                       return nav.GetAttribute (attribute, _ns);
-               }
-       }
-}
diff --git a/mcs/tools/linker/README b/mcs/tools/linker/README
deleted file mode 100644 (file)
index 95b8a92..0000000
+++ /dev/null
@@ -1,304 +0,0 @@
-monolinker
-====
-
-monolinker is the Mono CIL Linker.
-
-The linker is a tool one can use to only ship the minimal possible set of
-functions that a set of programs might require to run as opposed to the full
-libraries.
-
-* How does the linker work?
-
-The linker analyses the intermediate code (CIL) produced by every compiler
-targeting the Mono platform like mcs, gmcs, vbnc, booc or others. It will walk
-through all the code that it is given to it, and basically, perform a mark and
-sweep operations on all the code that it is referenced, to only keep what is
-necessary for the source program to run.
-
-* Usage
-
-1) Linking from a source assembly
-
-The command:
-
-monolinker -a Program.exe
-
-will use the assembly Program.exe as a source. That means that the linker will
-walk through all the methods of Program.exe to generate only what is necessary
-for this assembly to run.
-
-2) Linking from an xml descriptor
-
-The command:
-
-monolinker -x desc.xml
-
-will use the XML descriptor as a source. That means that the linker will
-use this file to decide what to link in a set of assemblies. The format of the
-descriptors is described further on in this document.
-
-3) Linking from an api info file
-
-The command:
-
-monolinker -i assembly.info
-
-will use a file produced by mono-api-info as a source. The linker will use
-this file to link only what is necessary to match the public API defined in
-the info file.
-
-4) Actions on the assemblies
-
-You can specify what the linker should do exactly per assembly.
-
-The linker can do 3 things:
-
-       - skip them, and do nothing with them,
-       - copy them to the output directory,
-       - link them, to reduce their size.
-
-You can specify an action per assembly like this:
-
-monolinker -p link Foo
-
-or
-
-monolinker -p skip System.Windows.Forms
-
-Or you can specify what to do for the core assemblies.
-
-Core assemblies are the assemblies that belongs to the base class library,
-like mscorlib.dll, System.dll or System.Windows.Forms.dll.
-
-You can specify what action to do on the core assemblies with the option:
-
--c skip|copy|link
-
-5) The output directory
-
-By default, the linker will create an `output' directory in the current
-directory where it will emit the linked files, to avoid erasing source
-assemblies. You can specify the output directory with the option:
-
--o output_directory
-
-If you specify the directory `.', please ensure that you won't write over
-important assemblies of yours.
-
-* Syntax of a xml descriptor
-
-Here is an example that shows all the possibilities of this format:
-
----
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo" />
-               <type fullname="Bar" preserve="nothing" required="false" />
-               <type fullname="Baz" preserve="fields" required="false" />
-               <type fullname="Gazonk">
-                       <method signature="System.Void .ctor(System.String)" />
-                       <field signature="System.String _blah" />
-               </type>
-       </assembly>
-</linker>
----
-
-In this example, the linker will link the types Foo, Bar, Baz and Gazonk.
-
-The fullname attribute specifies the fullname of the type in the format
-specified by ECMA-335. This is in Mono and certain cases not the same
-as the one reported by Type.FullName (nested classes e.g.).
-
-The preserve attribute ensures that all the fields of the type Baz will be
-always be linked, not matter if they are used or not, but that neither the
-fields or the methods of Bar will be linked if they are not used. Not
-specifying a preserve attribute implies that we are preserving everything in
-the specified type.
-
-The required attribute specifies that if the type is not marked, during the
-mark operation, it will not be linked.
-
-The type Gazonk will be linked, as well as its constructor taking a string as a
-parameter, and it's _blah field.
-
-You can have multiple assembly nodes.
-
-6) The i18n Assemblies
-
-Mono have a few assemblies which contains everything region specific:
-
-    I18N.CJK.dll
-    I18N.MidEast.dll
-    I18N.Other.dll
-    I18N.Rare.dll
-    I18N.West.dll
-
-By default, they will all be copied to the output directory. But you can
-specify which one you want using the command:
-
-monolinker -l choice
-
-Where choice can either be: none, all, cjk, mideast, other, rare or west. You can
-combine the values with a comma.
-
-Example:
-
-monolinker -a assembly -l mideast,cjk
-
-7) Specifying directories where the linker should look for assemblies
-
-By default, the linker will first look for assemblies in the directories `.'
-and `bin'. You can specify
-
-Example:
-
-monolinker -d ../../libs -a program.exe
-
-8) Adding custom steps to the linker.
-
-You can write custom steps for the linker and tell the linker to use them.
-Let's take a simple example:
-
-using System;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-namespace Foo {
-
-       public class FooStep : IStep {
-
-               public void Process (LinkContext context)
-               {
-                       foreach (IStep step in context.Pipeline.GetSteps ()) {
-                               Console.WriteLine (step.GetType ().Name);
-                       }
-               }
-       }
-}
-
-
-That is compiled against the linker to a Foo.dll assembly.
-
-You can ask the linker to add it at the end of the pipeline:
-
-monolinker -s Foo.FooStep,Foo -a program.exe
-
-Or you can ask the linker to add it after a specific step:
-
-monolinker -s MarkStep:Foo.FooStep,Foo -a program.exe
-
-Or before a specific step:
-
-monolinker -s Foo.FooStep,Foo:MarkStep
-
-* Inside the linker
-
-The linker is a quite small piece of code, and it pretty simple to address.
-Its only dependency is Mono.Cecil, that is used to read, modify and write back
-the assemblies.
-
-Everything is located in the namespace Mono.Linker, or in sub namespaces.
-Being a command line utility, its entry point function is in the class Driver.
-
-This class is in charge of analyzing the command line, and to instantiate two
-important objects, a LinkContext, and a Pipeline.
-
-The LinkContext contains all the informations that will be used during the
-linking process, such as the assemblies involved, the output directory and
-probably other useful stuff.
-
-The Pipeline is simply a queue of actions (steps), to be applied to the current
-context. The whole process of linking is split into those differents steps
-that are all located in the Mono.Linker.Steps namespace.
-
-Here are the current steps that are implemented, in the order they are used:
-
-1) ResolveFromAssembly or ResolveFromXml
-
-Those steps are used to initialize the context, and pre-mark the root code
-that will be used as a source for the linker.
-
-Resolving from an assembly or resolving from a xml descriptor is a decision
-taken in the command line parsing.
-
-2) LoadReferences
-
-This step will load all the references of all the assemblies involved in the
-current context.
-
-3) Blacklist
-
-This step is used if and only if you have specified that the core should be
-linked. It will load a bunch of resources from the assemblies, that are
-actually a few XML descriptors, that will ensure that some types and methods
-that are used from inside the runtime are properly linked and not removed.
-
-It is doing so by inserting a ResolveFromXml step per blacklist in the
-pipeline.
-
-4) Mark
-
-This is the most complex step. The linker will get from the context the list
-of types, fields and methods that have been pre-marked in the resolve steps,
-and walk through all of them. For every method, it will analyse the CIL stream,
-to find references to other fields, types, or methods.
-
-When it encounters such a reference, it will resolve the original definition of
-this reference, and add this to the queue of items to be processed. For
-instance, if have in a source assembly a call to Console.WriteLine, the linker
-will resolve the appropriate method WriteLine in the Console type from the
-mscorlib assembly, and add it to the queue. When this WriteLine method will be
-dequeued, and processed, the linker will go through everything that is used in
-it, and add it to the queue, if they have not been processed already.
-
-To know if something have been marked to be linked, or processed, the linker
-is using a functionality of Cecil called annotations. Almost everything in
-Cecil can be annotated. Concretely, it means that almost everything own an
-Hashtable in which you can add what you want, using the keys and the values you
-want.
-
-So the linker will annotate assemblies, types, methods and fields to know
-what should be linked or not, and what have been processed, and how it should
-process them.
-
-This is really useful as we don't have to recreate a full hierarchy of classes
-to encapsulate the different Cecil types to add the few informations we want.
-
-5) Sweep
-
-This simple step will walk through all the elements of an assembly, and based
-on their annotations, remove them or keep them.
-
-6) Clean
-
-This step will clean parts of the assemblies, like properties. If a proprety
-used to have a getter and a setter, and that after the mark & sweep steps,
-only the getter is linked, it will update the property to reflect that.
-
-There is a few things to keep clean like properties has we've seen, events,
-nested classes, and probably a few others.
-
-7) Output
-
-For each assembly in the context, this step will act on the action associated
-to the assembly. If the assembly is marked as skip, it won't do anything,
-if it's marked as copy, it will copy the assembly to the output directory,
-and if it's link, it will save the modified assembly to the output directory.
-
-* Reporting a bug
-
-If you face a bug in the linker, please report it to:
-
-http://bugzilla.ximian.com
-
-Product: Mono tools, Component: linker.
-
-* Mailing lists
-
-You can ask questions about the linker of the cecil Google Group:
-
-http://groups.google.com/group/mono-cecil
-
---
-Jb Evain <jbevain@novell.com>
diff --git a/mcs/tools/linker/Tests/Libs/nunit-console-runner.dll b/mcs/tools/linker/Tests/Libs/nunit-console-runner.dll
deleted file mode 100755 (executable)
index f112e23..0000000
Binary files a/mcs/tools/linker/Tests/Libs/nunit-console-runner.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/Libs/nunit-console.exe b/mcs/tools/linker/Tests/Libs/nunit-console.exe
deleted file mode 100755 (executable)
index 32ca802..0000000
Binary files a/mcs/tools/linker/Tests/Libs/nunit-console.exe and /dev/null differ
diff --git a/mcs/tools/linker/Tests/Libs/nunit-console.exe.config b/mcs/tools/linker/Tests/Libs/nunit-console.exe.config
deleted file mode 100755 (executable)
index 4926127..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<configuration>
-    <!--
-     Application settings for NUnit-console.exe. Do NOT put settings
-        for use by your tests here.
-       -->
-  <appSettings>
-
-       <!--
-        Specify the location to be used by .NET for the cache
-       -->
-    <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" />
-
-  </appSettings>
-
-    <!--
-     The startup section may be used to specify the runtime versions
-     supported in the order that they will be used if more than one
-     is present. As supplied, this section is commented out, which
-     causes nunit-console to use the version of the framework with
-     which it was built.
-
-        Since .NET 1.0 does not recognize the <supportedRuntime> elements,
-        a <requiredRuntime> element is used in case it is the only version
-        of the framework that is installed.
-    -->
-    <!--
-  <startup>
-         <supportedRuntime version="v2.0.50727" />
-         <supportedRuntime version="v2.0.50215" />
-         <supportedRuntime version="v2.0.40607" />
-         <supportedRuntime version="v1.1.4322" />
-         <supportedRuntime version="v1.0.3705" />
-
-         <requiredRuntime version="v1.0.3705" />
-  </startup>
-  -->
-
-   <!--
-    The following <runtime> section allows running nunit under
-    .NET 1.0 by redirecting assemblies. The appliesTo attribute
-    causes the section to be ignored except under .NET 1.0version 1
-    on a machine with only the .NET version 1.0 runtime installed.
-    If application and its tests were built for .NET 1.1 you will
-    also need to redirect system assemblies in the test config file.
-   -->
-
- <runtime>
-
-    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
-                       appliesTo="v1.0.3705">
-
-      <dependentAssembly>
-        <assemblyIdentity name="System"
-                          publicKeyToken="b77a5c561934e089"
-                          culture="neutral"/>
-        <bindingRedirect  oldVersion="1.0.5000.0"
-                          newVersion="1.0.3300.0"/>
-      </dependentAssembly>
-
-      <dependentAssembly>
-        <assemblyIdentity name="System.Data"
-                          publicKeyToken="b77a5c561934e089"
-                          culture="neutral"/>
-        <bindingRedirect  oldVersion="1.0.5000.0"
-                          newVersion="1.0.3300.0"/>
-      </dependentAssembly>
-
-      <dependentAssembly>
-        <assemblyIdentity name="System.Drawing"
-                          publicKeyToken="b03f5f7f11d50a3a"
-                          culture="neutral"/>
-        <bindingRedirect  oldVersion="1.0.5000.0"
-                          newVersion="1.0.3300.0"/>
-      </dependentAssembly>
-
-      <dependentAssembly>
-        <assemblyIdentity name="System.Windows.Forms"
-                          publicKeyToken="b77a5c561934e089"
-                          culture="neutral"/>
-        <bindingRedirect  oldVersion="1.0.5000.0"
-                          newVersion="1.0.3300.0"/>
-      </dependentAssembly>
-
-      <dependentAssembly>
-        <assemblyIdentity name="System.Xml"
-                          publicKeyToken="b77a5c561934e089"
-                          culture="neutral"/>
-        <bindingRedirect  oldVersion="1.0.5000.0"
-                          newVersion="1.0.3300.0"/>
-      </dependentAssembly>
-
-    </assemblyBinding>
-
-  </runtime>
-
-</configuration>
\ No newline at end of file
diff --git a/mcs/tools/linker/Tests/Libs/nunit.core.dll b/mcs/tools/linker/Tests/Libs/nunit.core.dll
deleted file mode 100755 (executable)
index df7f905..0000000
Binary files a/mcs/tools/linker/Tests/Libs/nunit.core.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/Libs/nunit.framework.dll b/mcs/tools/linker/Tests/Libs/nunit.framework.dll
deleted file mode 100755 (executable)
index 5316687..0000000
Binary files a/mcs/tools/linker/Tests/Libs/nunit.framework.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/Libs/nunit.util.dll b/mcs/tools/linker/Tests/Libs/nunit.util.dll
deleted file mode 100755 (executable)
index e9e479e..0000000
Binary files a/mcs/tools/linker/Tests/Libs/nunit.util.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/Makefile b/mcs/tools/linker/Tests/Makefile
deleted file mode 100644 (file)
index 769a38a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-MCS = mcs
-
-all: Mono.Linker.Tests.dll
-
-Mono.Cecil.dll:
-       cp ../Mono.Cecil.dll .
-
-monolinker.exe:
-       cp ../monolinker.exe .
-
-Mono.Linker.Tests.dll.sources:
-       find Mono.Linker.Tests -name "*.cs" > Mono.Linker.Tests.dll.sources
-
-Mono.Linker.Tests.dll: Mono.Cecil.dll monolinker.exe Mono.Linker.Tests.dll.sources
-       $(MCS) /target:library /out:Mono.Linker.Tests.dll /r:nunitlite.dll /r:Mono.Cecil.dll /r:monolinker.exe @Mono.Linker.Tests.dll.sources
-
-clean:
-       rm -rf Mono.Cecil.dll monolinker.exe Mono.Linker.Tests.dll.sources Mono.Linker.Tests.dll
-
-run-test: all
-       nunit-console Mono.Linker.Tests.dll
diff --git a/mcs/tools/linker/Tests/Mono.Linker.Tests.csproj b/mcs/tools/linker/Tests/Mono.Linker.Tests.csproj
deleted file mode 100644 (file)
index a83021f..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{400A1561-B6B6-482D-9E4C-3DDAEDE5BD07}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Mono.Linker.Tests</RootNamespace>
-    <AssemblyName>Mono.Linker.Tests</AssemblyName>
-    <StartupObject>
-    </StartupObject>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <ItemGroup>
-    <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>Libs\nunit.framework.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\..\class\Mono.Cecil\Mono.Cecil.csproj">
-      <Project>{D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}</Project>
-      <Name>Mono.Cecil</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\Mono.Linker.csproj">
-      <Project>{DD28E2B1-057B-4B4D-A04D-B2EBD9E76E46}</Project>
-      <Name>Mono.Linker</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Mono.Linker.Tests\AbstractLinkingTestFixture.cs" />
-    <Compile Include="Mono.Linker.Tests\AbstractTestFixture.cs" />
-    <Compile Include="Mono.Linker.Tests\AssemblyLinkingTestFixture.cs" />
-    <Compile Include="Mono.Linker.Tests\AssemblyInfo.cs" />
-    <Compile Include="Mono.Linker.Tests\IntegrationTestFixture.cs" />
-    <Compile Include="Mono.Linker.Tests\XmlLinkingTestFixture.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Properties\" />
-  </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/mcs/tools/linker/Tests/Mono.Linker.Tests/AbstractLinkingTestFixture.cs b/mcs/tools/linker/Tests/Mono.Linker.Tests/AbstractLinkingTestFixture.cs
deleted file mode 100644 (file)
index 58dc1a5..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-//
-// AbstractLinkingTestFixture.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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 Mono.Cecil;
-using Mono.Linker.Steps;
-using NUnit.Framework;
-
-namespace Mono.Linker.Tests {
-
-       public abstract class AbstractLinkingTestFixture : AbstractTestFixture {
-
-               [SetUp]
-               public override void SetUp ()
-               {
-                       base.SetUp ();
-
-                       TestCasesRoot = "Linker";
-               }
-
-               [TearDown]
-               public override void TearDown ()
-               {
-                       base.TearDown ();
-
-                       string output = GetOutputPath ();
-                       if (Directory.Exists (output))
-                               Directory.Delete (output, true);
-               }
-
-               protected override Pipeline GetPipeline ()
-               {
-                       Pipeline p = new Pipeline ();
-                       p.AppendStep (new LoadReferencesStep ());
-                       p.AppendStep (new BlacklistStep ());
-                       p.AppendStep (new TypeMapStep ());
-                       p.AppendStep (new MarkStep ());
-                       p.AppendStep (new SweepStep ());
-                       p.AppendStep (new CleanStep ());
-                       p.AppendStep (new OutputStep ());
-                       return p;
-               }
-
-               protected override void RunTest (string testCase)
-               {
-                       base.RunTest (testCase);
-
-                       Prepare ();
-               }
-
-               void Prepare ()
-               {
-                       Context = GetContext ();
-                       string output = GetOutputPath ();
-                       if (Directory.Exists (output))
-                               Directory.Delete (output, true);
-                       Directory.CreateDirectory (output);
-               }
-
-               protected override void Run ()
-               {
-                       base.Run ();
-                       Compare ();
-               }
-
-               void Compare ()
-               {
-                       foreach (AssemblyDefinition assembly in Context.GetAssemblies ()) {
-                               if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                                       continue;
-
-                               string fileName = GetAssemblyFileName (assembly);
-
-                               CompareAssemblies (
-                                       AssemblyFactory.GetAssembly (
-                                               Path.Combine (GetTestCasePath (), fileName)),
-                                       AssemblyFactory.GetAssembly (
-                                               Path.Combine (GetOutputPath (), fileName)));
-                       }
-               }
-
-               static void CompareAssemblies (AssemblyDefinition original, AssemblyDefinition linked)
-               {
-                       foreach (TypeDefinition originalType in original.MainModule.Types) {
-                               TypeDefinition linkedType = linked.MainModule.Types [originalType.FullName];
-                               if (NotLinked (originalType)) {
-                                       Assert.IsNull (linkedType, string.Format ("Type `{0}' should not have been linked", originalType));
-                                       continue;
-                               }
-
-                               Assert.IsNotNull (linkedType, string.Format ("Type `{0}' should have been linked", originalType));
-                               CompareTypes (originalType, linkedType);
-                       }
-               }
-
-               static void CompareTypes (TypeDefinition type, TypeDefinition linkedType)
-               {
-                       foreach (FieldDefinition originalField in type.Fields) {
-                               FieldDefinition linkedField = linkedType.Fields.GetField (originalField.Name);// TODO: also get with the type!
-                               if (NotLinked (originalField)) {
-                                       Assert.IsNull (linkedField, string.Format ("Field `{0}' should not have been linked", originalField));
-                                       continue;
-                               }
-
-                               Assert.IsNotNull (linkedField, string.Format ("Field `{0}' should have been linked", originalField));
-                       }
-
-                       foreach (MethodDefinition originalCtor in type.Constructors) {
-                               MethodDefinition linkedCtor = linkedType.Constructors.GetConstructor (originalCtor.IsStatic, originalCtor.Parameters);
-                               if (NotLinked (originalCtor)) {
-                                       Assert.IsNull (linkedCtor, string.Format ("Constructor `{0}' should not have been linked", originalCtor));
-                                       continue;
-                               }
-
-                               Assert.IsNotNull (linkedCtor, string.Format ("Constructor `{0}' should have been linked", originalCtor));
-                       }
-
-                       foreach (MethodDefinition originalMethod in type.Methods) {
-                               MethodDefinition linkedMethod = linkedType.Methods.GetMethod (originalMethod.Name, originalMethod.Parameters);
-                               if (NotLinked (originalMethod)) {
-                                       Assert.IsNull (linkedMethod, string.Format ("Method `{0}' should not have been linked", originalMethod));
-                                       continue;
-                               }
-
-                               Assert.IsNotNull (linkedMethod, string.Format ("Method `{0}' should have been linked", originalMethod));
-                       }
-               }
-
-               static bool NotLinked(ICustomAttributeProvider provider)
-               {
-                       foreach (CustomAttribute ca in provider.CustomAttributes)
-                               if (ca.Constructor.DeclaringType.Name == "NotLinkedAttribute")
-                                       return true;
-
-                       return false;
-               }
-       }
-}
diff --git a/mcs/tools/linker/Tests/Mono.Linker.Tests/AbstractTestFixture.cs b/mcs/tools/linker/Tests/Mono.Linker.Tests/AbstractTestFixture.cs
deleted file mode 100644 (file)
index f4ac2d5..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-// AbstractTestFixture.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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 Mono.Linker.Tests {
-
-       using System;
-       using System.IO;
-
-       using Mono.Cecil;
-
-       using NUnit.Framework;
-
-       public abstract class AbstractTestFixture {
-
-               string _testCasesRoot;
-               string _testCase;
-               LinkContext _context;
-               Pipeline _pipeline;
-
-               protected LinkContext Context {
-                       get { return _context; }
-                       set { _context = value; }
-               }
-
-               protected Pipeline Pipeline {
-                       get { return _pipeline; }
-                       set { _pipeline = value; }
-               }
-
-               public string TestCasesRoot {
-                       get { return _testCasesRoot; }
-                       set { _testCasesRoot = value; }
-               }
-
-               public string TestCase {
-                       get { return _testCase; }
-                       set { _testCase = value; }
-               }
-
-               [SetUp]
-               public virtual void SetUp ()
-               {
-                       _pipeline = GetPipeline ();
-               }
-
-               [TearDown]
-               public virtual void TearDown ()
-               {
-               }
-
-               protected virtual Pipeline GetPipeline ()
-               {
-                       return new Pipeline ();
-               }
-
-               protected virtual LinkContext GetContext ()
-               {
-                       LinkContext context = new LinkContext (_pipeline);
-                       context.OutputDirectory = GetOutputPath ();
-                       context.CoreAction = AssemblyAction.Copy;
-                       return context;
-               }
-
-               protected string GetOutputPath ()
-               {
-                       return Path.Combine (
-                               Path.GetTempPath (),
-                               _testCase);
-               }
-
-               protected string GetTestCasePath ()
-               {
-                       return Path.Combine (
-                               Path.Combine (
-#if DEBUG
-                                       Path.Combine (Environment.CurrentDirectory,
-                                               Path.Combine ("..", "..")),
-#else
-                                       Environment.CurrentDirectory,
-#endif
-                                       "TestCases"),
-                               Path.Combine (
-                                       _testCasesRoot,
-                                       _testCase));
-               }
-
-               protected virtual void RunTest (string testCase)
-               {
-                       _testCase = testCase;
-                       _context = GetContext ();
-               }
-
-               protected virtual void Run ()
-               {
-                       string cd = Environment.CurrentDirectory;
-                       Environment.CurrentDirectory = GetTestCasePath ();
-                       try {
-                               _pipeline.Process (_context);
-                       } finally {
-                               Environment.CurrentDirectory = cd;
-                       }
-               }
-
-               protected static string GetAssemblyFileName (AssemblyDefinition asm)
-               {
-                       return asm.Name.Name + (asm.Kind == AssemblyKind.Dll ? ".dll" : ".exe");
-               }
-       }
-}
diff --git a/mcs/tools/linker/Tests/Mono.Linker.Tests/AssemblyInfo.cs b/mcs/tools/linker/Tests/Mono.Linker.Tests/AssemblyInfo.cs
deleted file mode 100644 (file)
index 0c169fd..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// AssemblyInfo.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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.InteropServices;
-
-[assembly: AssemblyTitle ("Mono.Linker.Tests")]
-[assembly: AssemblyDescription ("NUnit tests for Mono's CIL Linker")]
-[assembly: AssemblyConfiguration ("")]
-[assembly: AssemblyProduct ("")]
-[assembly: AssemblyCopyright ("(C) 2006, Jb Evain")]
-[assembly: AssemblyCulture ("")]
-
-[assembly: CLSCompliant (false)]
-[assembly: ComVisible (false)]
-
diff --git a/mcs/tools/linker/Tests/Mono.Linker.Tests/AssemblyLinkingTestFixture.cs b/mcs/tools/linker/Tests/Mono.Linker.Tests/AssemblyLinkingTestFixture.cs
deleted file mode 100644 (file)
index 4810cd1..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// AssemblyLinkingTestFixture.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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 Mono.Linker.Steps;
-using NUnit.Framework;
-
-namespace Mono.Linker.Tests {
-
-       [TestFixture]
-       public class AssemblyLinkingTestFixture : AbstractLinkingTestFixture {
-
-               [Test]
-               public void TestSimple ()
-               {
-                       RunTest ("Simple");
-               }
-
-               [Test]
-               public void TestVirtualCall ()
-               {
-                       RunTest ("VirtualCall");
-               }
-
-               [Test]
-               public void TestMultipleReferences ()
-               {
-                       RunTest ("MultipleReferences");
-               }
-
-               protected override void RunTest (string testCase)
-               {
-                       base.RunTest (testCase);
-                       Pipeline.PrependStep (
-                               new ResolveFromAssemblyStep (
-                                       Path.Combine (GetTestCasePath (), "Program.exe")));
-
-                       Run ();
-               }
-       }
-}
diff --git a/mcs/tools/linker/Tests/Mono.Linker.Tests/IntegrationTestFixture.cs b/mcs/tools/linker/Tests/Mono.Linker.Tests/IntegrationTestFixture.cs
deleted file mode 100644 (file)
index f455f65..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// IntegrationTestFixture.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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.Diagnostics;
-using System.IO;
-using Mono.Linker.Steps;
-using NUnit.Framework;
-
-namespace Mono.Linker.Tests {
-
-       [TestFixture]
-       public class IntegrationTestFixture : AbstractTestFixture {
-
-               [SetUp]
-               public override void SetUp ()
-               {
-                       base.SetUp ();
-
-                       TestCasesRoot = "Integration";
-               }
-
-               [Test]
-               public void TestHelloWorld ()
-               {
-                       RunTest ("HelloWorld");
-               }
-
-               [Test]
-               public void TestCrypto ()
-               {
-                       RunTest ("Crypto");
-               }
-
-               protected override LinkContext GetContext()
-               {
-                       LinkContext context = base.GetContext ();
-                       context.CoreAction = AssemblyAction.Link;
-                       return context;
-               }
-
-               protected override Pipeline GetPipeline ()
-               {
-                       Pipeline p = new Pipeline ();
-                       p.AppendStep (new LoadReferencesStep ());
-                       p.AppendStep (new BlacklistStep ());
-                       p.AppendStep (new TypeMapStep ());
-                       p.AppendStep (new MarkStep ());
-                       p.AppendStep (new SweepStep ());
-                       p.AppendStep (new CleanStep ());
-                       p.AppendStep (new OutputStep ());
-                       return p;
-               }
-
-               protected override void RunTest (string testCase)
-               {
-                       if (!OnMono ())
-                               Assert.Ignore ("Integration tests are only runnable on Mono");
-
-                       base.RunTest (testCase);
-                       string test = Path.Combine (GetTestCasePath (), "Test.exe");
-
-                       string original = Execute (GetTestCasePath (), "Test.exe");
-
-                       Pipeline.PrependStep (
-                               new ResolveFromAssemblyStep (
-                                       test));
-
-                       Run ();
-
-                       string linked = Execute (Context.OutputDirectory, "Test.exe");
-
-                       Assert.AreEqual (original, linked);
-               }
-
-               static bool OnMono ()
-               {
-                       return Type.GetType ("System.MonoType") != null;
-               }
-
-               static string Execute (string directory, string file)
-               {
-                       Process p = new Process ();
-                       p.StartInfo.EnvironmentVariables ["MONO_PATH"] = directory;
-                       p.StartInfo.CreateNoWindow = true;
-                       p.StartInfo.WorkingDirectory = directory;
-                       p.StartInfo.FileName = "mono";
-                       p.StartInfo.Arguments = file;
-                       p.StartInfo.RedirectStandardOutput = true;
-                       p.StartInfo.UseShellExecute = false;
-
-                       p.Start ();
-                       p.WaitForExit ();
-
-                       return p.StandardOutput.ReadToEnd ();
-               }
-       }
-}
diff --git a/mcs/tools/linker/Tests/Mono.Linker.Tests/XmlLinkingTestFixture.cs b/mcs/tools/linker/Tests/Mono.Linker.Tests/XmlLinkingTestFixture.cs
deleted file mode 100644 (file)
index 1e89290..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// XmlLinkingTestFixture.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-//
-// 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.Xml.XPath;
-
-using Mono.Linker.Steps;
-using NUnit.Framework;
-
-
-namespace Mono.Linker.Tests {
-
-       [TestFixture]
-       public class XmlLinkingTestFixture : AbstractLinkingTestFixture {
-
-               [Test]
-               public void TestSimpleXml ()
-               {
-                       RunTest ("SimpleXml");
-               }
-
-               [Test]
-               public void TestInterface ()
-               {
-                       RunTest ("Interface");
-               }
-
-               [Test]
-               public void TestReferenceInVirtualMethod ()
-               {
-                       RunTest ("ReferenceInVirtualMethod");
-               }
-
-               [Test]
-               public void TestGenerics ()
-               {
-                       RunTest ("Generics");
-               }
-
-               [Test]
-               public void TestNestedNested ()
-               {
-                       RunTest ("NestedNested");
-               }
-
-               [Test]
-               public void TestPreserveFieldsRequired ()
-               {
-                       RunTest ("PreserveFieldsRequired");
-               }
-
-               [Test]
-               public void TestReferenceInAttributes ()
-               {
-                       RunTest ("ReferenceInAttributes");
-               }
-
-               [Test]
-               public void TestXmlPattern ()
-               {
-                       RunTest ("XmlPattern");
-               }
-
-               protected override void RunTest (string testCase)
-               {
-                       base.RunTest (testCase);
-                       Pipeline.PrependStep (
-                               new ResolveFromXmlStep (
-                                       new XPathDocument (Path.Combine (GetTestCasePath (), "desc.xml"))));
-
-                       Run ();
-               }
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Integration/Crypto/Test.cs b/mcs/tools/linker/Tests/TestCases/Integration/Crypto/Test.cs
deleted file mode 100644 (file)
index 8c38f92..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Security.Cryptography;
-using System.Text;
-
-class Test {
-
-       static void Main ()
-       {
-               byte [] foo = Encoding.UTF8.GetBytes ("foobared");
-
-               HashAlgorithm ha = MD5.Create ();
-               byte [] hash = ha.ComputeHash (foo);
-
-               Console.WriteLine (Encoding.UTF8.GetString (hash));
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Integration/Crypto/Test.exe b/mcs/tools/linker/Tests/TestCases/Integration/Crypto/Test.exe
deleted file mode 100755 (executable)
index 2decc49..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Integration/Crypto/Test.exe and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Integration/HelloWorld/Test.cs b/mcs/tools/linker/Tests/TestCases/Integration/HelloWorld/Test.cs
deleted file mode 100644 (file)
index 4a65b44..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-class Test {
-
-       static void Main ()
-       {
-               Console.WriteLine ("Hello world!");
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Integration/HelloWorld/Test.exe b/mcs/tools/linker/Tests/TestCases/Integration/HelloWorld/Test.exe
deleted file mode 100755 (executable)
index 2f4f4c9..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Integration/HelloWorld/Test.exe and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Generics/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/Generics/Library.cs
deleted file mode 100644 (file)
index 75fe1ed..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-using System;
-
-public class Foo {
-
-       void Bar ()
-       {
-               int i = 42;
-               string s = "hey";
-
-               Baz<int> bi = new Baz<int> (i);
-               bi.Gazonk ();
-               bi.Bat<string>(i, s);
-
-               Baz<string> bs = new Baz<string> (s);
-               bs.Gazonk ();
-               bs.Bat<int>(s, i);
-               bs.BiroBiro ();
-
-               bs.Blam<Bang> ();
-       }
-}
-
-public class Baz<T> {
-
-       T _t;
-
-       public Baz (T t)
-       {
-               _t = t;
-       }
-
-       public void Gazonk ()
-       {
-               Console.WriteLine (_t);
-       }
-
-       public void Bat<M> (T t, M m)
-       {
-               Console.WriteLine ("{0}{1}", t, m);
-       }
-
-       public void Blam<M> ()
-       {
-       }
-
-       public T [] BiroBiro ()
-       {
-               return new T [0];
-       }
-}
-
-class Bang {
-
-       [NotLinked] public Bang ()
-       {
-       }
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Generics/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/Generics/Library.dll
deleted file mode 100644 (file)
index fe5cab1..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/Generics/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Generics/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/Generics/Makefile
deleted file mode 100644 (file)
index 2e5bf5b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Generics/desc.xml b/mcs/tools/linker/Tests/TestCases/Linker/Generics/desc.xml
deleted file mode 100644 (file)
index 0dd61b9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo" />
-       </assembly>
-</linker>
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Interface/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/Interface/Library.cs
deleted file mode 100644 (file)
index 7aa9394..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-
-public class Foo : IFoo {
-
-       public void Gazonk ()
-       {
-       }
-}
-
-public interface IFoo : IBar {
-}
-
-public interface IBar {
-
-       void Gazonk ();
-}
-
-[NotLinked] public class Baz : IBaz {
-}
-
-[NotLinked] public interface IBaz {
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Interface/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/Interface/Library.dll
deleted file mode 100644 (file)
index 2ae8b92..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/Interface/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Interface/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/Interface/Makefile
deleted file mode 100644 (file)
index 2e5bf5b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Interface/desc.xml b/mcs/tools/linker/Tests/TestCases/Linker/Interface/desc.xml
deleted file mode 100644 (file)
index 0dd61b9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo" />
-       </assembly>
-</linker>
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Bar.cs b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Bar.cs
deleted file mode 100644 (file)
index c2f0df4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-public class Bar {
-
-       string bang = "bang !";
-
-       public Bar ()
-       {
-       }
-
-       public void Bang ()
-       {
-               Console.WriteLine (bang);
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Bar.dll b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Bar.dll
deleted file mode 100644 (file)
index 159106d..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Bar.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Baz.cs b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Baz.cs
deleted file mode 100644 (file)
index ab5241c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-
-public class Baz {
-
-       public void Chain (Foo f)
-       {
-               f.b.Bang ();
-       }
-
-       [NotLinked] public void Lurman ()
-       {
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Baz.dll b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Baz.dll
deleted file mode 100644 (file)
index 977b20f..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Baz.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Foo.cs b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Foo.cs
deleted file mode 100644 (file)
index 746a2b2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-
-public class Foo {
-
-       public Bar b;
-
-       public Foo (Bar b)
-       {
-               this.b = b;
-       }
-
-       public void UseBar ()
-       {
-               b.Bang ();
-       }
-
-       [NotLinked] public void Blam ()
-       {
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Foo.dll b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Foo.dll
deleted file mode 100644 (file)
index 54e10fe..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Foo.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Makefile
deleted file mode 100644 (file)
index 9f56e6e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library NotLinkedAttribute.cs
-       MCS /t:library Bar.cs
-       MCS /t:library /r:Bar.dll /r:NotLinkedAttribute.dll Foo.cs
-       MCS /t:library /r:Foo.dll /r:Bar.dll /r:NotLinkedAttribute.dll Baz.cs
-       MCS /t:library /r:Foo.dll /r:Bar.dll /r:NotLinkedAttribute.dll Baz.cs
-       MCS /r:Foo.dll /r:Bar.dll /r:Baz.dll /r:NotLinkedAttribute Program.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/NotLinkedAttribute.cs b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/NotLinkedAttribute.cs
deleted file mode 100644 (file)
index 5290344..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-using System;
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/NotLinkedAttribute.dll b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/NotLinkedAttribute.dll
deleted file mode 100644 (file)
index 06929d0..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/NotLinkedAttribute.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Program.cs b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Program.cs
deleted file mode 100644 (file)
index 4e1debd..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-
-public class Program {
-
-       public static int Main ()
-       {
-               Program p = new Program ();
-               p.Run ();
-
-               return 0;
-       }
-
-       void Run ()
-       {
-               Foo f = new Foo (new Bar ());
-               f.UseBar ();
-
-               Baz b = new Baz ();
-               b.Chain (f);
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Program.exe b/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Program.exe
deleted file mode 100644 (file)
index c8e7597..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/MultipleReferences/Program.exe and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Library.cs
deleted file mode 100644 (file)
index 1391162..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-
-public class Foo {
-}
-
-[NotLinked] public class Bar {
-
-       [NotLinked] public class Baz {
-
-               [NotLinked] public class Gazonk {
-               }
-       }
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Library.dll
deleted file mode 100644 (file)
index 49151f1..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/Makefile
deleted file mode 100644 (file)
index 2e5bf5b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/desc.xml b/mcs/tools/linker/Tests/TestCases/Linker/NestedNested/desc.xml
deleted file mode 100644 (file)
index 0dd61b9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo" />
-       </assembly>
-</linker>
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Library.cs
deleted file mode 100644 (file)
index 63a5ee7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-
-public class Foo {
-
-       public Foo ()
-       {
-               new NotRequiredButUsedNotPreserved ();
-               new NotRequiredButUsedAndFieldsPreserved ();
-       }
-}
-
-public class NotRequiredButUsedNotPreserved {
-
-       [NotLinked] public int foo;
-       [NotLinked] public int bar;
-}
-
-public class NotRequiredButUsedAndFieldsPreserved {
-
-       public int foo;
-       public int bar;
-
-       [NotLinked] public int FooBar ()
-       {
-               return foo + bar;
-       }
-}
-
-[NotLinked] public class NotRequiredAndNotUsed {
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Library.dll
deleted file mode 100755 (executable)
index 941d6c3..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/Makefile
deleted file mode 100644 (file)
index 2e5bf5b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/desc.xml b/mcs/tools/linker/Tests/TestCases/Linker/PreserveFieldsRequired/desc.xml
deleted file mode 100644 (file)
index 979d4e0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo" />
-               <type fullname="NotRequiredButUsedNotPreserved" preserve="nothing" required="false" />
-               <type fullname="NotRequiredButUsedAndFieldsPreserved" preserve="fields" required="false" />
-       </assembly>
-</linker>
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/LibLib.cs b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/LibLib.cs
deleted file mode 100644 (file)
index 6ca5a7f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-
-namespace LibLib {
-
-       public class LibLibAttribute : Attribute {
-
-               public Type LibLibType {
-                       [NotLinked] get { return null; }
-                       set {}
-               }
-       }
-
-       public class BilBil {
-
-               [NotLinked] public BilBil ()
-               {
-               }
-       }
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/LibLib.dll b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/LibLib.dll
deleted file mode 100755 (executable)
index 2f1e457..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/LibLib.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/Library.cs
deleted file mode 100644 (file)
index cb3903f..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-using System;
-using LibLib;
-
-public class BarAttribute : Attribute {
-
-       public BarAttribute ()
-       {
-       }
-
-       public BarAttribute (Type type)
-       {
-       }
-
-       public Type FieldType;
-
-       public Type PropertyType {
-               [NotLinked] get { return null; }
-               set {}
-       }
-}
-
-[Bar (typeof (Guy_A))]
-public class Foo {
-
-       [Bar (FieldType = typeof (Guy_B))]
-       public Foo a;
-
-       [Bar (PropertyType = typeof (Guy_C))]
-       public Foo b;
-
-       [LibLib (LibLibType = typeof (BilBil))]
-       public Foo c;
-
-       [LibLib (LibLibType = typeof (Guy_D))]
-       public Foo d;
-}
-
-public class Guy_A {
-
-       [NotLinked] public Guy_A ()
-       {
-       }
-}
-
-public class Guy_B {
-
-       [NotLinked] public Guy_B ()
-       {
-       }
-}
-
-public class Guy_C {
-
-       [NotLinked] public Guy_C ()
-       {
-       }
-}
-
-public class Guy_D {
-
-       [NotLinked] public Guy_D ()
-       {
-       }
-}
-
-[NotLinked] public class Baz {
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/Library.dll
deleted file mode 100755 (executable)
index 7c5b997..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/desc.xml b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInAttributes/desc.xml
deleted file mode 100644 (file)
index 0dd61b9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo" />
-       </assembly>
-</linker>
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Library.cs
deleted file mode 100644 (file)
index 8b840b4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-
-using System;
-
-public class Foo {
-
-       public void Do ()
-       {
-               Bar b = new Baz ();
-               b.Bang ();
-       }
-}
-
-public class Bar {
-
-       public virtual void Bang ()
-       {
-       }
-}
-
-public class Baz : Bar {
-
-       private string _hey;
-
-       public string Hey {
-               [NotLinked] get { return _hey; }
-               [NotLinked] set { _hey = value; }
-       }
-
-       public override void Bang ()
-       {
-               Console.WriteLine (_hey);
-       }
-}
-
-[NotLinked] public class NotLinkedAttribute : Attribute {}
\ No newline at end of file
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Library.dll
deleted file mode 100644 (file)
index b56fa60..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/Makefile
deleted file mode 100644 (file)
index 2e5bf5b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/desc.xml b/mcs/tools/linker/Tests/TestCases/Linker/ReferenceInVirtualMethod/desc.xml
deleted file mode 100644 (file)
index 0dd61b9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo" />
-       </assembly>
-</linker>
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Simple/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/Simple/Library.cs
deleted file mode 100644 (file)
index 538205a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-
-public class Library {
-
-       private int _pouet;
-       [NotLinked] private int _hey;
-
-       public Library ()
-       {
-               _pouet = 1;
-       }
-
-       [NotLinked] public Library (int pouet)
-       {
-               _pouet = pouet;
-       }
-
-       public int Hello ()
-       {
-               Console.WriteLine ("Hello");
-               return _pouet;
-       }
-
-       [NotLinked] public void Hey (int hey)
-       {
-               _hey = hey;
-               Console.WriteLine (_hey);
-       }
-}
-
-
-[NotLinked] public class Toy {
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Simple/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/Simple/Library.dll
deleted file mode 100644 (file)
index 5225e88..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/Simple/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Simple/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/Simple/Makefile
deleted file mode 100644 (file)
index 356b529..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
-       MCS /r:Library.dll Program.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Simple/Program.cs b/mcs/tools/linker/Tests/TestCases/Linker/Simple/Program.cs
deleted file mode 100644 (file)
index 6d3adb7..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-
-public class Program {
-
-       public static int Main ()
-       {
-               Program p = new Program ();
-               return p.Run ();
-       }
-
-       int Run ()
-       {
-               Library lib = new Library ();
-               return lib.Hello ();
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/Simple/Program.exe b/mcs/tools/linker/Tests/TestCases/Linker/Simple/Program.exe
deleted file mode 100644 (file)
index 1605ce0..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/Simple/Program.exe and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Library.cs
deleted file mode 100644 (file)
index 4e81b42..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-using System;
-
-public class Foo {
-
-       int _baz;
-       [NotLinked] int _shebang;
-
-       public Foo ()
-       {
-               _baz = 42;
-       }
-
-       public int Baz ()
-       {
-               return _baz;
-       }
-
-       [NotLinked] public int Shebang (int bang)
-       {
-               return _shebang = bang * 2;
-       }
-}
-
-public class Bar {
-
-       int _truc;
-
-       public Bar ()
-       {
-               _truc = 12;
-       }
-
-       public int Truc ()
-       {
-               return _truc;
-       }
-}
-
-[NotLinked] public class Gazonk {
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Library.dll
deleted file mode 100644 (file)
index c37c059..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/Makefile
deleted file mode 100644 (file)
index 2e5bf5b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/desc.xml b/mcs/tools/linker/Tests/TestCases/Linker/SimpleXml/desc.xml
deleted file mode 100644 (file)
index 2a20ed3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo">
-                       <field signature="System.Int32 _baz" />
-                       <method signature="System.Void .ctor()" />
-                       <method signature="System.Int32 Baz()" />
-               </type>
-               <type fullname="Bar" />
-       </assembly>
-</linker>
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Library.cs
deleted file mode 100644 (file)
index b9c3f02..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-
-public class Library {
-
-       public Library ()
-       {
-       }
-
-       public int Shebang ()
-       {
-               return Bang ();
-       }
-
-       protected virtual int Bang ()
-       {
-               return 1;
-       }
-}
-
-
-public class PowerFulLibrary : Library {
-
-       protected override int Bang ()
-       {
-               return 0;
-       }
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Library.dll
deleted file mode 100644 (file)
index 0f2ff3f..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Makefile
deleted file mode 100644 (file)
index 356b529..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
-       MCS /r:Library.dll Program.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Program.cs b/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Program.cs
deleted file mode 100644 (file)
index 1d4a64d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-
-public class Program {
-
-       public static int Main ()
-       {
-               Program p = new Program ();
-               return p.Run ();
-       }
-
-       int Run ()
-       {
-               Library lib = new PowerFulLibrary ();
-               return lib.Shebang ();
-       }
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Program.exe b/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Program.exe
deleted file mode 100644 (file)
index f5a9bec..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/VirtualCall/Program.exe and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Library.cs b/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Library.cs
deleted file mode 100755 (executable)
index 7f14865..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-
-namespace Foo {
-
-       [NotLinked] public class BarBar {
-       }
-
-       public class FooBaz {
-
-               public FooBaz ()
-               {
-               }
-
-               [NotLinked] public void BarBaz ()
-               {
-               }
-       }
-
-       public class TrucBaz {
-
-               public TrucBaz ()
-               {
-               }
-       }
-
-       public class BazBaz {
-
-               public BazBaz ()
-               {
-               }
-       }
-}
-
-[NotLinked, AttributeUsage (AttributeTargets.All)]
-public class NotLinkedAttribute : Attribute {
-}
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Library.dll b/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Library.dll
deleted file mode 100755 (executable)
index 80e7ef3..0000000
Binary files a/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Library.dll and /dev/null differ
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Makefile b/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/Makefile
deleted file mode 100755 (executable)
index 2e5bf5b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-include ../../config.make
-
-all:
-       MCS /t:library Library.cs
diff --git a/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/desc.xml b/mcs/tools/linker/Tests/TestCases/Linker/XmlPattern/desc.xml
deleted file mode 100755 (executable)
index c8e1e23..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<linker>
-       <assembly fullname="Library">
-               <type fullname="Foo.*Baz">
-                       <method signature="System.Void .ctor()" />
-               </type>
-       </assembly>
-</linker>
diff --git a/mcs/tools/linker/Tests/TestCases/config.make b/mcs/tools/linker/Tests/TestCases/config.make
deleted file mode 100644 (file)
index 8323eb2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-MCS = mcs
-
diff --git a/mcs/tools/linker/configure b/mcs/tools/linker/configure
deleted file mode 100755 (executable)
index 2598cb6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-VERSION=0.1
-prefix=/usr/local
-while test x$1 != x; do
-        case $1 in
-                --prefix=*)
-                        prefix=`echo $1 | sed 's/--prefix=//'`
-                        ;;
-                --prefix)
-                        echo --prefix needs an argument: --prefix=directory >&2
-                        ;;
-                *)
-                        echo Unknown argument $1 >&2
-        esac
-        shift
-done
-
-echo "prefix=$prefix" > config.make
-echo "RUNTIME=mono" >> config.make
-echo "ASSEMBLY_VERSION=$VERSION.0.0" >> config.make
-echo "VERSION=$VERSION" >> config.make
-
-echo "monolinker has been configure to be installed in $prefix"
index f6ccd23a3c7de48cbecab02df46930f31c0f9079..fa7f88b573b1afcc9abc69d5a1a7b54e081999db 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
   </PropertyGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <ItemGroup>\r
-    <Compile Include=".\Mono.Linker.Steps\BaseStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\BlacklistStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\CleanStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\IStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\LoadI18nAssemblies.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\LoadReferencesStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\MarkStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\OutputStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\RegenerateGuidStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\ResolveFromAssemblyStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\ResolveFromXApiStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\ResolveFromXmlStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\ResolveStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\SweepStep.cs" />\r
-    <Compile Include=".\Mono.Linker.Steps\TypeMapStep.cs" />\r
-    <Compile Include=".\Mono.Linker\Annotations.cs" />\r
-    <Compile Include=".\Mono.Linker\AssemblyAction.cs" />\r
-    <Compile Include=".\Mono.Linker\AssemblyInfo.cs" />\r
-    <Compile Include=".\Mono.Linker\AssemblyResolver.cs" />\r
-    <Compile Include=".\Mono.Linker\Driver.cs" />\r
-    <Compile Include=".\Mono.Linker\I18nAssemblies.cs" />\r
-    <Compile Include=".\Mono.Linker\IXApiVisitor.cs" />\r
-    <Compile Include=".\Mono.Linker\LinkContext.cs" />\r
-    <Compile Include=".\Mono.Linker\MethodAction.cs" />\r
-    <Compile Include=".\Mono.Linker\Pipeline.cs" />\r
-    <Compile Include=".\Mono.Linker\TypePreserve.cs" />\r
-    <Compile Include=".\Mono.Linker\XApiReader.cs" />\r  </ItemGroup>\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\BaseStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\BlacklistStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\CleanStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\IStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\LoadI18nAssemblies.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\LoadReferencesStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\MarkStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\OutputStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\RegenerateGuidStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\ResolveFromAssemblyStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\ResolveFromXApiStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\ResolveFromXmlStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\ResolveStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\SweepStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker.Steps\TypeMapStep.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\Annotations.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\AssemblyAction.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\AssemblyInfo.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\AssemblyResolver.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\Driver.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\I18nAssemblies.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\IXApiVisitor.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\LinkContext.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\MethodAction.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\Pipeline.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\TypePreserve.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\XApiReader.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
index 90b8ae0f7de28eb9055f40cbc8ac28d12ca99567..66410e5fe69bddfb2af8f759616b3291a8797308 100644 (file)
@@ -1,27 +1,27 @@
-./Mono.Linker/Pipeline.cs
-./Mono.Linker/AssemblyInfo.cs
-./Mono.Linker/AssemblyResolver.cs
-./Mono.Linker/TypePreserve.cs
-./Mono.Linker/Annotations.cs
-./Mono.Linker/LinkContext.cs
-./Mono.Linker/AssemblyAction.cs
-./Mono.Linker/Driver.cs
-./Mono.Linker/I18nAssemblies.cs
-./Mono.Linker/MethodAction.cs
-./Mono.Linker/XApiReader.cs
-./Mono.Linker/IXApiVisitor.cs
-./Mono.Linker.Steps/BaseStep.cs
-./Mono.Linker.Steps/LoadReferencesStep.cs
-./Mono.Linker.Steps/LoadI18nAssemblies.cs
-./Mono.Linker.Steps/ResolveFromXmlStep.cs
-./Mono.Linker.Steps/SweepStep.cs
-./Mono.Linker.Steps/RegenerateGuidStep.cs
-./Mono.Linker.Steps/ResolveFromXApiStep.cs
-./Mono.Linker.Steps/ResolveFromAssemblyStep.cs
-./Mono.Linker.Steps/ResolveStep.cs
-./Mono.Linker.Steps/CleanStep.cs
-./Mono.Linker.Steps/MarkStep.cs
-./Mono.Linker.Steps/BlacklistStep.cs
-./Mono.Linker.Steps/OutputStep.cs
-./Mono.Linker.Steps/TypeMapStep.cs
-./Mono.Linker.Steps/IStep.cs
+../../../external/linker/linker/Mono.Linker/Pipeline.cs
+../../../external/linker/linker/Mono.Linker/AssemblyInfo.cs
+../../../external/linker/linker/Mono.Linker/AssemblyResolver.cs
+../../../external/linker/linker/Mono.Linker/TypePreserve.cs
+../../../external/linker/linker/Mono.Linker/Annotations.cs
+../../../external/linker/linker/Mono.Linker/LinkContext.cs
+../../../external/linker/linker/Mono.Linker/AssemblyAction.cs
+../../../external/linker/linker/Mono.Linker/Driver.cs
+../../../external/linker/linker/Mono.Linker/I18nAssemblies.cs
+../../../external/linker/linker/Mono.Linker/MethodAction.cs
+../../../external/linker/linker/Mono.Linker/XApiReader.cs
+../../../external/linker/linker/Mono.Linker/IXApiVisitor.cs
+../../../external/linker/linker/Mono.Linker.Steps/BaseStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/LoadReferencesStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/LoadI18nAssemblies.cs
+../../../external/linker/linker/Mono.Linker.Steps/ResolveFromXmlStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/SweepStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/RegenerateGuidStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/ResolveFromXApiStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/ResolveFromAssemblyStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/ResolveStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/CleanStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/MarkStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/BlacklistStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/OutputStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/TypeMapStep.cs
+../../../external/linker/linker/Mono.Linker.Steps/IStep.cs
diff --git a/mcs/tools/linker/monolinker.in b/mcs/tools/linker/monolinker.in
deleted file mode 100644 (file)
index 55e24cb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-mono $MONO_EXTRA_ARGS @prefix@/lib/mink/mink.exe "$@"
diff --git a/mcs/tools/linker/profiler/Makefile b/mcs/tools/linker/profiler/Makefile
deleted file mode 100644 (file)
index 6a9702b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-SRC = link.c
-OBJ = libmono-profiler-link.so
-
-all:
-       gcc -g -Wall -shared -o $(OBJ) $(SRC) `pkg-config --cflags --libs mono`
-
-clean:
-       rm -f $(OBJ)
diff --git a/mcs/tools/linker/profiler/link.c b/mcs/tools/linker/profiler/link.c
deleted file mode 100644 (file)
index f81e251..0000000
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * link.c: a profiler to help the static linker
- *
- * Authors:
- *   Jb Evain (jbevain@novell.com)
- *
- * (C) 2007 Novell, Inc. http://www.novell.com
- *
- */
-#include <glib.h>
-#include <string.h>
-#include <mono/metadata/assembly.h>
-#include <mono/metadata/class.h>
-#include <mono/metadata/image.h>
-#include <mono/metadata/metadata.h>
-#include <mono/metadata/profiler.h>
-
-struct _MonoProfiler {
-       const char *output_file;
-       GHashTable *images;
-};
-
-typedef struct _LinkedImage {
-       MonoImage *image;
-       GHashTable *types;
-} LinkedImage;
-
-typedef struct _LinkedType {
-       MonoClass *klass;
-       GHashTable *methods;
-} LinkedType;
-
-typedef struct _LinkedMethod {
-       MonoMethod *method;
-} LinkedMethod;
-
-static void
-link_append_class_name (GString *res, MonoClass *klass, gboolean include_namespace)
-{
-       if (!klass) {
-               g_string_append (res, "**unknown**");
-               return;
-       }
-
-       if (mono_class_get_nesting_type (klass)) {
-               link_append_class_name (res, mono_class_get_nesting_type (klass), include_namespace);
-               g_string_append_c (res, '/');
-       }
-
-       if (include_namespace && *(mono_class_get_namespace (klass)))
-               g_string_sprintfa (res, "%s.", mono_class_get_namespace (klass));
-
-       g_string_sprintfa (res, "%s", mono_class_get_name (klass));
-}
-
-static MonoType *
-link_get_element_type (MonoType *type)
-{
-       return mono_class_get_type (mono_class_get_element_class (mono_class_from_mono_type (type)));
-}
-
-static void
-link_type_get_desc (GString *res, MonoType *type, gboolean include_namespace) {
-       switch (mono_type_get_type (type)) {
-       case MONO_TYPE_VOID:
-               g_string_append (res, "System.Void"); break;
-       case MONO_TYPE_CHAR:
-               g_string_append (res, "System.Char"); break;
-       case MONO_TYPE_BOOLEAN:
-               g_string_append (res, "System.Boolean"); break;
-       case MONO_TYPE_U1:
-               g_string_append (res, "System.Byte"); break;
-       case MONO_TYPE_I1:
-               g_string_append (res, "System.SByte"); break;
-       case MONO_TYPE_U2:
-               g_string_append (res, "System.UInt16"); break;
-       case MONO_TYPE_I2:
-               g_string_append (res, "System.Int16"); break;
-       case MONO_TYPE_U4:
-               g_string_append (res, "System.UInt32"); break;
-       case MONO_TYPE_I4:
-               g_string_append (res, "System.Int32"); break;
-       case MONO_TYPE_U8:
-               g_string_append (res, "System.UInt64"); break;
-       case MONO_TYPE_I8:
-               g_string_append (res, "System.Int64"); break;
-       case MONO_TYPE_FNPTR:
-               g_string_append (res, "*()"); break;
-       case MONO_TYPE_U:
-               g_string_append (res, "System.UIntPtr"); break;
-       case MONO_TYPE_I:
-               g_string_append (res, "System.IntPtr"); break;
-       case MONO_TYPE_R4:
-               g_string_append (res, "System.Single"); break;
-       case MONO_TYPE_R8:
-               g_string_append (res, "System.Double"); break;
-       case MONO_TYPE_STRING:
-               g_string_append (res, "System.String"); break;
-       case MONO_TYPE_OBJECT:
-               g_string_append (res, "System.Object"); break;
-       case MONO_TYPE_PTR:
-               link_type_get_desc (res, mono_type_get_ptr_type (type), include_namespace);
-               g_string_append_c (res, '*');
-               break;
-       case MONO_TYPE_ARRAY: {
-               MonoClass *eklass = mono_class_get_element_class (mono_class_from_mono_type (type));
-               link_type_get_desc (res, mono_class_get_type (eklass), include_namespace);
-               g_string_sprintfa (res, "[%d]", mono_class_get_rank (eklass));
-               break;
-       }
-       case MONO_TYPE_SZARRAY:
-               link_type_get_desc (res, link_get_element_type (type), include_namespace);
-               g_string_append (res, "[]");
-               break;
-       case MONO_TYPE_CLASS:
-       case MONO_TYPE_VALUETYPE:
-               link_append_class_name (res, mono_type_get_class (type), include_namespace);
-               break;
-       case MONO_TYPE_GENERICINST:
-               //link_type_get_desc (res, &type->data.generic_class->container_class->byval_arg, include_namespace);  /* ? */
-               break;
-       case MONO_TYPE_VAR:
-       case MONO_TYPE_MVAR:
-               //g_string_append (res, type->data.generic_param->name);  /* ? */
-               break;
-       default:
-               break;
-       }
-       if (mono_type_is_byref (type))
-               g_string_append (res, "&amp;");
-}
-
-static char *
-link_type_full_name (MonoType *type)
-{
-       GString *str;
-       char *res;
-
-       str = g_string_new ("");
-       link_type_get_desc (str, type, TRUE);
-
-       res = g_strdup (str->str);
-       g_string_free (str, TRUE);
-       return res;
-}
-
-static char *
-link_class_full_name (MonoClass *klass)
-{
-       return link_type_full_name (mono_class_get_type (klass));
-}
-
-static char *
-link_signature_get_desc (MonoMethodSignature *sig, gboolean include_namespace)
-{
-       int i;
-       char *result;
-       GString *res = g_string_new ("");
-
-       for (i = 0; i < sig->param_count; ++i) {
-               if (i > 0)
-                       g_string_append_c (res, ',');
-               link_type_get_desc (res, sig->params [i], include_namespace);
-       }
-       result = res->str;
-       g_string_free (res, FALSE);
-       return result;
-}
-
-static char *
-link_method_signature (MonoMethod *method)
-{
-       MonoMethodSignature *sig;
-       char *res;
-
-       sig = mono_method_signature (method);
-       char *tmpsig = link_signature_get_desc (sig, TRUE);
-       res = g_strdup_printf ("%s %s(%s)",
-               link_type_full_name (mono_signature_get_return_type (sig)),
-               mono_method_get_name (method), tmpsig);
-       g_free (tmpsig);
-
-       return res;
-}
-
-static char *
-link_image_fullname (MonoImage *image)
-{
-       MonoAssemblyName *name;
-       char *res;
-
-       name = g_new0 (MonoAssemblyName, 1);
-       mono_assembly_fill_assembly_name (image, name);
-       res = mono_stringify_assembly_name (name);
-       g_free (name);
-       return res;
-}
-
-static LinkedType *
-link_get_linked_type (LinkedImage *limage, MonoClass *klass)
-{
-       LinkedType *ltype;
-
-       ltype = (LinkedType *) g_hash_table_lookup (limage->types, klass);
-
-       if (ltype)
-               return ltype;
-
-       ltype = g_new0 (LinkedType, 1);
-       ltype->klass = klass;
-       ltype->methods = g_hash_table_new (NULL, NULL);
-       g_hash_table_insert (limage->types, klass, ltype);
-       return ltype;
-}
-
-static LinkedImage *
-link_get_linked_image (MonoProfiler *prof, MonoImage *image)
-{
-       LinkedImage *limage;
-
-       limage = (LinkedImage *) g_hash_table_lookup (prof->images, image);
-
-       if (limage)
-               return limage;
-
-       limage = g_new0 (LinkedImage, 1);
-       limage->image = image;
-       limage->types = g_hash_table_new (NULL, NULL);
-       g_hash_table_insert (prof->images, image, limage);
-       return limage;
-}
-
-static void
-link_method_leave (MonoProfiler *prof, MonoMethod *method)
-{
-       MonoClass *klass;
-       MonoImage *image;
-
-       LinkedType *ltype;
-       LinkedImage *limage;
-       LinkedMethod *lmethod;
-
-       klass = mono_method_get_class (method);
-       image = mono_class_get_image (klass);
-
-       limage = link_get_linked_image (prof, image);
-       ltype = link_get_linked_type (limage, klass);
-
-       lmethod = (LinkedMethod *) g_hash_table_lookup (ltype->methods, method);
-       if (lmethod)
-               return;
-
-       lmethod = g_new0 (LinkedMethod, 1);
-       lmethod->method = method;
-       g_hash_table_insert (ltype->methods, method, lmethod);
-}
-
-static void
-link_free_member (gpointer key, gpointer value, gpointer data)
-{
-       g_free (value);
-}
-
-static void
-link_free_type (gpointer key, gpointer value, gpointer data)
-{
-       LinkedType *type = (LinkedType *) value;
-
-       g_hash_table_foreach (type->methods, link_free_member, NULL);
-       g_free (type);
-}
-
-static void
-link_free_image (gpointer key, gpointer value, gpointer data)
-{
-       LinkedImage *image = (LinkedImage *) value;
-
-       g_hash_table_foreach (image->types, link_free_type, NULL);
-       g_free (image);
-}
-
-static void
-link_print_method (gpointer key, gpointer value, gpointer data)
-{
-       LinkedMethod *lmethod = (LinkedMethod *) value;
-       FILE *output = (FILE *) data;
-       char *signature;
-
-       signature = link_method_signature (lmethod->method);
-       fprintf (output, "\t\t\t<method signature=\"%s\" />\n", signature);
-       g_free (signature);
-}
-
-static void
-link_print_type (gpointer key, gpointer value, gpointer data)
-{
-       LinkedType *ltype = (LinkedType *) value;
-       FILE *output = (FILE *) data;
-       char *fullname;
-
-       fullname = link_class_full_name (ltype->klass);
-       fprintf (output, "\t\t<type fullname=\"%s\">\n", fullname);
-       g_free (fullname);
-
-       g_hash_table_foreach (ltype->methods, link_print_method, output);
-       fprintf (output, "\t\t</type>\n");
-}
-
-static void
-link_print_image (gpointer key, gpointer value, gpointer data)
-{
-       LinkedImage *limage = (LinkedImage *) value;
-       FILE *output = (FILE *) data;
-       char *fullname;
-
-       fullname = link_image_fullname (limage->image);
-       fprintf (output, "\t<assembly fullname=\"%s\">\n", fullname);
-       g_free (fullname);
-       g_hash_table_foreach (limage->types, link_print_type, output);
-       fprintf (output, "\t</assembly>\n");
-}
-
-static void
-link_print_tree (MonoProfiler *prof)
-{
-       FILE *output;
-
-       output = fopen (prof->output_file, "w");
-       fprintf (output, "<linker>\n");
-       g_hash_table_foreach (prof->images, link_print_image, output);
-       fprintf (output, "</linker>\n");
-       fclose (output);
-}
-
-static void
-link_shutdown (MonoProfiler *prof)
-{
-       link_print_tree (prof);
-       g_hash_table_foreach (prof->images, link_free_image, NULL);
-       g_free (prof);
-}
-
-void
-mono_profiler_startup (const char *desc)
-{
-       MonoProfiler *prof;
-
-       prof = g_new0 (MonoProfiler, 1);
-
-       if (strncmp ("link:", desc, 5) == 0 && desc [5])
-               prof->output_file = g_strdup (desc + 5);
-       else
-               prof->output_file = "link.xml";
-
-       prof->images = g_hash_table_new (NULL, NULL);
-
-       mono_profiler_install (prof, link_shutdown);
-
-       mono_profiler_install_enter_leave (NULL, link_method_leave);
-
-       mono_profiler_set_events (MONO_PROFILE_ENTER_LEAVE);
-}
diff --git a/mcs/tools/linker/standalone.make b/mcs/tools/linker/standalone.make
deleted file mode 100644 (file)
index f444215..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-
-MCS = mcs
-KEY_FILE = ../../class/mono.snk
-MONO.CECIL.DLL = Mono.Cecil.dll
-MCS_FLAGS = -debug -keyfile:$(KEY_FILE) -r:$(MONO.CECIL.DLL) -resource:Descriptors/mscorlib.xml -resource:Descriptors/System.xml -resource:Descriptors/System.Web.xml -resource:Descriptors/Mono.Posix.xml -resource:Descriptors/System.Drawing.xml
-LINKER = monolinker.exe
-
-all: config.make monolinker.exe monolinker
-
-monolinker: monolinker.in Makefile
-       sed "s,@prefix@,$(prefix)," < monolinker.in > monolinker
-       chmod +x monolinker
-
-monolinker.exe: Mono.Cecil.dll
-       $(MCS) $(MCS_FLAGS) @$(LINKER).sources /out:$(LINKER)
-
-Mono.Cecil.dll:
-       if pkg-config --atleast-version=0.5 mono-cecil; then \
-               cp `pkg-config --variable=Libraries mono-cecil` .; \
-       else \
-               echo You must install Mono.Cecil first; \
-               exit 1; \
-       fi
-
-clean:
-       rm -f $(LINKER) $(MONO.CECIL.DLL) monolinker
-
-install: all
-       mkdir -p $(prefix)/bin
-       mkdir -p $(prefix)/lib/monolinker
-       cp $(LINKER) $(MONO.CECIL.DLL) $(prefix)/lib/monolinker
-       cp monolinker $(prefix)/bin
-       cp man/monolinker.1 $(prefix)/share/man/man1
-
-config.make:
-       echo You must run configure first
-       exit 1
-
-include config.make
-
-run-test: all
-       cd ./Tests; \
-       make clean run-test; \
-       cd ..;
index fcee86378870d4dbdd905943b44dfd04830590b2..14185713d52b8f96a57ddb6cd5453886e122e0b8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f62f4b7d50063efe324119017151a0937a50f87c..a2ba4eb94c9fd23a7fbf679dc11c6bc1787c9215 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index a840ab664a084a8385de1ec94ddc78c7bbde47c7..f0a8a6d0141db3858a44eac384ca7b38b9be6fbd 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 79b3f22e5102e27be8dc917d5f05c379155a9fb8..f6de433088c2ec6019c4fbfdd926ef503182cf7c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f9ba0a189f33dca017f7f2f42800aca06c77cb91..1cdfb4653e647bcdeb145806c6a6e538483e2a92 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 9ae9b30b2dfb58c097bf109889f6bffdaf7cb13f..1a30e07048d93e1c9fee34c64a56f72a4e30219f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4fce01cd94229c2ef2859e58c3f05bbc8d38c5f9..09cc201b497b070e0c041748935a7735f6bc19af 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 11b6ec9a77fd4c81e863da6af50fc8c5e395bc33..89596db0dae8d1d370fb7e92b7ea410dae5c629d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 5ea29f42e34e034496f15a315f560c0e3c2752b1..4fdfba521c848a61aa91d7143f921b5eac4b0899 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 280daf2e121a45305c1081e254724e2d3689fc76..95268e9c3b59222c789c351e4df8b856e3eee92d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8f6dfe0c7d1dccb5fc158cf7163a907c5f4b2f56..d6ac11fff43bc95a3464b9b107d41fdc9e3bd9f7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 4ceeb1245c04749f77fa354fc51961aa9c9fb42d..a65ab75b17b9d2e021c606e9340354a89470d323 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3b054825bd5be1119d17a07ef2b4ed9e05019cde..43a2039703cc7b84380e0f605241e81ab7367276 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index d536d2fde45a3327de7c04e2095f96782a37c864..d7bc84b9c55cd7e7b3baf44727aeb4d8beec9eec 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index afcbc7a7e0354856599b8102b30f876e2baef57d..57dcb4efe27f7a66bad6a6e4cb2dafe0a9d4f535 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 609fbae4cfb50040e3435441587fc6093774a285..230652e3f73f9a0ed1a98c157d7be923e712f9de 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 43b13148463ed0828c802a96a7a96df86c18f6a5..ccb79a7f770480121e6f5cf3f8aea456bcdfa09b 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 2df821f8a4152555371f574cdf8e5655d297076c..8b4dd8efb27078fa2fab2aeb81976564d6aeb405 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 8ed613f981fb594fd6c51480a5dc05437723e874..40119b2a80b32d822e804eec2982e575d8565c53 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 483d18dfd18516678453318b5236472f1bf43e30..cb8835b5442e815036b67b2cf73e917e37eb67c6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 76031448a37d0df40014296bd556bbe2fcbf064c..d5422a51f85ae744b3a70e74fc2e5df372e32e42 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index f2ddaca95c3f20445e0760475171359a68ee45d2..29204d9140ff870ba246931cb673387225bac341 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 3430fc6dc2ce53f151f159873c44fcd821c51296..d20cf05b23a57896a86c6067dbc1b9fbdc4c6846 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
diff --git a/mcs/tools/tuner/Makefile b/mcs/tools/tuner/Makefile
deleted file mode 100644 (file)
index c364223..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-thisdir = tools/tuner
-SUBDIRS =
-DEP_DIRS = linker
-include ../../build/rules.make
-
-LOCAL_MCS_FLAGS = -r:$(topdir)/class/lib/$(PROFILE)/monolinker.exe
-LIB_REFS = System System.Core System.Xml Mono.Cecil
-
-LIBRARY = Mono.Tuner.dll
-
-NO_INSTALL = yes
-NO_TEST = yes
-NO_SIGN_ASSEMBLY = yes
-
-include ../../build/library.make
diff --git a/mcs/tools/tuner/Mono.Tuner-net_4_x.csproj b/mcs/tools/tuner/Mono.Tuner-net_4_x.csproj
deleted file mode 100644 (file)
index a681051..0000000
+++ /dev/null
@@ -1,116 +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>{8CCE7044-3466-4599-B09E-9F8E0C2F4614}</ProjectGuid>\r
-    <OutputType>Library</OutputType>\r
-    <NoWarn>1699</NoWarn>\r
-    <OutputPath>./../../class/lib/net_4_x</OutputPath>\r
-    <IntermediateOutputPath>obj-net_4_x</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>Mono.Tuner</AssemblyName>\r
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
-    <FileAlignment>512</FileAlignment>\r
-  </PropertyGroup>\r
-  \r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
-    <DebugSymbols>true</DebugSymbols>\r
-    <DebugType>full</DebugType>\r
-    <NoWarn>1699</NoWarn>\r
-    <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO</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</NoWarn>\r
-    <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO</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="Mono.Tuner\AdjustVisibility.cs" />\r
-    <Compile Include="Mono.Tuner\CheckVisibility.cs" />\r
-    <Compile Include="Mono.Tuner\FilterAttributes.cs" />\r
-    <Compile Include="Mono.Tuner\InjectSecurityAttributes.cs" />\r
-    <Compile Include="Mono.Tuner\MoonlightA11yApiMarker.cs" />\r
-    <Compile Include="Mono.Tuner\MoonlightA11yAssemblyStep.cs" />\r
-    <Compile Include="Mono.Tuner\MoonlightA11yDescriptorGenerator.cs" />\r
-    <Compile Include="Mono.Tuner\MoonlightA11yProcessor.cs" />\r
-    <Compile Include="Mono.Tuner\MoonlightA11yUsageInspectionStep.cs" />\r
-    <Compile Include="Mono.Tuner\MoonlightAssemblyStep.cs" />\r
-    <Compile Include="Mono.Tuner\PrintStatus.cs" />\r
-    <Compile Include="Mono.Tuner\RemoveSerialization.cs" />\r
-    <Compile Include="Mono.Tuner\TunerAnnotations.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="../linker/monolinker-net_4_x.csproj">\r
-      <Project>{FA920637-C202-4E75-AC0F-1A8DBD631DF1}</Project>\r
-      <Name>monolinker-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../../class/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="../../class/System/System-net_4_x.csproj">\r
-      <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
-      <Name>System-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../../class/System.Core/System.Core-net_4_x.csproj">\r
-      <Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>\r
-      <Name>System.Core-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../../class/System.XML/System.Xml-net_4_x.csproj">\r
-      <Project>{87FD2F0F-5222-4AE6-BD63-2D4975E11E5B}</Project>\r
-      <Name>System.Xml-net_4_x</Name>\r
-    </ProjectReference>\r
-    <Reference Include="./../../class/lib/net_4_x/Mono.Cecil.dll">\r
-      <SpecificVersion>False</SpecificVersion>\r
-      <HintPath>./../../class/lib/net_4_x/Mono.Cecil.dll</HintPath>\r
-      <Private>False</Private>\r
-    </Reference>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <Folder Include="Properties\" />\r
-  </ItemGroup>\r
-</Project>\r
-
diff --git a/mcs/tools/tuner/Mono.Tuner.csproj b/mcs/tools/tuner/Mono.Tuner.csproj
deleted file mode 100644 (file)
index fd5e22d..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{E97429BA-279A-4C1D-AE8A-8BD878C661D1}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Mono.Tuner</RootNamespace>
-    <AssemblyName>Mono.Tuner</AssemblyName>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>True</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>False</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>True</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Mono.Tuner\AdjustVisibility.cs" />
-    <Compile Include="Mono.Tuner\CheckVisibility.cs" />
-    <Compile Include="Mono.Tuner\PrintStatus.cs" />
-    <Compile Include="Mono.Tuner\RemoveSerialization.cs" />
-    <Compile Include="Mono.Tuner\TunerAnnotations.cs" />
-    <Compile Include="Mono.Tuner\InjectSecurityAttributes.cs" />
-    <Compile Include="Mono.Tuner\MoonlightAssemblyStep.cs" />
-    <Compile Include="Mono.Tuner\FilterAttributes.cs" />
-    <Compile Include="Mono.Tuner\MoonlightA11yProcessor.cs" />
-    <Compile Include="Mono.Tuner\MoonlightA11yAssemblyStep.cs" />
-    <Compile Include="Mono.Tuner\MoonlightA11yUsageInspectionStep.cs" />
-    <Compile Include="Mono.Tuner\MoonlightA11yDescriptorGenerator.cs" />
-    <Compile Include="Mono.Tuner\MoonlightA11yApiMarker.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <ItemGroup>
-    <None Include="Makefile" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\linker\Mono.Linker.csproj">
-      <Project>{DD28E2B1-057B-4B4D-A04D-B2EBD9E76E46}</Project>
-      <Name>Mono.Linker</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\..\external\cecil\Mono.Cecil.csproj">
-      <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
-      <Name>Mono.Cecil</Name>
-    </ProjectReference>
-  </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/mcs/tools/tuner/Mono.Tuner.dll.sources b/mcs/tools/tuner/Mono.Tuner.dll.sources
deleted file mode 100644 (file)
index cca968b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Mono.Tuner/TunerAnnotations.cs
-Mono.Tuner/PrintStatus.cs
-Mono.Tuner/RemoveSerialization.cs
-Mono.Tuner/AdjustVisibility.cs
-Mono.Tuner/CheckVisibility.cs
-Mono.Tuner/InjectSecurityAttributes.cs
-Mono.Tuner/MoonlightA11yApiMarker.cs
-Mono.Tuner/MoonlightA11yAssemblyStep.cs
-Mono.Tuner/MoonlightA11yDescriptorGenerator.cs
-Mono.Tuner/MoonlightA11yProcessor.cs
-Mono.Tuner/MoonlightA11yUsageInspectionStep.cs
-Mono.Tuner/MoonlightAssemblyStep.cs
-Mono.Tuner/FilterAttributes.cs
diff --git a/mcs/tools/tuner/Mono.Tuner/AdjustVisibility.cs b/mcs/tools/tuner/Mono.Tuner/AdjustVisibility.cs
deleted file mode 100644 (file)
index 6b684b6..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-//
-// AdjustVisibilityStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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;
-using System.Collections.Generic;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class AdjustVisibility : BaseStep {
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       ProcessTypes (assembly.MainModule.Types);
-               }
-
-               void ProcessTypes (ICollection types)
-               {
-                       foreach (TypeDefinition type in types)
-                               ProcessType (type);
-               }
-
-               void ProcessType (TypeDefinition type)
-               {
-                       if (!IsPublic (type))
-                               return;
-
-                       if (!IsMarkedAsPublic (type)) {
-                               SetInternalVisibility (type);
-                               return;
-                       }
-
-                       if (type.IsEnum)
-                               return;
-
-                       ProcessFields (type.Fields);
-                       ProcessMethods (type.Methods);
-               }
-
-               static bool IsPublic (TypeDefinition type)
-               {
-                       return type.DeclaringType == null ? type.IsPublic : type.IsNestedPublic;
-               }
-
-               void SetInternalVisibility (TypeDefinition type)
-               {
-                       type.Attributes &= ~TypeAttributes.VisibilityMask;
-                       if (type.DeclaringType == null)
-                               type.Attributes |= TypeAttributes.NotPublic;
-                       else
-                               type.Attributes |= TypeAttributes.NestedAssembly;
-
-                       MarkInternalized (type);
-               }
-
-               void ProcessMethods (ICollection methods)
-               {
-                       foreach (MethodDefinition method in methods)
-                               ProcessMethod (method);
-               }
-
-               void ProcessMethod (MethodDefinition method)
-               {
-                       if (IsMarkedAsPublic (method))
-                               return;
-
-                       if (method.IsPublic)
-                               SetInternalVisibility (method);
-                       else if (method.IsFamily || method.IsFamilyOrAssembly)
-                               SetProtectedAndInternalVisibility (method);
-               }
-
-               void SetInternalVisibility (MethodDefinition method)
-               {
-                       method.Attributes &= ~MethodAttributes.MemberAccessMask;
-                       method.Attributes |= MethodAttributes.Assembly;
-
-                       MarkInternalized (method);
-               }
-
-               void SetProtectedAndInternalVisibility (MethodDefinition method)
-               {
-                       method.Attributes &= ~MethodAttributes.MemberAccessMask;
-                       method.Attributes |= MethodAttributes.FamANDAssem;
-
-                       MarkInternalized (method);
-               }
-
-               bool IsMarkedAsPublic (IMetadataTokenProvider provider)
-               {
-                       return Annotations.IsPublic (provider);
-               }
-
-               void ProcessFields (IEnumerable<FieldDefinition> fields)
-               {
-                       foreach (FieldDefinition field in fields)
-                               ProcessField (field);
-               }
-
-               void ProcessField (FieldDefinition field)
-               {
-                       if (IsMarkedAsPublic (field))
-                               return;
-
-                       if (field.IsPublic)
-                               SetInternalVisibility (field);
-                       else if (field.IsFamily || field.IsFamilyOrAssembly)
-                               SetProtectedAndInternalVisibility (field);
-               }
-
-               void SetInternalVisibility (FieldDefinition field)
-               {
-                       field.Attributes &= ~FieldAttributes.FieldAccessMask;
-                       field.Attributes |= FieldAttributes.Assembly;
-
-                       MarkInternalized (field);
-               }
-
-               void SetProtectedAndInternalVisibility (FieldDefinition field)
-               {
-                       field.Attributes &= ~FieldAttributes.FieldAccessMask;
-                       field.Attributes |= FieldAttributes.FamANDAssem;
-
-                       MarkInternalized (field);
-               }
-
-               void MarkInternalized (IMetadataTokenProvider provider)
-               {
-                       TunerAnnotations.Internalized (Context, provider);
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/ApplyPreserveAttributeBase.cs b/mcs/tools/tuner/Mono.Tuner/ApplyPreserveAttributeBase.cs
deleted file mode 100644 (file)
index 6a910a9..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public abstract class ApplyPreserveAttributeBase : BaseSubStep {
-
-               // set 'removeAttribute' to true if you want the preserved attribute to be removed from the final assembly
-               protected abstract bool IsPreservedAttribute (ICustomAttributeProvider provider, CustomAttribute attribute, out bool removeAttribute);
-
-               public override SubStepTargets Targets {
-                       get {
-                               return SubStepTargets.Type
-                                       | SubStepTargets.Field
-                                       | SubStepTargets.Method
-                                       | SubStepTargets.Property
-                                       | SubStepTargets.Event;
-                       }
-               }
-
-               public override bool IsActiveFor (AssemblyDefinition assembly)
-               {
-                       return !Profile.IsSdkAssembly (assembly) && Annotations.GetAction (assembly) == AssemblyAction.Link;
-               }
-
-               public override void ProcessType (TypeDefinition type)
-               {
-                       TryApplyPreserveAttribute (type);
-               }
-
-               public override void ProcessField (FieldDefinition field)
-               {
-                       foreach (var attribute in GetPreserveAttributes (field))
-                               Mark (field, attribute);
-               }
-
-               public override void ProcessMethod (MethodDefinition method)
-               {
-                       MarkMethodIfPreserved (method);
-               }
-
-               public override void ProcessProperty (PropertyDefinition property)
-               {
-                       foreach (var attribute in GetPreserveAttributes (property)) {
-                               MarkMethod (property.GetMethod, attribute);
-                               MarkMethod (property.SetMethod, attribute);
-                       }
-               }
-
-               public override void ProcessEvent (EventDefinition @event)
-               {
-                       foreach (var attribute in GetPreserveAttributes (@event)) {
-                               MarkMethod (@event.AddMethod, attribute);
-                               MarkMethod (@event.InvokeMethod, attribute);
-                               MarkMethod (@event.RemoveMethod, attribute);
-                       }
-               }
-
-               void MarkMethodIfPreserved (MethodDefinition method)
-               {
-                       foreach (var attribute in GetPreserveAttributes (method)) 
-                               MarkMethod (method, attribute);
-               }
-
-               void MarkMethod (MethodDefinition method, CustomAttribute preserve_attribute)
-               {
-                       if (method == null)
-                               return;
-
-                       Mark (method, preserve_attribute);
-                       Annotations.SetAction (method, MethodAction.Parse);
-               }
-
-               void Mark (IMetadataTokenProvider provider, CustomAttribute preserve_attribute)
-               {
-                       if (IsConditionalAttribute (preserve_attribute)) {
-                               PreserveConditional (provider);
-                               return;
-                       }
-
-                       PreserveUnconditional (provider);
-               }
-
-               void PreserveConditional (IMetadataTokenProvider provider)
-               {
-                       var method = provider as MethodDefinition;
-                       if (method == null) {
-                               // workaround to support (uncommon but valid) conditional fields form [Preserve]
-                               PreserveUnconditional (provider);
-                               return;
-                       }
-
-                       Annotations.AddPreservedMethod (method.DeclaringType, method);
-               }
-
-               static bool IsConditionalAttribute (CustomAttribute attribute)
-               {
-                       if (attribute == null)
-                               return false;
-
-                       foreach (var named_argument in attribute.Fields)
-                               if (named_argument.Name == "Conditional")
-                                       return (bool) named_argument.Argument.Value;
-
-                       return false;
-               }
-
-               void PreserveUnconditional (IMetadataTokenProvider provider)
-               {
-                       Annotations.Mark (provider);
-
-                       var member = provider as IMemberDefinition;
-                       if (member == null || member.DeclaringType == null)
-                               return;
-
-                       Mark (member.DeclaringType, null);
-               }
-
-               void TryApplyPreserveAttribute (TypeDefinition type)
-               {
-                       foreach (var attribute in GetPreserveAttributes (type)) {
-                               Annotations.Mark (type);
-
-                               if (!attribute.HasFields)
-                                       continue;
-                               foreach (var named_argument in attribute.Fields)
-                                       if (named_argument.Name == "AllMembers" && (bool)named_argument.Argument.Value)
-                                               Annotations.SetPreserve (type, TypePreserve.All);
-                       }
-               }
-
-               List<CustomAttribute> GetPreserveAttributes (ICustomAttributeProvider provider)
-               {
-                       List<CustomAttribute> attrs = new List<CustomAttribute> ();
-
-                       if (!provider.HasCustomAttributes)
-                               return attrs;
-
-                       var attributes = provider.CustomAttributes;
-
-                       for (int i = attributes.Count - 1; i >= 0; i--) {
-                               var attribute = attributes [i];
-
-                               bool remote_attribute;
-                               if (!IsPreservedAttribute (provider, attribute, out remote_attribute))
-                                       continue;
-
-                               attrs.Add (attribute);
-                               if (remote_attribute)
-                                       attributes.RemoveAt (i);
-                       }
-
-                       return attrs;
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/CecilRocks.cs b/mcs/tools/tuner/Mono.Tuner/CecilRocks.cs
deleted file mode 100644 (file)
index 6995859..0000000
+++ /dev/null
@@ -1,519 +0,0 @@
-//
-// MethodBodyRocks.cs
-//
-// Author:
-//   Jb Evain (jbevain@gmail.com)
-//
-// Copyright (c) 2008 - 2011 Jb Evain
-//
-// 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.Linq;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Tuner {
-
-       public static class MethodBodyRocks {
-
-               public static IEnumerable<TypeDefinition> GetAllTypes (this ModuleDefinition self)
-               {
-                       return self.Types.SelectMany (t => t.GetAllTypes ());
-               }
-
-               static IEnumerable<TypeDefinition> GetAllTypes (this TypeDefinition self)
-               {
-                       yield return self;
-
-                       if (!self.HasNestedTypes)
-                               yield break;
-
-                       foreach (var type in self.NestedTypes.SelectMany (t => t.GetAllTypes ()))
-                               yield return type;
-               }
-
-               public static IEnumerable<MethodDefinition> GetMethods (this TypeDefinition self)
-               {
-                       return self.Methods.Where (m => !m.IsConstructor);
-               }
-
-               public static IEnumerable<MethodDefinition> GetConstructors (this TypeDefinition self)
-               {
-                       return self.Methods.Where (m => m.IsConstructor);
-               }
-
-               public static MethodDefinition GetTypeConstructor (this TypeDefinition self)
-               {
-                       return self.GetConstructors ().FirstOrDefault (c => c.IsStatic);
-               }
-
-               public static void SimplifyMacros (this MethodBody self)
-               {
-                       if (self == null)
-                               throw new ArgumentNullException ("self");
-
-                       foreach (var instruction in self.Instructions) {
-                               if (instruction.OpCode.OpCodeType != OpCodeType.Macro)
-                                       continue;
-
-                               switch (instruction.OpCode.Code) {
-                               case Code.Ldarg_0:
-                                       ExpandMacro (instruction, OpCodes.Ldarg, self.GetParameter (0));
-                                       break;
-                               case Code.Ldarg_1:
-                                       ExpandMacro (instruction, OpCodes.Ldarg, self.GetParameter (1));
-                                       break;
-                               case Code.Ldarg_2:
-                                       ExpandMacro (instruction, OpCodes.Ldarg, self.GetParameter (2));
-                                       break;
-                               case Code.Ldarg_3:
-                                       ExpandMacro (instruction, OpCodes.Ldarg, self.GetParameter (3));
-                                       break;
-                               case Code.Ldloc_0:
-                                       ExpandMacro (instruction, OpCodes.Ldloc, self.Variables [0]);
-                                       break;
-                               case Code.Ldloc_1:
-                                       ExpandMacro (instruction, OpCodes.Ldloc, self.Variables [1]);
-                                       break;
-                               case Code.Ldloc_2:
-                                       ExpandMacro (instruction, OpCodes.Ldloc, self.Variables [2]);
-                                       break;
-                               case Code.Ldloc_3:
-                                       ExpandMacro (instruction, OpCodes.Ldloc, self.Variables [3]);
-                                       break;
-                               case Code.Stloc_0:
-                                       ExpandMacro (instruction, OpCodes.Stloc, self.Variables [0]);
-                                       break;
-                               case Code.Stloc_1:
-                                       ExpandMacro (instruction, OpCodes.Stloc, self.Variables [1]);
-                                       break;
-                               case Code.Stloc_2:
-                                       ExpandMacro (instruction, OpCodes.Stloc, self.Variables [2]);
-                                       break;
-                               case Code.Stloc_3:
-                                       ExpandMacro (instruction, OpCodes.Stloc, self.Variables [3]);
-                                       break;
-                               case Code.Ldarg_S:
-                                       instruction.OpCode = OpCodes.Ldarg;
-                                       break;
-                               case Code.Ldarga_S:
-                                       instruction.OpCode = OpCodes.Ldarga;
-                                       break;
-                               case Code.Starg_S:
-                                       instruction.OpCode = OpCodes.Starg;
-                                       break;
-                               case Code.Ldloc_S:
-                                       instruction.OpCode = OpCodes.Ldloc;
-                                       break;
-                               case Code.Ldloca_S:
-                                       instruction.OpCode = OpCodes.Ldloca;
-                                       break;
-                               case Code.Stloc_S:
-                                       instruction.OpCode = OpCodes.Stloc;
-                                       break;
-                               case Code.Ldc_I4_M1:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, -1);
-                                       break;
-                               case Code.Ldc_I4_0:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 0);
-                                       break;
-                               case Code.Ldc_I4_1:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 1);
-                                       break;
-                               case Code.Ldc_I4_2:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 2);
-                                       break;
-                               case Code.Ldc_I4_3:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 3);
-                                       break;
-                               case Code.Ldc_I4_4:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 4);
-                                       break;
-                               case Code.Ldc_I4_5:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 5);
-                                       break;
-                               case Code.Ldc_I4_6:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 6);
-                                       break;
-                               case Code.Ldc_I4_7:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 7);
-                                       break;
-                               case Code.Ldc_I4_8:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, 8);
-                                       break;
-                               case Code.Ldc_I4_S:
-                                       ExpandMacro (instruction, OpCodes.Ldc_I4, (int) (sbyte) instruction.Operand);
-                                       break;
-                               case Code.Br_S:
-                                       instruction.OpCode = OpCodes.Br;
-                                       break;
-                               case Code.Brfalse_S:
-                                       instruction.OpCode = OpCodes.Brfalse;
-                                       break;
-                               case Code.Brtrue_S:
-                                       instruction.OpCode = OpCodes.Brtrue;
-                                       break;
-                               case Code.Beq_S:
-                                       instruction.OpCode = OpCodes.Beq;
-                                       break;
-                               case Code.Bge_S:
-                                       instruction.OpCode = OpCodes.Bge;
-                                       break;
-                               case Code.Bgt_S:
-                                       instruction.OpCode = OpCodes.Bgt;
-                                       break;
-                               case Code.Ble_S:
-                                       instruction.OpCode = OpCodes.Ble;
-                                       break;
-                               case Code.Blt_S:
-                                       instruction.OpCode = OpCodes.Blt;
-                                       break;
-                               case Code.Bne_Un_S:
-                                       instruction.OpCode = OpCodes.Bne_Un;
-                                       break;
-                               case Code.Bge_Un_S:
-                                       instruction.OpCode = OpCodes.Bge_Un;
-                                       break;
-                               case Code.Bgt_Un_S:
-                                       instruction.OpCode = OpCodes.Bgt_Un;
-                                       break;
-                               case Code.Ble_Un_S:
-                                       instruction.OpCode = OpCodes.Ble_Un;
-                                       break;
-                               case Code.Blt_Un_S:
-                                       instruction.OpCode = OpCodes.Blt_Un;
-                                       break;
-                               case Code.Leave_S:
-                                       instruction.OpCode = OpCodes.Leave;
-                                       break;
-                               }
-                       }
-               }
-
-               static void ExpandMacro (Instruction instruction, OpCode opcode, object operand)
-               {
-                       instruction.OpCode = opcode;
-                       instruction.Operand = operand;
-               }
-
-               static void MakeMacro (Instruction instruction, OpCode opcode)
-               {
-                       instruction.OpCode = opcode;
-                       instruction.Operand = null;
-               }
-
-               public static void OptimizeMacros (this MethodBody self)
-               {
-                       if (self == null)
-                               throw new ArgumentNullException ("self");
-
-                       var method = self.Method;
-
-                       foreach (var instruction in self.Instructions) {
-                               int index;
-                               switch (instruction.OpCode.Code) {
-                               case Code.Ldarg:
-                                       index = ((ParameterDefinition) instruction.Operand).Index;
-                                       if (index == -1 && instruction.Operand == self.ThisParameter)
-                                               index = 0;
-                                       else if (method.HasThis)
-                                               index++;
-
-                                       switch (index) {
-                                       case 0:
-                                               MakeMacro (instruction, OpCodes.Ldarg_0);
-                                               break;
-                                       case 1:
-                                               MakeMacro (instruction, OpCodes.Ldarg_1);
-                                               break;
-                                       case 2:
-                                               MakeMacro (instruction, OpCodes.Ldarg_2);
-                                               break;
-                                       case 3:
-                                               MakeMacro (instruction, OpCodes.Ldarg_3);
-                                               break;
-                                       default:
-                                               if (index < 256)
-                                                       ExpandMacro (instruction, OpCodes.Ldarg_S, instruction.Operand);
-                                               break;
-                                       }
-                                       break;
-                               case Code.Ldloc:
-                                       index = ((VariableDefinition) instruction.Operand).Index;
-                                       switch (index) {
-                                       case 0:
-                                               MakeMacro (instruction, OpCodes.Ldloc_0);
-                                               break;
-                                       case 1:
-                                               MakeMacro (instruction, OpCodes.Ldloc_1);
-                                               break;
-                                       case 2:
-                                               MakeMacro (instruction, OpCodes.Ldloc_2);
-                                               break;
-                                       case 3:
-                                               MakeMacro (instruction, OpCodes.Ldloc_3);
-                                               break;
-                                       default:
-                                               if (index < 256)
-                                                       ExpandMacro (instruction, OpCodes.Ldloc_S, instruction.Operand);
-                                               break;
-                                       }
-                                       break;
-                               case Code.Stloc:
-                                       index = ((VariableDefinition) instruction.Operand).Index;
-                                       switch (index) {
-                                       case 0:
-                                               MakeMacro (instruction, OpCodes.Stloc_0);
-                                               break;
-                                       case 1:
-                                               MakeMacro (instruction, OpCodes.Stloc_1);
-                                               break;
-                                       case 2:
-                                               MakeMacro (instruction, OpCodes.Stloc_2);
-                                               break;
-                                       case 3:
-                                               MakeMacro (instruction, OpCodes.Stloc_3);
-                                               break;
-                                       default:
-                                               if (index < 256)
-                                                       ExpandMacro (instruction, OpCodes.Stloc_S, instruction.Operand);
-                                               break;
-                                       }
-                                       break;
-                               case Code.Ldarga:
-                                       index = ((ParameterDefinition) instruction.Operand).Index;
-                                       if (index == -1 && instruction.Operand == self.ThisParameter)
-                                               index = 0;
-                                       else if (method.HasThis)
-                                               index++;
-                                       if (index < 256)
-                                               ExpandMacro (instruction, OpCodes.Ldarga_S, instruction.Operand);
-                                       break;
-                               case Code.Ldloca:
-                                       if (((VariableDefinition) instruction.Operand).Index < 256)
-                                               ExpandMacro (instruction, OpCodes.Ldloca_S, instruction.Operand);
-                                       break;
-                               case Code.Ldc_I4:
-                                       int i = (int) instruction.Operand;
-                                       switch (i) {
-                                       case -1:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_M1);
-                                               break;
-                                       case 0:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_0);
-                                               break;
-                                       case 1:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_1);
-                                               break;
-                                       case 2:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_2);
-                                               break;
-                                       case 3:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_3);
-                                               break;
-                                       case 4:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_4);
-                                               break;
-                                       case 5:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_5);
-                                               break;
-                                       case 6:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_6);
-                                               break;
-                                       case 7:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_7);
-                                               break;
-                                       case 8:
-                                               MakeMacro (instruction, OpCodes.Ldc_I4_8);
-                                               break;
-                                       default:
-                                               if (i >= -128 && i < 128)
-                                                       ExpandMacro (instruction, OpCodes.Ldc_I4_S, (sbyte) i);
-                                               break;
-                                       }
-                                       break;
-                               }
-                       }
-
-                       OptimizeBranches (self);
-               }
-
-               static void OptimizeBranches (MethodBody body)
-               {
-                       ComputeOffsets (body);
-
-                       foreach (var instruction in body.Instructions) {
-                               if (instruction.OpCode.OperandType != OperandType.InlineBrTarget)
-                                       continue;
-
-                               if (OptimizeBranch (instruction))
-                                       ComputeOffsets (body);
-                       }
-               }
-
-               static bool OptimizeBranch (Instruction instruction)
-               {
-                       var offset = ((Instruction) instruction.Operand).Offset - (instruction.Offset + instruction.OpCode.Size + 4);
-                       if (!(offset >= -128 && offset <= 127))
-                               return false;
-
-                       switch (instruction.OpCode.Code) {
-                       case Code.Br:
-                               instruction.OpCode = OpCodes.Br_S;
-                               break;
-                       case Code.Brfalse:
-                               instruction.OpCode = OpCodes.Brfalse_S;
-                               break;
-                       case Code.Brtrue:
-                               instruction.OpCode = OpCodes.Brtrue_S;
-                               break;
-                       case Code.Beq:
-                               instruction.OpCode = OpCodes.Beq_S;
-                               break;
-                       case Code.Bge:
-                               instruction.OpCode = OpCodes.Bge_S;
-                               break;
-                       case Code.Bgt:
-                               instruction.OpCode = OpCodes.Bgt_S;
-                               break;
-                       case Code.Ble:
-                               instruction.OpCode = OpCodes.Ble_S;
-                               break;
-                       case Code.Blt:
-                               instruction.OpCode = OpCodes.Blt_S;
-                               break;
-                       case Code.Bne_Un:
-                               instruction.OpCode = OpCodes.Bne_Un_S;
-                               break;
-                       case Code.Bge_Un:
-                               instruction.OpCode = OpCodes.Bge_Un_S;
-                               break;
-                       case Code.Bgt_Un:
-                               instruction.OpCode = OpCodes.Bgt_Un_S;
-                               break;
-                       case Code.Ble_Un:
-                               instruction.OpCode = OpCodes.Ble_Un_S;
-                               break;
-                       case Code.Blt_Un:
-                               instruction.OpCode = OpCodes.Blt_Un_S;
-                               break;
-                       case Code.Leave:
-                               instruction.OpCode = OpCodes.Leave_S;
-                               break;
-                       }
-
-                       return true;
-               }
-
-               static void ComputeOffsets (MethodBody body)
-               {
-                       var offset = 0;
-                       foreach (var instruction in body.Instructions) {
-                               instruction.Offset = offset;
-                               offset += instruction.GetSize ();
-                       }
-               }
-
-               public static ParameterDefinition GetParameter (this MethodBody self, int index)
-               {
-                       var method = self.Method;
-
-                       if (method.HasThis) {
-                               if (index == 0)
-                                       return self.ThisParameter;
-
-                               index--;
-                       }
-
-                       var parameters = method.Parameters;
-
-                       if (index < 0 || index >= parameters.Count)
-                               return null;
-
-                       return parameters [index];
-               }
-
-               public static bool Implements (this TypeReference self, string interfaceName)
-               {
-                       if (interfaceName == null)
-                               throw new ArgumentNullException ("interfaceName");
-                       if (self == null)
-                               return false;
-
-                       TypeDefinition type = self.Resolve ();
-                       if (type == null)
-                               return false;   // not enough information available
-
-                       // special case, check if we implement ourselves
-                       if (type.IsInterface && (type.FullName == interfaceName))
-                               return true;
-
-                       return Implements (type, interfaceName, (interfaceName.IndexOf ('`') >= 0));
-               }
-
-               public static bool Implements (TypeDefinition type, string interfaceName, bool generic)
-               {
-                       while (type != null) {
-                               // does the type implements it itself
-                               if (type.HasInterfaces) {
-                                       foreach (var iface in type.Interfaces) {
-                                               string fullname = (generic) ? iface.InterfaceType.GetElementType ().FullName : iface.InterfaceType.FullName;
-                                               if (fullname == interfaceName)
-                                                       return true;
-                                               //if not, then maybe one of its parent interfaces does
-                                               if (Implements (iface.InterfaceType.Resolve (), interfaceName, generic))
-                                                       return true;
-                                       }
-                               }
-
-                               type = type.BaseType != null ? type.BaseType.Resolve () : null;
-                       }
-                       return false;
-               }
-
-               public static bool Inherits (this TypeReference self, string @namespace, string name)
-               {
-                       if (@namespace == null)
-                               throw new ArgumentNullException ("namespace");
-                       if (name == null)
-                               throw new ArgumentNullException ("name");
-                       if (self == null)
-                               return false;
-                       
-                       TypeReference current = self.Resolve ();
-                       while (current != null) {
-                               if (current.Is (@namespace, name))
-                                       return true;
-                               if (current.Is ("System", "Object"))
-                                       return false;
-                               
-                               TypeDefinition td = current.Resolve ();
-                               if (td == null)
-                                       return false;           // could not resolve type
-                               current = td.BaseType;
-                       }
-                       return false;
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/CheckVisibility.cs b/mcs/tools/tuner/Mono.Tuner/CheckVisibility.cs
deleted file mode 100644 (file)
index df553db..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-//
-// CheckVisibility.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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;
-using System.Text;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Tuner {
-
-       public class CheckVisibility : BaseStep {
-
-               bool throw_on_error;
-
-               protected override void Process ()
-               {
-                       throw_on_error = GetThrowOnVisibilityErrorParameter ();
-               }
-
-               bool GetThrowOnVisibilityErrorParameter ()
-               {
-                       try {
-                               return bool.Parse (Context.GetParameter ("throw_on_visibility_error"));
-                       } catch {
-                               return false;
-                       }
-               }
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (assembly.Name.Name == "mscorlib" || assembly.Name.Name == "smcs")
-                               return;
-
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       Report ("in assembly {0}", assembly.Name);
-
-                       foreach (ModuleDefinition module in assembly.Modules)
-                               foreach (TypeDefinition type in module.Types)
-                                       CheckType (type);
-               }
-
-               void CheckType (TypeDefinition type)
-               {
-                       if (!IsVisibleFrom (type, type.BaseType)) {
-                               ReportError ("Base type `{0}` of type `{1}` is not visible",
-                                       type.BaseType, type);
-                       }
-
-                       CheckInterfaces (type);
-
-                       CheckFields (type);
-                       CheckMethods (type);
-               }
-
-               void CheckInterfaces (TypeDefinition type)
-               {
-                       foreach (var iface in type.Interfaces) {
-                               if (!IsVisibleFrom (type, iface.InterfaceType)) {
-                                       ReportError ("Interface `{0}` implemented by `{1}` is not visible",
-                                               iface, type);
-                               }
-                       }
-               }
-
-               static bool IsPublic (TypeDefinition type)
-               {
-                       return (type.DeclaringType == null && type.IsPublic) || type.IsNestedPublic;
-               }
-
-               static bool AreInDifferentAssemblies (TypeDefinition type, TypeDefinition target)
-               {
-                       if (type.Module.Assembly.Name.FullName == target.Module.Assembly.Name.FullName)
-                               return false;
-
-                       return !IsInternalVisibleTo (target.Module.Assembly, type.Module.Assembly);
-               }
-
-               static bool IsInternalVisibleTo (AssemblyDefinition assembly, AssemblyDefinition candidate)
-               {
-                       foreach (CustomAttribute attribute in assembly.CustomAttributes) {
-                               if (!IsInternalsVisibleToAttribute (attribute))
-                                       continue;
-
-                               if (attribute.ConstructorArguments.Count == 0)
-                                       continue;
-
-                               string signature = (string) attribute.ConstructorArguments [0].Value;
-
-                               if (InternalsVisibleToSignatureMatch (signature, candidate.Name))
-                                       return true;
-                       }
-
-                       return false;
-               }
-
-               static bool InternalsVisibleToSignatureMatch (string signature, AssemblyNameReference reference)
-               {
-                       int pos = signature.IndexOf (",");
-                       if (pos == -1)
-                               return signature == reference.Name;
-
-                       string assembly_name = signature.Substring (0, pos);
-
-                       pos = signature.IndexOf ("=");
-                       if (pos == -1)
-                               throw new ArgumentException ();
-
-                       string public_key = signature.Substring (pos + 1).ToLower ();
-
-                       return assembly_name == reference.Name && public_key == ToPublicKeyString (reference.PublicKey);
-               }
-
-               static string ToPublicKeyString (byte [] public_key)
-               {
-                       StringBuilder signature = new StringBuilder (public_key.Length);
-                       for (int i = 0; i < public_key.Length; i++)
-                               signature.Append (public_key [i].ToString ("x2"));
-
-                       return signature.ToString ();
-               }
-
-               static bool IsInternalsVisibleToAttribute (CustomAttribute attribute)
-               {
-                       return attribute.Constructor.DeclaringType.FullName == "System.Runtime.CompilerServices.InternalsVisibleToAttribute";
-               }
-
-               bool IsVisibleFrom (TypeDefinition type, TypeReference reference)
-               {
-                       if (reference == null)
-                               return true;
-
-                       if (reference is GenericParameter || reference.GetElementType () is GenericParameter)
-                               return true;
-
-                       TypeDefinition other = reference.Resolve ();
-                       if (other == null)
-                               return true;
-
-                       if (!AreInDifferentAssemblies (type, other))
-                               return true;
-
-                       if (IsPublic (other))
-                               return true;
-
-                       return false;
-               }
-
-               bool IsVisibleFrom (TypeDefinition type, MethodReference reference)
-               {
-                       if (reference == null)
-                               return true;
-
-                       MethodDefinition meth = reference.Resolve ();
-                       if (meth == null)
-                               return true;
-
-                       TypeDefinition dec = (TypeDefinition) meth.DeclaringType;
-                       if (!IsVisibleFrom (type, dec))
-                               return false;
-
-                       if (meth.IsPublic)
-                               return true;
-
-                       if (type == dec || IsNestedIn (type, dec))
-                               return true;
-
-                       if (meth.IsFamily && InHierarchy (type, dec))
-                               return true;
-
-                       if (meth.IsFamilyOrAssembly && (!AreInDifferentAssemblies (type, dec) || InHierarchy (type, dec)))
-                               return true;
-
-                       if (meth.IsFamilyAndAssembly && (!AreInDifferentAssemblies (type, dec) && InHierarchy (type, dec)))
-                               return true;
-
-                       if (!AreInDifferentAssemblies (type, dec) && meth.IsAssembly)
-                               return true;
-
-                       return false;
-               }
-
-               bool IsVisibleFrom (TypeDefinition type, FieldReference reference)
-               {
-                       if (reference == null)
-                               return true;
-
-                       FieldDefinition field = reference.Resolve ();
-                       if (field == null)
-                               return true;
-
-                       TypeDefinition dec = (TypeDefinition) field.DeclaringType;
-                       if (!IsVisibleFrom (type, dec))
-                               return false;
-
-                       if (field.IsPublic)
-                               return true;
-
-                       if (type == dec || IsNestedIn (type, dec))
-                               return true;
-
-                       if (field.IsFamily && InHierarchy (type, dec))
-                               return true;
-
-                       if (field.IsFamilyOrAssembly && (!AreInDifferentAssemblies (type, dec) || InHierarchy (type, dec)))
-                               return true;
-
-                       if (field.IsFamilyAndAssembly && (!AreInDifferentAssemblies (type, dec) && InHierarchy (type, dec)))
-                               return true;
-
-                       if (!AreInDifferentAssemblies (type, dec) && field.IsAssembly)
-                               return true;
-
-                       return false;
-               }
-
-               static bool IsNestedIn (TypeDefinition type, TypeDefinition other)
-               {
-                       TypeDefinition declaring = type.DeclaringType;
-
-                       if (declaring == null)
-                               return false;
-
-                       if (declaring == other)
-                               return true;
-
-                       if (declaring.DeclaringType == null)
-                               return false;
-
-                       return IsNestedIn (declaring, other);
-               }
-
-               static bool InHierarchy (TypeDefinition type, TypeDefinition other)
-               {
-                       if (type.BaseType == null)
-                               return false;
-
-                       TypeDefinition baseType = type.BaseType.Resolve ();
-
-                       if (baseType == other)
-                               return true;
-
-                       return InHierarchy (baseType, other);
-               }
-
-               static void Report (string pattern, params object [] parameters)
-               {
-                       Console.WriteLine ("[check] " + pattern, parameters);
-               }
-
-               void ReportError (string pattern, params object [] parameters)
-               {
-                       Report (pattern, parameters);
-
-                       if (throw_on_error)
-                               throw new VisibilityErrorException (string.Format (pattern, parameters));
-               }
-
-               void CheckFields (TypeDefinition type)
-               {
-                       foreach (FieldDefinition field in type.Fields) {
-                               if (!IsVisibleFrom (type, field.FieldType)) {
-                                       ReportError ("Field `{0}` of type `{1}` is not visible from `{2}`",
-                                               field.Name, field.FieldType, type);
-                               }
-                       }
-               }
-
-               void CheckMethods (TypeDefinition type)
-               {
-                       CheckMethods (type, type.Methods);
-               }
-
-               void CheckMethods (TypeDefinition type, ICollection methods)
-               {
-                       foreach (MethodDefinition method in methods) {
-                               if (!IsVisibleFrom (type, method.ReturnType)) {
-                                       ReportError ("Method return type `{0}` in method `{1}` is not visible",
-                                               method.ReturnType, method);
-                               }
-
-                               foreach (ParameterDefinition parameter in method.Parameters) {
-                                       if (!IsVisibleFrom (type, parameter.ParameterType)) {
-                                               ReportError ("Parameter `{0}` of type `{1}` in method `{2}` is not visible.",
-                                                       parameter.Index, parameter.ParameterType, method);
-                                       }
-                               }
-
-                               if (method.HasBody)
-                                       CheckBody (method);
-                       }
-               }
-
-               void CheckBody (MethodDefinition method)
-               {
-                       TypeDefinition type = (TypeDefinition) method.DeclaringType;
-
-                       foreach (VariableDefinition variable in method.Body.Variables) {
-                               if (!IsVisibleFrom ((TypeDefinition) method.DeclaringType, variable.VariableType)) {
-                                       ReportError ("Variable `{0}` of type `{1}` from method `{2}` is not visible",
-                                               variable.Index, variable.VariableType, method);
-                               }
-                       }
-
-                       foreach (Instruction instr in method.Body.Instructions) {
-                               switch (instr.OpCode.OperandType) {
-                               case OperandType.InlineType:
-                               case OperandType.InlineMethod:
-                               case OperandType.InlineField:
-                               case OperandType.InlineTok:
-                                       bool error = false;
-                                       TypeReference type_ref = instr.Operand as TypeReference;
-                                       if (type_ref != null)
-                                               error = !IsVisibleFrom (type, type_ref);
-
-                                       MethodReference meth_ref = instr.Operand as MethodReference;
-                                       if (meth_ref != null)
-                                               error = !IsVisibleFrom (type, meth_ref);
-
-                                       FieldReference field_ref = instr.Operand as FieldReference;
-                                       if (field_ref != null)
-                                               error = !IsVisibleFrom (type, field_ref);
-
-                                       if (error) {
-                                               ReportError ("Operand `{0}` of type {1} at offset 0x{2} in method `{3}` is not visible",
-                                                       instr.Operand, instr.OpCode.OperandType, instr.Offset.ToString ("x4"), method);
-                                       }
-
-                                       break;
-                               default:
-                                       continue;
-                               }
-                       }
-               }
-
-               class VisibilityErrorException : Exception {
-
-                       public VisibilityErrorException (string message)
-                               : base (message)
-                       {
-                       }
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/CustomizeActions.cs b/mcs/tools/tuner/Mono.Tuner/CustomizeActions.cs
deleted file mode 100644 (file)
index 1bb6d6f..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Tuner {
-
-       public class CustomizeActions : BaseStep {
-
-               readonly bool link_sdk_only;
-               readonly HashSet<string> skipped_assemblies;
-
-               public CustomizeActions (bool link_sdk_only, IEnumerable<string> skipped_assemblies)
-               {
-                       this.link_sdk_only = link_sdk_only;
-                       this.skipped_assemblies = new HashSet<string> (skipped_assemblies);
-               }
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (!IsSkipped (assembly) && IsLinked (assembly)) {
-                               if (!Annotations.HasAction (assembly)) // stray assembly not picked up when resolving references
-                                       Annotations.SetAction (assembly, AssemblyAction.Link);
-                               return;
-                       }
-                       ProcessUserAssembly (assembly);
-               }
-
-               protected virtual bool IsPreservedAttribute (CustomAttribute attribute)
-               {
-                       // [assembly: Preserve (type)] does not preserve all the code in the assembly, in fact it might
-                       // not preserve anything in _this_ assembly, but something in a separate assembly (reference)
-                       if (attribute.HasConstructorArguments)
-                               return false;
-                       return (attribute.AttributeType.Name == "PreserveAttribute");
-               }
-
-               protected virtual bool IsLinkerSafeAttribute (CustomAttribute attribute)
-               {
-                       return (attribute.AttributeType.Name == "LinkerSafeAttribute");
-               }
-
-               const ModuleAttributes Supported = ModuleAttributes.ILOnly | ModuleAttributes.Required32Bit | 
-                       ModuleAttributes.Preferred32Bit | ModuleAttributes.StrongNameSigned;
-
-               protected virtual bool IsSkipped (AssemblyDefinition assembly)
-               {
-                       // Cecil can't save back mixed-mode assemblies - so we can't link them
-                       if ((assembly.MainModule.Attributes & ~Supported) != 0)
-                               return true;
-
-                       if (assembly.HasCustomAttributes) {
-                               foreach (var ca in assembly.CustomAttributes) {
-                                       if (IsPreservedAttribute (ca))
-                                               return true;
-                               }
-                       }
-                       return skipped_assemblies.Contains (assembly.Name.Name);
-               }
-
-               protected virtual bool IsLinked (AssemblyDefinition assembly)
-               {
-                       // LinkAll
-                       if (!link_sdk_only)
-                               return true;
-                       // Link SDK : applies to BCL/SDK and product assembly (e.g. monotouch.dll)
-                       if (Profile.IsSdkAssembly (assembly))
-                               return true;
-                       if (Profile.IsProductAssembly (assembly))
-                           return true;
-                       // the assembly can be marked with [LinkAssembly]
-                       if (assembly.HasCustomAttributes) {
-                               foreach (var ca in assembly.CustomAttributes) {
-                                       if (IsLinkerSafeAttribute (ca))
-                                               return true;
-                               }
-                       }
-                       return false;
-               }
-
-               protected void ProcessUserAssembly (AssemblyDefinition assembly)
-               {
-                       ResolveFromAssemblyStep.ProcessLibrary (Context, assembly);
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/Dispatcher.cs b/mcs/tools/tuner/Mono.Tuner/Dispatcher.cs
deleted file mode 100644 (file)
index 9dcf5ee..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       [Flags]
-       public enum SubStepTargets {
-               None = 0,
-
-               Assembly = 1,
-               Type = 2,
-               Field = 4,
-               Method = 8,
-               Property = 16,
-               Event = 32,
-       }
-
-       public interface ISubStep {
-
-               SubStepTargets Targets { get; }
-
-               void Initialize (LinkContext context);
-               bool IsActiveFor (AssemblyDefinition assembly);
-
-               void ProcessAssembly (AssemblyDefinition assembly);
-               void ProcessType (TypeDefinition type);
-               void ProcessField (FieldDefinition field);
-               void ProcessMethod (MethodDefinition method);
-               void ProcessProperty (PropertyDefinition property);
-               void ProcessEvent (EventDefinition @event);
-       }
-
-       public abstract class BaseSubStep : ISubStep {
-
-               protected LinkContext context;
-
-               public AnnotationStore Annotations {
-                       get { return context.Annotations; }
-               }
-
-               public abstract SubStepTargets Targets { get; }
-
-               public virtual void Initialize (LinkContext context)
-               {
-                       this.context = context;
-               }
-
-               public virtual bool IsActiveFor (AssemblyDefinition assembly)
-               {
-                       return true;
-               }
-
-               public virtual void ProcessAssembly (AssemblyDefinition assembly)
-               {
-               }
-
-               public virtual void ProcessType (TypeDefinition type)
-               {
-               }
-
-               public virtual void ProcessField (FieldDefinition field)
-               {
-               }
-
-               public virtual void ProcessMethod (MethodDefinition method)
-               {
-               }
-
-               public virtual void ProcessProperty (PropertyDefinition property)
-               {
-               }
-
-               public virtual void ProcessEvent (EventDefinition @event)
-               {
-               }
-       }
-
-       public class SubStepDispatcher : IStep, IEnumerable<ISubStep> {
-
-               List<ISubStep> substeps = new List<ISubStep> ();
-
-               List<ISubStep> on_assemblies;
-               List<ISubStep> on_types;
-               List<ISubStep> on_fields;
-               List<ISubStep> on_methods;
-               List<ISubStep> on_properties;
-               List<ISubStep> on_events;
-
-               public void Add (ISubStep substep)
-               {
-                       substeps.Add (substep);
-               }
-
-               public void Process (LinkContext context)
-               {
-                       InitializeSubSteps (context);
-
-                       BrowseAssemblies (context.GetAssemblies ());
-               }
-
-               static bool HasSubSteps (List<ISubStep> substeps)
-               {
-                       return substeps != null && substeps.Count > 0;
-               }
-
-               void BrowseAssemblies (IEnumerable<AssemblyDefinition> assemblies)
-               {
-                       foreach (var assembly in assemblies) {
-                               CategorizeSubSteps (assembly);
-
-                               if (HasSubSteps (on_assemblies))
-                                       DispatchAssembly (assembly);
-
-                               if (!ShouldDispatchTypes ())
-                                       continue;
-
-                               BrowseTypes (assembly.MainModule.Types);
-                       }
-               }
-
-               bool ShouldDispatchTypes ()
-               {
-                       return HasSubSteps (on_types)
-                               || HasSubSteps (on_fields)
-                               || HasSubSteps (on_methods)
-                               || HasSubSteps (on_properties)
-                               || HasSubSteps (on_events);
-               }
-
-               void BrowseTypes (ICollection types)
-               {
-                       foreach (TypeDefinition type in types) {
-                               DispatchType (type);
-
-                               if (type.HasFields && HasSubSteps (on_fields))
-                                       BrowseFields (type.Fields);
-
-                               if (type.HasMethods && HasSubSteps (on_methods))
-                                       BrowseMethods (type.Methods);
-
-                               if (type.HasProperties && HasSubSteps (on_properties))
-                                       BrowseProperties (type.Properties);
-
-                               if (type.HasEvents && HasSubSteps (on_events))
-                                       BrowseEvents (type.Events);
-
-                               if (type.HasNestedTypes)
-                                       BrowseTypes (type.NestedTypes);
-                       }
-               }
-
-               void BrowseFields (ICollection fields)
-               {
-                       foreach (FieldDefinition field in fields)
-                               DispatchField (field);
-               }
-
-               void BrowseMethods (ICollection methods)
-               {
-                       foreach (MethodDefinition method in methods)
-                               DispatchMethod (method);
-               }
-
-               void BrowseProperties (ICollection properties)
-               {
-                       foreach (PropertyDefinition property in properties)
-                               DispatchProperty (property);
-               }
-
-               void BrowseEvents (ICollection events)
-               {
-                       foreach (EventDefinition @event in events)
-                               DispatchEvent (@event);
-               }
-
-               void DispatchAssembly (AssemblyDefinition assembly)
-               {
-                       foreach (var substep in on_assemblies) {
-                               var bs = substep as BaseSubStep;
-                               if (bs != null)
-                                       bs.Annotations.Push (substep);
-                               substep.ProcessAssembly (assembly);
-                               if (bs != null)
-                                       bs.Annotations.Pop ();
-                       }
-               }
-
-               void DispatchType (TypeDefinition type)
-               {
-                       foreach (var substep in on_types) {
-                               var bs = substep as BaseSubStep;
-                               if (bs != null)
-                                       bs.Annotations.Push (substep);
-                               substep.ProcessType (type);
-                               if (bs != null)
-                                       bs.Annotations.Pop ();
-                       }
-               }
-
-               void DispatchField (FieldDefinition field)
-               {
-                       foreach (var substep in on_fields)
-                               substep.ProcessField (field);
-               }
-
-               void DispatchMethod (MethodDefinition method)
-               {
-                       foreach (var substep in on_methods)
-                               substep.ProcessMethod (method);
-               }
-
-               void DispatchProperty (PropertyDefinition property)
-               {
-                       foreach (var substep in on_properties)
-                               substep.ProcessProperty (property);
-               }
-
-               void DispatchEvent (EventDefinition @event)
-               {
-                       foreach (var substep in on_events)
-                               substep.ProcessEvent (@event);
-               }
-
-               void InitializeSubSteps (LinkContext context)
-               {
-                       foreach (var substep in substeps)
-                               substep.Initialize (context);
-               }
-
-               void CategorizeSubSteps (AssemblyDefinition assembly)
-               {
-                       on_assemblies = null;
-                       on_types = null;
-                       on_fields = null;
-                       on_methods = null;
-                       on_properties = null;
-                       on_events = null;
-
-                       foreach (var substep in substeps)
-                               CategorizeSubStep (substep, assembly);
-               }
-
-               void CategorizeSubStep (ISubStep substep, AssemblyDefinition assembly)
-               {
-                       if (!substep.IsActiveFor (assembly))
-                               return;
-
-                       CategorizeTarget (substep, SubStepTargets.Assembly, ref on_assemblies);
-                       CategorizeTarget (substep, SubStepTargets.Type, ref on_types);
-                       CategorizeTarget (substep, SubStepTargets.Field, ref on_fields);
-                       CategorizeTarget (substep, SubStepTargets.Method, ref on_methods);
-                       CategorizeTarget (substep, SubStepTargets.Property, ref on_properties);
-                       CategorizeTarget (substep, SubStepTargets.Event, ref on_events);
-               }
-
-               static void CategorizeTarget (ISubStep substep, SubStepTargets target, ref List<ISubStep> list)
-               {
-                       if (!Targets (substep, target))
-                               return;
-
-                       if (list == null)
-                               list = new List<ISubStep> ();
-
-                       list.Add (substep);
-               }
-
-               static bool Targets (ISubStep substep, SubStepTargets target)
-               {
-                       return (substep.Targets & target) == target;
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return GetEnumerator ();
-               }
-
-               public IEnumerator<ISubStep> GetEnumerator ()
-               {
-                       return substeps.GetEnumerator ();
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/Extensions.cs b/mcs/tools/tuner/Mono.Tuner/Extensions.cs
deleted file mode 100644 (file)
index 3e3b312..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-using Mono.Cecil;
-
-using Mono.Linker;
-
-namespace Mono.Tuner {
-
-       public static partial class Extensions {
-
-               public static bool TryGetLinkedAssembly (this LinkContext context, string name, out AssemblyDefinition assembly)
-               {
-                       assembly = GetAssembly (context, name);
-                       if (assembly == null)
-                               return false;
-
-                       return context.Annotations.GetAction (assembly) == AssemblyAction.Link;
-               }
-
-               public static AssemblyDefinition GetAssembly (this LinkContext context, string assembly_name)
-               {
-                       foreach (var assembly in context.GetAssemblies ())
-                               if (assembly.Name.Name == assembly_name)
-                                       return assembly;
-
-                       return null;
-               }
-
-               // note: direct check, no inheritance
-               public static bool Is (this TypeReference type, string @namespace, string name)
-               {
-                       return ((type != null) && (type.Name == name) && (type.Namespace == @namespace));
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/FilterAttributes.cs b/mcs/tools/tuner/Mono.Tuner/FilterAttributes.cs
deleted file mode 100644 (file)
index 19a334a..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-//
-// FilterAttributes.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2009 Novell, 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;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class FilterAttributes : BaseStep {
-
-               static Hashtable attributes = new Hashtable ();
-
-               static FilterAttributes ()
-               {
-                       FilterAttribute ("System.Runtime.InteropServices.ComVisibleAttribute");
-               }
-
-               static void FilterAttribute (string fullname)
-               {
-                       attributes.Add (fullname, null);
-               }
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       Filter (assembly);
-
-                       foreach (ModuleDefinition module in assembly.Modules)
-                               ProcessModule (module);
-               }
-
-               static void ProcessModule (ModuleDefinition module)
-               {
-                       Filter (module);
-
-                       foreach (TypeDefinition type in module.Types)
-                               ProcessType (type);
-               }
-
-               static void ProcessType (TypeDefinition type)
-               {
-                       if (type.HasFields)
-                               ProcessFields (type.Fields);
-
-                       if (type.HasMethods)
-                               ProcessMethods (type.Methods);
-
-                       if (type.HasEvents)
-                               ProcessEvents (type.Events);
-
-                       if (type.HasProperties)
-                               ProcessProperties (type.Properties);
-
-                       ProcessGenericParameters (type);
-               }
-
-               static void ProcessFields (ICollection fields)
-               {
-                       foreach (FieldDefinition field in fields)
-                               Filter (field);
-               }
-
-               static void ProcessMethods (ICollection methods)
-               {
-                       foreach (MethodDefinition method in methods)
-                               ProcessMethod (method);
-               }
-
-               static void ProcessMethod (MethodDefinition method)
-               {
-                       ProcessGenericParameters (method);
-
-                       Filter (method.MethodReturnType);
-
-                       if (method.HasParameters)
-                               ProcessParameters (method.Parameters);
-               }
-
-               static void ProcessParameters (ICollection parameters)
-               {
-                       foreach (ParameterDefinition parameter in parameters)
-                               Filter (parameter);
-               }
-
-               static void ProcessGenericParameters (IGenericParameterProvider provider)
-               {
-                       if (!provider.HasGenericParameters)
-                               return;
-
-                       foreach (GenericParameter parameter in provider.GenericParameters)
-                               Filter (parameter);
-               }
-
-               static void ProcessEvents (ICollection events)
-               {
-                       foreach (EventDefinition @event in events)
-                               Filter (@event);
-               }
-
-               static void ProcessProperties (ICollection properties)
-               {
-                       foreach (PropertyDefinition property in properties)
-                               Filter (property);
-               }
-
-               static void Filter (ICustomAttributeProvider provider)
-               {
-                       if (!provider.HasCustomAttributes)
-                               return;
-
-                       for (int i = 0; i < provider.CustomAttributes.Count; i++) {
-                               CustomAttribute attribute = provider.CustomAttributes [i];
-                               if (!IsFilteredAttribute (attribute))
-                                       continue;
-
-                               provider.CustomAttributes.RemoveAt (i--);
-                       }
-               }
-
-               static bool IsFilteredAttribute (CustomAttribute attribute)
-               {
-                       return attributes.Contains (attribute.Constructor.DeclaringType.FullName);
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/FixModuleFlags.cs b/mcs/tools/tuner/Mono.Tuner/FixModuleFlags.cs
deleted file mode 100644 (file)
index 2bb01ab..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class FixModuleFlags : BaseStep {
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       assembly.MainModule.Attributes = ModuleAttributes.ILOnly;
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/InjectSecurityAttributes.cs b/mcs/tools/tuner/Mono.Tuner/InjectSecurityAttributes.cs
deleted file mode 100644 (file)
index 9489876..0000000
+++ /dev/null
@@ -1,500 +0,0 @@
-//
-// InjectSecurityAttributes.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2009 Novell, 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;
-using System.IO;
-using System.Linq;
-using System.Text;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Tuner {
-
-       public class InjectSecurityAttributes : BaseStep {
-
-               enum TargetKind {
-                       Type,
-                       Method,
-               }
-
-               protected enum AttributeType {
-                       Critical,
-                       SafeCritical,
-               }
-
-               const string _safe_critical = "System.Security.SecuritySafeCriticalAttribute";
-               const string _critical = "System.Security.SecurityCriticalAttribute";
-               const string _system_void = "System.Void";
-
-               const string sec_attr_folder = "secattrs";
-
-               protected AssemblyDefinition _assembly;
-
-               MethodDefinition _safe_critical_ctor;
-               MethodDefinition _critical_ctor;
-               TypeDefinition _void_type;
-
-               string data_folder;
-
-               protected override bool ConditionToProcess ()
-               {
-                       if (!Context.HasParameter (sec_attr_folder)) {
-                               Console.Error.WriteLine ("Warning: no secattrs folder specified.");
-                               return false;
-                       }
-
-                       data_folder = Context.GetParameter (sec_attr_folder);
-                       return true;
-               }
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       string secattr_file = Path.Combine (
-                               data_folder,
-                               assembly.Name.Name + ".secattr");
-
-                       if (!File.Exists (secattr_file)) {
-                               Console.Error.WriteLine ("Warning: file '{0}' not found, skipping.", secattr_file);
-                               return;
-                       }
-
-                       _assembly = assembly;
-
-                       // remove existing [SecurityCritical] and [SecuritySafeCritical]
-                       RemoveSecurityAttributes ();
-
-                       // add [SecurityCritical] and [SecuritySafeCritical] from the data file
-                       ProcessSecurityAttributeFile (secattr_file);
-               }
-
-               protected void RemoveSecurityAttributes ()
-               {
-                       foreach (TypeDefinition type in _assembly.MainModule.Types) {
-                               if (RemoveSecurityAttributes (type))
-                                       type.HasSecurity = false;
-
-                               if (type.HasMethods) {
-                                       foreach (MethodDefinition method in type.Methods) {
-                                               if (RemoveSecurityAttributes (method))
-                                                       method.HasSecurity = false;
-                                       }
-                               }
-                       }
-               }
-
-               static bool RemoveSecurityDeclarations (ISecurityDeclarationProvider provider)
-               {
-                       // also remove already existing CAS security declarations
-
-                       if (provider == null)
-                               return false;
-
-                       if (!provider.HasSecurityDeclarations)
-                               return false;
-
-                       provider.SecurityDeclarations.Clear ();
-                       return true;
-               }
-
-               static bool RemoveSecurityAttributes (ICustomAttributeProvider provider)
-               {
-                       bool result = RemoveSecurityDeclarations (provider as ISecurityDeclarationProvider);
-
-                       if (!provider.HasCustomAttributes)
-                               return result;
-
-                       var attributes = provider.CustomAttributes;
-                       for (int i = 0; i < attributes.Count; i++) {
-                               CustomAttribute attribute = attributes [i];
-                               switch (attribute.Constructor.DeclaringType.FullName) {
-                               case _safe_critical:
-                               case _critical:
-                                       attributes.RemoveAt (i--);
-                                       break;
-                               }
-                       }
-                       return result;
-               }
-
-               void ProcessSecurityAttributeFile (string file)
-               {
-                       using (StreamReader reader = File.OpenText (file)) {
-                               string line;
-                               while ((line = reader.ReadLine ()) != null)
-                                       ProcessLine (line);
-                       }
-               }
-
-               void ProcessLine (string line)
-               {
-                       if (line == null || line.Length < 6 || line [0] == '#')
-                               return;
-
-                       int sep = line.IndexOf (": ");
-                       if (sep == -1)
-                               return;
-
-                       string marker = line.Substring (0, sep);
-                       string target = line.Substring (sep + 2);
-
-                       ProcessSecurityAttributeEntry (
-                               DecomposeAttributeType (marker),
-                               DecomposeTargetKind (marker),
-                               target);
-               }
-
-               static AttributeType DecomposeAttributeType (string marker)
-               {
-                       if (marker.StartsWith ("SC"))
-                               return AttributeType.Critical;
-                       else if (marker.StartsWith ("SSC"))
-                               return AttributeType.SafeCritical;
-                       else
-                               throw new ArgumentException ();
-               }
-
-               static TargetKind DecomposeTargetKind (string marker)
-               {
-                       switch (marker [marker.Length - 1]) {
-                       case 'T':
-                               return TargetKind.Type;
-                       case 'M':
-                               return TargetKind.Method;
-                       default:
-                               throw new ArgumentException ();
-                       }
-               }
-
-               public static bool NeedsDefaultConstructor (TypeDefinition type)
-               {
-                       if (type.IsInterface)
-                               return false;
-
-                       TypeReference base_type = type.BaseType;
-                       if ((base_type == null) || (base_type.Namespace != "System"))
-                               return true;
-
-                       return ((base_type.Name != "Delegate") && (base_type.Name != "MulticastDelegate"));
-               }
-
-               void ProcessSecurityAttributeEntry (AttributeType type, TargetKind kind, string target)
-               {
-                       ICustomAttributeProvider provider = GetTarget (kind, target);
-                       if (provider == null) {
-                               Console.Error.WriteLine ("Warning: entry '{0}' could not be found", target);
-                               return;
-                       }
-
-                       // we need to be smarter when applying the attributes (mostly SC) to types
-                       if (kind == TargetKind.Type) {
-                               TypeDefinition td = (provider as TypeDefinition);
-                               // ensure [SecurityCritical] types (well most) have a default constructor
-                               if ((type == AttributeType.Critical) && NeedsDefaultConstructor (td)) {
-                                       if (GetDefaultConstructor (td) == null) {
-                                               // Console.Error.WriteLine ("Info: adding default ctor for '{0}'", td);
-                                               td.Methods.Add (CreateDefaultConstructor ());
-                                       }
-                               }
-
-                               // it's easier for some tools (e.g. less false positives in fxcop) 
-                               // and also quicker for the runtime (one less lookup) if all methods gets decorated
-                               foreach (MethodDefinition method in td.Methods) {
-                                       bool skip = false;
-
-                                       AttributeType mtype = type;
-                                       // there are cases where an SC cannot be applied to some methods
-                                       switch (method.Name) {
-                                       // e.g. everything we override from System.Object (which is transparent)
-                                       case "Equals":
-                                               skip = method.Parameters.Count == 1 && method.Parameters [0].ParameterType.FullName == "System.Object";
-                                               break;
-                                       case "Finalize":
-                                       case "GetHashCode":
-                                       case "ToString":
-                                               skip = !method.HasParameters;
-                                               break;
-                                       // e.g. some transparent interfaces, like IDisposable (implicit or explicit)
-                                       // downgrade some SC into SSC to respect the override/inheritance rules
-                                       case "System.IDisposable.Dispose":
-                                       case "Dispose":
-                                               skip = !method.HasParameters;
-                                               break;
-                                       }
-
-                                       if (skip)
-                                               continue;
-
-                                       switch (mtype) {
-                                       case AttributeType.Critical:
-                                               AddCriticalAttribute (method);
-                                               break;
-                                       case AttributeType.SafeCritical:
-                                               AddSafeCriticalAttribute (method);
-                                               break;
-                                       }
-                               }
-                       }
-
-                       switch (type) {
-                       case AttributeType.Critical:
-                               AddCriticalAttribute (provider);
-                               break;
-                       case AttributeType.SafeCritical:
-                               AddSafeCriticalAttribute (provider);
-                               break;
-                       }
-               }
-
-               protected void AddCriticalAttribute (ICustomAttributeProvider provider)
-               {
-                       // a [SecurityCritical] replaces a [SecuritySafeCritical]
-                       if (HasSecurityAttribute (provider, AttributeType.SafeCritical))
-                               RemoveSecurityAttributes (provider);
-
-                       AddSecurityAttribute (provider, AttributeType.Critical);
-               }
-
-               void AddSafeCriticalAttribute (ICustomAttributeProvider provider)
-               {
-                       // a [SecuritySafeCritical] is ignored if a [SecurityCritical] is present
-                       if (HasSecurityAttribute (provider, AttributeType.Critical))
-                               return;
-
-                       AddSecurityAttribute (provider, AttributeType.SafeCritical);
-               }
-
-               void AddSecurityAttribute (ICustomAttributeProvider provider, AttributeType type)
-               {
-                       if (HasSecurityAttribute (provider, type))
-                               return;
-
-                       var attributes = provider.CustomAttributes;
-                       switch (type) {
-                       case AttributeType.Critical:
-                               attributes.Add (CreateCriticalAttribute ());
-                               break;
-                       case AttributeType.SafeCritical:
-                               attributes.Add (CreateSafeCriticalAttribute ());
-                               break;
-                       }
-               }
-
-               protected static bool HasSecurityAttribute (ICustomAttributeProvider provider, AttributeType type)
-               {
-                       if (!provider.HasCustomAttributes)
-                               return false;
-
-                       foreach (CustomAttribute attribute in provider.CustomAttributes) {
-                               switch (attribute.Constructor.DeclaringType.Name) {
-                               case _critical:
-                                       if (type == AttributeType.Critical)
-                                               return true;
-
-                                       break;
-                               case _safe_critical:
-                                       if (type == AttributeType.SafeCritical)
-                                               return true;
-
-                                       break;
-                               }
-                       }
-
-                       return false;
-               }
-
-               ICustomAttributeProvider GetTarget (TargetKind kind, string target)
-               {
-                       switch (kind) {
-                       case TargetKind.Type:
-                               return GetType (target);
-                       case TargetKind.Method:
-                               return GetMethod (target);
-                       default:
-                               throw new ArgumentException ();
-                       }
-               }
-
-               TypeDefinition GetType (string fullname)
-               {
-                       return _assembly.MainModule.GetType (fullname);
-               }
-
-               MethodDefinition GetMethod (string signature)
-               {
-                       int pos = signature.IndexOf (" ");
-                       if (pos == -1)
-                               throw new ArgumentException ();
-
-                       string tmp = signature.Substring (pos + 1);
-
-                       pos = tmp.IndexOf ("::");
-                       if (pos == -1)
-                               throw new ArgumentException ();
-
-                       string type_name = tmp.Substring (0, pos);
-
-                       int parpos = tmp.IndexOf ("(");
-                       if (parpos == -1)
-                               throw new ArgumentException ();
-
-                       string method_name = tmp.Substring (pos + 2, parpos - pos - 2);
-
-                       TypeDefinition type = GetType (type_name);
-                       if (type == null)
-                               return null;
-
-                       return GetMethod (type.Methods, signature);
-               }
-
-               static MethodDefinition GetMethod (IEnumerable methods, string signature)
-               {
-                       foreach (MethodDefinition method in methods)
-                               if (GetFullName (method) == signature)
-                                       return method;
-
-                       return null;
-               }
-
-               static string GetFullName (MethodReference method)
-               {
-                       var sentinel = method.Parameters.FirstOrDefault (p => p.ParameterType.IsSentinel);
-                       var sentinel_pos = -1;
-                       if (sentinel != null)
-                               sentinel_pos = method.Parameters.IndexOf (sentinel);
-
-                       StringBuilder sb = new StringBuilder ();
-                       sb.Append (method.ReturnType.FullName);
-                       sb.Append (" ");
-                       sb.Append (method.DeclaringType.FullName);
-                       sb.Append ("::");
-                       sb.Append (method.Name);
-                       if (method.HasGenericParameters) {
-                               sb.Append ("<");
-                               for (int i = 0; i < method.GenericParameters.Count; i++ ) {
-                                       if (i > 0)
-                                               sb.Append (",");
-                                       sb.Append (method.GenericParameters [i].Name);
-                               }
-                               sb.Append (">");
-                       }
-                       sb.Append ("(");
-                       if (method.HasParameters) {
-                               for (int i = 0; i < method.Parameters.Count; i++) {
-                                       if (i > 0)
-                                               sb.Append (",");
-
-                                       if (i == sentinel_pos)
-                                               sb.Append ("...,");
-
-                                       sb.Append (method.Parameters [i].ParameterType.FullName);
-                               }
-                       }
-                       sb.Append (")");
-                       return sb.ToString ();
-               }
-
-               static MethodDefinition GetDefaultConstructor (TypeDefinition type)
-               {
-                       foreach (MethodDefinition ctor in type.Methods.Where (m => m.IsConstructor))
-                               if (!ctor.IsStatic && !ctor.HasParameters)
-                                       return ctor;
-
-                       return null;
-               }
-
-               MethodDefinition GetSafeCriticalCtor ()
-               {
-                       if (_safe_critical_ctor != null)
-                               return _safe_critical_ctor;
-
-                       TypeDefinition safe_critical_type = Context.GetType (_safe_critical);
-                       if (safe_critical_type == null)
-                               throw new InvalidOperationException (String.Format ("{0} type not found", _safe_critical));
-
-                       _safe_critical_ctor = GetDefaultConstructor (safe_critical_type);
-                       return _safe_critical_ctor;
-               }
-
-               MethodDefinition GetCriticalCtor ()
-               {
-                       if (_critical_ctor != null)
-                               return _critical_ctor;
-
-                       TypeDefinition critical_type = Context.GetType (_critical);
-                       if (critical_type == null)
-                               throw new InvalidOperationException (String.Format ("{0} type not found", _critical));
-
-                       _critical_ctor = GetDefaultConstructor (critical_type);
-                       return _critical_ctor;
-               }
-
-               TypeDefinition GetSystemVoid ()
-               {
-                       if (_void_type != null)
-                               return _void_type;
-
-                       _void_type = Context.GetType (_system_void);
-                       if (_void_type == null)
-                               throw new InvalidOperationException (String.Format ("{0} type not found", _system_void));
-
-                       return _void_type;
-               }
-
-               MethodReference Import (MethodDefinition method)
-               {
-                       return _assembly.MainModule.Import (method);
-               }
-
-               CustomAttribute CreateSafeCriticalAttribute ()
-               {
-                       return new CustomAttribute (Import (GetSafeCriticalCtor ()));
-               }
-
-               CustomAttribute CreateCriticalAttribute ()
-               {
-                       return new CustomAttribute (Import (GetCriticalCtor ()));
-               }
-
-               MethodDefinition CreateDefaultConstructor ()
-               {
-                       MethodDefinition method = new MethodDefinition (".ctor", 
-                               MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName, 
-                               GetSystemVoid ());
-                       method.Body.Instructions.Add (Instruction.Create (OpCodes.Ret));
-                       return method;
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/MarkNSObjectsBase.cs b/mcs/tools/tuner/Mono.Tuner/MarkNSObjectsBase.cs
deleted file mode 100644 (file)
index 9d65be1..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-//
-// MarkNSObjectsBase.cs
-//
-// Authors:
-//     Jb Evain (jbevain@novell.com)
-//     Sebastien Pouliot  <sebastien@xamarin.com>
-//
-// (C) 2009 Novell, Inc.
-// Copyright (C) 2011 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;
-using System.Collections.Generic;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Tuner;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public abstract class MarkNSObjectsBase : BaseSubStep {
-
-               protected abstract string ExportAttribute { get; }
-
-               public override SubStepTargets Targets {
-                       get { return SubStepTargets.Type; }
-               }
-
-               public override void ProcessType (TypeDefinition type)
-               {
-                       if (!IsProductType (type)) {
-                               Annotations.Mark (type);
-                               Annotations.SetPreserve (type, TypePreserve.All);
-                       } else
-                               PreserveProductType (type);
-               }
-
-               void PreserveProductType (TypeDefinition type)
-               {
-                       PreserveIntPtrConstructor (type);
-                       PreserveExportedMethods (type);
-               }
-
-               void PreserveExportedMethods (TypeDefinition type)
-               {
-                       if (!type.HasMethods)
-                               return;
-
-                       foreach (var method in type.GetMethods ()) {
-                               if (!IsExportedMethod (method))
-                                       continue;
-
-                               if (!IsOverridenInUserCode (method))
-                                       continue;
-
-                               PreserveMethod (type, method);
-                       }
-               }
-
-               bool IsOverridenInUserCode (MethodDefinition method)
-               {
-                       if (!method.IsVirtual)
-                               return false;
-
-                       var overrides = Annotations.GetOverrides (method);
-                       if (overrides == null || overrides.Count == 0)
-                               return false;
-
-                       foreach (MethodDefinition @override in overrides)
-                               if (!IsProductMethod (@override))
-                                       return true;
-
-                       return false;
-               }
-
-               bool IsExportedMethod (MethodDefinition method)
-               {
-                       return HasExportAttribute (method);
-               }
-
-               bool HasExportAttribute (ICustomAttributeProvider provider)
-               {
-                       if (!provider.HasCustomAttributes)
-                               return false;
-
-                       foreach (CustomAttribute attribute in provider.CustomAttributes)
-                               if (attribute.AttributeType.FullName == ExportAttribute)
-                                       return true;
-
-                       return false;
-               }
-
-               void PreserveIntPtrConstructor (TypeDefinition type)
-               {
-                       if (!type.HasMethods)
-                               return;
-
-                       foreach (MethodDefinition constructor in type.GetConstructors ()) {
-                               if (!constructor.HasParameters)
-                                       continue;
-
-                               if (constructor.Parameters.Count != 1 || constructor.Parameters [0].ParameterType.FullName != "System.IntPtr")
-                                       continue;
-
-                               PreserveMethod (type, constructor);
-                               break; // only one .ctor can match this
-                       }
-               }
-
-               void PreserveMethod (TypeDefinition type, MethodDefinition method)
-               {
-                       Annotations.AddPreservedMethod (type, method);
-               }
-
-               static bool IsProductMethod (MethodDefinition method)
-               {
-                       return IsProductType (method.DeclaringType);
-               }
-
-               static bool IsProductType (TypeDefinition type)
-               {
-                       return Profile.IsProductAssembly (type.Module.Assembly);
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/MoonlightA11yApiMarker.cs b/mcs/tools/tuner/Mono.Tuner/MoonlightA11yApiMarker.cs
deleted file mode 100644 (file)
index fcd61af..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// MoonlightA11yApiMarker.cs
-//
-// Author:
-//   Andrés G. Aragoneses (aaragoneses@novell.com)
-//
-// (C) 2009 Novell, 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;
-using System.Xml;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class MoonlightA11yApiMarker : MarkStep {
-
-               bool IsA11yAssembly (AssemblyDefinition assembly)
-               {
-                       return assembly.ToString ().Contains ("DummyEntry") || assembly.ToString ().Contains ("MoonAtkBridge");
-               }
-
-               protected override void InitializeAssembly (AssemblyDefinition assembly)
-               {
-                       if (IsA11yAssembly (assembly))
-                               base.InitializeAssembly (assembly);
-               }
-
-               protected override void EnqueueMethod (MethodDefinition method)
-               {
-                       if (IsA11yAssembly (method.DeclaringType.Module.Assembly))
-                               base.EnqueueMethod (method);
-                       else
-                               Annotations.Mark (method);
-               }
-
-               protected override bool IgnoreScope (IMetadataScope scope)
-               {
-                       return false;
-               }
-
-               protected override TypeDefinition MarkType (TypeReference reference)
-               {
-                       if (reference == null)
-                               throw new ArgumentNullException ("reference");
-
-                       reference = GetOriginalType (reference);
-
-                       if (reference is GenericParameter)
-                               return null;
-
-                       TypeDefinition type = reference.Resolve ();
-
-                       if (type == null)
-                               throw new ResolutionException (reference);
-
-                       if (CheckProcessed (type))
-                               return type;
-
-                       Annotations.Mark (type);
-                       return type;
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/MoonlightA11yAssemblyStep.cs b/mcs/tools/tuner/Mono.Tuner/MoonlightA11yAssemblyStep.cs
deleted file mode 100644 (file)
index 63a82b2..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// MoonlightA11yAssemblyStep.cs
-//
-// Author:
-//   Andrés G. Aragoneses (aaragoneses@novell.com)
-//
-// (C) 2009 Novell, 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;
-using System.IO;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class MoonlightA11yAssemblyStep : MoonlightAssemblyStep {
-
-               protected override void CustomizePipeline (Pipeline pipeline)
-               {
-                       pipeline.RemoveStep (typeof (LoadI18nAssemblies));
-                       pipeline.RemoveStep (typeof (BlacklistStep));
-                       pipeline.RemoveStep (typeof (MarkStep));
-                       pipeline.RemoveStep (typeof (SweepStep));
-                       pipeline.RemoveStep (typeof (CleanStep));
-                       pipeline.RemoveStep (typeof (RegenerateGuidStep));
-                       pipeline.AddStepBefore (typeof (OutputStep), new MoonlightA11yProcessor ());
-               }
-
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/MoonlightA11yDescriptorGenerator.cs b/mcs/tools/tuner/Mono.Tuner/MoonlightA11yDescriptorGenerator.cs
deleted file mode 100644 (file)
index 17db23b..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-//
-// MoonlightA11yDescriptorGenerator.cs
-//
-// Author:
-//   Andrés G. Aragoneses (aaragoneses@novell.com)
-//
-// (C) 2009 Novell, 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;
-using System.Collections.Generic;
-
-using System.IO;
-using System.Text.RegularExpressions;
-using System.Text;
-
-using System.Xml;
-using System.Xml.XPath;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class MoonlightA11yDescriptorGenerator : BaseStep {
-
-               XmlTextWriter writer = null;
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (assembly.Name.Name == "MoonAtkBridge" || assembly.Name.Name == "System.Windows" ||
-                           assembly.Name.Name.Contains ("Dummy"))
-                               return;
-
-                       if (writer == null) {
-                               if (!Directory.Exists (Context.OutputDirectory))
-                                       Directory.CreateDirectory (Context.OutputDirectory);
-
-                               string file_name = "descriptors.xml";
-                               string file_path = Path.Combine (Context.OutputDirectory, file_name);
-                               if (File.Exists (file_path))
-                                       File.Delete (file_path);
-                               FileStream xml_file = new FileStream (file_path, FileMode.OpenOrCreate);
-                               Console.WriteLine ("Created file {0}", file_name);
-                               Console.Write ("Writing contents...");
-
-                               writer = new XmlTextWriter (xml_file, System.Text.Encoding.UTF8);
-                               writer.Formatting = Formatting.Indented;
-                               writer.WriteStartElement("linker");
-                       }
-
-                       SortedDictionary <TypeDefinition, IList> types = ScanAssembly (assembly);
-                       if (types != null && types.Count > 0) {
-                               writer.WriteStartElement("assembly");
-                               writer.WriteAttributeString ("fullname", assembly.Name.Name);
-
-                               foreach (TypeDefinition type in types.Keys) {
-                                       IList members = types [type];
-                                       if (members != null && members.Count > 0) {
-                                               writer.WriteStartElement("type");
-                                               writer.WriteAttributeString ("fullname", type.FullName);
-
-                                               foreach (IMetadataTokenProvider member in members) {
-                                                       MethodDefinition method = member as MethodDefinition;
-                                                       if (method != null) {
-                                                               writer.WriteStartElement("method");
-                                                               writer.WriteAttributeString ("signature",
-                                                                                            method.ReturnType.FullName + " " +
-                                                                                            method.Name + GetMethodParams (method));
-                                                               writer.WriteEndElement ();
-                                                               continue;
-                                                       }
-
-                                                       FieldDefinition field = member as FieldDefinition;
-                                                       if (field != null) {
-                                                               writer.WriteStartElement("field");
-                                                               writer.WriteAttributeString ("signature", field.DeclaringType.FullName + " " + field.Name);
-                                                               writer.WriteEndElement ();
-                                                       }
-                                               }
-                                               writer.WriteEndElement ();
-                                       }
-                               }
-
-                               writer.WriteEndElement ();
-                               Console.WriteLine ();
-                       }
-
-               }
-
-               protected override void EndProcess ()
-               {
-                       Console.WriteLine ();
-
-                       foreach (FileStream stream in streams)
-                               stream.Close ();
-
-                       if (writer != null) {
-                               writer.WriteEndElement ();
-                               writer.Close ();
-                               writer = null;
-                       }
-               }
-
-               //this is almost the ToString method of MethodDefinition...
-               private string GetMethodParams (MethodDefinition method)
-               {
-                       string @params = "(";
-                       if (method.HasParameters) {
-                               for (int i = 0; i < method.Parameters.Count; i++) {
-                                       if (i > 0)
-                                               @params += ",";
-
-                                       @params += method.Parameters [i].ParameterType.FullName;
-                               }
-                       }
-                       @params += ")";
-                       return @params;
-               }
-
-               SortedDictionary<TypeDefinition, IList> /*,List<IAnnotationProvider>>*/ ScanAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return null;
-
-                       SortedDictionary<TypeDefinition, IList> members_used = new SortedDictionary<TypeDefinition, IList> (new TypeComparer ());
-                       foreach (TypeDefinition type in assembly.MainModule.Types) {
-                               IList used_providers = FilterPublicMembers (ScanType (type));
-                               if (used_providers.Count > 0)
-                                       members_used [type] = used_providers;
-                               else if (IsInternal (type, true) &&
-                                        Annotations.IsMarked (type))
-                                       throw new NotSupportedException (String.Format ("The type {0} is used while its API is not", type.ToString ()));
-                       }
-                       return members_used;
-               }
-
-               IList ScanType (TypeDefinition type)
-               {
-                       return ExtractUsedProviders (type.Methods, type.Fields);
-               }
-
-               static IList FilterPublicMembers (IList members)
-               {
-                       IList new_list = new ArrayList ();
-                       foreach (MemberReference item in members)
-                               if (IsInternal (item, true))
-                                       new_list.Add (item);
-
-                       return new_list;
-               }
-
-               static string [] master_infos = Directory.GetFiles (Environment.CurrentDirectory, "*.info");
-
-               static string FindMasterInfoFile (string name)
-               {
-                       if (master_infos.Length == 0)
-                               throw new Exception ("No masterinfo files found in current directory");
-
-                       foreach (string file in master_infos) {
-                               if (file.EndsWith (name + ".info"))
-                                       return file;
-                       }
-
-                       return null;
-               }
-
-               const string xpath_init = "assemblies/assembly/namespaces/namespace[@name='{0}']/classes/class[@name='{1}']";
-
-               static string GetXPathSearchForType (TypeDefinition type)
-               {
-                       TypeDefinition parent_type = type;
-                       string xpath = String.Empty;
-                       while (parent_type.DeclaringType != null) {
-                               xpath = String.Format ("/classes/class[@name='{0}']", parent_type.Name) + xpath;
-                               parent_type = parent_type.DeclaringType;
-                       }
-                       return String.Format (xpath_init, parent_type.Namespace, parent_type.Name) + xpath;
-               }
-
-               static bool IsInternal (MemberReference member, bool master_info)
-               {
-                       TypeDefinition type = null;
-                       string master_info_file = null;
-
-                       if (member is TypeDefinition) {
-                               type = member as TypeDefinition;
-                               if (!master_info)
-                                       return (!type.IsNested && !type.IsPublic) ||
-                                              (type.IsNested && (!type.IsNestedPublic || IsInternal (type.DeclaringType, false)));
-
-                               master_info_file = FindMasterInfoFile (type.Module.Assembly.Name.Name);
-                               if (master_info_file == null)
-                                       return IsInternal (member, false);
-
-                               return !NodeExists (master_info_file, GetXPathSearchForType (type));
-                       }
-
-                       type = member.DeclaringType.Resolve ();
-
-                       if (IsInternal (type, master_info))
-                               return true;
-
-                       MethodDefinition method = member as MethodDefinition;
-                       FieldDefinition field = member as FieldDefinition;
-
-                       if (field == null && method == null)
-                               throw new System.NotSupportedException ("Members to scan should be methods or fields");
-
-                       if (!master_info) {
-
-                               if (method != null)
-                                       return !method.IsPublic;
-
-                               return !field.IsPublic;
-                       }
-
-                       master_info_file = FindMasterInfoFile (type.Module.Assembly.Name.Name);
-                       if (master_info_file == null)
-                               return IsInternal (member, false);
-
-                       string xpath_type = GetXPathSearchForType (type);
-                       string name;
-                       if (field != null)
-                               name = field.Name;
-                       else {
-                               name = method.ToString ();
-
-                               //lame, I know...
-                               name = WackyOutArgs (WackyCommas (name.Substring (name.IndexOf ("::") + 2)
-                                                   .Replace ("/", "+") // nested classes
-                                                   .Replace ('<', '[').Replace ('>', ']'))); //generic params
-                       }
-
-                       if (field != null || !IsPropertyMethod (method))
-                               return !NodeExists (master_info_file, xpath_type + String.Format ("/*/*[@name='{0}']", name));
-
-                       return !NodeExists (master_info_file, xpath_type + String.Format ("/properties/*/*/*[@name='{0}']", name));
-               }
-
-               //at some point I want to get rid of this method and ask cecil's maintainer to spew commas in a uniform way...
-               static string WackyCommas (string method)
-               {
-                       string outstring = String.Empty;
-                       bool square_bracket = false;
-                       foreach (char c in method) {
-                               if (c == '[')
-                                       square_bracket = true;
-                               else if (c == ']')
-                                       square_bracket = false;
-
-                               outstring = outstring + c;
-
-                               if (c == ',' && !square_bracket)
-                                       outstring = outstring + " ";
-                       }
-                       return outstring;
-               }
-
-               //ToString() spews & but not 'out' keyword
-               static string WackyOutArgs (string method)
-               {
-                       return Regex.Replace (method, @"\w+&", delegate (Match m) { return "out " + m.ToString (); });
-               }
-
-               //copied from MarkStep (violating DRY unless I can put this in a better place... Cecil?)
-               static bool IsPropertyMethod (MethodDefinition md)
-               {
-                       return (md.SemanticsAttributes & MethodSemanticsAttributes.Getter) != 0 ||
-                               (md.SemanticsAttributes & MethodSemanticsAttributes.Setter) != 0;
-               }
-
-               static Dictionary<string, XPathNavigator> navs = new Dictionary<string, XPathNavigator> ();
-               static List<FileStream> streams = new List<FileStream> ();
-
-               static bool NodeExists (string file, string xpath)
-               {
-                       Console.Write (".");
-                       //Console.WriteLine ("Looking for node {0} in file {1}", xpath, file.Substring (file.LastIndexOf ("/") + 1));
-
-                       XPathNavigator nav = null;
-                       if (!navs.TryGetValue (file, out nav)) {
-                               FileStream stream = new FileStream (file, FileMode.Open);
-                               XPathDocument document = new XPathDocument (stream);
-                               nav = document.CreateNavigator ();
-                               streams.Add (stream);
-                               navs [file] = nav;
-                       }
-                       return nav.SelectSingleNode (xpath) != null;
-               }
-
-               IList /*List<IAnnotationProvider>*/ ExtractUsedProviders (params IList[] members)
-               {
-                       IList used = new ArrayList ();
-                       if (members == null || members.Length == 0)
-                               return used;
-
-                       foreach (IList members_list in members)
-                               foreach (IMetadataTokenProvider provider in members_list)
-                                       if (Annotations.IsMarked (provider))
-                                               used.Add (provider);
-
-                       return used;
-               }
-
-               class TypeComparer : IComparer <TypeDefinition> {
-
-                       public int Compare (TypeDefinition x, TypeDefinition y)
-                       {
-                               return string.Compare (x.ToString (), y.ToString ());
-                       }
-
-               }
-
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/MoonlightA11yProcessor.cs b/mcs/tools/tuner/Mono.Tuner/MoonlightA11yProcessor.cs
deleted file mode 100644 (file)
index 2971b11..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-//
-// MoonlightA11yProcessor.cs
-//
-// Author:
-//   Andrés G. Aragoneses (aaragoneses@novell.com)
-//
-// (C) 2009 Novell, 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.Linq;
-
-using Mono.Cecil;
-
-using Mono.Linker;
-
-namespace Mono.Tuner {
-
-       public class MoonlightA11yProcessor : InjectSecurityAttributes {
-
-               protected override bool ConditionToProcess ()
-               {
-                       return true;
-               }
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       _assembly = assembly;
-
-                       // remove existing [SecurityCritical] and [SecuritySafeCritical]
-                       RemoveSecurityAttributes ();
-
-                       // add [SecurityCritical]
-                       AddSecurityAttributes ();
-
-                       // convert all public members into internal
-                       MakeApiInternal ();
-               }
-
-               void MakeApiInternal ()
-               {
-                       foreach (TypeDefinition type in _assembly.MainModule.Types) {
-                               if (type.IsPublic)
-                                       type.IsPublic = false;
-
-                               if (type.HasMethods && !type.Name.EndsWith ("Adapter"))
-                                       foreach (MethodDefinition ctor in type.Methods.Where (m => m.IsConstructor))
-                                               if (ctor.IsPublic)
-                                                       ctor.IsAssembly = true;
-
-                               if (type.HasMethods)
-                                       foreach (MethodDefinition method in type.Methods.Where (m => !m.IsConstructor))
-                                               if (method.IsPublic)
-                                                       method.IsAssembly = true;
-                       }
-               }
-
-               void AddSecurityAttributes ()
-               {
-                       foreach (TypeDefinition type in _assembly.MainModule.Types) {
-                               AddCriticalAttribute (type);
-
-                               if (type.HasMethods)
-                                       foreach (MethodDefinition ctor in type.Methods.Where (m => m.IsConstructor))
-                                               AddCriticalAttribute (ctor);
-
-                               if (type.HasMethods)
-                                       foreach (MethodDefinition method in type.Methods.Where (m => !m.IsConstructor)) {
-                                               MethodDefinition parent = null;
-
-                                               //TODO: take in account generic params
-                                               if (!method.HasGenericParameters) {
-
-                                                       /*
-                                                        * we need to scan base methods because the CoreCLR complains about SC attribs added
-                                                        * to overriden methods whose base (virtual or interface) method is not marked as SC
-                                                        * with TypeLoadExceptions
-                                                        */
-                                                       parent = GetBaseMethod (type, method);
-                                               }
-
-                                               //if there's no base method
-                                               if (parent == null ||
-
-                                               //if it's our bridge assembly, we're sure it will (finally, at the end of the linking process) have the SC attrib
-                                                   _assembly.MainModule.Types.Contains (parent.DeclaringType) ||
-
-                                               //if the type is in the moonlight assemblies, check if it has the SC attrib
-                                                   HasSecurityAttribute (parent, AttributeType.Critical))
-
-                                                       AddCriticalAttribute (method);
-                               }
-
-                       }
-               }
-
-               MethodDefinition GetBaseMethod (TypeDefinition finalType, MethodDefinition final)
-               {
-                       // both GetOverridenMethod and GetInterfaceMethod return null if there is no base method
-                       return GetOverridenMethod (finalType, final) ?? GetInterfaceMethod (finalType, final);
-               }
-
-               //note: will not return abstract methods
-               MethodDefinition GetOverridenMethod (TypeDefinition finalType, MethodDefinition final)
-               {
-                       TypeReference baseType = finalType.BaseType;
-                       while (baseType != null && baseType.Resolve () != null) {
-                               foreach (MethodDefinition method in baseType.Resolve ().Methods) {
-                                       if (!method.IsVirtual || method.Name != final.Name)
-                                               continue;
-
-                                       //TODO: should we discard them?
-                                       if (method.IsAbstract)
-                                               continue;
-
-                                       if (HasSameSignature (method, final))
-                                               return method;
-                               }
-                               baseType = baseType.Resolve().BaseType;
-                       }
-                       return null;
-               }
-
-               MethodDefinition GetInterfaceMethod (TypeDefinition finalType, MethodDefinition final)
-               {
-                       TypeDefinition baseType = finalType;
-                       while (baseType != null) {
-                               if (baseType.HasInterfaces)
-                                       foreach (var @interface in baseType.Interfaces)
-                                               foreach (MethodDefinition method in @interface.InterfaceType.Resolve ().Methods)
-                                                       if (method.Name == final.Name && HasSameSignature (method, final))
-                                                               return method;
-
-                               baseType = baseType.BaseType == null ? null : baseType.BaseType.Resolve ();
-                       }
-                       return null;
-               }
-
-               bool HasSameSignature (MethodDefinition method1, MethodDefinition method2)
-               {
-                       if (method1.ReturnType.FullName != method2.ReturnType.FullName)
-                               return false;
-
-                       if (method1.Parameters.Count != method2.Parameters.Count)
-                               return false;
-
-                       for (int i = 0; i < method1.Parameters.Count; i++) {
-                               if (method1.Parameters [i].ParameterType.FullName !=
-                                   method2.Parameters [i].ParameterType.FullName)
-                                       return false;
-                       }
-
-                       return true;
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/MoonlightA11yUsageInspectionStep.cs b/mcs/tools/tuner/Mono.Tuner/MoonlightA11yUsageInspectionStep.cs
deleted file mode 100644 (file)
index 27aa4a2..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// MoonlightA11yUsageInspectionStep.cs
-//
-// Author:
-//   Andrés G. Aragoneses (aaragoneses@novell.com)
-//
-// (C) 2009 Novell, 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;
-using System.IO;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class MoonlightA11yUsageInspectionStep : MoonlightAssemblyStep {
-
-               protected override void CustomizePipeline (Pipeline pipeline)
-               {
-                       pipeline.ReplaceStep (typeof (MarkStep), new MoonlightA11yApiMarker ());
-                       pipeline.ReplaceStep (typeof (SweepStep), new MoonlightA11yDescriptorGenerator ());
-                       pipeline.RemoveStep (typeof (LoadI18nAssemblies));
-                       pipeline.RemoveStep (typeof (CleanStep));
-                       pipeline.RemoveStep (typeof (RegenerateGuidStep));
-                       pipeline.RemoveStep (typeof (OutputStep));
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/MoonlightAssemblyStep.cs b/mcs/tools/tuner/Mono.Tuner/MoonlightAssemblyStep.cs
deleted file mode 100644 (file)
index fc98536..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// MoonlightAssemblyStep.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2009 Novell, 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;
-using System.IO;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class MoonlightAssemblyStep : IStep {
-
-               public void Process (LinkContext context)
-               {
-                       CustomizePipeline (context.Pipeline);
-                       ProcessAssemblies (context);
-               }
-
-               static void ProcessAssemblies (LinkContext context)
-               {
-                       foreach (AssemblyDefinition assembly in context.GetAssemblies ())
-                               context.Annotations.SetAction (assembly, AssemblyAction.Link);
-               }
-
-               protected virtual void CustomizePipeline (Pipeline pipeline)
-               {
-                       pipeline.RemoveStep (typeof (LoadI18nAssemblies));
-                       pipeline.RemoveStep (typeof (BlacklistStep));
-                       pipeline.RemoveStep (typeof (TypeMapStep));
-                       pipeline.RemoveStep (typeof (MarkStep));
-                       pipeline.RemoveStep (typeof (SweepStep));
-                       pipeline.RemoveStep (typeof (CleanStep));
-                       pipeline.RemoveStep (typeof (RegenerateGuidStep));
-                       pipeline.AddStepBefore (typeof (OutputStep), new InjectSecurityAttributes ());
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/PreserveCrypto.cs b/mcs/tools/tuner/Mono.Tuner/PreserveCrypto.cs
deleted file mode 100644 (file)
index 18dbe7f..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace Mono.Tuner {
-
-       public class PreserveCrypto : IStep {
-
-               AnnotationStore annotations;
-
-               public void Process (LinkContext context)
-               {
-                       annotations = context.Annotations;
-
-                       ProcessCorlib (context);
-                       ProcessSystemCore (context);
-               }
-
-               void ProcessCorlib (LinkContext context)
-               {
-                       AssemblyDefinition corlib;
-                       if (!context.TryGetLinkedAssembly ("mscorlib", out corlib))
-                               return;
-
-                       AddPreserveInfo (corlib, "DES", "DESCryptoServiceProvider");
-                       AddPreserveInfo (corlib, "DSA", "DSACryptoServiceProvider");
-                       AddPreserveInfo (corlib, "RandomNumberGenerator", "RNGCryptoServiceProvider");
-                       AddPreserveInfo (corlib, "SHA1", "SHA1CryptoServiceProvider");
-                       AddPreserveInfo (corlib, "SHA1", "SHA1Managed");
-                       AddPreserveInfo (corlib, "MD5", "MD5CryptoServiceProvider");
-                       AddPreserveInfo (corlib, "RC2", "RC2CryptoServiceProvider");
-                       AddPreserveInfo (corlib, "TripleDES", "TripleDESCryptoServiceProvider");
-
-                       AddPreserveInfo (corlib, "Rijndael", "RijndaelManaged");
-                       AddPreserveInfo (corlib, "RIPEMD160", "RIPEMD160Managed");
-                       AddPreserveInfo (corlib, "SHA256", "SHA256Managed");
-                       AddPreserveInfo (corlib, "SHA384", "SHA384Managed");
-                       AddPreserveInfo (corlib, "SHA512", "SHA512Managed");
-
-                       AddPreserveInfo (corlib, "HMAC", "HMACMD5");
-                       AddPreserveInfo (corlib, "HMAC", "HMACRIPEMD160");
-                       AddPreserveInfo (corlib, "HMAC", "HMACSHA1");
-                       AddPreserveInfo (corlib, "HMAC", "HMACSHA256");
-                       AddPreserveInfo (corlib, "HMAC", "HMACSHA384");
-                       AddPreserveInfo (corlib, "HMAC", "HMACSHA512");
-
-                       AddPreserveInfo (corlib, "HMACMD5", "MD5CryptoServiceProvider");
-                       AddPreserveInfo (corlib, "HMACRIPEMD160", "RIPEMD160Managed");
-                       AddPreserveInfo (corlib, "HMACSHA1", "SHA1CryptoServiceProvider");
-                       AddPreserveInfo (corlib, "HMACSHA1", "SHA1Managed");
-                       AddPreserveInfo (corlib, "HMACSHA256", "SHA256Managed");
-                       AddPreserveInfo (corlib, "HMACSHA384", "SHA384Managed");
-                       AddPreserveInfo (corlib, "HMACSHA512", "SHA512Managed");
-
-                       TryAddPreserveInfo (corlib, "Aes", "AesManaged");
-
-                       var corlibAes = GetCryptoType (corlib, "Aes");
-                       Preserve (corlibAes, GetCryptoType (corlib, "AesManaged"));
-
-                       AssemblyDefinition syscore;
-                       if (context.TryGetLinkedAssembly ("System.Core", out syscore))
-                               Preserve (corlibAes, GetCryptoType (syscore, "AesCryptoServiceProvider"));
-               }
-
-               void ProcessSystemCore (LinkContext context)
-               {
-                       AssemblyDefinition syscore;
-                       if (!context.TryGetLinkedAssembly ("System.Core", out syscore))
-                               return;
-
-                       // AddPreserveInfo (syscore, "Aes", "AesCryptoServiceProvider");
-                       TryAddPreserveInfo (syscore, "Aes", "AesManaged");
-               }
-
-               bool TryAddPreserveInfo (AssemblyDefinition assembly, string name, string type)
-               {
-                       var marker = GetCryptoType (assembly, name);
-                       if (marker == null)
-                               return false;
-
-                       var implementation = GetCryptoType (assembly, type);
-                       if (implementation == null)
-                               return false;
-
-                       Preserve (marker, implementation);
-                       return true;
-               }
-
-               void AddPreserveInfo (AssemblyDefinition assembly, string name, string type)
-               {
-                       var marker = GetCryptoType (assembly, name);
-                       if (marker == null)
-                               throw new ArgumentException (name);
-
-                       var implementation = GetCryptoType (assembly, type);
-                       if (implementation == null)
-                               throw new ArgumentException (type);
-
-                       Preserve (marker, implementation);
-               }
-
-               void Preserve (TypeDefinition marker, TypeDefinition implementation)
-               {
-                       if (marker == null || implementation == null)
-                               return;
-                       foreach (var constructor in implementation.GetConstructors ())
-                               annotations.AddPreservedMethod (marker, constructor);
-               }
-
-               TypeDefinition GetCryptoType (AssemblyDefinition assembly, string name)
-               {
-                       return assembly.MainModule.GetType ("System.Security.Cryptography." + name);
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/PreserveHttps.cs b/mcs/tools/tuner/Mono.Tuner/PreserveHttps.cs
deleted file mode 100644 (file)
index c3c56c7..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-using System;
-using System.IO;
-using System.Xml.XPath;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class PreserveHttps : BaseStep {
-
-               static string [] types = new [] {
-                       "System.Net.WebRequest",
-                       "System.Net.WebClient",
-                       "System.Net.Security.RemoteCertificateValidationCallback",
-                       "System.Web.Services.Protocols.WebClientProtocol",
-                       "System.Security.Cryptography.X509Certificates.X509Certificate",
-                       "System.ServiceModel.ClientBase`1",
-                       "System.Web.Services.WebServiceBindingAttribute",
-                       "System.Web.Services.Protocols.SoapHttpClientProtocol",
-                       "System.Xml.XmlDocument"
-               };
-
-               bool need_https;
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (need_https)
-                               return;
-
-                       if (Profile.IsSdkAssembly (assembly) || Profile.IsProductAssembly (assembly))
-                               return;
-
-                       if (HasNeededReference (assembly.MainModule))
-                               need_https = true;
-               }
-
-               static bool HasNeededReference (ModuleDefinition module)
-               {
-                       foreach (var type in types)
-                               if (module.HasTypeReference (type))
-                                       return true;
-
-                       return false;
-               }
-
-               protected override void EndProcess ()
-               {
-                       if (!need_https)
-                               return;
-
-                       var mono_security = Context.Resolve ("Mono.Security");
-                       if (mono_security == null)
-                               return;
-
-                       if (Annotations.GetAction (mono_security) != AssemblyAction.Link)
-                               return;
-
-                       var xml_preserve = CreatePreserveStep ();
-                       Context.Pipeline.AddStepAfter (typeof (PreserveHttps), xml_preserve);
-//                     Context.Pipeline.AddStepAfter (xml_preserve, new PreserveCrypto ());
-               }
-
-               static IStep CreatePreserveStep ()
-               {
-                       return new ResolveFromXmlStep (
-                               new XPathDocument (
-                                       new StringReader (descriptor)));
-               }
-
-               const string descriptor = @"<?xml version=""1.0"" encoding=""utf-8"" ?>
-<linker>
-       <assembly fullname=""Mono.Security"">
-               <type fullname=""Mono.Security.Protocol.Tls.HttpsClientStream"" />
-               <type fullname=""Mono.Security.Protocol.Tls.SslClientStream"" />
-               <type fullname=""Mono.Security.Protocol.Tls.SslStreamBase"" />
-       </assembly>
-</linker>
-";
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/PreserveSoapHttpClients.cs b/mcs/tools/tuner/Mono.Tuner/PreserveSoapHttpClients.cs
deleted file mode 100644 (file)
index bdb04a9..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-using System;
-
-using Mono.Linker;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class PreserveSoapHttpClients : BaseSubStep {
-
-               public override SubStepTargets Targets {
-                       get { return SubStepTargets.Type; }
-               }
-
-               public override bool IsActiveFor (AssemblyDefinition assembly)
-               {
-                       return Annotations.GetAction (assembly) == AssemblyAction.Link && !Profile.IsSdkAssembly (assembly);
-               }
-
-               public override void ProcessType (TypeDefinition type)
-               {
-                       if (IsWebServiceClient (type))
-                               PreserveClient (type);
-               }
-
-               void PreserveClient (TypeDefinition type)
-               {
-                       if (!type.HasMethods)
-                               return;
-
-                       foreach (MethodDefinition method in type.Methods) {
-                               string sync_method;
-                               if (!TryExtractSyncMethod (method, out sync_method))
-                                       continue;
-
-                               AddPreservedMethod (method, sync_method);
-                       }
-               }
-
-               void AddPreservedMethod (MethodDefinition target, string methodName)
-               {
-                       foreach (MethodDefinition method in target.DeclaringType.Methods)
-                               if (method.Name == methodName)
-                                       Annotations.AddPreservedMethod (target, method);
-               }
-
-               static bool TryExtractSyncMethod (MethodDefinition method, out string sync_method)
-               {
-                       if (TryExtractPrefixedMethodName ("Begin", method.Name, out sync_method))
-                               return true;
-
-                       if (TryExtractPrefixedMethodName ("End", method.Name, out sync_method))
-                               return true;
-
-                       if (TryExtractSuffixedMethodName ("Async", method.Name, out sync_method))
-                               return true;
-
-                       return false;
-               }
-
-               static bool TryExtractPrefixedMethodName (string prefix, string fullName, out string methodName)
-               {
-                       methodName = null;
-
-                       int pos = fullName.IndexOf (prefix, StringComparison.Ordinal);
-                       if (pos == -1)
-                               return false;
-
-                       methodName = fullName.Substring (prefix.Length);
-                       return true;
-               }
-
-               static bool TryExtractSuffixedMethodName (string suffix, string fullName, out string methodName)
-               {
-                       methodName = null;
-
-                       int pos = fullName.LastIndexOf (suffix, StringComparison.Ordinal);
-                       if (pos == -1)
-                               return false;
-
-                       methodName = fullName.Substring (0, pos);
-                       return true;
-               }
-
-               static bool IsWebServiceClient (TypeDefinition type)
-               {
-                       return type.Inherits ("System.Web.Services.Protocols", "SoapHttpClientProtocol");
-               }
-       }
-}
\ No newline at end of file
diff --git a/mcs/tools/tuner/Mono.Tuner/PrintStatus.cs b/mcs/tools/tuner/Mono.Tuner/PrintStatus.cs
deleted file mode 100644 (file)
index 374395b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// PrintStatus.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class PrintStatus : BaseStep {
-
-               static string display_internalized = "display_internalized";
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       Console.WriteLine ("Assembly `{0}' ({1}) tuned", assembly.Name, assembly.MainModule.FullyQualifiedName);
-
-                       if (!DisplayInternalized ())
-                               return;
-
-                       foreach (TypeDefinition type in assembly.MainModule.Types)
-                               ProcessType (type);
-               }
-
-               bool DisplayInternalized ()
-               {
-                       try {
-                               return bool.Parse (Context.GetParameter (display_internalized));
-                       } catch {
-                               return false;
-                       }
-               }
-
-               void ProcessType (TypeDefinition type)
-               {
-                       ProcessCollection (type.Fields);
-                       ProcessCollection (type.Methods);
-               }
-
-               void ProcessCollection (ICollection collection)
-               {
-                       foreach (IMetadataTokenProvider provider in collection)
-                               ProcessProvider (provider);
-               }
-
-               void ProcessProvider (IMetadataTokenProvider provider)
-               {
-                       if (!TunerAnnotations.IsInternalized (Context, provider))
-                               return;
-
-                       Console.WriteLine ("[internalized] {0}", provider);
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/PrintTypeMap.cs b/mcs/tools/tuner/Mono.Tuner/PrintTypeMap.cs
deleted file mode 100644 (file)
index 8838b1a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// PrintTypeMap.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2009 Novell, 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;
-using System.Collections.Generic;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class PrintTypeMap : BaseStep {
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       foreach (TypeDefinition type in assembly.MainModule.GetAllTypes ())
-                               PrintMap (type);
-               }
-
-               void PrintMap (TypeDefinition type)
-               {
-                       if (!type.HasMethods)
-                               return;
-
-                       Console.WriteLine ("Type {0} map", type);
-
-                       foreach (MethodDefinition method in type.Methods) {
-                               if (!method.IsVirtual)
-                                       continue;
-
-                               Console.WriteLine ("  Method {0} map", method);
-
-                               IEnumerable<MethodDefinition> overrides = Annotations.GetOverrides (method);
-                               foreach (var @override in overrides ?? new MethodDefinition [0])
-                                       Console.WriteLine ("    HasOverride {0}", @override);
-
-                               IEnumerable<MethodDefinition> bases = Annotations.GetBaseMethods (method);
-                               foreach (var @base in bases ?? new MethodDefinition [0])
-                                       Console.WriteLine ("    Base {0}", @base);
-                       }
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/Profile.cs b/mcs/tools/tuner/Mono.Tuner/Profile.cs
deleted file mode 100644 (file)
index 54cfffa..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public abstract class Profile {
-
-               static Profile current;
-
-               public static Profile Current {
-                       get {
-                               if (current != null)
-                                       return current;
-
-                               current = CreateProfile ("MonoTouch");
-                               if (current != null)
-                                       return current;
-
-                               current = CreateProfile ("MonoDroid");
-                               if (current != null)
-                                       return current;
-
-                               current = CreateProfile ("MonoMac");
-                               if (current != null)
-                                       return current;
-
-                               throw new NotSupportedException ("No active profile");
-                       }
-                       set {
-                               current = value;
-                       }
-               }
-
-               static Profile CreateProfile (string name)
-               {
-                       var type = Type.GetType (string.Format ("{0}.Tuner.{0}Profile", name));
-                       if (type == null)
-                               return null;
-
-                       return (Profile) Activator.CreateInstance (type);
-               }
-
-               public static bool IsSdkAssembly (AssemblyDefinition assembly)
-               {
-                       return Current.IsSdk (assembly);
-               }
-
-               public static bool IsSdkAssembly (string assemblyName)
-               {
-                       return Current.IsSdk (assemblyName);
-               }
-
-               public static bool IsProductAssembly (AssemblyDefinition assembly)
-               {
-                       return Current.IsProduct (assembly);
-               }
-
-               public static bool IsProductAssembly (string assemblyName)
-               {
-                       return Current.IsProduct (assemblyName);
-               }
-
-               protected virtual bool IsSdk (AssemblyDefinition assembly)
-               {
-                       return IsSdk (assembly.Name.Name);
-               }
-               
-               protected virtual bool IsProduct (AssemblyDefinition assembly)
-               {
-                       return IsProduct (assembly.Name.Name);
-               }
-
-               protected abstract bool IsSdk (string assemblyName);
-               protected abstract bool IsProduct (string assemblyName);
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/RemoveAttributesBase.cs b/mcs/tools/tuner/Mono.Tuner/RemoveAttributesBase.cs
deleted file mode 100644 (file)
index 6110180..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Tuner;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public abstract class RemoveAttributesBase : BaseSubStep {
-
-               public override SubStepTargets Targets {
-                       get {
-                               return SubStepTargets.Assembly
-                                       | SubStepTargets.Type
-                                       | SubStepTargets.Field
-                                       | SubStepTargets.Method
-                                       | SubStepTargets.Property
-                                       | SubStepTargets.Event;
-                       }
-               }
-
-               public override bool IsActiveFor (AssemblyDefinition assembly)
-               {
-                       return Annotations.GetAction (assembly) == AssemblyAction.Link;
-               }
-
-               public override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       ProcessAttributeProvider (assembly);
-                       ProcessAttributeProvider (assembly.MainModule);
-               }
-
-               public override void ProcessType (TypeDefinition type)
-               {
-                       ProcessAttributeProvider (type);
-
-                       if (type.HasGenericParameters)
-                               ProcessAttributeProviderCollection (type.GenericParameters);
-               }
-
-               void ProcessAttributeProviderCollection (IList list)
-               {
-                       for (int i = 0; i < list.Count; i++)
-                               ProcessAttributeProvider ((ICustomAttributeProvider) list [i]);
-               }
-
-               public override void ProcessField (FieldDefinition field)
-               {
-                       ProcessAttributeProvider (field);
-               }
-
-               public override void ProcessMethod (MethodDefinition method)
-               {
-                       ProcessMethodAttributeProvider (method);
-               }
-
-               void ProcessMethodAttributeProvider (MethodDefinition method)
-               {
-                       ProcessAttributeProvider (method);
-                       ProcessAttributeProvider (method.MethodReturnType);
-
-                       if (method.HasParameters)
-                               ProcessAttributeProviderCollection (method.Parameters);
-
-                       if (method.HasGenericParameters)
-                               ProcessAttributeProviderCollection (method.GenericParameters);
-               }
-
-               public override void ProcessProperty (PropertyDefinition property)
-               {
-                       ProcessAttributeProvider (property);
-               }
-
-               public override void ProcessEvent (EventDefinition @event)
-               {
-                       ProcessAttributeProvider (@event);
-               }
-
-               void ProcessAttributeProvider (ICustomAttributeProvider provider)
-               {
-                       if (!provider.HasCustomAttributes)
-                               return;
-
-                       for (int i = 0; i < provider.CustomAttributes.Count; i++) {
-                               var attrib = provider.CustomAttributes [i];
-                               if (!IsRemovedAttribute (attrib))
-                                       continue;
-
-                               WillRemoveAttribute (provider, attrib);
-                               provider.CustomAttributes.RemoveAt (i--);
-                       }
-               }
-
-               protected abstract bool IsRemovedAttribute (CustomAttribute attribute);
-               protected virtual void WillRemoveAttribute (ICustomAttributeProvider provider, CustomAttribute attribute) { }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/RemoveResources.cs b/mcs/tools/tuner/Mono.Tuner/RemoveResources.cs
deleted file mode 100644 (file)
index 7edc44f..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-using System;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class RemoveResources : IStep {
-
-               readonly I18nAssemblies assemblies;
-
-               public RemoveResources (I18nAssemblies assemblies)
-               {
-                       this.assemblies = assemblies;
-               }
-
-               public virtual void Process (LinkContext context)
-               {
-                       AssemblyDefinition assembly;
-                       if (!context.TryGetLinkedAssembly ("mscorlib", out assembly))
-                               return;
-
-                       // skip this if we're not linking mscorlib, e.g. --linkskip=mscorlib
-                       if (context.Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       var resources = assembly.MainModule.Resources;
-
-                       for (int i = 0; i < resources.Count; i++) {
-                               var resource = resources [i] as EmbeddedResource;
-                               if (resource == null)
-                                       continue;
-
-                               switch (resource.Name) {
-                               case "collation.core.bin":
-                               case "collation.tailoring.bin":
-                                       continue;
-                               default:
-                                       if (!resource.Name.Contains ("cjk"))
-                                               continue;
-                                       if (IncludeCJK ())
-                                               continue;
-
-                                       resources.RemoveAt (i--);
-                                       break;
-                               }
-                       }
-               }
-
-               bool IncludeCJK ()
-               {
-                       return (assemblies & I18nAssemblies.CJK) != 0;
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/RemoveSecurity.cs b/mcs/tools/tuner/Mono.Tuner/RemoveSecurity.cs
deleted file mode 100644 (file)
index 2704564..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class RemoveSecurity : BaseSubStep {
-
-               public override SubStepTargets Targets {
-                       get {
-                               return SubStepTargets.Assembly
-                                       | SubStepTargets.Type
-                                       | SubStepTargets.Method;
-                       }
-               }
-
-               public override bool IsActiveFor (AssemblyDefinition assembly)
-               {
-                       return Annotations.GetAction (assembly) == AssemblyAction.Link;
-               }
-
-               public override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       ProcessSecurityProvider (assembly);
-               }
-
-               public override void ProcessType (TypeDefinition type)
-               {
-                       ProcessSecurityProvider (type);
-               }
-
-               public override void ProcessMethod (MethodDefinition method)
-               {
-                       ProcessSecurityProvider (method);
-               }
-
-               static void ProcessSecurityProvider (ISecurityDeclarationProvider provider)
-               {
-                       if (!provider.HasSecurityDeclarations)
-                               return;
-
-                       provider.SecurityDeclarations.Clear ();
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/RemoveSerialization.cs b/mcs/tools/tuner/Mono.Tuner/RemoveSerialization.cs
deleted file mode 100644 (file)
index d38aef1..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-//
-// RemoveSerialization.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-
-namespace Mono.Tuner {
-
-       public class RemoveSerialization : BaseStep {
-
-               static readonly string _Serialization = "System.Runtime.Serialization";
-               static readonly string _ISerializable = Concat (_Serialization, "ISerializable");
-               static readonly string _IDeserializationCallback = Concat (_Serialization, "IDeserializationCallback");
-               static readonly string _SerializationInfo = Concat (_Serialization, "SerializationInfo");
-               static readonly string _StreamingContext = Concat (_Serialization, "StreamingContext");
-
-               static readonly string _GetObjectData = "GetObjectData";
-               static readonly string _OnDeserialization = "OnDeserialization";
-
-               static string Concat (string lhs, string rhs)
-               {
-                       return string.Concat (lhs, ".", rhs);
-               }
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (assembly.Name.Name == "mscorlib")
-                               return;
-
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       foreach (ModuleDefinition module in assembly.Modules)
-                               foreach (TypeDefinition type in module.Types)
-                                       ProcessType (type);
-               }
-
-               static void RemoveInterface (TypeDefinition type, string name)
-               {
-                       for (int i = 0; i < type.Interfaces.Count; i++) {
-                               TypeReference iface = type.Interfaces [i].InterfaceType;
-                               if (iface.FullName == name) {
-                                       type.Interfaces.RemoveAt (i);
-                                       return;
-                               }
-                       }
-               }
-
-               static void RemoveSerializableFlag (TypeDefinition type)
-               {
-                       type.Attributes &= ~TypeAttributes.Serializable;
-               }
-
-               static void ProcessType (TypeDefinition type)
-               {
-                       RemoveSerializableFlag (type);
-
-                       RemoveInterface (type, _ISerializable);
-                       RemoveMethod (type, ".ctor", _SerializationInfo, _StreamingContext);
-                       RemoveInterfaceMethod (type, _ISerializable, _GetObjectData, _SerializationInfo, _StreamingContext);
-
-                       RemoveInterface (type, _IDeserializationCallback);
-                       RemoveInterfaceMethod (type, _IDeserializationCallback, _OnDeserialization, "System.Object");
-
-                       RemoveField (type);
-               }
-
-               static void RemoveField (TypeDefinition type)
-               {
-                       for (int i = 0; i < type.Fields.Count; i++) {
-                               FieldDefinition field = type.Fields [i];
-                               if (field.FieldType.FullName == _SerializationInfo) {
-                                       type.Fields.RemoveAt (i);
-                                       break;
-                               }
-                       }
-               }
-
-               static bool ParametersMatch (IMethodSignature meth, string [] parameters)
-               {
-                       for (int i = 0; i < parameters.Length; i++) {
-                               ParameterDefinition param = meth.Parameters [i];
-                               if (param.ParameterType.FullName != parameters [i])
-                                       return false;
-                       }
-
-                       return true;
-               }
-
-               static void RemoveInterfaceMethod (TypeDefinition type, string iface, string method, params string [] parameters)
-               {
-                       RemoveMethod (type, method, parameters);
-                       RemoveMethod (type, Concat (iface, method), parameters);
-               }
-
-               static void RemoveMethod (TypeDefinition type, string name, params string [] parameters)
-               {
-                       RemoveMethod (type.Methods, name, parameters);
-               }
-
-               static void RemoveMethod (IList container, string name, params string [] parameters)
-               {
-                       for (int i = 0; i < container.Count; i++) {
-                               MethodDefinition method = (MethodDefinition) container [i];
-                               if (method.Name != name)
-                                       continue;
-
-                               if (method.Parameters.Count != parameters.Length)
-                                       continue;
-
-                               if (!ParametersMatch (method, parameters))
-                                       continue;
-
-                               container.RemoveAt (i);
-                               return;
-                       }
-               }
-       }
-}
diff --git a/mcs/tools/tuner/Mono.Tuner/TunerAnnotations.cs b/mcs/tools/tuner/Mono.Tuner/TunerAnnotations.cs
deleted file mode 100644 (file)
index 2107ac4..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// TunerAnnotations.cs
-//
-// Author:
-//   Jb Evain (jbevain@novell.com)
-//
-// (C) 2007 Novell, 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 Mono.Cecil;
-using Mono.Linker;
-
-namespace Mono.Tuner {
-
-       public class TunerAnnotations {
-
-               static readonly object _internalizedKey = new object ();
-
-               public static void Internalized (LinkContext context, IMetadataTokenProvider provider)
-               {
-                       var annotations = context.Annotations.GetCustomAnnotations (_internalizedKey);
-                       annotations [provider] = _internalizedKey;
-               }
-
-               public static bool IsInternalized (LinkContext context, IMetadataTokenProvider provider)
-               {
-                       var annotations = context.Annotations.GetCustomAnnotations (_internalizedKey);
-
-                       return annotations.ContainsKey (provider);
-               }
-
-               private TunerAnnotations ()
-               {
-               }
-       }
-}
diff --git a/mcs/tools/tuner/MonoMac.Tuner/ApplyPreserveAttribute.cs b/mcs/tools/tuner/MonoMac.Tuner/ApplyPreserveAttribute.cs
deleted file mode 100644 (file)
index d7c49b8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Tuner;
-
-using Mono.Cecil;
-
-namespace MonoMac.Tuner {
-
-       public class ApplyPreserveAttribute : ApplyPreserveAttributeBase {
-
-               protected override string PreserveAttribute {
-                       get { return "MonoMac.Foundation.PreserveAttribute"; }
-               }
-       }
-}
diff --git a/mcs/tools/tuner/MonoMac.Tuner/Extensions.cs b/mcs/tools/tuner/MonoMac.Tuner/Extensions.cs
deleted file mode 100644 (file)
index ec7fd1f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-using Mono.Cecil;
-
-using Mono.Linker;
-
-using Mono.Tuner;
-
-namespace MonoMac.Tuner {
-
-       static class Extensions {
-
-               const string NSObject = "MonoMac.Foundation.NSObject";
-               const string INativeObject = "MonoMac.ObjCRuntime.INativeObject";
-
-               public static bool IsNSObject (this TypeDefinition type)
-               {
-                       return type.Inherits (NSObject);
-               }
-
-               public static bool IsNativeObject (this TypeDefinition type)
-               {
-                       return type.Implements (INativeObject);
-               }
-       }
-}
diff --git a/mcs/tools/tuner/MonoMac.Tuner/MarkNSObjects.cs b/mcs/tools/tuner/MonoMac.Tuner/MarkNSObjects.cs
deleted file mode 100644 (file)
index 163decc..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// MarkNSObjects.cs
-//
-// Authors:
-//     Jb Evain (jbevain@novell.com)
-//     Sebastien Pouliot  <sebastien@xamarin.com>
-//
-// (C) 2009 Novell, Inc.
-// Copyright (C) 2011 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 Mono.Tuner;
-
-using Mono.Cecil;
-
-namespace MonoMac.Tuner {
-
-       public class MarkNSObjects : MarkNSObjectsBase {
-
-               protected override string ExportAttribute {
-                       get { return "MonoMac.Foundation.ExportAttribute"; }
-               }
-
-               public override void ProcessType (TypeDefinition type)
-               {
-                       if (!type.IsNSObject () || !type.IsNativeObject ())
-                               return;
-
-                       base.ProcessType (type);
-               }
-       }
-}
diff --git a/mcs/tools/tuner/MonoMac.Tuner/MethodMapInjection.cs b/mcs/tools/tuner/MonoMac.Tuner/MethodMapInjection.cs
deleted file mode 100644 (file)
index ebb2407..0000000
+++ /dev/null
@@ -1,382 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Tuner;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace MonoMac.Tuner {
-
-       public class MethodMapInjection : BaseStep {
-
-               struct ExportedMethod {
-                       public readonly CustomAttribute attribute;
-                       public readonly MethodDefinition method;
-
-                       public ExportedMethod (CustomAttribute attribute, MethodDefinition method)
-                       {
-                               this.attribute = attribute;
-                               this.method = method;
-                       }
-               }
-
-               ModuleDefinition module;
-
-               bool imported;
-               TypeReference void_type;
-               TypeReference dictionary_intptr_methoddesc;
-               MethodReference dictionary_intptr_methoddesc_ctor;
-               MethodReference dictionary_intptr_methoddesc_set_item;
-               MethodReference methoddesc_ctor;
-               MethodReference selector_get_handle;
-               MethodReference methodbase_get_method_from_handle;
-               MethodReference class_register_methods;
-               MethodReference type_get_type_from_handle;
-               FieldReference selector_init;
-
-               protected override void ProcessAssembly (AssemblyDefinition assembly)
-               {
-                       if (Annotations.GetAction (assembly) != AssemblyAction.Link)
-                               return;
-
-                       module = assembly.MainModule;
-
-                       foreach (TypeDefinition type in module.GetAllTypes ()) {
-                               if (!type.IsNSObject ())
-                                       continue;
-
-                               ProcessNSObject (type);
-                       }
-
-                       imported = false;
-               }
-
-               void PrepareImports ()
-               {
-                       if (imported)
-                               return;
-
-                       var corlib = Context.GetAssembly ("mscorlib");
-
-                       void_type = Import (corlib, "System.Void");
-
-                       var monomac = Context.GetAssembly ("MonoMac");
-
-                       var dictionary = Import (corlib, "System.Collections.Generic.Dictionary`2");
-
-                       var intptr = Import (corlib, "System.IntPtr");
-                       var method_desc = Import (monomac, "MonoMac.ObjCRuntime.MethodDescription");
-
-                       var dic_i_md = new GenericInstanceType (dictionary);
-                       dic_i_md.GenericArguments.Add (intptr);
-                       dic_i_md.GenericArguments.Add (method_desc);
-                       dictionary_intptr_methoddesc = dic_i_md;
-
-                       dictionary_intptr_methoddesc_ctor = Import (".ctor", dic_i_md, false, void_type, Import (corlib, "System.Int32"));
-
-                       dictionary_intptr_methoddesc_set_item = Import ("set_Item", dic_i_md, false, void_type,
-                               dictionary.GenericParameters [0],
-                               dictionary.GenericParameters [1]);
-
-                       methoddesc_ctor = Import (".ctor", method_desc, false, void_type,
-                               Import (corlib, "System.Reflection.MethodBase"),
-                               Import (monomac, "MonoMac.ObjCRuntime.ArgumentSemantic"));
-
-                       var selector = Import (monomac, "MonoMac.ObjCRuntime.Selector");
-
-                       selector_get_handle = Import ("GetHandle", selector, true, intptr, Import (corlib, "System.String"));
-                       selector_init = new FieldReference ("Init", selector, intptr);
-
-                       var methodbase = Import (corlib, "System.Reflection.MethodBase");
-
-                       methodbase_get_method_from_handle = Import ("GetMethodFromHandle", methodbase, true, methodbase, Import (corlib, "System.RuntimeMethodHandle"));
-
-                       var type = Import (corlib, "System.Type");
-
-                       type_get_type_from_handle = Import ("GetTypeFromHandle", type, true, type, Import (corlib, "System.RuntimeTypeHandle"));
-
-                       var @class = Import (monomac, "MonoMac.ObjCRuntime.Class");
-
-                       class_register_methods = Import ("RegisterMethods", @class, true, void_type, type, dic_i_md);
-
-                       imported = true;
-               }
-
-               MethodReference Import (string name, TypeReference declaring_type, bool @static, TypeReference return_type, params TypeReference [] parameters_type)
-               {
-                       var reference = new MethodReference (name, return_type, declaring_type) {
-                               HasThis = !@static,
-                               ExplicitThis = false,
-                               CallingConvention = MethodCallingConvention.Default,
-                       };
-
-                       foreach (var parameter_type in parameters_type)
-                               reference.Parameters.Add (new ParameterDefinition (parameter_type));
-
-                       return reference;
-               }
-
-               TypeReference Import (TypeReference type)
-               {
-                       return module.Import (type);
-               }
-
-               TypeReference Import (AssemblyDefinition assembly, string type_name)
-               {
-                       return Import (assembly.MainModule.GetType (type_name));
-               }
-
-               void ProcessNSObject (TypeDefinition type)
-               {
-                       var exported = new List<ExportedMethod> ();
-
-                       if (type.HasMethods) {
-                               ProcessMethods (type, exported);
-                               ProcessConstructors (type, exported);
-                       }
-
-                       if (exported.Count == 0)
-                               return;
-
-                       InjectMethodMap (type, exported);
-               }
-
-               void InjectMethodMap (TypeDefinition type, List<ExportedMethod> exported_methods)
-               {
-                       PrepareImports ();
-
-                       var cctor = GetTypeConstructor (type);
-
-                       var selectors = MapSelectors (cctor);
-
-                       var map = new VariableDefinition (dictionary_intptr_methoddesc);
-                       map.Name = "$method_map";
-                       cctor.Body.Variables.Add (map);
-                       cctor.Body.SimplifyMacros ();
-
-                       var il = cctor.Body.GetILProcessor ();
-
-                       var instructions = new List<Instruction> {
-                               il.Create (OpCodes.Ldc_I4, exported_methods.Count),
-                               il.Create (OpCodes.Newobj, dictionary_intptr_methoddesc_ctor),
-                               il.Create (OpCodes.Stloc, map),
-                       };
-
-                       foreach (var exported in exported_methods) {
-
-                               instructions.Add (il.Create (OpCodes.Ldloc, map));
-
-                               if (!IsDefaultConstructor (exported)) {
-                                       var selector_name = GetSelectorName (exported);
-                                       FieldReference selector;
-
-                                       if (selectors != null && selectors.TryGetValue (selector_name, out selector)) {
-                                               instructions.Add (il.Create (OpCodes.Ldsfld, selector));
-                                       } else {
-                                               instructions.AddRange (new [] {
-                                                       il.Create (OpCodes.Ldstr, selector_name),
-                                                       il.Create (OpCodes.Call, selector_get_handle),
-                                               });
-                                       }
-                               } else
-                                       instructions.Add (il.Create (OpCodes.Ldsfld, selector_init));
-
-                               instructions.AddRange (new [] {
-                                       il.Create (OpCodes.Ldtoken, exported.method),
-                                       il.Create (OpCodes.Call, methodbase_get_method_from_handle),
-                                       il.Create (OpCodes.Ldc_I4, GetArgumentSemantic (exported)),
-                                       il.Create (OpCodes.Newobj, methoddesc_ctor),
-                                       il.Create (OpCodes.Callvirt, dictionary_intptr_methoddesc_set_item),
-                               });
-                       }
-
-                       instructions.AddRange (new [] {
-                               il.Create (OpCodes.Ldtoken, type),
-                               il.Create (OpCodes.Call, type_get_type_from_handle),
-                               il.Create (OpCodes.Ldloc, map),
-                               il.Create (OpCodes.Call, class_register_methods),
-                       });
-
-                       Append (il, instructions);
-
-                       cctor.Body.OptimizeMacros ();
-               }
-
-               static Dictionary<string, FieldReference> MapSelectors (MethodDefinition cctor)
-               {
-                       var instructions = cctor.Body.Instructions;
-                       Dictionary<string, FieldReference> selectors = null;
-
-                       for (int i = 0; i < instructions.Count; i++) {
-                               var instruction = instructions [i];
-
-                               FieldReference field;
-                               if (!IsCreateSelector (instruction, out field))
-                                       continue;
-
-                               if (selectors == null)
-                                       selectors = new Dictionary<string, FieldReference> ();
-
-                               selectors.Add ((string) instruction.Operand, field);
-                       }
-
-                       return selectors;
-               }
-
-               static bool IsCreateSelector (Instruction instruction, out FieldReference field)
-               {
-                       field = null;
-
-                       if (instruction.OpCode != OpCodes.Ldstr)
-                               return false;
-
-                       if (instruction.Next == null)
-                               return false;
-
-                       instruction = instruction.Next;
-
-                       if (instruction.OpCode != OpCodes.Call)
-                               return false;
-
-                       var method = (MethodReference) instruction.Operand;
-                       if (method.DeclaringType.Name != "Selector")
-                               return false;
-
-                       if (method.Name != "GetHandle" && method.Name != "sel_registerName")
-                               return false;
-
-                       if (instruction.Next == null)
-                               return false;
-
-                       instruction = instruction.Next;
-
-                       if (instruction.OpCode != OpCodes.Stsfld)
-                               return false;
-
-                       field = instruction.Operand as FieldReference;
-                       return true;
-               }
-
-               static bool IsDefaultConstructor (ExportedMethod exported)
-               {
-                       return exported.attribute == null && exported.method.IsConstructor && !exported.method.IsStatic;
-               }
-
-               static void Append (ILProcessor il, IEnumerable<Instruction> instructions)
-               {
-                       var method_instructions = il.Body.Instructions;
-                       var last = method_instructions [method_instructions.Count - 1];
-
-                       foreach (var instruction in instructions)
-                               il.InsertBefore (last, instruction);
-               }
-
-               static int GetArgumentSemantic (ExportedMethod exported)
-               {
-                       if (exported.attribute == null)
-                               return 0; // Assign
-
-                       var arguments = exported.attribute.ConstructorArguments;
-
-                       if (arguments.Count == 2)
-                               return (int) arguments [1].Value;
-
-                       if (arguments.Count == 1)
-                               return -1; // None
-
-                       return 0; // Assign
-               }
-
-               static string GetSelectorName (ExportedMethod exported)
-               {
-                       var arguments = exported.attribute.ConstructorArguments;
-
-                       if (arguments.Count == 0)
-                               return exported.method.Name;
-
-                       return (string) arguments [0].Value;
-               }
-
-               MethodDefinition GetTypeConstructor (TypeDefinition type)
-               {
-                       return type.GetTypeConstructor () ?? CreateTypeConstructor (type);
-               }
-
-               MethodDefinition CreateTypeConstructor (TypeDefinition type)
-               {
-                       var cctor = new MethodDefinition (".cctor", MethodAttributes.Private | MethodAttributes.Static | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName, void_type);
-                       cctor.Body.GetILProcessor ().Emit (OpCodes.Ret);
-
-                       type.Methods.Add (cctor);
-
-                       return cctor;
-               }
-
-               void ProcessConstructors (TypeDefinition type, List<ExportedMethod> exported)
-               {
-                       foreach (MethodDefinition ctor in type.GetConstructors ()) {
-                               if (!ctor.HasParameters && !ctor.IsStatic) {
-                                       exported.Add (new ExportedMethod (null, ctor));
-                                       continue;
-                               }
-
-                               CustomAttribute export;
-                               if (!TryGetExportAttribute (ctor, out export))
-                                       continue;
-
-                               exported.Add (new ExportedMethod (export, ctor));
-                       }
-               }
-
-               static bool TryGetExportAttribute (MethodDefinition method, out CustomAttribute export)
-               {
-                       export = null;
-
-                       if (!method.HasCustomAttributes)
-                               return false;
-
-                       foreach (CustomAttribute attribute in method.CustomAttributes) {
-                               if (attribute.AttributeType.FullName != "MonoMac.Foundation.ExportAttribute")
-                                       continue;
-
-                               export = attribute;
-                               return true;
-                       }
-
-                       return false;
-               }
-
-               void ProcessMethods (TypeDefinition type, List<ExportedMethod> exported)
-               {
-                       foreach (MethodDefinition method in type.GetMethods ()) {
-                               CustomAttribute attribute;
-                               if (TryGetExportAttribute (method, out attribute)) {
-                                       exported.Add (new ExportedMethod (attribute, method));
-                                       continue;
-                               }
-
-                               if (!method.IsVirtual)
-                                       continue;
-
-                               var bases = Annotations.GetBaseMethods (method);
-                               if (bases == null)
-                                       continue;
-
-                               foreach (MethodDefinition @base in bases) {
-                                       if (@base.DeclaringType.IsInterface)
-                                               continue;
-
-                                       if (TryGetExportAttribute (@base, out attribute)) {
-                                               exported.Add (new ExportedMethod (attribute, method));
-                                               break;
-                                       }
-                               }
-                       }
-               }
-       }
-}
diff --git a/mcs/tools/tuner/MonoMac.Tuner/MonoMac.xml b/mcs/tools/tuner/MonoMac.Tuner/MonoMac.xml
deleted file mode 100644 (file)
index 9a078c8..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<linker>
-       <assembly fullname="MonoMac">
-               <namespace fullname="MonoMac.ObjCRuntime" />
-               <!--
-               <type fullname="MonoMac.ObjCRuntime.Runtime" />
-               <type fullname="MonoMac.ObjCRuntime.Class" />
-               <type fullname="MonoMac.ObjCRuntime.Selector" />
-               <type fullname="MonoMac.ObjCRuntime.NativeConstructorBuilder" />
-               <type fullname="MonoMac.ObjCRuntime.NativeImplementationBuilder" />
-               <type fullname="MonoMac.ObjCRuntime.NativeMethodBuilder" />
-               <type fullname="MonoMac.ObjCRuntime.INativeObject" />
-               -->
-               <type fullname="MonoMac.Foundation.NSObject" preserve="fields">
-                       <method name="NativeRelease" />
-                       <method name="NativeRetain" />
-                       <method name="Retain" />
-               </type>
-               <type fullname="MonoMac.Foundation.NSArray" preserve="fields">
-                       <method name="ArrayFromHandle" />
-                       <method name="StringArrayFromHandle" />
-                       <method name="FromNSObjects" />
-                       <method name="FromStrings" />
-               </type>
-               <type fullname="MonoMac.Foundation.ExportAttribute" />
-       </assembly>
-       <assembly fullname="mscorlib">
-               <type fullname="System.Runtime.Serialization.FormatterServices">
-                       <method name="GetUninitializedObject" />
-               </type>
-               <type fullname="System.Runtime.InteropServices.Marshal">
-                       <method name="StructureToPtr" />
-               </type>
-               <type fullname="System.Runtime.InteropServices.MarshalAsAttribute">
-                       <field name="MarshalTypeRef" />
-               </type>
-       </assembly>
-</linker>
diff --git a/mcs/tools/tuner/MonoMac.Tuner/MonoMacProfile.cs b/mcs/tools/tuner/MonoMac.Tuner/MonoMacProfile.cs
deleted file mode 100644 (file)
index 0692e48..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-using Mono.Tuner;
-
-using Mono.Cecil;
-
-namespace MonoMac.Tuner {
-
-       class MonoMacProfile : Profile {
-
-               static readonly HashSet<string> Sdk = new HashSet<string> {
-                       "mscorlib",
-                       "I18N.CJK",
-                       "I18N",
-                       "I18N.MidEast",
-                       "I18N.Other",
-                       "I18N.Rare",
-                       "I18N.West",
-                       "Microsoft.Build.Engine",
-                       "Microsoft.Build.Framework",
-                       "Microsoft.Build.Tasks.v4.0",
-                       "Microsoft.Build.Utilities.v4.0",
-                       "Microsoft.CSharp",
-                       "Microsoft.Web.Infrastructure",
-                       "Mono.C5",
-                       "Mono.Cairo",
-                       "Mono.CodeContracts",
-                       "Mono.CompilerServices.SymbolWriter",
-                       "Mono.Configuration.Crypto",
-                       "Mono.CSharp",
-                       "Mono.Data.Sqlite",
-                       "Mono.Data.Tds",
-                       "Mono.Debugger.Soft",
-                       "Mono.Http",
-                       "Mono.Management",
-                       "Mono.Messaging",
-                       "Mono.Messaging.RabbitMQ",
-                       "Mono.Options",
-                       "Mono.Parallel",
-                       "Mono.Posix",
-                       "Mono.Security",
-                       "Mono.Security.Win32",
-                       "Mono.Simd",
-                       "Mono.Tasklets",
-                       "Mono.Tuner",
-                       "Mono.WebBrowser",
-                       "Mono.Web",
-                       "Novell.Directory.Ldap",
-                       "Npgsql",
-                       "OpenSystem.C",
-                       "PEAPI",
-                       "System.ComponentModel.Composition",
-                       "System.ComponentModel.DataAnnotations",
-                       "System.Configuration",
-                       "System.Configuration.Install",
-                       "System.Core",
-                       "System.Data.DataSetExtensions",
-                       "System.Data",
-                       "System.Data.Linq",
-                       "System.Data.OracleClient",
-                       "System.Data.Services.Client",
-                       "System.Data.Services",
-                       "System.Design",
-                       "System.DirectoryServices",
-                       "System",
-                       "System.Drawing.Design",
-                       "System.Drawing",
-                       "System.Dynamic",
-                       "System.EnterpriseServices",
-                       "System.IdentityModel",
-                       "System.IdentityModel.Selectors",
-                       "System.Management",
-                       "System.Messaging",
-                       "System.Net",
-                       "System.Numerics",
-                       "System.Runtime.Caching",
-                       "System.Runtime.DurableInstancing",
-                       "System.Runtime.Remoting",
-                       "System.Runtime.Serialization",
-                       "System.Runtime.Serialization.Formatters.Soap",
-                       "System.Security",
-                       "System.ServiceModel.Discovery",
-                       "System.ServiceModel",
-                       "System.ServiceModel.Routing",
-                       "System.ServiceModel.Web",
-                       "System.ServiceProcess",
-                       "System.Transactions",
-                       "System.Web.Abstractions",
-                       "System.Web.ApplicationServices",
-                       "System.Web",
-                       "System.Web.DynamicData",
-                       "System.Web.Extensions.Design",
-                       "System.Web.Extensions",
-                       "System.Web.Routing",
-                       "System.Web.Services",
-                       "System.Windows.Forms.DataVisualization",
-                       "System.Windows.Forms",
-                       "System.Xaml",
-                       "System.Xml",
-                       "System.Xml.Linq",
-                       "WebMatrix.Data",
-                       "WindowsBase",
-                       "Microsoft.VisualBasic",
-               };
-
-               protected override bool IsSdk (AssemblyDefinition assembly)
-               {
-                       return Sdk.Contains (assembly.Name.Name);
-               }
-
-               protected override bool IsProduct (AssemblyDefinition assembly)
-               {
-                       return assembly.Name.Name == "MonoMac";
-               }
-       }
-}
diff --git a/mcs/tools/tuner/MonoMac.Tuner/RemoveSelectors.cs b/mcs/tools/tuner/MonoMac.Tuner/RemoveSelectors.cs
deleted file mode 100644 (file)
index 0c201ae..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using Mono.Linker;
-using Mono.Linker.Steps;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-using Mono.Tuner;
-
-namespace MonoMac.Tuner {
-
-       public class RemoveSelectors : IStep {
-
-               public void Process (LinkContext context)
-               {
-                       AssemblyDefinition monomac;
-                       if (!context.TryGetLinkedAssembly ("MonoMac", out monomac))
-                               return;
-
-                       foreach (TypeDefinition type in monomac.MainModule.Types) {
-                               if (!type.IsNSObject ())
-                                       continue;
-
-                               ProcessNSObject (type);
-                       }
-               }
-
-               static void ProcessNSObject (TypeDefinition type)
-               {
-                       var selectors = PopulateSelectors (type);
-                       if (selectors == null)
-                               return;
-
-                       foreach (var method in CollectMethods (type))
-                               CheckSelectorUsage (method, selectors);
-
-                       if (selectors.Count == 0)
-                               return;
-
-                       PatchStaticConstructor (type, selectors);
-                       RemoveUnusedSelectors (type, selectors);
-               }
-
-               static void CheckSelectorUsage (MethodDefinition method, HashSet<FieldDefinition> selectors)
-               {
-                       if (!method.HasBody)
-                               return;
-
-                       foreach (Instruction instruction in method.Body.Instructions) {
-                               switch (instruction.OpCode.OperandType) {
-                               case OperandType.InlineTok:
-                               case OperandType.InlineField:
-                                       var field = instruction.Operand as FieldDefinition;
-                                       if (field == null)
-                                               continue;
-
-                                       if (selectors.Contains (field))
-                                               selectors.Remove (field);
-
-                                       break;
-                               }
-                       }
-               }
-
-               static void PatchStaticConstructor (TypeDefinition type, HashSet<FieldDefinition> selectors)
-               {
-                       var cctor = type.GetTypeConstructor ();
-                       if (cctor == null || !cctor.HasBody)
-                               return;
-
-                       var instructions = cctor.Body.Instructions;
-
-                       for (int i = 0; i < instructions.Count; i++) {
-                               var instruction = instructions [i];
-                               if (!IsCreateSelector (instruction, selectors))
-                                       continue;
-
-                               instructions.RemoveAt (i--);
-                               instructions.RemoveAt (i--);
-                               instructions.RemoveAt (i--);
-                       }
-               }
-
-               static bool IsCreateSelector (Instruction instruction, HashSet<FieldDefinition> selectors)
-               {
-                       if (instruction.OpCode != OpCodes.Stsfld)
-                               return false;
-
-                       var field = instruction.Operand as FieldDefinition;
-                       if (field == null)
-                               return false;
-
-                       if (!selectors.Contains (field))
-                               return false;
-
-                       instruction = instruction.Previous;
-                       if (instruction == null)
-                               return false;
-
-                       if (instruction.OpCode != OpCodes.Call)
-                               return false;
-
-                       if (!IsRegisterSelector (instruction.Operand as MethodReference))
-                               return false;
-
-                       instruction = instruction.Previous;
-                       if (instruction == null)
-                               return false;
-
-                       if (instruction.OpCode != OpCodes.Ldstr)
-                               return false;
-
-                       return true;
-               }
-
-               static bool IsRegisterSelector (MethodReference method)
-               {
-                       if (method == null)
-                               return false;
-
-                       if (method.Name != "GetHandle" && method.Name != "sel_registerName")
-                               return false;
-
-                       if (method.DeclaringType.FullName != "MonoMac.ObjCRuntime.Selector")
-                               return false;
-
-                       return true;
-               }
-
-               static void RemoveUnusedSelectors (TypeDefinition type, HashSet<FieldDefinition> selectors)
-               {
-                       var fields = type.Fields;
-
-                       for (int i = 0; i < fields.Count; i++)
-                               if (selectors.Contains (fields [i]))
-                                       fields.RemoveAt (i--);
-               }
-
-               static HashSet<FieldDefinition> PopulateSelectors (TypeDefinition type)
-               {
-                       if (!type.HasFields)
-                               return null;
-
-                       HashSet<FieldDefinition> selectors = null;
-
-                       foreach (FieldDefinition field in type.Fields) {
-                               if (!IsSelector (field))
-                                       continue;
-
-                               if (selectors == null)
-                                       selectors = new HashSet<FieldDefinition> ();
-
-                               selectors.Add (field);
-                       }
-
-                       return selectors;
-               }
-
-               static bool IsSelector (FieldDefinition field)
-               {
-                       if (!field.IsStatic)
-                               return false;
-
-                       if (field.FieldType.FullName != "System.IntPtr")
-                               return false;
-
-                       if (!field.Name.StartsWith ("sel"))
-                               return false;
-
-                       return true;
-               }
-
-               static IEnumerable<MethodDefinition> CollectMethods (TypeDefinition type)
-               {
-                       if (!type.HasMethods)
-                               yield break;
-
-                       foreach (MethodDefinition method in type.Methods) {
-                               if (method.IsStatic && method.IsConstructor)
-                                       continue;
-
-                               yield return method;
-                       }
-               }
-       }
-}
index 2ad8af584166130aa87223703bcebe76f74cf476..22f09af6eabfb7cdf0874a34a713bdb43c7171e6 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 7c3fb3d2c72fe03d751753e5f811c2793ae03e30..41ad49155e0d8442d2ca07c152436841d9d03e77 100644 (file)
@@ -22,7 +22,13 @@ if (NOT "${BTLS_ARCH}" STREQUAL "")
        message (WARNING "SET ARCH: ${BTLS_ARCH}")
        set (CMAKE_SYSTEM_PROCESSOR "${BTLS_ARCH}")
 endif ()
+if (BUILD_DYNAMIC_BTLS)
+set (C_CXX_FLAGS "-Wall -Wsign-compare -Wmissing-field-initializers -fPIC -ggdb -fvisibility=hidden")
+elseif (BUILD_SHARED_LIBS)
+set (C_CXX_FLAGS "-Wall -Wsign-compare -Wmissing-field-initializers -fPIC -ggdb -fvisibility=hidden")
+else ()
 set (C_CXX_FLAGS "-Wall -Wsign-compare -Wmissing-field-initializers -ggdb -fvisibility=hidden")
+endif()
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_CXX_FLAGS} ${BTLS_CFLAGS}")
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${C_CXX_FLAGS} ${BTLS_CFLAGS}")
 set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${BTLS_CFLAGS}")
index f18d6c19247d968557f054379b1a22e1d54b2571..dda74ec4b5eae5788dd0015565be95f576f9ef5c 100644 (file)
@@ -207,3 +207,9 @@ mono_btls_ssl_set_server_name (MonoBtlsSsl *ptr, const char *name)
 {
        return SSL_set_tlsext_host_name (ptr->ssl, name);
 }
+
+MONO_API const char *
+mono_btls_ssl_get_server_name (MonoBtlsSsl *ptr)
+{
+       return SSL_get_servername (ptr->ssl, TLSEXT_NAMETYPE_host_name);
+}
index 10da4364881a7fc51177e9224278e09dfe0d2640..98b017340e1b1a956da2bafdaf056e5bd3c0b33b 100644 (file)
@@ -77,6 +77,9 @@ mono_btls_ssl_set_verify_param (MonoBtlsSsl *ptr, const MonoBtlsX509VerifyParam
 int
 mono_btls_ssl_set_server_name (MonoBtlsSsl *ptr, const char *name);
 
+const char *
+mono_btls_ssl_get_server_name (MonoBtlsSsl *ptr);
+
 void
 mono_btls_ssl_destroy (MonoBtlsSsl *ptr);
 
index 3106fc13078bbd75f986b6eb143eb92d91197a95..70a374557dd3a9a16f32956790699accd6efdfb7 100644 (file)
@@ -1764,7 +1764,12 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
        if (attrs & FILE_FLAG_RANDOM_ACCESS)
                posix_fadvise (fd, 0, 0, POSIX_FADV_RANDOM);
 #endif
-       
+
+#ifdef F_RDAHEAD
+       if (attrs & FILE_FLAG_SEQUENTIAL_SCAN)
+               fcntl(fd, F_RDAHEAD, 1);
+#endif
+
 #ifndef S_ISFIFO
 #define S_ISFIFO(m) ((m & S_IFIFO) != 0)
 #endif
@@ -2913,7 +2918,6 @@ gboolean FindNextFile (gpointer handle, WapiFindData *find_data)
        gunichar2 *utf16_basename;
        time_t create_time;
        glong bytes;
-       int thr_ret;
        gboolean ret = FALSE;
        
        ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FIND,
@@ -2925,8 +2929,7 @@ gboolean FindNextFile (gpointer handle, WapiFindData *find_data)
                return(FALSE);
        }
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
        
 retry:
        if (find_handle->count >= find_handle->num) {
@@ -3032,8 +3035,7 @@ retry:
        g_free (utf16_basename);
 
 cleanup:
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
        
        return(ret);
 }
@@ -3050,7 +3052,6 @@ gboolean FindClose (gpointer handle)
 {
        struct _WapiHandle_find *find_handle;
        gboolean ok;
-       int thr_ret;
 
        if (handle == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -3066,14 +3067,12 @@ gboolean FindClose (gpointer handle)
                return(FALSE);
        }
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
        
        g_strfreev (find_handle->namelist);
        g_free (find_handle->dir_part);
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
        
        mono_w32handle_unref (handle);
        
index b374973ebc67288c7b5fe9ba35c64c50d1a40856..d98ac677a2e22047432a89a717ad9b1a849f37ed 100644 (file)
@@ -130,7 +130,7 @@ static gboolean
 cleanup_close (gpointer handle, gpointer data, gpointer user_data)
 {
        if (mono_w32handle_get_type (handle) == MONO_W32HANDLE_SOCKET)
-               mono_w32handle_ops_close (handle, data);
+               mono_w32handle_force_close (handle, data);
 
        return FALSE;
 }
index a48d586713f751a7f02520017476835819ec8c35..bc369533a3f86bdc79f4d09e1c21cce51c292667 100644 (file)
@@ -201,6 +201,8 @@ common_sources = \
        number-ms.h             \
        object-internals.h      \
        opcodes.c               \
+       property-bag.h  \
+       property-bag.c  \
        socket-io.c             \
        socket-io.h             \
        w32process.c            \
index 0d47d88beda989a173d99301957aa1dc1f0abd86..aed903cc6a91b1f7db483af69afb4c1f19a47eae 100644 (file)
@@ -33,6 +33,7 @@
 #include <mono/utils/gc_wrapper.h>
 #include <mono/utils/mono-os-mutex.h>
 #include <mono/utils/mono-counters.h>
+#include <mono/utils/mono-compiler.h>
 
 #if HAVE_BOEHM_GC
 
@@ -1938,8 +1939,5 @@ mono_gchandle_free_domain (MonoDomain *domain)
 }
 #else
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_boehm_gc_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (boehm_gc);
 #endif /* no Boehm GC */
index 53e67682d53604ac205868943fada78ad4fc51b2..1ea2597599fba3ee870715c18c4dfadc4a086d20 100644 (file)
@@ -6,6 +6,12 @@
 #include <mono/metadata/tabledefs.h>
 
 
+enum InfrequentDataKind {
+       PROP_MARSHAL_INFO = 1, /* MonoMarshalType */
+       PROP_EXT = 2, /* MonoClassExt */
+       PROP_REF_INFO_HANDLE = 3, /* gchandle */
+};
+
 /* Accessors based on class kind*/
 
 /*
@@ -222,3 +228,58 @@ mono_class_set_field_count (MonoClass *klass, guint32 count)
                break;
        }
 }
+
+MonoMarshalType*
+mono_class_get_marshal_info (MonoClass *class)
+{
+       return mono_property_bag_get (&class->infrequent_data, PROP_MARSHAL_INFO);
+}
+
+void
+mono_class_set_marshal_info (MonoClass *class, MonoMarshalType *marshal_info)
+{
+       marshal_info->head.tag = PROP_MARSHAL_INFO;
+       mono_property_bag_add (&class->infrequent_data, marshal_info);
+}
+
+MonoClassExt*
+mono_class_get_ext (MonoClass *class)
+{
+       return mono_property_bag_get (&class->infrequent_data, PROP_EXT);
+}
+
+void
+mono_class_set_ext (MonoClass *class, MonoClassExt *ext)
+{
+       ext->head.tag = PROP_EXT;
+       mono_property_bag_add (&class->infrequent_data, ext);
+}
+
+typedef struct {
+       MonoPropertyBagItem head;
+       guint32 value;
+} Uint32Property;
+
+guint32
+mono_class_get_ref_info_handle (MonoClass *class)
+{
+       Uint32Property *prop = mono_property_bag_get (&class->infrequent_data, PROP_REF_INFO_HANDLE);
+       return prop ? prop->value : 0;
+}
+
+guint32
+mono_class_set_ref_info_handle (MonoClass *class, guint32 value)
+{
+       if (!value) {
+               Uint32Property *prop = mono_property_bag_get (&class->infrequent_data, PROP_REF_INFO_HANDLE);
+               if (prop)
+                       prop->value = 0;
+               return 0;
+       }
+
+       Uint32Property *prop = mono_class_alloc (class, sizeof (Uint32Property));
+       prop->head.tag = PROP_REF_INFO_HANDLE;
+       prop->value = value;
+       prop = mono_property_bag_add (&class->infrequent_data, prop);
+       return prop->value;
+}
index afbae43bff65bd721ac8c95acd74a26aa17808c0..40a8780dbbdd228d24efcaba92c53aa823c47779 100644 (file)
@@ -9,6 +9,7 @@
 #include <mono/metadata/object.h>
 #include <mono/metadata/mempool.h>
 #include <mono/metadata/metadata-internals.h>
+#include <mono/metadata/property-bag.h>
 #include <mono/io-layer/io-layer.h>
 #include "mono/utils/mono-compiler.h"
 #include "mono/utils/mono-error.h"
@@ -164,6 +165,8 @@ typedef struct {
 } MonoMarshalField;
 
 typedef struct {
+       MonoPropertyBagItem head;
+
        guint32 native_size, min_align;
        guint32 num_fields;
        MonoMethod *ptr_to_str;
@@ -232,6 +235,8 @@ typedef struct {
  * be used for fields which are only used in like 5% of all classes.
  */
 typedef struct {
+       MonoPropertyBagItem head;
+
        struct {
 #if MONO_SMALL_CONFIG
                guint16 first, count;
@@ -362,12 +367,6 @@ struct _MonoClass {
                int generic_param_token; /* for generic param types, both var and mvar */
        } sizes;
 
-       /* A GC handle pointing to the corresponding type builder/generic param builder */
-       guint32 ref_info_handle;
-
-       /* loaded on demand */
-       MonoMarshalType *marshal_info;
-
        /*
         * Field information: Type and location from object base
         */
@@ -386,8 +385,8 @@ struct _MonoClass {
        /* Generic vtable. Initialized by a call to mono_class_setup_vtable () */
        MonoMethod **vtable;
 
-       /* Rarely used fields of classes */
-       MonoClassExt *ext;
+       /* Infrequently used items. See class-accessors.c: InfrequentDataKind for what goes into here. */
+       MonoPropertyBag infrequent_data;
 };
 
 typedef struct {
@@ -1494,6 +1493,24 @@ mono_class_get_field_count (MonoClass *klass);
 void
 mono_class_set_field_count (MonoClass *klass, guint32 count);
 
+MonoMarshalType*
+mono_class_get_marshal_info (MonoClass *class);
+
+void
+mono_class_set_marshal_info (MonoClass *class, MonoMarshalType *marshal_info);
+
+MonoClassExt*
+mono_class_get_ext (MonoClass *class);
+
+void
+mono_class_set_ext (MonoClass *class, MonoClassExt *ext);
+
+guint32
+mono_class_get_ref_info_handle (MonoClass *class);
+
+guint32
+mono_class_set_ref_info_handle (MonoClass *class, guint32 value);
+
 /*Now that everything has been defined, let's include the inline functions */
 #include <mono/metadata/class-inlines.h>
 
index f4646c71123615982cf7aa098a864b102d9c997a..f8f2d7dca8a5c400cbd210ce77153f7ff3e08d9c 100644 (file)
@@ -245,9 +245,10 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError
                enclosing = mono_class_from_typeref_checked (image, MONO_TOKEN_TYPE_REF | idx, error); 
                return_val_if_nok (error, NULL);
 
-               if (enclosing->nested_classes_inited && enclosing->ext) {
+               MonoClassExt *ext = mono_class_get_ext (enclosing);
+               if (enclosing->nested_classes_inited && ext) {
                        /* Micro-optimization: don't scan the metadata tables if enclosing is already inited */
-                       for (tmp = enclosing->ext->nested_classes; tmp; tmp = tmp->next) {
+                       for (tmp = ext->nested_classes; tmp; tmp = tmp->next) {
                                res = (MonoClass *)tmp->data;
                                if (strcmp (res->name, name) == 0)
                                        return res;
@@ -1687,6 +1688,9 @@ mono_class_init_sizes (MonoClass *klass)
        MonoCachedClassInfo cached_info;
        gboolean has_cached_info;
 
+       if (klass->size_inited)
+               return;
+
        has_cached_info = mono_class_get_cached_class_info (klass, &cached_info);
 
        init_sizes_with_info (klass, has_cached_info ? &cached_info : NULL);
@@ -2089,6 +2093,17 @@ mono_class_layout_fields (MonoClass *klass, int base_instance_size, int packing_
        mono_loader_lock ();
        if (klass->instance_size && !klass->image->dynamic) {
                /* Might be already set using cached info */
+               if (klass->instance_size != instance_size) {
+                       /* Emit info to help debugging */
+                       g_print ("%d %d %d %d\n", klass->instance_size, instance_size, klass->blittable, blittable);
+                       g_print ("%d %d %d %d\n", klass->has_references, has_references, klass->packing_size, packing_size);
+                       g_print ("%d %d\n", klass->min_align, min_align);
+                       for (i = 0; i < top; ++i) {
+                               field = &klass->fields [i];
+                               if (!(field->type->attrs & FIELD_ATTRIBUTE_STATIC))
+                                       printf ("  %d %d\n", klass->fields [i].offset, field_offsets [i]);
+                       }
+               }
                g_assert (klass->instance_size == instance_size);
        } else {
                klass->instance_size = instance_size;
@@ -2523,7 +2538,8 @@ mono_class_setup_properties (MonoClass *klass)
        guint32 last;
        int first, count;
 
-       if (klass->ext && klass->ext->properties)
+       MonoClassExt *ext = mono_class_get_ext (klass);
+       if (ext && ext->properties)
                return;
 
        if (mono_class_is_ginst (klass)) {
@@ -2534,13 +2550,14 @@ mono_class_setup_properties (MonoClass *klass)
                if (mono_class_set_type_load_failure_causedby_class (klass, gklass, "Generic type definition failed to load"))
                        return;
 
-               properties = mono_class_new0 (klass, MonoProperty, gklass->ext->property.count + 1);
+               MonoClassExt *gext = mono_class_get_ext (gklass);
+               properties = mono_class_new0 (klass, MonoProperty, gext->property.count + 1);
 
-               for (i = 0; i < gklass->ext->property.count; i++) {
+               for (i = 0; i < gext->property.count; i++) {
                        MonoError error;
                        MonoProperty *prop = &properties [i];
 
-                       *prop = gklass->ext->properties [i];
+                       *prop = gext->properties [i];
 
                        if (prop->get)
                                prop->get = mono_class_inflate_generic_method_full_checked (
@@ -2553,8 +2570,8 @@ mono_class_setup_properties (MonoClass *klass)
                        prop->parent = klass;
                }
 
-               first = gklass->ext->property.first;
-               count = gklass->ext->property.count;
+               first = gext->property.first;
+               count = gext->property.count;
        } else {
                first = mono_metadata_properties_from_typedef (klass->image, mono_metadata_token_index (klass->type_token) - 1, &last);
                count = last - first;
@@ -2603,23 +2620,24 @@ mono_class_setup_properties (MonoClass *klass)
        }
 
        mono_class_alloc_ext (klass);
+       ext = mono_class_get_ext (klass);
 
        mono_image_lock (klass->image);
 
-       if (klass->ext->properties) {
+       if (ext->properties) {
                /* We leak 'properties' which was allocated from the image mempool */
                mono_image_unlock (klass->image);
                return;
        }
 
-       klass->ext->property.first = first;
-       klass->ext->property.count = count;
+       ext->property.first = first;
+       ext->property.count = count;
 
        /* Flush any pending writes as we do double checked locking on klass->ext->properties */
        mono_memory_barrier ();
 
        /* Leave this assignment as the last op in the function */
-       klass->ext->properties = properties;
+       ext->properties = properties;
 
        mono_image_unlock (klass->image);
 }
@@ -2655,7 +2673,8 @@ mono_class_setup_events (MonoClass *klass)
        guint32 last;
        MonoEvent *events;
 
-       if (klass->ext && klass->ext->events)
+       MonoClassExt *ext = mono_class_get_ext (klass);
+       if (ext && ext->events)
                return;
 
        if (mono_class_is_ginst (klass)) {
@@ -2666,8 +2685,9 @@ mono_class_setup_events (MonoClass *klass)
                if (mono_class_set_type_load_failure_causedby_class (klass, gklass, "Generic type definition failed to load"))
                        return;
 
-               first = gklass->ext->event.first;
-               count = gklass->ext->event.count;
+               MonoClassExt *gext = mono_class_get_ext (gklass);
+               first = gext->event.first;
+               count = gext->event.count;
 
                events = mono_class_new0 (klass, MonoEvent, count);
 
@@ -2677,7 +2697,7 @@ mono_class_setup_events (MonoClass *klass)
                for (i = 0; i < count; i++) {
                        MonoError error;
                        MonoEvent *event = &events [i];
-                       MonoEvent *gevent = &gklass->ext->events [i];
+                       MonoEvent *gevent = &gext->events [i];
 
                        mono_error_init (&error); //since we do conditional calls, we must ensure the default value is ok
 
@@ -2766,22 +2786,23 @@ mono_class_setup_events (MonoClass *klass)
        }
 
        mono_class_alloc_ext (klass);
+       ext = mono_class_get_ext (klass);
 
        mono_image_lock (klass->image);
 
-       if (klass->ext->events) {
+       if (ext->events) {
                mono_image_unlock (klass->image);
                return;
        }
 
-       klass->ext->event.first = first;
-       klass->ext->event.count = count;
+       ext->event.first = first;
+       ext->event.count = count;
 
        /* Flush any pending writes as we do double checked locking on klass->ext.events */
        mono_memory_barrier ();
 
        /* Leave this assignment as the last op in the function */
-       klass->ext->events = events;
+       ext->events = events;
 
        mono_image_unlock (klass->image);
 }
@@ -3544,6 +3565,8 @@ setup_interface_offsets (MonoClass *klass, int cur_slot, gboolean overwrite)
        int num_array_interfaces;
        int is_enumerator = FALSE;
 
+       mono_loader_lock ();
+
        mono_class_setup_supertypes (klass);
        /* 
         * get the implicit generic interfaces for either the arrays or for System.Array/InternalEnumerator<T>
@@ -3704,8 +3727,6 @@ setup_interface_offsets (MonoClass *klass, int cur_slot, gboolean overwrite)
        }
 
        /* Publish the data */
-       mono_loader_lock ();
-
        klass->max_interface_id = max_iid;
        /*
         * We might get called multiple times:
@@ -3747,9 +3768,9 @@ setup_interface_offsets (MonoClass *klass, int cur_slot, gboolean overwrite)
                klass->interface_bitmap = bitmap;
 #endif
        }
+end:
        mono_loader_unlock ();
 
-end:
        g_free (interfaces_full);
        g_free (interface_offsets_full);
        g_free (array_interfaces);
@@ -6765,9 +6786,10 @@ mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)
                mono_class_set_failure (klass, mono_error_box (&prepared_error, klass->image));
                mono_error_cleanup (&prepared_error);
        } else if (eclass->enumtype && !mono_class_enum_basetype (eclass)) {
-               if (!eclass->ref_info_handle || eclass->wastypebuilder) {
+               guint32 ref_info_handle = mono_class_get_ref_info_handle (eclass);
+               if (!ref_info_handle || eclass->wastypebuilder) {
                        g_warning ("Only incomplete TypeBuilder objects are allowed to be an enum without base_type");
-                       g_assert (eclass->ref_info_handle && !eclass->wastypebuilder);
+                       g_assert (ref_info_handle && !eclass->wastypebuilder);
                }
                /* element_size -1 is ok as this is not an instantitable type*/
                klass->sizes.element_size = -1;
@@ -7135,23 +7157,25 @@ mono_class_get_field_default_value (MonoClassField *field, MonoTypeEnum *def_typ
 
        g_assert (field->type->attrs & FIELD_ATTRIBUTE_HAS_DEFAULT);
 
-       if (!klass->ext || !klass->ext->field_def_values) {
+       MonoClassExt *ext = mono_class_get_ext (klass);
+       if (!ext || !ext->field_def_values) {
                MonoFieldDefaultValue *def_values;
 
                mono_class_alloc_ext (klass);
+               ext = mono_class_get_ext (klass);
 
                def_values = (MonoFieldDefaultValue *)mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * mono_class_get_field_count (klass));
 
                mono_image_lock (klass->image);
                mono_memory_barrier ();
-               if (!klass->ext->field_def_values)
-                       klass->ext->field_def_values = def_values;
+               if (!ext->field_def_values)
+                       ext->field_def_values = def_values;
                mono_image_unlock (klass->image);
        }
 
        field_index = mono_field_get_index (field);
                
-       if (!klass->ext->field_def_values [field_index].data) {
+       if (!ext->field_def_values [field_index].data) {
                cindex = mono_metadata_get_constant_index (field->parent->image, mono_class_get_field_token (field), 0);
                if (!cindex)
                        return NULL;
@@ -7159,20 +7183,21 @@ mono_class_get_field_default_value (MonoClassField *field, MonoTypeEnum *def_typ
                g_assert (!(field->type->attrs & FIELD_ATTRIBUTE_HAS_FIELD_RVA));
 
                mono_metadata_decode_row (&field->parent->image->tables [MONO_TABLE_CONSTANT], cindex - 1, constant_cols, MONO_CONSTANT_SIZE);
-               klass->ext->field_def_values [field_index].def_type = (MonoTypeEnum)constant_cols [MONO_CONSTANT_TYPE];
-               klass->ext->field_def_values [field_index].data = (const char *)mono_metadata_blob_heap (field->parent->image, constant_cols [MONO_CONSTANT_VALUE]);
+               ext->field_def_values [field_index].def_type = (MonoTypeEnum)constant_cols [MONO_CONSTANT_TYPE];
+               ext->field_def_values [field_index].data = (const char *)mono_metadata_blob_heap (field->parent->image, constant_cols [MONO_CONSTANT_VALUE]);
        }
 
-       *def_type = klass->ext->field_def_values [field_index].def_type;
-       return klass->ext->field_def_values [field_index].data;
+       *def_type = ext->field_def_values [field_index].def_type;
+       return ext->field_def_values [field_index].data;
 }
 
 static int
 mono_property_get_index (MonoProperty *prop)
 {
-       int index = prop - prop->parent->ext->properties;
+       MonoClassExt *ext = mono_class_get_ext (prop->parent);
+       int index = prop - ext->properties;
 
-       g_assert (index >= 0 && index < prop->parent->ext->property.count);
+       g_assert (index >= 0 && index < ext->property.count);
 
        return index;
 }
@@ -7197,10 +7222,11 @@ mono_class_get_property_default_value (MonoProperty *property, MonoTypeEnum *def
         */
 
        if (image_is_dynamic (klass->image)) {
+               MonoClassExt *ext = mono_class_get_ext (klass);
                int prop_index = mono_property_get_index (property);
-               if (klass->ext->prop_def_values && klass->ext->prop_def_values [prop_index].data) {
-                       *def_type = klass->ext->prop_def_values [prop_index].def_type;
-                       return klass->ext->prop_def_values [prop_index].data;
+               if (ext->prop_def_values && ext->prop_def_values [prop_index].data) {
+                       *def_type = ext->prop_def_values [prop_index].def_type;
+                       return ext->prop_def_values [prop_index].data;
                }
                return NULL;
        }
@@ -7220,10 +7246,11 @@ mono_class_get_event_token (MonoEvent *event)
        int i;
 
        while (klass) {
-               if (klass->ext) {
-                       for (i = 0; i < klass->ext->event.count; ++i) {
-                               if (&klass->ext->events [i] == event)
-                                       return mono_metadata_make_token (MONO_TABLE_EVENT, klass->ext->event.first + i + 1);
+               MonoClassExt *ext = mono_class_get_ext (klass);
+               if (ext) {
+                       for (i = 0; i < ext->event.count; ++i) {
+                               if (&ext->events [i] == event)
+                                       return mono_metadata_make_token (MONO_TABLE_EVENT, ext->event.first + i + 1);
                        }
                }
                klass = klass->parent;
@@ -7271,9 +7298,10 @@ mono_class_get_property_token (MonoProperty *prop)
                MonoProperty* p;
                int i = 0;
                gpointer iter = NULL;
+               MonoClassExt *ext = mono_class_get_ext (klass);
                while ((p = mono_class_get_properties (klass, &iter))) {
-                       if (&klass->ext->properties [i] == prop)
-                               return mono_metadata_make_token (MONO_TABLE_PROPERTY, klass->ext->property.first + i + 1);
+                       if (&ext->properties [i] == prop)
+                               return mono_metadata_make_token (MONO_TABLE_PROPERTY, ext->property.first + i + 1);
                        
                        i ++;
                }
@@ -8370,7 +8398,7 @@ mono_class_is_assignable_from (MonoClass *klass, MonoClass *oklass)
                }
 
                /* interface_offsets might not be set for dynamic classes */
-               if (oklass->ref_info_handle && !oklass->interface_bitmap) {
+               if (mono_class_get_ref_info_handle (oklass) && !oklass->interface_bitmap) {
                        /* 
                         * oklass might be a generic type parameter but they have 
                         * interface_offsets set.
@@ -9117,7 +9145,7 @@ mono_class_num_properties (MonoClass *klass)
 {
        mono_class_setup_properties (klass);
 
-       return klass->ext->property.count;
+       return mono_class_get_ext (klass)->property.count;
 }
 
 /**
@@ -9131,7 +9159,7 @@ mono_class_num_events (MonoClass *klass)
 {
        mono_class_setup_events (klass);
 
-       return klass->ext->event.count;
+       return mono_class_get_ext (klass)->event.count;
 }
 
 /**
@@ -9316,9 +9344,10 @@ mono_class_get_properties (MonoClass* klass, gpointer *iter)
                return NULL;
        if (!*iter) {
                mono_class_setup_properties (klass);
+               MonoClassExt *ext = mono_class_get_ext (klass);
                /* start from the first */
-               if (klass->ext->property.count) {
-                       *iter = &klass->ext->properties [0];
+               if (ext->property.count) {
+                       *iter = &ext->properties [0];
                        return (MonoProperty *)*iter;
                } else {
                        /* no fields */
@@ -9327,7 +9356,8 @@ mono_class_get_properties (MonoClass* klass, gpointer *iter)
        }
        property = (MonoProperty *)*iter;
        property++;
-       if (property < &klass->ext->properties [klass->ext->property.count]) {
+       MonoClassExt *ext = mono_class_get_ext (klass);
+       if (property < &ext->properties [ext->property.count]) {
                *iter = property;
                return (MonoProperty *)*iter;
        }
@@ -9354,9 +9384,10 @@ mono_class_get_events (MonoClass* klass, gpointer *iter)
                return NULL;
        if (!*iter) {
                mono_class_setup_events (klass);
+               MonoClassExt *ext = mono_class_get_ext (klass);
                /* start from the first */
-               if (klass->ext->event.count) {
-                       *iter = &klass->ext->events [0];
+               if (ext->event.count) {
+                       *iter = &ext->events [0];
                        return (MonoEvent *)*iter;
                } else {
                        /* no fields */
@@ -9365,7 +9396,8 @@ mono_class_get_events (MonoClass* klass, gpointer *iter)
        }
        event = (MonoEvent *)*iter;
        event++;
-       if (event < &klass->ext->events [klass->ext->event.count]) {
+       MonoClassExt *ext = mono_class_get_ext (klass);
+       if (event < &ext->events [ext->event.count]) {
                *iter = event;
                return (MonoEvent *)*iter;
        }
@@ -9463,7 +9495,7 @@ setup_nested_types (MonoClass *klass)
 
        mono_memory_barrier ();
        if (!klass->nested_classes_inited) {
-               klass->ext->nested_classes = nested_classes;
+               mono_class_get_ext (klass)->nested_classes = nested_classes;
                mono_memory_barrier ();
                klass->nested_classes_inited = TRUE;
        }
@@ -9495,10 +9527,11 @@ mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
                setup_nested_types (klass);
 
        if (!*iter) {
+               MonoClassExt *ext = mono_class_get_ext (klass);
                /* start from the first */
-               if (klass->ext && klass->ext->nested_classes) {
-                       *iter = klass->ext->nested_classes;
-                       return (MonoClass *)klass->ext->nested_classes->data;
+               if (ext && ext->nested_classes) {
+                       *iter = ext->nested_classes;
+                       return (MonoClass *)ext->nested_classes->data;
                } else {
                        /* no nested types */
                        return NULL;
@@ -9637,28 +9670,30 @@ mono_field_get_rva (MonoClassField *field)
 
        g_assert (field->type->attrs & FIELD_ATTRIBUTE_HAS_FIELD_RVA);
 
-       if (!klass->ext || !klass->ext->field_def_values) {
+       MonoClassExt *ext = mono_class_get_ext (klass);
+       if (!ext || !ext->field_def_values) {
                mono_class_alloc_ext (klass);
+               ext = mono_class_get_ext (klass);
 
                field_def_values = (MonoFieldDefaultValue *)mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * mono_class_get_field_count (klass));
 
                mono_image_lock (klass->image);
-               if (!klass->ext->field_def_values)
-                       klass->ext->field_def_values = field_def_values;
+               if (!ext->field_def_values)
+                       ext->field_def_values = field_def_values;
                mono_image_unlock (klass->image);
        }
 
        field_index = mono_field_get_index (field);
                
-       if (!klass->ext->field_def_values [field_index].data && !image_is_dynamic (klass->image)) {
+       if (!ext->field_def_values [field_index].data && !image_is_dynamic (klass->image)) {
                int first_field_idx = mono_class_get_first_field_idx (klass);
                mono_metadata_field_info (field->parent->image, first_field_idx + field_index, NULL, &rva, NULL);
                if (!rva)
                        g_warning ("field %s in %s should have RVA data, but hasn't", mono_field_get_name (field), field->parent->name);
-               klass->ext->field_def_values [field_index].data = mono_image_rva_map (field->parent->image, rva);
+               ext->field_def_values [field_index].data = mono_image_rva_map (field->parent->image, rva);
        }
 
-       return klass->ext->field_def_values [field_index].data;
+       return ext->field_def_values [field_index].data;
 }
 
 /**
@@ -10631,14 +10666,14 @@ mono_class_alloc_ext (MonoClass *klass)
 {
        MonoClassExt *ext;
 
-       if (klass->ext)
+       if (mono_class_get_ext (klass))
                return;
 
        ext = (MonoClassExt *)mono_class_alloc0 (klass, sizeof (MonoClassExt));
        mono_image_lock (klass->image);
        mono_memory_barrier ();
-       if (!klass->ext)
-               klass->ext = ext;
+       if (!mono_class_get_ext (klass))
+               mono_class_set_ext (klass, ext);
        class_ext_size += sizeof (MonoClassExt);
        ++class_ext_count;
        mono_image_unlock (klass->image);
index 56d43362d965b419c96964e11520a3391f8d530e..938ef80b171f844072f7f031150e9fcb2c9d2a72 100644 (file)
@@ -6,9 +6,10 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 #include "mono/metadata/console-win32-internals.h"
 
 MonoBoolean
@@ -93,8 +94,5 @@ ves_icall_System_ConsoleDriver_TtySetup (MonoString *keypad, MonoString *teardow
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_console_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (console_win32_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 7aacb5ec86481c791df073bcf31baab29e61cecc..d75660775e7153a663bcf048cdd7046b92eea063 100644 (file)
@@ -6,9 +6,10 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 #include "mono/metadata/coree-internals.h"
 
 BOOL STDMETHODCALLTYPE
@@ -50,8 +51,5 @@ mono_coree_set_act_ctx (const char *file_name)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_coree_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (coree_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 600a27e0765ba20e8109fb7678ec505053d6e17d..8e56148ab1cb8fd8994f2233b11deb542b1df47d 100644 (file)
@@ -134,10 +134,11 @@ find_field_index (MonoClass *klass, MonoClassField *field) {
 static guint32
 find_property_index (MonoClass *klass, MonoProperty *property) {
        int i;
+       MonoClassExt *ext = mono_class_get_ext (klass);
 
-       for (i = 0; i < klass->ext->property.count; ++i) {
-               if (property == &klass->ext->properties [i])
-                       return klass->ext->property.first + 1 + i;
+       for (i = 0; i < ext->property.count; ++i) {
+               if (property == &ext->properties [i])
+                       return ext->property.first + 1 + i;
        }
        return 0;
 }
@@ -148,10 +149,11 @@ find_property_index (MonoClass *klass, MonoProperty *property) {
 static guint32
 find_event_index (MonoClass *klass, MonoEvent *event) {
        int i;
+       MonoClassExt *ext = mono_class_get_ext (klass);
 
-       for (i = 0; i < klass->ext->event.count; ++i) {
-               if (event == &klass->ext->events [i])
-                       return klass->ext->event.first + 1 + i;
+       for (i = 0; i < ext->event.count; ++i) {
+               if (event == &ext->events [i])
+                       return ext->event.first + 1 + i;
        }
        return 0;
 }
index 3fe59706eed425c8e6d5ca7de9148fef9064b237..ad455297d1110c13b68bcb19ef1831463f836723 100644 (file)
@@ -29,4 +29,13 @@ mono_file_io_replace_file (gunichar2 *destinationFileName, gunichar2 *sourceFile
 gboolean
 mono_file_io_unlock_file (HANDLE handle, gint64 position, gint64 length, gint32 *error);
 
+HANDLE
+mono_file_io_get_console_output (void);
+
+HANDLE
+mono_file_io_get_console_error (void);
+
+HANDLE
+mono_file_io_get_console_input (void);
+
 #endif /* __MONO_FILE_IO_INTERNALS_H__ */
index 2ece546a9c3ebed189a7e493cae2587b716e6e14..3af6c056c857c6c3f803f33dbef5c580ab2a10bc 100644 (file)
@@ -6,9 +6,10 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 #include "mono/metadata/file-io-windows-internals.h"
 
 gboolean
@@ -112,10 +113,55 @@ mono_file_io_unlock_file (HANDLE handle, gint64 position, gint64 length, gint32
        return result;
 }
 
+HANDLE
+mono_file_io_get_console_output (void)
+{
+       MonoError mono_error;
+       mono_error_init (&mono_error);
+
+       g_unsupported_api ("GetStdHandle (STD_OUTPUT_HANDLE)");
+
+       mono_error_set_not_supported (&mono_error, G_UNSUPPORTED_API, "GetStdHandle (STD_OUTPUT_HANDLE)");
+       mono_error_set_pending_exception (&mono_error);
+
+       SetLastError (ERROR_NOT_SUPPORTED);
+
+       return INVALID_HANDLE_VALUE;
+}
+
+HANDLE
+mono_file_io_get_console_input (void)
+{
+       MonoError mono_error;
+       mono_error_init (&mono_error);
+
+       g_unsupported_api ("GetStdHandle (STD_INPUT_HANDLE)");
+
+       mono_error_set_not_supported (&mono_error, G_UNSUPPORTED_API, "GetStdHandle (STD_INPUT_HANDLE)");
+       mono_error_set_pending_exception (&mono_error);
+
+       SetLastError (ERROR_NOT_SUPPORTED);
+
+       return INVALID_HANDLE_VALUE;
+}
+
+HANDLE
+mono_file_io_get_console_error (void)
+{
+       MonoError mono_error;
+       mono_error_init (&mono_error);
+
+       g_unsupported_api ("GetStdHandle (STD_ERROR_HANDLE)");
+
+       mono_error_set_not_supported (&mono_error, G_UNSUPPORTED_API, "GetStdHandle (STD_ERROR_HANDLE)");
+       mono_error_set_pending_exception (&mono_error);
+
+       SetLastError (ERROR_NOT_SUPPORTED);
+
+       return INVALID_HANDLE_VALUE;
+}
+
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_file_io_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (file_io_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 7f55a5e9542fb83ebeec0a1d401b2849cc09404e..0b001db668921cde759f8d3dbc434bc30aedf43f 100644 (file)
@@ -1085,22 +1085,46 @@ ves_icall_System_IO_MonoIO_SetFileTime (HANDLE handle, gint64 creation_time,
        return(ret);
 }
 
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+HANDLE
+mono_file_io_get_console_output (void)
+{
+       return GetStdHandle (STD_OUTPUT_HANDLE);
+}
+#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
+
 HANDLE 
 ves_icall_System_IO_MonoIO_get_ConsoleOutput ()
 {
-       return GetStdHandle (STD_OUTPUT_HANDLE);
+       return mono_file_io_get_console_output ();
 }
 
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+HANDLE
+mono_file_io_get_console_input (void)
+{
+       return GetStdHandle (STD_INPUT_HANDLE);
+}
+#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
+
 HANDLE 
 ves_icall_System_IO_MonoIO_get_ConsoleInput ()
 {
-       return GetStdHandle (STD_INPUT_HANDLE);
+       return mono_file_io_get_console_input ();
+}
+
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+HANDLE
+mono_file_io_get_console_error (void)
+{
+       return GetStdHandle (STD_ERROR_HANDLE);
 }
+#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
 
 HANDLE 
 ves_icall_System_IO_MonoIO_get_ConsoleError ()
 {
-       return GetStdHandle (STD_ERROR_HANDLE);
+       return mono_file_io_get_console_error ();
 }
 
 MonoBoolean
index b0fd5d9b8962bbfbcfefa532774b6fdb94adf6dd..3cc9124c0854ccf6626e244329df27bd8c5e90ae 100644 (file)
@@ -13,8 +13,9 @@
  */
 
 #include <config.h>
-
-#ifdef HOST_WIN32
+#include <glib.h>
+#include <mono/utils/mono-compiler.h>
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) && defined(HOST_WIN32)
 
 #include <glib.h>
 
@@ -410,4 +411,8 @@ gboolean mono_mmap_unmap (void *mmap_handle)
        return result;
 }
 
+#else
+
+MONO_EMPTY_SOURCE_FILE (file_mmap_windows);
+
 #endif
index 0b5afa2624bbf1b11bf6898ff4922bf55b909896..f43e22f5d39ff47fc302bcafec9d7d9be1c04c1b 100644 (file)
@@ -6,9 +6,10 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 #include "mono/metadata/icall-windows-internals.h"
 
 MonoString *
@@ -87,8 +88,5 @@ mono_icall_wait_for_input_idle (gpointer handle, gint32 milliseconds)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_icall_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (icall_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 9b5686568da3491507fa7ea5ff90469edea9dd81..29ee725a4db5e926d61af3cec194340f836c58a7 100644 (file)
@@ -2098,12 +2098,13 @@ ves_icall_MonoField_GetRawConstantValue (MonoReflectionField *rfield)
        if (image_is_dynamic (field->parent->image)) {
                MonoClass *klass = field->parent;
                int fidx = field - klass->fields;
+               MonoClassExt *ext = mono_class_get_ext (klass);
+
+               g_assert (ext);
+               g_assert (ext->field_def_values);
+               def_type = ext->field_def_values [fidx].def_type;
+               def_value = ext->field_def_values [fidx].data;
 
-               g_assert (fidx >= 0 && fidx < mono_class_get_field_count (klass));
-               g_assert (klass->ext);
-               g_assert (klass->ext->field_def_values);
-               def_type = klass->ext->field_def_values [fidx].def_type;
-               def_value = klass->ext->field_def_values [fidx].data;
                if (def_type == MONO_TYPE_END) {
                        mono_set_pending_exception (mono_get_exception_invalid_operation (NULL));
                        return NULL;
index 6382c774ae3fd431d61f741df0456253a4847d44..328cb5ac7583312904112bbfb933f779f8a9c402 100644 (file)
@@ -4,7 +4,6 @@
 #include <mono/metadata/metadata.h>
 #include <mono/metadata/image.h>
 #include <mono/utils/mono-error.h>
-#include <mono/utils/mono-dl.h>
 
 MONO_BEGIN_DECLS
 
@@ -64,9 +63,6 @@ mono_lookup_internal_call (MonoMethod *method);
 void*
 mono_lookup_internal_call_full (MonoMethod *method, mono_bool *uses_handles);
 
-void
-mono_loader_register_module (const char *name, MonoDl *module);
-
 MONO_API const char*
 mono_lookup_icall_symbol (MonoMethod *m);
 
index 551f8a751e8e1d58edac3c6186346d64fd46100c..8ca4a27ab8211ed592ba4f0cbbe4d7f78d4ad91f 100644 (file)
@@ -21,6 +21,7 @@
 #endif
 
 #include <mono/io-layer/io-layer.h>
+#include <mono/utils/mono-compiler.h>
 
 #include "lock-tracer.h"
 
@@ -142,8 +143,5 @@ mono_locks_lock_released (RuntimeLocks kind, gpointer lock)
 }
 #else
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_lock_tracer_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (lock_tracer);
 #endif /* LOCK_TRACER */
index a2fa813499b6a3d54e89292b7a873f58002028dd..7ac1a33b47a8653ed9fc5d79c7cfa3690dcbf818 100644 (file)
@@ -6,9 +6,10 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 #include "mono/metadata/marshal-windows-internals.h"
 
 void *
@@ -32,8 +33,5 @@ mono_marshal_free_hglobal (gpointer ptr)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_marshal_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (marshal_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 11b688dbea39934fbf45e03c95b4a219d89a5edb..148f5bc251743e9d26bf104a8fc70b9c9c41d7cb 100644 (file)
@@ -9128,8 +9128,9 @@ mono_marshal_get_struct_to_ptr (MonoClass *klass)
 
        mono_marshal_load_type_info (klass);
 
-       if (klass->marshal_info->str_to_ptr)
-               return klass->marshal_info->str_to_ptr;
+       MonoMarshalType *marshal_info = mono_class_get_marshal_info (klass);
+       if (marshal_info->str_to_ptr)
+               return marshal_info->str_to_ptr;
 
        if (!stoptr) 
                stoptr = mono_class_get_method_from_name (mono_defaults.marshal_class, "StructureToPtr", 3);
@@ -9175,10 +9176,10 @@ mono_marshal_get_struct_to_ptr (MonoClass *klass)
        mono_mb_free (mb);
 
        mono_marshal_lock ();
-       if (!klass->marshal_info->str_to_ptr)
-               klass->marshal_info->str_to_ptr = res;
+       if (!marshal_info->str_to_ptr)
+               marshal_info->str_to_ptr = res;
        else
-               res = klass->marshal_info->str_to_ptr;
+               res = marshal_info->str_to_ptr;
        mono_marshal_unlock ();
        return res;
 }
@@ -9201,8 +9202,9 @@ mono_marshal_get_ptr_to_struct (MonoClass *klass)
 
        mono_marshal_load_type_info (klass);
 
-       if (klass->marshal_info->ptr_to_str)
-               return klass->marshal_info->ptr_to_str;
+       MonoMarshalType *marshal_info = mono_class_get_marshal_info (klass);
+       if (marshal_info->ptr_to_str)
+               return marshal_info->ptr_to_str;
 
        if (!ptostr) {
                MonoMethodSignature *sig;
@@ -9253,10 +9255,10 @@ mono_marshal_get_ptr_to_struct (MonoClass *klass)
        mono_mb_free (mb);
 
        mono_marshal_lock ();
-       if (!klass->marshal_info->ptr_to_str)
-               klass->marshal_info->ptr_to_str = res;
+       if (!marshal_info->ptr_to_str)
+               marshal_info->ptr_to_str = res;
        else
-               res = klass->marshal_info->ptr_to_str;
+               res = marshal_info->ptr_to_str;
        mono_marshal_unlock ();
        return res;
 }
@@ -11233,7 +11235,7 @@ mono_marshal_is_loading_type_info (MonoClass *klass)
 /**
  * mono_marshal_load_type_info:
  *
- *  Initialize klass->marshal_info using information from metadata. This function can
+ *  Initialize klass::marshal_info using information from metadata. This function can
  * recursively call itself, and the caller is responsible to avoid that by calling 
  * mono_marshal_is_loading_type_info () beforehand.
  *
@@ -11252,14 +11254,16 @@ mono_marshal_load_type_info (MonoClass* klass)
 
        g_assert (klass != NULL);
 
-       if (klass->marshal_info)
-               return klass->marshal_info;
+       info = mono_class_get_marshal_info (klass);
+       if (info)
+               return info;
 
        if (!klass->inited)
                mono_class_init (klass);
 
-       if (klass->marshal_info)
-               return klass->marshal_info;
+       info = mono_class_get_marshal_info (klass);
+       if (info)
+               return info;
 
        /*
         * This function can recursively call itself, so we keep the list of classes which are
@@ -11381,15 +11385,17 @@ mono_marshal_load_type_info (MonoClass* klass)
        mono_native_tls_set_value (load_type_info_tls_id, loads_list);
 
        mono_marshal_lock ();
-       if (!klass->marshal_info) {
+       MonoMarshalType *info2 = mono_class_get_marshal_info (klass);
+       if (!info2) {
                /*We do double-checking locking on marshal_info */
                mono_memory_barrier ();
-               klass->marshal_info = info;
+               mono_class_set_marshal_info (klass, info);
                ++class_marshal_info_count;
+               info2 = info;
        }
        mono_marshal_unlock ();
 
-       return klass->marshal_info;
+       return info2;
 }
 
 /**
@@ -11401,8 +11407,9 @@ mono_marshal_load_type_info (MonoClass* klass)
  */
 gint32
 mono_class_native_size (MonoClass *klass, guint32 *align)
-{      
-       if (!klass->marshal_info) {
+{
+       MonoMarshalType *info = mono_class_get_marshal_info (klass);
+       if (!info) {
                if (mono_marshal_is_loading_type_info (klass)) {
                        if (align)
                                *align = 0;
@@ -11410,12 +11417,13 @@ mono_class_native_size (MonoClass *klass, guint32 *align)
                } else {
                        mono_marshal_load_type_info (klass);
                }
+               info = mono_class_get_marshal_info (klass);
        }
 
        if (align)
-               *align = klass->marshal_info->min_align;
+               *align = info->min_align;
 
-       return klass->marshal_info->native_size;
+       return info->native_size;
 }
 
 /*
index a68897538aec5f910d666a786c38532051f87d5d..1c82b442e2798dbc7ce8fdcf4855fc7c9bdc8ed3 100644 (file)
@@ -917,5 +917,8 @@ mono_image_set_description (MonoImageSet *);
 MonoImageSet *
 mono_find_image_set_owner (void *ptr);
 
+void
+mono_loader_register_module (const char *name, MonoDl *module);
+
 #endif /* __MONO_METADATA_INTERNALS_H__ */
 
index 36a954cd8b036e73716d1d806fd2a83a465f7098..e8a19188a757201581b562a6ce7309af31b420d5 100644 (file)
@@ -6634,8 +6634,8 @@ mono_metadata_get_corresponding_event_from_generic_type_definition (MonoEvent *e
                return event;
 
        gtd = mono_class_get_generic_class (event->parent)->container_class;
-       offset = event - event->parent->ext->events;
-       return gtd->ext->events + offset;
+       offset = event - mono_class_get_ext (event->parent)->events;
+       return mono_class_get_ext (gtd)->events + offset;
 }
 
 /*
@@ -6652,8 +6652,8 @@ mono_metadata_get_corresponding_property_from_generic_type_definition (MonoPrope
                return property;
 
        gtd = mono_class_get_generic_class (property->parent)->container_class;
-       offset = property - property->parent->ext->properties;
-       return gtd->ext->properties + offset;
+       offset = property - mono_class_get_ext (property->parent)->properties;
+       return mono_class_get_ext (gtd)->properties + offset;
 }
 
 MonoWrapperCaches*
index a4c48f1413dda3adef0ed9064d111854343a075e..0a697360e22e3404541a4f645725d78a2d518217 100644 (file)
@@ -9,6 +9,7 @@
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 #include <config.h>
+#include <mono/utils/mono-compiler.h>
 #include "mono-endian.h"
 
 #if NO_UNALIGNED_ACCESS
@@ -86,4 +87,8 @@ mono_read64 (const unsigned char *x)
        return r.i;
 }
 
+#else /* NO_UNALIGNED_ACCESS */
+
+MONO_EMPTY_SOURCE_FILE (mono_endian);
+
 #endif
index 791e76c2f8ea7a210de4e5e203c7956bc9307244..01549b8d3fc91347f8070f9c15c87bb2f7be990b 100644 (file)
@@ -6,9 +6,10 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 #include "mono/metadata/mono-security-windows-internals.h"
 
 gpointer
@@ -172,8 +173,5 @@ mono_security_win_protect_user (gunichar2 *path)
 }
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_mono_security_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (mono_security_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 0990ff875fd9a661ce35792db960492ebe1ecb64..9ea87bd844c51a3efaf775a8b159251b1271fc2f 100644 (file)
@@ -552,8 +552,5 @@ mono_gc_is_null (void)
 }
 #else
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_null_gc_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (null_gc);
 #endif /* HAVE_NULL_GC */
diff --git a/mono/metadata/property-bag.c b/mono/metadata/property-bag.c
new file mode 100644 (file)
index 0000000..28e8113
--- /dev/null
@@ -0,0 +1,49 @@
+
+/*
+ * property-bag.c: Linearizable property bag.
+ *
+ * Authors:
+ *   Rodrigo Kumpera (kumpera@gmail.com)
+ *
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+#include <mono/metadata/property-bag.h>
+#include <mono/utils/atomic.h>
+#include <mono/utils/mono-membar.h>
+
+void*
+mono_property_bag_get (MonoPropertyBag *bag, int tag)
+{
+       MonoPropertyBagItem *item;
+       
+       for (item = bag->head; item && item->tag <= tag; item = item->next) {
+               if (item->tag == tag)
+                       return item;
+       }
+       return NULL;
+}
+
+void*
+mono_property_bag_add (MonoPropertyBag *bag, void *value)
+{
+       MonoPropertyBagItem *cur, **prev, *item = value;
+       int tag = item->tag;
+       mono_memory_barrier (); //publish the values in value
+
+retry:
+       prev = &bag->head;
+       while (1) {
+               cur = *prev;
+               if (!cur || cur->tag > tag) {
+                       item->next = cur;
+                       if (InterlockedCompareExchangePointer ((void*)prev, item, cur) == cur)
+                               return item;
+                       goto retry;
+               } else if (cur->tag == tag) {
+                       return cur;
+               } else {
+                       prev = &cur->next;
+               }
+       }
+       return value;
+}
diff --git a/mono/metadata/property-bag.h b/mono/metadata/property-bag.h
new file mode 100644 (file)
index 0000000..8f3f0ee
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * property-bag.h: Linearizable property bag.
+ *
+ * Authors:
+ *   Rodrigo Kumpera (kumpera@gmail.com)
+ *
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+#ifndef __MONO_METADATA_PROPERTY_BAG_H__
+#define __MONO_METADATA_PROPERTY_BAG_H__
+
+#include <mono/utils/mono-compiler.h>
+
+typedef struct _MonoPropertyBagItem MonoPropertyBagItem;
+
+struct _MonoPropertyBagItem {
+       MonoPropertyBagItem *next;
+       int tag;
+};
+
+typedef struct {
+       MonoPropertyBagItem *head;
+} MonoPropertyBag;
+
+void* mono_property_bag_get (MonoPropertyBag *bag, int tag);
+void* mono_property_bag_add (MonoPropertyBag *bag, void *value);
+
+#endif
index 88ecb5fddfdf84bb216c4259845dbc865569cf3e..c0c334a0f23e3b0671c51336e7144180378d7774 100644 (file)
@@ -89,11 +89,12 @@ gpointer
 mono_class_get_ref_info (MonoClass *klass)
 {
        MONO_REQ_GC_UNSAFE_MODE;
+       guint32 ref_info_handle = mono_class_get_ref_info_handle (klass);
 
-       if (klass->ref_info_handle == 0)
+       if (ref_info_handle == 0)
                return NULL;
        else
-               return mono_gchandle_get_target (klass->ref_info_handle);
+               return mono_gchandle_get_target (ref_info_handle);
 }
 
 void
@@ -101,19 +102,23 @@ mono_class_set_ref_info (MonoClass *klass, gpointer obj)
 {
        MONO_REQ_GC_UNSAFE_MODE;
 
-       klass->ref_info_handle = mono_gchandle_new ((MonoObject*)obj, FALSE);
+       guint32 candidate = mono_gchandle_new ((MonoObject*)obj, FALSE);
+       guint32 handle = mono_class_set_ref_info_handle (klass, candidate);
        ++class_ref_info_handle_count;
-       g_assert (klass->ref_info_handle != 0);
+
+       if (handle != candidate)
+               mono_gchandle_free (candidate);
 }
 
 void
 mono_class_free_ref_info (MonoClass *klass)
 {
        MONO_REQ_GC_NEUTRAL_MODE;
+       guint32 handle = mono_class_get_ref_info_handle (klass);
 
-       if (klass->ref_info_handle) {
-               mono_gchandle_free (klass->ref_info_handle);
-               klass->ref_info_handle = 0;
+       if (handle) {
+               mono_gchandle_free (handle);
+               mono_class_set_ref_info_handle (klass, 0);
        }
 }
 
@@ -2363,7 +2368,8 @@ guint32
 mono_declsec_flags_from_class (MonoClass *klass)
 {
        if (mono_class_get_flags (klass) & TYPE_ATTRIBUTE_HAS_SECURITY) {
-               if (!klass->ext || !klass->ext->declsec_flags) {
+               MonoClassExt *ext = mono_class_get_ext (klass);
+               if (!ext || !ext->declsec_flags) {
                        guint32 idx;
 
                        idx = mono_metadata_token_index (klass->type_token);
@@ -2371,11 +2377,12 @@ mono_declsec_flags_from_class (MonoClass *klass)
                        idx |= MONO_HAS_DECL_SECURITY_TYPEDEF;
                        mono_loader_lock ();
                        mono_class_alloc_ext (klass);
+                       ext = mono_class_get_ext (klass);
                        mono_loader_unlock ();
                        /* we cache the flags on classes */
-                       klass->ext->declsec_flags = mono_declsec_get_flags (klass->image, idx);
+                       ext->declsec_flags = mono_declsec_get_flags (klass->image, idx);
                }
-               return klass->ext->declsec_flags;
+               return ext->declsec_flags;
        }
        return 0;
 }
index 2f32e315a429ce58d78d7d89f304bc1f491dc5d0..b52ff6c6df9543e60c7386f0af3b70cc829f9840 100644 (file)
@@ -1217,10 +1217,11 @@ mono_image_fill_export_table_from_class (MonoDomain *domain, MonoClass *klass,
        table->next_idx ++;
 
        /* Emit nested types */
-       if (klass->ext && klass->ext->nested_classes) {
+       MonoClassExt *ext = mono_class_get_ext (klass);
+       if (ext && ext->nested_classes) {
                GList *tmp;
 
-               for (tmp = klass->ext->nested_classes; tmp; tmp = tmp->next)
+               for (tmp = ext->nested_classes; tmp; tmp = tmp->next)
                        mono_image_fill_export_table_from_class (domain, (MonoClass *)tmp->data, module_index, table->next_idx - 1, assembly);
        }
 
index 5b411fd05fe962e5a20dd28d65b86a2d49b360c5..3d73c7561332b5efbf78b0ed01f3c6b7f1240560 100644 (file)
@@ -3190,6 +3190,7 @@ typebuilder_setup_fields (MonoClass *klass, MonoError *error)
        MonoReflectionTypeBuilder *tb = (MonoReflectionTypeBuilder *)mono_class_get_ref_info (klass);
        MonoReflectionFieldBuilder *fb;
        MonoClassField *field;
+       MonoClassExt *ext;
        MonoImage *image = klass->image;
        const char *p, *p2;
        int i, instance_size, packing_size = 0;
@@ -3215,7 +3216,8 @@ typebuilder_setup_fields (MonoClass *klass, MonoError *error)
        
        klass->fields = image_g_new0 (image, MonoClassField, fcount);
        mono_class_alloc_ext (klass);
-       klass->ext->field_def_values = image_g_new0 (image, MonoFieldDefaultValue, fcount);
+       ext = mono_class_get_ext (klass);
+       ext->field_def_values = image_g_new0 (image, MonoFieldDefaultValue, fcount);
        /*
        This is, guess what, a hack.
        The issue is that the runtime doesn't know how to setup the fields of a typebuider and crash.
@@ -3248,7 +3250,7 @@ typebuilder_setup_fields (MonoClass *klass, MonoError *error)
                        size_t size = mono_array_length (rva_data);
                        char *data = (char *)mono_image_alloc (klass->image, size);
                        memcpy (data, base, size);
-                       klass->ext->field_def_values [i].data = data;
+                       ext->field_def_values [i].data = data;
                }
                if (fb->offset != -1)
                        field->offset = fb->offset;
@@ -3258,13 +3260,13 @@ typebuilder_setup_fields (MonoClass *klass, MonoError *error)
                if (fb->def_value) {
                        MonoDynamicImage *assembly = (MonoDynamicImage*)klass->image;
                        field->type->attrs |= FIELD_ATTRIBUTE_HAS_DEFAULT;
-                       idx = mono_dynimage_encode_constant (assembly, fb->def_value, &klass->ext->field_def_values [i].def_type);
+                       idx = mono_dynimage_encode_constant (assembly, fb->def_value, &ext->field_def_values [i].def_type);
                        /* Copy the data from the blob since it might get realloc-ed */
                        p = assembly->blob.data + idx;
                        len = mono_metadata_decode_blob_size (p, &p2);
                        len += p2 - p;
-                       klass->ext->field_def_values [i].data = (const char *)mono_image_alloc (image, len);
-                       memcpy ((gpointer)klass->ext->field_def_values [i].data, p, len);
+                       ext->field_def_values [i].data = (const char *)mono_image_alloc (image, len);
+                       memcpy ((gpointer)ext->field_def_values [i].data, p, len);
                }
        }
 
@@ -3278,19 +3280,21 @@ typebuilder_setup_properties (MonoClass *klass, MonoError *error)
        MonoReflectionPropertyBuilder *pb;
        MonoImage *image = klass->image;
        MonoProperty *properties;
+       MonoClassExt *ext;
        int i;
 
        mono_error_init (error);
 
-       if (!klass->ext)
-               klass->ext = image_g_new0 (image, MonoClassExt, 1);
+       ext = mono_class_get_ext (klass);
+       if (!ext)
+               mono_class_set_ext (klass, ext = image_g_new0 (image, MonoClassExt, 1));
 
-       klass->ext->property.count = tb->properties ? mono_array_length (tb->properties) : 0;
-       klass->ext->property.first = 0;
+       ext->property.count = tb->properties ? mono_array_length (tb->properties) : 0;
+       ext->property.first = 0;
 
-       properties = image_g_new0 (image, MonoProperty, klass->ext->property.count);
-       klass->ext->properties = properties;
-       for (i = 0; i < klass->ext->property.count; ++i) {
+       properties = image_g_new0 (image, MonoProperty, ext->property.count);
+       ext->properties = properties;
+       for (i = 0; i < ext->property.count; ++i) {
                pb = mono_array_get (tb->properties, MonoReflectionPropertyBuilder*, i);
                properties [i].parent = klass;
                properties [i].attrs = pb->attrs;
@@ -3307,16 +3311,16 @@ typebuilder_setup_properties (MonoClass *klass, MonoError *error)
                        guint32 len, idx;
                        const char *p, *p2;
                        MonoDynamicImage *assembly = (MonoDynamicImage*)klass->image;
-                       if (!klass->ext->prop_def_values)
-                               klass->ext->prop_def_values = image_g_new0 (image, MonoFieldDefaultValue, klass->ext->property.count);
+                       if (!ext->prop_def_values)
+                               ext->prop_def_values = image_g_new0 (image, MonoFieldDefaultValue, ext->property.count);
                        properties [i].attrs |= PROPERTY_ATTRIBUTE_HAS_DEFAULT;
-                       idx = mono_dynimage_encode_constant (assembly, pb->def_value, &klass->ext->prop_def_values [i].def_type);
+                       idx = mono_dynimage_encode_constant (assembly, pb->def_value, &ext->prop_def_values [i].def_type);
                        /* Copy the data from the blob since it might get realloc-ed */
                        p = assembly->blob.data + idx;
                        len = mono_metadata_decode_blob_size (p, &p2);
                        len += p2 - p;
-                       klass->ext->prop_def_values [i].data = (const char *)mono_image_alloc (image, len);
-                       memcpy ((gpointer)klass->ext->prop_def_values [i].data, p, len);
+                       ext->prop_def_values [i].data = (const char *)mono_image_alloc (image, len);
+                       memcpy ((gpointer)ext->prop_def_values [i].data, p, len);
                }
        }
 }
@@ -3328,19 +3332,21 @@ typebuilder_setup_events (MonoClass *klass, MonoError *error)
        MonoReflectionEventBuilder *eb;
        MonoImage *image = klass->image;
        MonoEvent *events;
+       MonoClassExt *ext;
        int i;
 
        mono_error_init (error);
 
-       if (!klass->ext)
-               klass->ext = image_g_new0 (image, MonoClassExt, 1);
+       ext = mono_class_get_ext (klass);
+       if (!ext)
+               mono_class_set_ext (klass, ext = image_g_new0 (image, MonoClassExt, 1));
 
-       klass->ext->event.count = tb->events ? mono_array_length (tb->events) : 0;
-       klass->ext->event.first = 0;
+       ext->event.count = tb->events ? mono_array_length (tb->events) : 0;
+       ext->event.first = 0;
 
-       events = image_g_new0 (image, MonoEvent, klass->ext->event.count);
-       klass->ext->events = events;
-       for (i = 0; i < klass->ext->event.count; ++i) {
+       events = image_g_new0 (image, MonoEvent, ext->event.count);
+       ext->events = events;
+       for (i = 0; i < ext->event.count; ++i) {
                eb = mono_array_get (tb->events, MonoReflectionEventBuilder*, i);
                events [i].parent = klass;
                events [i].attrs = eb->attrs;
@@ -3467,7 +3473,7 @@ ves_icall_TypeBuilder_create_runtime_class (MonoReflectionTypeBuilder *tb)
 
                        MonoType *subtype = mono_reflection_type_get_handle ((MonoReflectionType*)subtb, &error);
                        if (!is_ok (&error)) goto failure;
-                       klass->ext->nested_classes = g_list_prepend_image (klass->image, klass->ext->nested_classes, mono_class_from_mono_type (subtype));
+                       mono_class_get_ext (klass)->nested_classes = g_list_prepend_image (klass->image, mono_class_get_ext (klass)->nested_classes, mono_class_from_mono_type (subtype));
                }
        }
 
index 83ac3dd994b2e47ec5e10becd6e65abd8495a717..51d7ccac064356305041fc2d2e62afb63ccedff6 100644 (file)
@@ -140,12 +140,12 @@ static StaticDataInfo context_static_info;
 /* The hash of existing threads (key is thread ID, value is
  * MonoInternalThread*) that need joining before exit
  */
-static MonoGHashTable *threads=NULL;
+static MonoGHashTable *threads;
 
 /* List of app context GC handles.
  * Added to from ves_icall_System_Runtime_Remoting_Contexts_Context_RegisterContext ().
  */
-static GHashTable *contexts = NULL;
+static GHashTable *contexts;
 
 /* Cleanup queue for contexts. */
 static MonoReferenceQueue *context_queue;
@@ -155,7 +155,7 @@ static MonoReferenceQueue *context_queue;
  * When mono_thread_attach_internal is called for a thread, it will be removed from this hash table.
  * Protected by mono_threads_lock ().
  */
-static MonoGHashTable *threads_starting_up = NULL;
+static MonoGHashTable *threads_starting_up;
 
 /* The TLS key that holds the MonoObject assigned to each thread */
 static MonoNativeTlsKey current_object_key;
@@ -165,6 +165,15 @@ static MonoNativeTlsKey current_object_key;
 static GHashTable *joinable_threads;
 static int joinable_thread_count;
 
+#define thread_wait_lock() mono_os_mutex_lock (&thread_wait_mutex)
+#define thread_wait_unlock() mono_os_mutex_unlock (&thread_wait_mutex)
+static mono_mutex_t thread_wait_mutex;
+/* Used to wait for a thread to be joined or to change state */
+/* Used to wait for njoined_threads to increase or for background_change to become true */
+static mono_cond_t thread_wait_cond;
+static int njoined_threads;
+static gboolean background_changed;
+
 #ifdef MONO_HAVE_FAST_TLS
 /* we need to use both the Tls* functions and __thread because
  * the gc needs to see all the threads 
@@ -214,8 +223,10 @@ static mono_mutex_t interlocked_mutex;
 /* global count of thread interruptions requested */
 static gint32 thread_interruption_requested = 0;
 
+#ifdef HOST_WIN32
 /* Event signaled when a thread changes its background mode */
 static MonoOSEvent background_change_event;
+#endif
 
 static gboolean shutting_down = FALSE;
 
@@ -2072,6 +2083,18 @@ ves_icall_System_Threading_Thread_MemoryBarrier (void)
        mono_memory_barrier ();
 }
 
+static void
+signal_background_change (void)
+{
+       thread_wait_lock ();
+       background_changed = TRUE;
+       mono_os_cond_signal (&thread_wait_cond);
+       thread_wait_unlock ();
+#ifdef HOST_WIN32
+       mono_os_event_set (&background_change_event);
+#endif
+}
+
 void
 ves_icall_System_Threading_Thread_ClrState (MonoInternalThread* this_obj, guint32 state)
 {
@@ -2082,7 +2105,7 @@ ves_icall_System_Threading_Thread_ClrState (MonoInternalThread* this_obj, guint3
                 * be notified, since it has to rebuild the list of threads to
                 * wait for.
                 */
-               mono_os_event_set (&background_change_event);
+               signal_background_change ();
        }
 }
 
@@ -2096,7 +2119,7 @@ ves_icall_System_Threading_Thread_SetState (MonoInternalThread* this_obj, guint3
                 * be notified, since it has to rebuild the list of threads to
                 * wait for.
                 */
-               mono_os_event_set (&background_change_event);
+               signal_background_change ();
        }
 }
 
@@ -2856,8 +2879,13 @@ void mono_thread_init (MonoThreadStartCB start_cb,
 
        mono_os_mutex_init_recursive(&interlocked_mutex);
        mono_os_mutex_init_recursive(&joinable_threads_mutex);
+
+       mono_os_mutex_init_recursive(&thread_wait_mutex);
+       mono_os_cond_init(&thread_wait_cond);
        
+#ifdef HOST_WIN32
        mono_os_event_init (&background_change_event, FALSE);
+#endif
        
        mono_init_static_data_info (&thread_static_info);
        mono_init_static_data_info (&context_static_info);
@@ -2889,7 +2917,9 @@ void mono_thread_cleanup (void)
        mono_os_mutex_destroy (&interlocked_mutex);
        mono_os_mutex_destroy (&delayed_free_table_mutex);
        mono_os_mutex_destroy (&small_id_mutex);
+#ifdef HOST_WIN32
        mono_os_event_destroy (&background_change_event);
+#endif
 #endif
 
        mono_native_tls_free (current_object_key);
@@ -2919,19 +2949,56 @@ static void print_tids (gpointer key, gpointer value, gpointer user)
        g_message ("Waiting for: %p", key);
 }
 
-struct wait_data 
-{
+typedef struct {
+       int njoined;
        MonoThreadHandle *handles[MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS];
        MonoInternalThread *threads[MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS];
        guint32 num;
-};
+} WaitData;
 
+/*
+ * wait_for_tids:
+ *
+ * Wait until either:
+ * - wait->num threads are joined
+ * - @check_state_change is TRUE and a thread changes background state
+ * - timeout elapses
+ */
 static void
-wait_for_tids (struct wait_data *wait, guint32 timeout, gboolean check_state_change)
+wait_for_tids (WaitData *wait, guint32 timeout, gboolean check_state_change)
 {
+#ifndef HOST_WIN32
+       /*
+        * Its is complicated to wait for a given set of threads, so we wait for a given
+        * number of threads instead, the caller needs to call us until the set of threads
+        * it is waiting for are terminated.
+        */
+       gboolean finished = FALSE;
+       gint64 start = mono_msec_ticks ();
+       while (!finished) {
+               thread_wait_lock ();
+               if (njoined_threads >= wait->njoined + wait->num || (check_state_change && background_changed)) {
+                       finished = TRUE;
+               } else {
+                       int res = mono_os_cond_timedwait (&thread_wait_cond, &thread_wait_mutex, timeout);
+                       if (res)
+                               finished = TRUE;
+                       if (timeout != INFINITE) {
+                               gint64 now = mono_msec_ticks ();
+                               if (now - start >= timeout) {
+                                       finished = TRUE;
+                               } else {
+                                       timeout -= now - start;
+                                       start = now;
+                               }
+                       }
+               }
+               thread_wait_unlock ();
+       }
+#else
        guint32 i;
        MonoThreadInfoWaitRet ret;
-       
+
        THREAD_DEBUG (g_message("%s: %d threads to wait for in this batch", __func__, wait->num));
 
        /* Add the thread state change event, so it wakes
@@ -2966,87 +3033,102 @@ wait_for_tids (struct wait_data *wait, guint32 timeout, gboolean check_state_cha
                        g_error ("%s: failed to call mono_thread_detach_internal on thread %p, InternalThread: %p", __func__, internal->tid, internal);
                mono_threads_unlock ();
        }
+#endif
+}
+
+static void
+init_wait_data (WaitData *wait)
+{
+       /* This is used calculate the number of joined threads in wait_for_tids () */
+       thread_wait_lock ();
+       wait->njoined = njoined_threads;
+       thread_wait_unlock ();
+       wait->num = 0;
+       /* We must zero all InternalThread pointers to avoid making the GC unhappy. */
+       memset (wait->threads, 0, MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS * SIZEOF_VOID_P);
 }
 
-static void build_wait_tids (gpointer key, gpointer value, gpointer user)
+static void
+add_wait_thread (WaitData *wait, MonoInternalThread *thread)
 {
-       struct wait_data *wait=(struct wait_data *)user;
+#ifdef HOST_WIN32
+       /* These are not used by the wait_for_tids () code on unix */
+       wait->handles [wait->num] = mono_threads_open_thread_handle (thread->handle);
+#endif
+       wait->threads [wait->num] = thread;
+       wait->num++;
+}
 
-       if(wait->num<MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS - 1) {
-               MonoInternalThread *thread=(MonoInternalThread *)value;
+static void
+build_wait_tids (gpointer key, gpointer value, gpointer user)
+{
+       WaitData *wait = (WaitData *)user;
+       MonoInternalThread *thread = (MonoInternalThread *)value;
 
-               /* Ignore background threads, we abort them later */
-               /* Do not lock here since it is not needed and the caller holds threads_lock */
-               if (thread->state & ThreadState_Background) {
-                       THREAD_DEBUG (g_message ("%s: ignoring background thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
-                       return; /* just leave, ignore */
-               }
+       if (wait->num >= MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS - 1) {
+               /* Just ignore the rest, we can't do anything with
+                * them yet
+                */
+               return;
+       }
+
+       /* Ignore background threads, we abort them later */
+       /* Do not lock here since it is not needed and the caller holds threads_lock */
+       if (thread->state & ThreadState_Background) {
+               THREAD_DEBUG (g_message ("%s: ignoring background thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
+               return; /* just leave, ignore */
+       }
                
-               if (mono_gc_is_finalizer_internal_thread (thread)) {
-                       THREAD_DEBUG (g_message ("%s: ignoring finalizer thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
-                       return;
-               }
+       if (mono_gc_is_finalizer_internal_thread (thread)) {
+               THREAD_DEBUG (g_message ("%s: ignoring finalizer thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
+               return;
+       }
 
-               if (thread == mono_thread_internal_current ()) {
-                       THREAD_DEBUG (g_message ("%s: ignoring current thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
-                       return;
-               }
+       if (thread == mono_thread_internal_current ()) {
+               THREAD_DEBUG (g_message ("%s: ignoring current thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
+               return;
+       }
 
-               if (mono_thread_get_main () && (thread == mono_thread_get_main ()->internal_thread)) {
-                       THREAD_DEBUG (g_message ("%s: ignoring main thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
-                       return;
-               }
+       if (mono_thread_get_main () && (thread == mono_thread_get_main ()->internal_thread)) {
+               THREAD_DEBUG (g_message ("%s: ignoring main thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
+               return;
+       }
 
-               if (thread->flags & MONO_THREAD_FLAG_DONT_MANAGE) {
-                       THREAD_DEBUG (g_message ("%s: ignoring thread %" G_GSIZE_FORMAT "with DONT_MANAGE flag set.", __func__, (gsize)thread->tid));
-                       return;
-               }
+       if (thread->flags & MONO_THREAD_FLAG_DONT_MANAGE) {
+               THREAD_DEBUG (g_message ("%s: ignoring thread %" G_GSIZE_FORMAT "with DONT_MANAGE flag set.", __func__, (gsize)thread->tid));
+               return;
+       }
 
-               THREAD_DEBUG (g_message ("%s: Invoking mono_thread_manage callback on thread %p", __func__, thread));
-               if ((thread->manage_callback == NULL) || (thread->manage_callback (thread->root_domain_thread) == TRUE)) {
-                       wait->handles[wait->num]=mono_threads_open_thread_handle (thread->handle);
-                       wait->threads[wait->num]=thread;
-                       wait->num++;
+       THREAD_DEBUG (g_message ("%s: Invoking mono_thread_manage callback on thread %p", __func__, thread));
+       if ((thread->manage_callback == NULL) || (thread->manage_callback (thread->root_domain_thread) == TRUE)) {
+               add_wait_thread (wait, thread);
 
-                       THREAD_DEBUG (g_message ("%s: adding thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
-               } else {
-                       THREAD_DEBUG (g_message ("%s: ignoring (because of callback) thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
-               }
-               
-               
+               THREAD_DEBUG (g_message ("%s: adding thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
        } else {
-               /* Just ignore the rest, we can't do anything with
-                * them yet
-                */
+               THREAD_DEBUG (g_message ("%s: ignoring (because of callback) thread %"G_GSIZE_FORMAT, __func__, (gsize)thread->tid));
        }
 }
 
-static gboolean
-remove_and_abort_threads (gpointer key, gpointer value, gpointer user)
+static void
+collect_and_abort_threads (gpointer key, gpointer value, gpointer user)
 {
-       struct wait_data *wait=(struct wait_data *)user;
+       WaitData *wait = (WaitData *)user;
        MonoNativeThreadId self = mono_native_thread_id_get ();
        MonoInternalThread *thread = (MonoInternalThread *)value;
 
        if (wait->num >= MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS)
-               return FALSE;
+               return;
 
        /* The finalizer thread is not a background thread */
        if (!mono_native_thread_id_equals (thread_get_tid (thread), self)
             && (thread->state & ThreadState_Background) != 0
-            && (thread->flags & MONO_THREAD_FLAG_DONT_MANAGE) == 0
-       ) {
-               wait->handles[wait->num] = mono_threads_open_thread_handle (thread->handle);
-               wait->threads[wait->num] = thread;
-               wait->num++;
+               && (thread->flags & MONO_THREAD_FLAG_DONT_MANAGE) == 0) {
+               add_wait_thread (wait, thread);
 
                THREAD_DEBUG (g_print ("%s: Aborting id: %"G_GSIZE_FORMAT"\n", __func__, (gsize)thread->tid));
                mono_thread_internal_abort (thread);
-               return TRUE;
+               return;
        }
-
-       return !mono_native_thread_id_equals (thread_get_tid (thread), self)
-               && !mono_gc_is_finalizer_internal_thread (thread);
 }
 
 /** 
@@ -3092,18 +3174,19 @@ mono_threads_set_shutting_down (void)
                 * interrupt the main thread if it is waiting for all
                 * the other threads.
                 */
-               mono_os_event_set (&background_change_event);
+               signal_background_change ();
                
                mono_threads_unlock ();
        }
 }
 
-void mono_thread_manage (void)
+void
+mono_thread_manage (void)
 {
-       struct wait_data wait_data;
-       struct wait_data *wait = &wait_data;
+       WaitData wait_data;
+       WaitData *wait = &wait_data;
 
-       memset (wait, 0, sizeof (struct wait_data));
+       memset (wait, 0, sizeof (WaitData));
        /* join each thread that's still running */
        THREAD_DEBUG (g_message ("%s: Joining each running thread...", __func__));
        
@@ -3125,17 +3208,18 @@ void mono_thread_manage (void)
                THREAD_DEBUG (g_message ("%s: There are %d threads to join", __func__, mono_g_hash_table_size (threads));
                        mono_g_hash_table_foreach (threads, print_tids, NULL));
        
+#ifdef HOST_WIN32
                mono_os_event_reset (&background_change_event);
-               wait->num=0;
-               /* We must zero all InternalThread pointers to avoid making the GC unhappy. */
-               memset (wait->threads, 0, MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS * SIZEOF_VOID_P);
+#endif
+               background_changed = FALSE;
+               init_wait_data (wait);
                mono_g_hash_table_foreach (threads, build_wait_tids, wait);
                mono_threads_unlock ();
                if (wait->num > 0)
                        /* Something to wait for */
                        wait_for_tids (wait, INFINITE, TRUE);
                THREAD_DEBUG (g_message ("%s: I have %d threads after waiting.", __func__, wait->num));
-       } while(wait->num>0);
+       } while (wait->num > 0);
 
        /* Mono is shutting down, so just wait for the end */
        if (!mono_runtime_try_shutdown ()) {
@@ -3151,10 +3235,8 @@ void mono_thread_manage (void)
        do {
                mono_threads_lock ();
 
-               wait->num = 0;
-               /*We must zero all InternalThread pointers to avoid making the GC unhappy.*/
-               memset (wait->threads, 0, MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS * SIZEOF_VOID_P);
-               mono_g_hash_table_foreach_remove (threads, remove_and_abort_threads, wait);
+               init_wait_data (wait);
+               mono_g_hash_table_foreach (threads, collect_and_abort_threads, wait);
 
                mono_threads_unlock ();
 
@@ -3177,7 +3259,7 @@ static void
 collect_threads_for_suspend (gpointer key, gpointer value, gpointer user_data)
 {
        MonoInternalThread *thread = (MonoInternalThread*)value;
-       struct wait_data *wait = (struct wait_data*)user_data;
+       WaitData *wait = (WaitData*)user_data;
 
        /* 
         * We try to exclude threads early, to avoid running into the MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS
@@ -3188,9 +3270,9 @@ collect_threads_for_suspend (gpointer key, gpointer value, gpointer user_data)
                (thread->state & ThreadState_Stopped) != 0)
                return;
 
-       if (wait->num<MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS) {
-               wait->handles [wait->num] = mono_threads_open_thread_handle (thread->handle);
-               wait->threads [wait->num] = thread;
+       if (wait->num < MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS) {
+               wait->handles[wait->num] = mono_threads_open_thread_handle (thread->handle);
+               wait->threads[wait->num] = thread;
                wait->num++;
        }
 }
@@ -3201,16 +3283,17 @@ collect_threads_for_suspend (gpointer key, gpointer value, gpointer user_data)
  *  Suspend all managed threads except the finalizer thread and this thread. It is
  * not possible to resume them later.
  */
-void mono_thread_suspend_all_other_threads (void)
+void
+mono_thread_suspend_all_other_threads (void)
 {
-       struct wait_data wait_data;
-       struct wait_data *wait = &wait_data;
+       WaitData wait_data;
+       WaitData *wait = &wait_data;
        int i;
        MonoNativeThreadId self = mono_native_thread_id_get ();
        guint32 eventidx = 0;
        gboolean starting, finished;
 
-       memset (wait, 0, sizeof (struct wait_data));
+       memset (wait, 0, sizeof (WaitData));
        /*
         * The other threads could be in an arbitrary state at this point, i.e.
         * they could be starting up, shutting down etc. This means that there could be
@@ -3236,9 +3319,7 @@ void mono_thread_suspend_all_other_threads (void)
                 * Make a copy of the hashtable since we can't do anything with
                 * threads while threads_mutex is held.
                 */
-               wait->num = 0;
-               /*We must zero all InternalThread pointers to avoid making the GC unhappy.*/
-               memset (wait->threads, 0, MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS * SIZEOF_VOID_P);
+               init_wait_data (wait);
                mono_threads_lock ();
                mono_g_hash_table_foreach (threads, collect_threads_for_suspend, wait);
                mono_threads_unlock ();
@@ -3702,7 +3783,7 @@ mono_thread_has_appdomain_ref (MonoThread *thread, MonoDomain *domain)
 }
 
 typedef struct abort_appdomain_data {
-       struct wait_data wait;
+       WaitData wait;
        MonoDomain *domain;
 } abort_appdomain_data;
 
@@ -3716,10 +3797,8 @@ collect_appdomain_thread (gpointer key, gpointer value, gpointer user_data)
        if (mono_thread_internal_has_appdomain_ref (thread, domain)) {
                /* printf ("ABORTING THREAD %p BECAUSE IT REFERENCES DOMAIN %s.\n", thread->tid, domain->friendly_name); */
 
-               if(data->wait.num<MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS) {
-                       data->wait.handles [data->wait.num] = mono_threads_open_thread_handle (thread->handle);
-                       data->wait.threads [data->wait.num] = thread;
-                       data->wait.num++;
+               if (data->wait.num < MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS) {
+                       add_wait_thread (&data->wait, thread);
                } else {
                        /* Just ignore the rest, we can't do anything with
                         * them yet
@@ -3752,7 +3831,7 @@ mono_threads_abort_appdomain_threads (MonoDomain *domain, int timeout)
                mono_threads_lock ();
 
                user_data.domain = domain;
-               user_data.wait.num = 0;
+               init_wait_data (&user_data.wait);
                /* This shouldn't take any locks */
                mono_g_hash_table_foreach (threads, collect_appdomain_thread, &user_data);
                mono_threads_unlock ();
@@ -4919,6 +4998,10 @@ mono_threads_join_threads (void)
                                /* This shouldn't block */
                                mono_native_thread_join (thread);
                                MONO_EXIT_GC_SAFE;
+                               thread_wait_lock ();
+                               njoined_threads ++;
+                               mono_os_cond_signal (&thread_wait_cond);
+                               thread_wait_unlock ();
                        }
                } else {
                        break;
index 35b6ce787cc48512909c48b617c326c650491bca..6c95aaf56c9e97a4f48828e29a602be528d04970 100644 (file)
@@ -34,12 +34,12 @@ static gboolean event_handle_own (gpointer handle, MonoW32HandleType type, guint
        ok = mono_w32handle_lookup (handle, type, (gpointer *)&event_handle);
        if (!ok) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        if (!event_handle->manual) {
                g_assert (event_handle->set_count > 0);
@@ -171,7 +171,6 @@ mono_w32event_reset (gpointer handle)
 static gpointer event_handle_create (MonoW32HandleEvent *event_handle, MonoW32HandleType type, gboolean manual, gboolean initial)
 {
        gpointer handle;
-       int thr_ret;
 
        event_handle->manual = manual;
        event_handle->set_count = (initial && !manual) ? 1 : 0;
@@ -179,22 +178,20 @@ static gpointer event_handle_create (MonoW32HandleEvent *event_handle, MonoW32Ha
        handle = mono_w32handle_new (type, event_handle);
        if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating %s handle",
-                       __func__, mono_w32handle_ops_typename (type));
+                       __func__, mono_w32handle_get_typename (type));
                SetLastError (ERROR_GEN_FAILURE);
                return NULL;
        }
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
 
        if (initial)
                mono_w32handle_set_signal_state (handle, TRUE, FALSE);
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        return handle;
 }
@@ -203,7 +200,7 @@ static gpointer event_create (gboolean manual, gboolean initial)
 {
        MonoW32HandleEvent event_handle;
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_EVENT));
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_EVENT));
        return event_handle_create (&event_handle, MONO_W32HANDLE_EVENT, manual, initial);
 }
 
@@ -213,7 +210,7 @@ static gpointer namedevent_create (gboolean manual, gboolean initial, const guni
        gchar *utf8_name;
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_NAMEDEVENT));
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_NAMEDEVENT));
 
        /* w32 seems to guarantee that opening named objects can't race each other */
        mono_w32handle_namespace_lock ();
@@ -269,7 +266,6 @@ ves_icall_System_Threading_Events_SetEvent_internal (gpointer handle)
 {
        MonoW32HandleType type;
        MonoW32HandleEvent *event_handle;
-       int thr_ret;
 
        if (handle == NULL) {
                SetLastError (ERROR_INVALID_HANDLE);
@@ -287,15 +283,14 @@ ves_icall_System_Threading_Events_SetEvent_internal (gpointer handle)
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&event_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: setting %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
 
        if (!event_handle->manual) {
                event_handle->set_count = 1;
@@ -304,8 +299,7 @@ ves_icall_System_Threading_Events_SetEvent_internal (gpointer handle)
                mono_w32handle_set_signal_state (handle, TRUE, TRUE);
        }
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
 
        return TRUE;
 }
@@ -315,7 +309,6 @@ ves_icall_System_Threading_Events_ResetEvent_internal (gpointer handle)
 {
        MonoW32HandleType type;
        MonoW32HandleEvent *event_handle;
-       int thr_ret;
 
        SetLastError (ERROR_SUCCESS);
 
@@ -335,30 +328,28 @@ ves_icall_System_Threading_Events_ResetEvent_internal (gpointer handle)
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&event_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: resetting %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
 
        if (!mono_w32handle_issignalled (handle)) {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: no need to reset %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
        } else {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: obtained write lock on %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
 
                mono_w32handle_set_signal_state (handle, FALSE, FALSE);
        }
 
        event_handle->set_count = 0;
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
 
        return TRUE;
 }
index 1ca4e1dd8c57162da5177bc0eaacafe6fad0166c..2eb2145533b6d804c6e285cc7848803e38e1e8cf 100644 (file)
@@ -84,7 +84,7 @@ mono_w32handle_namespace_search_handle_callback (gpointer handle, gpointer data,
                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));
+                               __func__, handle, mono_w32handle_get_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",
@@ -111,7 +111,7 @@ mono_w32handle_namespace_search_handle (MonoW32HandleType type, gchar *name)
                g_error ("%s: type %s does not have a namespace", __func__, type);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Lookup for handle named [%s] type %s",
-               __func__, name, mono_w32handle_ops_typename (type));
+               __func__, name, mono_w32handle_get_typename (type));
 
        search_data.ret = NULL;
        search_data.type = type;
index e6d1ddb9363a3e77c740ac75e5c41169d40f738e..ef3b24838e1729459f9da4c99ddc7a834ce51aa7 100644 (file)
  */
 
 #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"
 
@@ -141,6 +114,15 @@ mono_w32handle_get_type (gpointer handle)
        return handle_data->type;
 }
 
+static const gchar*
+mono_w32handle_ops_typename (MonoW32HandleType type);
+
+const gchar*
+mono_w32handle_get_typename (MonoW32HandleType type)
+{
+       return mono_w32handle_ops_typename (type);
+}
+
 void
 mono_w32handle_set_signal_state (gpointer handle, gboolean state, gboolean broadcast)
 {
@@ -197,7 +179,7 @@ mono_w32handle_issignalled (gpointer handle)
        return handle_data->signalled;
 }
 
-static int
+static void
 mono_w32handle_lock_signal_mutex (void)
 {
 #ifdef DEBUG
@@ -205,11 +187,9 @@ mono_w32handle_lock_signal_mutex (void)
 #endif
 
        mono_os_mutex_lock (&global_signal_mutex);
-
-       return 0;
 }
 
-static int
+static void
 mono_w32handle_unlock_signal_mutex (void)
 {
 #ifdef DEBUG
@@ -217,72 +197,58 @@ mono_w32handle_unlock_signal_mutex (void)
 #endif
 
        mono_os_mutex_unlock (&global_signal_mutex);
-
-       return 0;
 }
 
-int
+void
 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);
-       }
+       if (!mono_w32handle_lookup_data (handle, &handle_data))
+               g_error ("%s: failed to lookup handle %p", __func__, handle);
 
        mono_w32handle_ref (handle);
 
        mono_os_mutex_lock (&handle_data->signal_mutex);
 
-       return 0;
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: lock handle %p", __func__, handle);
 }
 
-int
+gboolean
 mono_w32handle_trylock_handle (gpointer handle)
 {
        MonoW32HandleBase *handle_data;
-       int ret;
+       gboolean locked;
 
-#ifdef DEBUG
-       g_message ("%s: locking handle %p", __func__, handle);
-#endif
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: trylock handle %p", __func__, handle);
 
-       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
-               return(0);
-       }
+       if (!mono_w32handle_lookup_data (handle, &handle_data))
+               g_error ("%s: failed to lookup handle %p", __func__, handle);
 
        mono_w32handle_ref (handle);
 
-       ret = mono_os_mutex_trylock (&handle_data->signal_mutex);
-       if (ret != 0) {
+       locked = mono_os_mutex_trylock (&handle_data->signal_mutex) == 0;
+       if (!locked)
                mono_w32handle_unref (handle);
-       }
 
-       return(ret);
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: trylock handle %p, locked: %s", __func__, handle, locked ? "true" : "false");
+
+       return locked;
 }
 
-int
+void
 mono_w32handle_unlock_handle (gpointer handle)
 {
        MonoW32HandleBase *handle_data;
 
-#ifdef DEBUG
-       g_message ("%s: unlocking handle %p", __func__, handle);
-#endif
+       if (!mono_w32handle_lookup_data (handle, &handle_data))
+               g_error ("%s: failed to lookup handle %p", __func__, handle);
 
-       if (!mono_w32handle_lookup_data (handle, &handle_data)) {
-               return(0);
-       }
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: unlock handle %p", __func__, handle);
 
        mono_os_mutex_unlock (&handle_data->signal_mutex);
 
        mono_w32handle_unref (handle);
-
-       return 0;
 }
 
 /*
@@ -352,6 +318,9 @@ mono_w32handle_cleanup (void)
                g_free (private_handles [i]);
 }
 
+static gsize
+mono_w32handle_ops_typesize (MonoW32HandleType type);
+
 static void mono_w32handle_init_handle (MonoW32HandleBase *handle,
                               MonoW32HandleType type, gpointer handle_specific)
 {
@@ -694,6 +663,15 @@ mono_w32handle_unref (gpointer handle)
        }
 }
 
+static void
+mono_w32handle_ops_close (gpointer handle, gpointer data);
+
+void
+mono_w32handle_force_close (gpointer handle, gpointer data)
+{
+       mono_w32handle_ops_close (handle, data);
+}
+
 void
 mono_w32handle_register_ops (MonoW32HandleType type, MonoW32HandleOps *ops)
 {
@@ -734,7 +712,8 @@ static void (*_wapi_handle_ops_get_close_func (MonoW32HandleType type))(gpointer
        return (NULL);
 }
 
-void mono_w32handle_ops_close (gpointer handle, gpointer data)
+static void
+mono_w32handle_ops_close (gpointer handle, gpointer data)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -751,7 +730,8 @@ void mono_w32handle_ops_close (gpointer handle, gpointer data)
        }
 }
 
-void mono_w32handle_ops_details (MonoW32HandleType type, gpointer data)
+static void
+mono_w32handle_ops_details (MonoW32HandleType type, gpointer data)
 {
        if (handle_ops[type] != NULL &&
            handle_ops[type]->details != NULL) {
@@ -759,21 +739,24 @@ void mono_w32handle_ops_details (MonoW32HandleType type, gpointer data)
        }
 }
 
-const gchar* mono_w32handle_ops_typename (MonoW32HandleType type)
+static 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)
+static 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)
+static void
+mono_w32handle_ops_signal (gpointer handle)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -789,7 +772,8 @@ void mono_w32handle_ops_signal (gpointer handle)
        }
 }
 
-gboolean mono_w32handle_ops_own (gpointer handle, guint32 *statuscode)
+static gboolean
+mono_w32handle_ops_own (gpointer handle, guint32 *statuscode)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -807,7 +791,8 @@ gboolean mono_w32handle_ops_own (gpointer handle, guint32 *statuscode)
        }
 }
 
-gboolean mono_w32handle_ops_isowned (gpointer handle)
+static gboolean
+mono_w32handle_ops_isowned (gpointer handle)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -825,7 +810,7 @@ gboolean mono_w32handle_ops_isowned (gpointer handle)
        }
 }
 
-MonoW32HandleWaitRet
+static MonoW32HandleWaitRet
 mono_w32handle_ops_specialwait (gpointer handle, guint32 timeout, gboolean *alerted)
 {
        MonoW32HandleBase *handle_data;
@@ -845,7 +830,8 @@ mono_w32handle_ops_specialwait (gpointer handle, guint32 timeout, gboolean *aler
        }
 }
 
-void mono_w32handle_ops_prewait (gpointer handle)
+static void
+mono_w32handle_ops_prewait (gpointer handle)
 {
        MonoW32HandleBase *handle_data;
        MonoW32HandleType type;
@@ -865,6 +851,9 @@ void mono_w32handle_ops_prewait (gpointer handle)
 static void
 spin (guint32 ms)
 {
+#ifdef HOST_WIN32
+       SleepEx (ms, TRUE);
+#else
        struct timespec sleepytime;
 
        g_assert (ms < 1000);
@@ -872,13 +861,13 @@ spin (guint32 ms)
        sleepytime.tv_sec = 0;
        sleepytime.tv_nsec = ms * 1000000;
        nanosleep (&sleepytime, NULL);
+#endif /* HOST_WIN32 */
 }
 
 static void
 mono_w32handle_lock_handles (gpointer *handles, gsize numhandles)
 {
        guint32 i, iter=0;
-       int thr_ret;
 
        /* Lock all the handles, with backoff */
 again:
@@ -887,19 +876,16 @@ again:
 
                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) {
+               if (!mono_w32handle_trylock_handle (handle)) {
                        /* Bummer */
 
                        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: attempt failed for %p: %s", __func__,
-                                  handle, strerror (thr_ret));
+                                  handle);
 
                        while (i--) {
                                handle = handles[i];
 
-                               thr_ret = mono_w32handle_unlock_handle (handle);
-                               g_assert (thr_ret == 0);
+                               mono_w32handle_unlock_handle (handle);
                        }
 
                        /* If iter ever reaches 100 the nanosleep will
@@ -928,15 +914,13 @@ static void
 mono_w32handle_unlock_handles (gpointer *handles, gsize numhandles)
 {
        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);
+               mono_w32handle_unlock_handle (handle);
        }
 }
 
@@ -1123,7 +1107,6 @@ mono_w32handle_wait_one (gpointer handle, guint32 timeout, gboolean alertable)
        MonoW32HandleWaitRet ret;
        gboolean alerted;
        gint64 start;
-       gint thr_ret;
        guint32 statuscode = 0;
 
        alerted = FALSE;
@@ -1142,8 +1125,7 @@ mono_w32handle_wait_one (gpointer handle, guint32 timeout, gboolean alertable)
                return MONO_W32HANDLE_WAIT_RET_FAILED;
        }
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
 
        if (mono_w32handle_test_capabilities (handle, MONO_W32HANDLE_CAP_OWN)) {
                if (own_if_owned (handle, &statuscode)) {
@@ -1197,8 +1179,7 @@ mono_w32handle_wait_one (gpointer handle, guint32 timeout, gboolean alertable)
        }
 
 done:
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
 
        return ret;
 }
@@ -1208,7 +1189,7 @@ mono_w32handle_wait_multiple (gpointer *handles, gsize nhandles, gboolean waital
 {
        MonoW32HandleWaitRet ret;
        gboolean alerted, poll;
-       gint i, thr_ret;
+       gint i;
        gint64 start;
        gpointer handles_sorted [MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS];
        guint32 statuscodes [MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS] = {0};
@@ -1320,8 +1301,7 @@ mono_w32handle_wait_multiple (gpointer *handles, gsize nhandles, gboolean waital
                        }
                }
 
-               thr_ret = mono_w32handle_lock_signal_mutex ();
-               g_assert (thr_ret == 0);
+               mono_w32handle_lock_signal_mutex ();
 
                if (waitall) {
                        signalled = TRUE;
@@ -1353,8 +1333,7 @@ mono_w32handle_wait_multiple (gpointer *handles, gsize nhandles, gboolean waital
                                if (elapsed > timeout) {
                                        ret = MONO_W32HANDLE_WAIT_RET_TIMEOUT;
 
-                                       thr_ret = mono_w32handle_unlock_signal_mutex ();
-                                       g_assert (thr_ret == 0);
+                                       mono_w32handle_unlock_signal_mutex ();
 
                                        goto done;
                                }
@@ -1363,8 +1342,7 @@ mono_w32handle_wait_multiple (gpointer *handles, gsize nhandles, gboolean waital
                        }
                }
 
-               thr_ret = mono_w32handle_unlock_signal_mutex ();
-               g_assert (thr_ret == 0);
+               mono_w32handle_unlock_signal_mutex ();
 
                if (alerted) {
                        ret = MONO_W32HANDLE_WAIT_RET_ALERTED;
@@ -1392,8 +1370,8 @@ mono_w32handle_signal_and_wait (gpointer signal_handle, gpointer wait_handle, gu
        MonoW32HandleWaitRet ret;
        gint64 start;
        gboolean alerted;
-       gint thr_ret;
        guint32 statuscode = 0;
+       gpointer handles [2];
 
        alerted = FALSE;
 
@@ -1407,11 +1385,15 @@ mono_w32handle_signal_and_wait (gpointer signal_handle, gpointer wait_handle, gu
                return MONO_W32HANDLE_WAIT_RET_FAILED;
        }
 
-       thr_ret = mono_w32handle_lock_handle (wait_handle);
-       g_assert (thr_ret == 0);
+       handles [0] = wait_handle;
+       handles [1] = signal_handle;
+
+       mono_w32handle_lock_handles (handles, 2);
 
        mono_w32handle_ops_signal (signal_handle);
 
+       mono_w32handle_unlock_handle (signal_handle);
+
        if (mono_w32handle_test_capabilities (wait_handle, MONO_W32HANDLE_CAP_OWN)) {
                if (own_if_owned (wait_handle, &statuscode)) {
                        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: handle %p already owned",
@@ -1464,10 +1446,7 @@ mono_w32handle_signal_and_wait (gpointer signal_handle, gpointer wait_handle, gu
        }
 
 done:
-       thr_ret = mono_w32handle_unlock_handle (wait_handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (wait_handle);
 
        return ret;
 }
-
-#endif /* !defined(HOST_WIN32) */
index b67ada79afc1620be0dd42275f6219fa509a009a..ce7d76ec68824cebc75436a4399d38e2116dbd82 100644 (file)
@@ -108,6 +108,9 @@ mono_w32handle_new_fd (MonoW32HandleType type, int fd, gpointer handle_specific)
 MonoW32HandleType
 mono_w32handle_get_type (gpointer handle);
 
+const gchar*
+mono_w32handle_get_typename (MonoW32HandleType type);
+
 gboolean
 mono_w32handle_lookup (gpointer handle, MonoW32HandleType type, gpointer *handle_specific);
 
@@ -130,31 +133,7 @@ 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, guint32 *statuscode);
-
-gboolean
-mono_w32handle_ops_isowned (gpointer handle);
-
-MonoW32HandleWaitRet
-mono_w32handle_ops_specialwait (gpointer handle, guint32 timeout, gboolean *alerted);
-
-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);
+mono_w32handle_force_close (gpointer handle, gpointer data);
 
 void
 mono_w32handle_set_signal_state (gpointer handle, gboolean state, gboolean broadcast);
@@ -162,13 +141,13 @@ mono_w32handle_set_signal_state (gpointer handle, gboolean state, gboolean broad
 gboolean
 mono_w32handle_issignalled (gpointer handle);
 
-int
+void
 mono_w32handle_lock_handle (gpointer handle);
 
-int
+gboolean
 mono_w32handle_trylock_handle (gpointer handle);
 
-int
+void
 mono_w32handle_unlock_handle (gpointer handle);
 
 MonoW32HandleWaitRet
index 37e8e5c462d19ef2c0d5297f7ba593adce3562d7..d27fd5b8a586dbb182643b647e97dcafadd97d95 100644 (file)
@@ -66,12 +66,12 @@ mutex_handle_own (gpointer handle, MonoW32HandleType type, guint32 *statuscode)
        *statuscode = WAIT_OBJECT_0;
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
-               g_warning ("%s: error looking up %s handle %p", __func__, mono_w32handle_ops_typename (type), handle);
+               g_warning ("%s: error looking up %s handle %p", __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p, before: [tid: %p, recursion: %d], after: [tid: %p, recursion: %d], abandoned: %s",
-               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion, (gpointer) pthread_self (), mutex_handle->recursion + 1, mutex_handle->abandoned ? "true" : "false");
+               __func__, mono_w32handle_get_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion, (gpointer) pthread_self (), mutex_handle->recursion + 1, mutex_handle->abandoned ? "true" : "false");
 
        if (mutex_handle->recursion != 0) {
                g_assert (pthread_equal (pthread_self (), mutex_handle->tid));
@@ -99,20 +99,20 @@ mutex_handle_is_owned (gpointer handle, MonoW32HandleType type)
        MonoW32HandleMutex *mutex_handle;
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
-               g_warning ("%s: error looking up %s handle %p", __func__, mono_w32handle_ops_typename (type), handle);
+               g_warning ("%s: error looking up %s handle %p", __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: testing ownership %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        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__, mono_w32handle_ops_typename (type), handle, (gpointer) pthread_self ());
+                       __func__, mono_w32handle_get_typename (type), handle, (gpointer) pthread_self ());
                return TRUE;
        } else {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p not owned by %p, tid: %p recursion: %d",
-                       __func__, mono_w32handle_ops_typename (type), handle, (gpointer) pthread_self (), (gpointer) mutex_handle->tid, mutex_handle->recursion);
+                       __func__, mono_w32handle_get_typename (type), handle, (gpointer) pthread_self (), (gpointer) mutex_handle->tid, mutex_handle->recursion);
                return FALSE;
        }
 }
@@ -161,12 +161,12 @@ static void mutex_handle_prewait (gpointer handle, MonoW32HandleType type)
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: pre-waiting %s handle %p, owned? %s",
-               __func__, mono_w32handle_ops_typename (type), handle, mutex_handle->recursion != 0 ? "true" : "false");
+               __func__, mono_w32handle_get_typename (type), handle, mutex_handle->recursion != 0 ? "true" : "false");
 }
 
 /* The shared state is not locked when prewait methods are called */
@@ -264,7 +264,6 @@ mono_w32mutex_init (void)
 static gpointer mutex_handle_create (MonoW32HandleMutex *mutex_handle, MonoW32HandleType type, gboolean owned)
 {
        gpointer handle;
-       int thr_ret;
        guint32 statuscode;
 
        mutex_handle->tid = 0;
@@ -274,24 +273,22 @@ static gpointer mutex_handle_create (MonoW32HandleMutex *mutex_handle, MonoW32Ha
        handle = mono_w32handle_new (type, mutex_handle);
        if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating %s handle",
-                       __func__, mono_w32handle_ops_typename (type));
+                       __func__, mono_w32handle_get_typename (type));
                SetLastError (ERROR_GEN_FAILURE);
                return NULL;
        }
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
 
        if (owned)
                mutex_handle_own (handle, type, &statuscode);
        else
                mono_w32handle_set_signal_state (handle, TRUE, FALSE);
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        return handle;
 }
@@ -300,7 +297,7 @@ static gpointer mutex_create (gboolean owned)
 {
        MonoW32HandleMutex mutex_handle;
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_MUTEX));
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_MUTEX));
        return mutex_handle_create (&mutex_handle, MONO_W32HANDLE_MUTEX, owned);
 }
 
@@ -310,7 +307,7 @@ static gpointer namedmutex_create (gboolean owned, const gunichar2 *name)
        gchar *utf8_name;
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_NAMEDMUTEX));
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_NAMEDMUTEX));
 
        /* w32 seems to guarantee that opening named objects can't race each other */
        mono_w32handle_namespace_lock ();
@@ -374,7 +371,6 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
        MonoW32HandleType type;
        MonoW32HandleMutex *mutex_handle;
        pthread_t tid;
-       int thr_ret;
        gboolean ret;
 
        if (handle == NULL) {
@@ -393,15 +389,14 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: releasing %s handle %p, tid: %p recursion: %d",
-               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
+               __func__, mono_w32handle_get_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
 
        tid = pthread_self ();
 
@@ -412,7 +407,7 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
                ret = FALSE;
 
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: we don't own %s handle %p (owned by %ld, me %ld)",
-                           __func__, mono_w32handle_ops_typename (type), handle, (long)mutex_handle->tid, (long)tid);
+                           __func__, mono_w32handle_get_typename (type), handle, (long)mutex_handle->tid, (long)tid);
        } else {
                ret = TRUE;
 
@@ -423,15 +418,14 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
                        thread_disown_mutex (mono_thread_internal_current (), handle);
 
                        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking %s handle %p, tid: %p recusion : %d",
-                               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
+                               __func__, mono_w32handle_get_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
 
                        mutex_handle->tid = 0;
                        mono_w32handle_set_signal_state (handle, TRUE, FALSE);
                }
        }
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
 
        return ret;
 }
@@ -492,7 +486,6 @@ mono_w32mutex_abandon (void)
                MonoW32HandleMutex *mutex_handle;
                MonoNativeThreadId tid;
                gpointer handle;
-               int thr_ret;
 
                handle = g_ptr_array_index (internal->owned_mutexes, 0);
 
@@ -506,11 +499,11 @@ mono_w32mutex_abandon (void)
 
                if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
                        g_error ("%s: error looking up %s handle %p",
-                               __func__, mono_w32handle_ops_typename (type), handle);
+                               __func__, mono_w32handle_get_typename (type), handle);
                }
 
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandoning %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
 
                tid = MONO_UINT_TO_NATIVE_THREAD_ID (internal->tid);
 
@@ -518,8 +511,7 @@ mono_w32mutex_abandon (void)
                        g_error ("%s: trying to release mutex %p acquired by thread %p from thread %p",
                                __func__, handle, (gpointer) mutex_handle->tid, (gpointer) tid);
 
-               thr_ret = mono_w32handle_lock_handle (handle);
-               g_assert (thr_ret == 0);
+               mono_w32handle_lock_handle (handle);
 
                mutex_handle->recursion = 0;
                mutex_handle->tid = 0;
@@ -530,10 +522,9 @@ mono_w32mutex_abandon (void)
                thread_disown_mutex (internal, handle);
 
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandoned %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
 
-               thr_ret = mono_w32handle_unlock_handle (handle);
-               g_assert (thr_ret == 0);
+               mono_w32handle_unlock_handle (handle);
        }
 
        g_ptr_array_free (internal->owned_mutexes, TRUE);
index 1699f95753388de317bae9c76d2dd1d2478e39e1..a5eb90a8cdd3c6b2d210af2c6c9b54a3e00065ca 100644 (file)
@@ -20,7 +20,7 @@ mono_process_init_startup_info (HANDLE stdin_handle, HANDLE stdout_handle,
                                HANDLE stderr_handle,STARTUPINFO *startinfo);
 
 gboolean
-mono_process_create_process (MonoProcInfo *mono_process_info, gunichar2 *shell_path, MonoString *cmd,
+mono_process_create_process (MonoW32ProcessInfo *mono_process_info, gunichar2 *shell_path, MonoString *cmd,
                             guint32 creation_flags, gchar *env_vars, gunichar2 *dir, STARTUPINFO *start_info,
                             PROCESS_INFORMATION *process_info);
 
@@ -35,6 +35,9 @@ mono_icall_get_priority_class (gpointer handle);
 
 MonoBoolean
 mono_icall_set_priority_class (gpointer handle, gint32 priorityClass);
+
+gboolean
+mono_process_win_enum_processes (DWORD *pids, DWORD count, DWORD *needed);
 #endif  /* !G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
 
 #endif /* __MONO_METADATA_PROCESS_INTERNALS_H__ */
index 9fc329ad7a22ea3d48860e6669a44c5b8e6d92eb..cbd46b794aa603a3aec89ba3f55843c19949b6b7 100644 (file)
@@ -6,9 +6,13 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
+#include <mono/metadata/object-internals.h>
+#include "mono/metadata/w32process.h"
+#include "mono/metadata/w32process-internals.h"
 #include "mono/metadata/w32process-win32-internals.h"
 
 gboolean
@@ -24,16 +28,17 @@ mono_process_win_enum_processes (DWORD *pids, DWORD count, DWORD *needed)
 HANDLE
 ves_icall_System_Diagnostics_Process_GetProcess_internal (guint32 pid)
 {
-       HANDLE handle;
-
-       /* GetCurrentProcess returns a pseudo-handle, so use
-        * OpenProcess instead
-        */
-       handle = OpenProcess (PROCESS_ALL_ACCESS, TRUE, pid);
-       if (handle == NULL)
-               /* FIXME: Throw an exception */
-               return NULL;
-       return handle;
+       MonoError mono_error;
+       mono_error_init (&mono_error);
+
+       g_unsupported_api ("OpenProcess");
+
+       mono_error_set_not_supported (&mono_error, G_UNSUPPORTED_API, "OpenProcess");
+       mono_error_set_pending_exception (&mono_error);
+
+       SetLastError (ERROR_NOT_SUPPORTED);
+
+       return NULL;
 }
 
 void
@@ -77,7 +82,7 @@ ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this_obj,
 }
 
 MonoBoolean
-ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoProcessStartInfo *proc_start_info, MonoProcInfo *process_info)
+ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStartInfo *proc_start_info, MonoW32ProcessInfo *process_info)
 {
        MonoError mono_error;
        mono_error_init (&mono_error);
@@ -124,7 +129,7 @@ mono_process_init_startup_info (HANDLE stdin_handle, HANDLE stdout_handle, HANDL
 }
 
 gboolean
-mono_process_create_process (MonoProcInfo *mono_process_info, gunichar2 *shell_path, MonoString *cmd, guint32 creation_flags,
+mono_process_create_process (MonoW32ProcessInfo *mono_process_info, gunichar2 *shell_path, MonoString *cmd, guint32 creation_flags,
                             gchar *env_vars, gunichar2 *dir, STARTUPINFO *start_info, PROCESS_INFORMATION *process_info)
 {
        MonoError       mono_error;
@@ -214,8 +219,5 @@ mono_icall_set_priority_class (gpointer handle, gint32 priorityClass)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_process_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (process_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 3e87ad8ad3f086fe415ebf26d34aac1bec0a78e1..f0a93d1f985384045bcff34f5d44debd2d2d3270 100644 (file)
@@ -32,12 +32,12 @@ static gboolean sem_handle_own (gpointer handle, MonoW32HandleType type, guint32
 
        if (!mono_w32handle_lookup (handle, type, (gpointer *)&sem_handle)) {
                g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+                       __func__, mono_w32handle_get_typename (type), handle);
                return FALSE;
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        sem_handle->val--;
 
@@ -140,7 +140,6 @@ static gpointer
 sem_handle_create (MonoW32HandleSemaphore *sem_handle, MonoW32HandleType type, gint32 initial, gint32 max)
 {
        gpointer handle;
-       int thr_ret;
 
        sem_handle->val = initial;
        sem_handle->max = max;
@@ -148,22 +147,20 @@ sem_handle_create (MonoW32HandleSemaphore *sem_handle, MonoW32HandleType type, g
        handle = mono_w32handle_new (type, sem_handle);
        if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating %s handle",
-                       __func__, mono_w32handle_ops_typename (type));
+                       __func__, mono_w32handle_get_typename (type));
                SetLastError (ERROR_GEN_FAILURE);
                return NULL;
        }
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
 
        if (initial != 0)
                mono_w32handle_set_signal_state (handle, TRUE, FALSE);
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: created %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
        return handle;
 }
@@ -173,7 +170,7 @@ sem_create (gint32 initial, gint32 max)
 {
        MonoW32HandleSemaphore sem_handle;
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle, initial %d max %d",
-               __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_SEM), initial, max);
+               __func__, mono_w32handle_get_typename (MONO_W32HANDLE_SEM), initial, max);
        return sem_handle_create (&sem_handle, MONO_W32HANDLE_SEM, initial, max);
 }
 
@@ -184,7 +181,7 @@ namedsem_create (gint32 initial, gint32 max, const gunichar2 *name)
        gchar *utf8_name;
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle, initial %d max %d name \"%s\"",
-                   __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_NAMEDSEM), initial, max, (const char*)name);
+                   __func__, mono_w32handle_get_typename (MONO_W32HANDLE_NAMEDSEM), initial, max, (const char*)name);
 
        /* w32 seems to guarantee that opening named objects can't race each other */
        mono_w32handle_namespace_lock ();
@@ -260,7 +257,6 @@ ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle,
 {
        MonoW32HandleType type;
        MonoW32HandleSemaphore *sem_handle;
-       int thr_ret;
        MonoBoolean ret;
 
        if (!handle) {
@@ -283,10 +279,9 @@ ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle,
        }
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: releasing %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+               __func__, mono_w32handle_get_typename (type), handle);
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_lock_handle (handle);
 
        /* Do this before checking for count overflow, because overflowing
         * max is a listed technique for finding the current value */
@@ -296,12 +291,12 @@ ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle,
        /* No idea why max is signed, but thats the spec :-( */
        if (sem_handle->val + releaseCount > (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__, mono_w32handle_ops_typename (type), handle, sem_handle->val, releaseCount, sem_handle->max);
+                       __func__, mono_w32handle_get_typename (type), handle, sem_handle->val, releaseCount, sem_handle->max);
 
                ret = FALSE;
        } else {
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p val %d count %d max %d",
-                       __func__, mono_w32handle_ops_typename (type), handle, sem_handle->val, releaseCount, sem_handle->max);
+                       __func__, mono_w32handle_get_typename (type), handle, sem_handle->val, releaseCount, sem_handle->max);
 
                sem_handle->val += releaseCount;
                mono_w32handle_set_signal_state (handle, TRUE, TRUE);
@@ -309,8 +304,7 @@ ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle,
                ret = TRUE;
        }
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       mono_w32handle_unlock_handle (handle);
 
        return ret;
 }
index 17a8e84d91a9da461fd4b40e08d5040b4d624d1e..c4c00645c1630884ba75ec654fc47124dcd2a379 100644 (file)
@@ -13,6 +13,7 @@
 #include <mono/metadata/mempool.h>
 #include <mono/metadata/opcodes.h>
 #include <mono/metadata/mempool-internals.h>
+#include <mono/utils/mono-compiler.h>
 
 #include <config.h>
 
@@ -1380,4 +1381,8 @@ mono_perform_abc_removal (MonoCompile *cfg)
        process_block (cfg, cfg->bblocks [0], &area);
 }
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (abcremoval);
+
+#endif /* !DISABLE_JIT */
index 82e3672ae1dee2f7b56abf3141204e2d2dbe844c..c419dfa2b42abf4139037e97340225628b8670b3 100644 (file)
@@ -13,6 +13,7 @@
 #include "mini.h"
 #include "ir-emit.h"
 #include "glib.h"
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -362,4 +363,8 @@ done:
                mono_print_code (cfg, "AFTER ALIAS_ANALYSIS");
 }
 
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (alias_analysis);
+
 #endif /* !DISABLE_JIT */
index b581dc35e4a9c19048a55e459b1e2ef039edcfb9..6c30c8f5bd11d92bf78f9c95192070ef72b52487 100644 (file)
@@ -6314,7 +6314,7 @@ emit_klass_info (MonoAotCompile *acfg, guint32 token)
                encode_value (-1, p, &p);
        } else {
                encode_value (klass->vtable_size, p, &p);
-               encode_value ((mono_class_is_gtd (klass) ? (1 << 8) : 0) | (no_special_static << 7) | (klass->has_static_refs << 6) | (klass->has_references << 5) | ((klass->blittable << 4) | ((klass->ext && klass->ext->nested_classes) ? 1 : 0) << 3) | (klass->has_cctor << 2) | (klass->has_finalize << 1) | klass->ghcimpl, p, &p);
+               encode_value ((mono_class_is_gtd (klass) ? (1 << 8) : 0) | (no_special_static << 7) | (klass->has_static_refs << 6) | (klass->has_references << 5) | ((klass->blittable << 4) | ((mono_class_get_ext (klass) && mono_class_get_ext (klass)->nested_classes) ? 1 : 0) << 3) | (klass->has_cctor << 2) | (klass->has_finalize << 1) | klass->ghcimpl, p, &p);
                if (klass->has_cctor)
                        encode_method_ref (acfg, mono_class_get_cctor (klass), p, &p);
                if (klass->has_finalize)
@@ -7527,6 +7527,8 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                flags = (JitFlags)(flags | JIT_FLAG_LLVM_ONLY | JIT_FLAG_EXPLICIT_NULL_CHECKS);
        if (acfg->aot_opts.no_direct_calls)
                flags = (JitFlags)(flags | JIT_FLAG_NO_DIRECT_ICALLS);
+       if (acfg->aot_opts.direct_pinvoke)
+               flags = (JitFlags)(flags | JIT_FLAG_DIRECT_PINVOKE);
 
        jit_timer = mono_time_track_start ();
        cfg = mini_method_compile (method, acfg->opts, mono_get_root_domain (), flags, 0, index);
index c85bd5e0f1dd6558cabbeb11e7e483d968ebcf01..1602b03d59aae4ef6d211d82ce75bf61f80b17b6 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include "config.h"
+#include <mono/utils/mono-compiler.h>
 #ifndef DISABLE_JIT
 
 #include "mini.h"
@@ -1479,4 +1480,8 @@ mono_optimize_branches (MonoCompile *cfg)
        } while (changed && (niterations > 0));
 }
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (branch_opts);
+
+#endif /* !DISABLE_JIT */
index d786bbad8fcc36e2a293eb5670aabf76360f42b6..846e1cd51410471e354a30ca42333def627dc127 100644 (file)
@@ -45,7 +45,7 @@
 #
 # See the code in mini-x86.c for more details on how the specifiers are used.
 #
-tailcall: len:120 clob:c
+tailcall: len:124 clob:c
 memory_barrier: len:4
 nop: len:4
 relaxed_nop: len:4
index a883e70ee8915fc5301082d289ab5e15c3a412d0..aaa34a3bc34fba472c49726be3bd70936bc4426a 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <mono/metadata/gc-internals.h>
 #include <mono/metadata/abi-details.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -1968,4 +1969,8 @@ mono_local_emulate_ops (MonoCompile *cfg)
        }
 }
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (decompose);
+
+#endif /* !DISABLE_JIT */
index ad25f58728ec9c6a3de38dd253f4e0cecdb92c78..6c191d0b37ddd73527a2bc7a990cc95c964a19d8 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "config.h"
+#include <mono/utils/mono-compiler.h>
 
 #if !defined(DISABLE_AOT) && !defined(DISABLE_JIT)
 #include "dwarfwriter.h"
@@ -2002,4 +2003,9 @@ mono_dwarf_writer_emit_trampoline (MonoDwarfWriter *w, const char *tramp_name, c
        emit_fde (w, w->fde_index, start_symbol, end_symbol, code, code_size, unwind_info, FALSE);
        w->fde_index ++;
 }
+
+#else /* !defined(DISABLE_AOT) && !defined(DISABLE_JIT) */
+
+MONO_EMPTY_SOURCE_FILE (dwarfwriter);
+
 #endif /* End of: !defined(DISABLE_AOT) && !defined(DISABLE_JIT) */
index 08d2891f87c239c138f3d1e48284f3f8c8399aef..95e1fff2bb42a59abeb32870870b8c718163494f 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <config.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -346,5 +347,9 @@ mono_draw_graph (MonoCompile *cfg, MonoGraphOptions draw_options)
 #endif
 }
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (graph);
+
+#endif /* !DISABLE_JIT */
 
index 287022daad738c08857273cf5d686eb060edc1eb..faadc048ec98457f870f771ca0e919c1f03b7b0d 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "mini.h"
 #include <mono/metadata/debug-helpers.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -512,4 +513,8 @@ mono_linear_scan2 (MonoCompile *cfg, GList *vars, GList *regs, regmask_t *used_m
        g_list_free (inactive);
 }
 
-#endif /* #ifndef DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (linear_scan);
+
+#endif /* !DISABLE_JIT */
index c897893074057b178071b619e5420ae7a36b5b6e..7cc05634123e8b4a78b0d5f3c007578e563b3c1c 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <config.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -1158,4 +1159,8 @@ mono_analyze_liveness_gc (MonoCompile *cfg)
        g_free (vreg_to_varinfo);
 }
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (liveness);
+
+#endif /* !DISABLE_JIT */
index e19b91c5fcab116663a5971c7d925362daaeaadf..647d787dafcf4f72f315faf2eafa4b9e5a790c31 100644 (file)
@@ -14,6 +14,8 @@
  */
 
 #include <config.h>
+#include <mono/utils/mono-compiler.h>
+
 #ifndef DISABLE_JIT
 
 #include <string.h>
@@ -1002,4 +1004,8 @@ mono_local_deadce (MonoCompile *cfg)
        //mono_print_code (cfg, "AFTER LOCAL-DEADCE");
 }
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (local_propagation);
+
+#endif /* !DISABLE_JIT */
index 77f8bc9578c9cea42168c5695dd3dca43d53ff6c..80044897a83e48a34caee27a8aa05d1a92e74edc 100644 (file)
@@ -151,7 +151,7 @@ bundle_save_library_initialize ()
        bundle_save_library_initialized = 1;
        char *path = g_build_filename (g_get_tmp_dir (), "mono-bundle-XXXXXX", NULL);
        bundled_dylibrary_directory = g_mkdtemp (path);
-       /* don't free path - mkdtemp modifies it in place, and bundled_dylibrary_directory is an alias of it */
+       g_free (path);
        if (bundled_dylibrary_directory == NULL)
                return;
        atexit (delete_bundled_libraries);
index 3143431b6c48b11fab721ee8d1d0f6739519716b..de0e58ab1799364ea5c1c77f129066f37d9835c1 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <config.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -12578,7 +12579,17 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                cmethod = (MonoMethod *)mono_method_get_wrapper_data (method, token);
 
                                if (cfg->compile_aot) {
-                                       EMIT_NEW_AOTCONST (cfg, ins, MONO_PATCH_INFO_ICALL_ADDR, cmethod);
+                                       if (cfg->direct_pinvoke && ip + 6 < end && (ip [6] == CEE_POP)) {
+                                               /*
+                                                * This is generated by emit_native_wrapper () to resolve the pinvoke address
+                                                * before the call, its not needed when using direct pinvoke.
+                                                * This is not an optimization, but its used to avoid looking up pinvokes
+                                                * on platforms which don't support dlopen ().
+                                                */
+                                               EMIT_NEW_PCONST (cfg, ins, NULL);
+                                       } else {
+                                               EMIT_NEW_AOTCONST (cfg, ins, MONO_PATCH_INFO_ICALL_ADDR, cmethod);
+                                       }
                                } else {
                                        ptr = mono_lookup_internal_call (cmethod);
                                        g_assert (ptr);
@@ -15295,4 +15306,8 @@ NOTES
   the values on the stack before emitting the last instruction of the bb.
 */
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (method_to_ir);
+
+#endif /* !DISABLE_JIT */
index 4ed38f2b58312bd22f6697f0ad9bd2d72be8e261..b9a4503e2e2be0cbcff3491c925192b0463c21b6 100644 (file)
@@ -438,7 +438,7 @@ collect_field_info_nested (MonoClass *klass, StructFieldInfo *fields, int index,
 #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)
+allocate_register_for_valuetype_win64 (ArgInfo *arg_info, ArgumentClass arg_class, guint32 arg_size, AMD64_Reg_No int_regs [], int int_reg_count, AMD64_XMM_Reg_No float_regs [], int float_reg_count, guint32 *current_int_reg, guint32 *current_float_reg)
 {
        gboolean result = FALSE;
 
index 8ac16a17176d26319836dee254922c1c16dc1632..24eb6524bf759596849b46637e9bc860c1a92d16 100644 (file)
@@ -191,11 +191,11 @@ typedef struct MonoCompileArch {
 
 static AMD64_Reg_No param_regs [] = { AMD64_RCX, AMD64_RDX, AMD64_R8, AMD64_R9 };
 
-static AMD64_Reg_No float_param_regs [] = { AMD64_XMM0, AMD64_XMM1, AMD64_XMM2, AMD64_XMM3 };
+static AMD64_XMM_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 };
+static AMD64_XMM_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)
index e19467f8945dc90d4f2b27a41abd00b30e430501..3b4dd15c8c9acb3dc3a9bed4b689f664526ffe62 100644 (file)
@@ -1789,25 +1789,21 @@ mono_arch_flush_icache (guint8 *code, gint size)
         * icache/dcache cache line sizes, that can vary between cores on
         * big.LITTLE architectures. */
        guint64 end = (guint64) (code + size);
-       guint64 addr, ctr_el0;
-       static size_t icache_line_size = 0xffff, dcache_line_size = 0xffff;
-       size_t isize, dsize;
-
-       asm volatile ("mrs %0, ctr_el0" : "=r" (ctr_el0));
-       isize = 4 << ((ctr_el0 >> 0 ) & 0xf);
-       dsize = 4 << ((ctr_el0 >> 16) & 0xf);
-
-       /* determine the global minimum cache line size */
-       icache_line_size = isize = MIN (icache_line_size, isize);
-       dcache_line_size = dsize = MIN (dcache_line_size, dsize);
-
-       addr = (guint64) code & ~(guint64) (dsize - 1);
-       for (; addr < end; addr += dsize)
+       guint64 addr;
+       /* always go with cacheline size of 4 bytes as this code isn't perf critical
+        * anyway. Reading the cache line size from a machine register can be racy
+        * on a big.LITTLE architecture if the cores don't have the same cache line
+        * sizes. */
+       const size_t icache_line_size = 4;
+       const size_t dcache_line_size = 4;
+
+       addr = (guint64) code & ~(guint64) (dcache_line_size - 1);
+       for (; addr < end; addr += dcache_line_size)
                asm volatile("dc civac, %0" : : "r" (addr) : "memory");
        asm volatile("dsb ish" : : : "memory");
 
-       addr = (guint64) code & ~(guint64) (isize - 1);
-       for (; addr < end; addr += isize)
+       addr = (guint64) code & ~(guint64) (icache_line_size - 1);
+       for (; addr < end; addr += icache_line_size)
                asm volatile("ic ivau, %0" : : "r" (addr) : "memory");
 
        asm volatile ("dsb ish" : : : "memory");
index 572048ff5ff8b401b415ab6ba0fe9de8e88cc02f..77b4bb21415055645f74797cf80e24f8cc3aa600 100644 (file)
@@ -253,6 +253,8 @@ mono_print_method_from_ip (void *ip)
        MonoGenericSharingContext*gsctx;
        const char *shared_type;
 
+       if (!domain)
+               domain = mono_get_root_domain ();
        ji = mini_jit_info_table_find_ext (domain, (char *)ip, TRUE, &target_domain);
        if (ji && ji->is_trampoline) {
                MonoTrampInfo *tinfo = (MonoTrampInfo *)ji->d.tramp_info;
index c2367aae9c2a046301d5b140a070a17f795881a7..2d479708fcd8034d08702f4b90417fc332dc5ea8 100644 (file)
@@ -6,9 +6,10 @@
  */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 
 void
 mono_runtime_setup_stat_profiler (void)
@@ -35,9 +36,6 @@ mono_setup_thread_context(DWORD thread_id, MonoContext *mono_context)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_mini_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (mini_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
index e94e9fc18c00e59ca5c5b38e0295d461819bbe4c..5b42ca510f34ffa07def506ffdb86ffff3612339 100644 (file)
@@ -3315,6 +3315,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
        cfg->soft_breakpoints = debug_options.soft_breakpoints;
        cfg->check_pinvoke_callconv = debug_options.check_pinvoke_callconv;
        cfg->disable_direct_icalls = disable_direct_icalls;
+       cfg->direct_pinvoke = (flags & JIT_FLAG_DIRECT_PINVOKE) != 0;
        if (try_generic_shared)
                cfg->gshared = TRUE;
        cfg->compile_llvm = try_llvm;
index 1d4184ee09c37b27229fcf76bd41e634d3416a56..9e6f8f7523f5702fccc496b9433cd0abc5a02422 100644 (file)
@@ -1513,12 +1513,14 @@ typedef enum {
        JIT_FLAG_FULL_AOT = (1 << 2),
        /* Whenever to compile with LLVM */
        JIT_FLAG_LLVM = (1 << 3),
-       /* Whenever to disable direct calls to direct calls to icall functions */
+       /* Whenever to disable direct calls to icall functions */
        JIT_FLAG_NO_DIRECT_ICALLS = (1 << 4),
        /* Emit explicit null checks */
        JIT_FLAG_EXPLICIT_NULL_CHECKS = (1 << 5),
        /* Whenever to compile in llvm-only mode */
        JIT_FLAG_LLVM_ONLY = (1 << 6),
+       /* Whenever calls to pinvoke functions are made directly */
+       JIT_FLAG_DIRECT_PINVOKE = (1 << 7)
 } JitFlags;
 
 /* Bit-fields in the MonoBasicBlock.region */
@@ -1688,6 +1690,7 @@ typedef struct {
        guint            disable_out_of_line_bblocks : 1;
        guint            disable_direct_icalls : 1;
        guint            disable_gc_safe_points : 1;
+       guint            direct_pinvoke : 1;
        guint            create_lmf_var : 1;
        /*
         * When this is set, the code to push/pop the LMF from the LMF stack is generated as IR
index cb100267ef706a6c3608f7b09e12f5dcb92e1cfb..d70788c6afb39ce430fcde647838b3ca7689e66b 100644 (file)
@@ -13,6 +13,7 @@
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/mempool.h>
 #include <mono/metadata/mempool-internals.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_JIT
 
@@ -1515,4 +1516,8 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg)
        }
 }
 
-#endif /* DISABLE_JIT */
+#else /* !DISABLE_JIT */
+
+MONO_EMPTY_SOURCE_FILE (ssa);
+
+#endif /* !DISABLE_JIT */
index 44ddf94b24dad9e505796d536d2d0c6f99417e14..04b1f241e1abaff2b96990b572e1bdf5e5bf8907 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "sgen/sgen-gc.h"
 #include "sgen/sgen-layout-stats.h"
+#include <mono/utils/mono-compiler.h>
 
 #ifdef SGEN_OBJECT_LAYOUT_STATISTICS
 
@@ -60,9 +61,6 @@ sgen_object_layout_dump (FILE *out)
 }
 #else
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_sgen_layout_stats_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (sgen_layout_stats);
 #endif /* SGEN_OBJECT_LAYOUT_STATISTICS */
 #endif
index b3114b1524d80d38ac70410b20b4135ae8f81daf..3e3ef31f47e241080430c1174943a1a54e59e12d 100644 (file)
@@ -531,7 +531,11 @@ endif
 
 if POWERPC64
 # FIXME: These tests hang/fail for unknown reasons
-PLATFORM_DISABLED_TESTS=monitor.exe threadpool-exceptions5.exe
+PLATFORM_DISABLED_TESTS=monitor.exe threadpool-exceptions5.exe appdomain-thread-abort.exe appdomain-unload.exe \
+       pinvoke2.exe pinvoke3.exe pinvoke11.exe threadpool-exceptions7.exe winx64structs.exe bug-10127.exe pinvoke_ppcc.exe \
+       pinvoke_ppcs.exe pinvoke_ppci.exe pinvoke_ppcf.exe pinvoke_ppcd.exe abort-cctor.exe \
+       sgen-domain-unload-2.exe sgen-weakref-stress.exe sgen-cementing-stress.exe sgen-new-threads-dont-join-stw.exe \
+       sgen-new-threads-dont-join-stw-2.exe sgen-new-threads-collect.exe sgen-bridge.exe
 endif
 
 if ARM
@@ -690,20 +694,30 @@ endif
 # delegate-invoke.exe depends on 929c6bc9b6d76a273f251e6f5dfacac36e9c38bd which was
 # reverted.
 # bug-Xamarin-5278.exe got broken by 5d26590e79da139a284459299aee95c25f4cd835
+# bug-45841-fpstack-exceptions.exe: https://bugzilla.xamarin.com/show_bug.cgi?id=47053
+# appdomain-thread-abort.exe: https://bugzilla.xamarin.com/show_bug.cgi?id=47054
 DISABLED_TESTS=                        \
        delegate-async-exception.exe    \
        bug-348522.2.exe        \
        bug-459094.exe \
        delegate-invoke.exe \
        bug-Xamarin-5278.exe \
+       bug-45841-fpstack-exceptions.exe \
+       appdomain-thread-abort.exe \
        $(PLATFORM_DISABLED_TESTS) \
        $(EXTRA_DISABLED_TESTS) \
        $(COOP_DISABLED_TESTS) \
        $(PROFILE_DISABLED_TESTS)
 
-DISABLED_TESTS_WRENCH= \
+# failing tests which we temporarily disable for PRs
+# so they don't interfere with other people's work
+DISABLED_TESTS_CI_PR = \
+       appdomain-threadpool-unload.exe \
+       appdomain-thread-abort.exe
+
+DISABLED_TESTS_CI=     \
        $(DISABLED_TESTS)       \
-       $(PLATFORM_DISABLED_TESTS_WRENCH)       \
+       $(shell if [ "x$(CI_PR)" != "x" ]; then echo $(DISABLED_TESTS_CI_PR); fi)       \
        main-returns-background-resetabort.exe \
        main-returns-background-abort-resetabort.exe    \
        thread6.exe     \
@@ -952,7 +966,7 @@ test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
        @failed=0; \
        passed=0; \
        if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
-       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        for i in $(TESTSI_CS); do       \
                if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
                then \
@@ -968,7 +982,7 @@ test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
        @failed=0; \
        passed=0; \
        if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
-       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        for i in $(TESTSI_IL); do       \
                if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
                then \
@@ -982,7 +996,7 @@ test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
 
 testb: $(TEST_PROG) $(TESTBS)
        if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
-       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        for i in $(TESTBS); do  \
                $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS);  \
        done
@@ -992,7 +1006,7 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
        passed=0; \
        failed_tests="";\
        if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
-       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        rm -f testlist testlist.sorted; \
        for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do echo $${i} >> testlist; sort testlist > testlist.sorted; done; \
        for i in `cat testlist.sorted`; do \
@@ -1022,11 +1036,11 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
        fi
 
 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; \
+       @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        $(RUNTIME) --debug $(TEST_RUNNER) $(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; \
+       @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_CI)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        $(RUNTIME) --debug $(TEST_RUNNER) $(TEST_RUNNER_ARGS) -j 1 --testsuite-name "runtime" --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 testjit:
@@ -1078,12 +1092,14 @@ testbundle: console.exe
 
 EXTRA_DIST += load-missing.il t-missing.cs load-exceptions.cs
 test-type-load: $(TEST_DRIVER_DEPEND)
+if !POWERPC64
        @$(ILASM) /dll /output:load-missing.dll $(srcdir)/load-missing.il > /dev/null
        @$(MCS) -t:library -out:t.dll -d:FOUND $(srcdir)/t-missing.cs
        @$(MCS) -r:TestDriver.dll -r:load-missing.dll -r:t.dll -out:load-exceptions.exe $(srcdir)/load-exceptions.cs
        @$(MCS) -t:library -out:t.dll $(srcdir)/t-missing.cs
        @echo "Testing load-exception.exe..."
        @$(RUNTIME) load-exceptions.exe > load-exceptions.exe.stdout 2> load-exceptions.exe.stderr
+endif
 
 EXTRA_DIST += test-multi-netmodule-1-netmodule.cs test-multi-netmodule-2-dll1.cs test-multi-netmodule-3-dll2.cs test-multi-netmodule-4-exe.cs
 test-multi-netmodule:
@@ -1166,21 +1182,21 @@ sgen-regular-tests: $(SGEN_REGULAR_TESTS)
        $(MAKE) sgen-regular-tests-ms-conc-split-clear-at-gc
 
 sgen-regular-tests-ms: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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="major=marksweep,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc-split-95: $(SGEN_REGULAR_TESTS) test-runner.exe
-       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc,minor=split,alloc-ratio=95" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="major=marksweep-conc,minor=split,alloc-ratio=95" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-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" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="major=marksweep" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 sgen-regular-tests-ms-conc-split-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,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_REGULAR_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="clear-at-gc" MONO_GC_PARAMS="major=marksweep-conc,minor=split" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_REGULAR_TESTS)
 
 SGEN_TOGGLEREF_TESTS=  \
        sgen-toggleref.exe
@@ -1196,21 +1212,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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_TOGGLEREF_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="toggleref-test" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_TOGGLEREF_TESTS)
 
 SGEN_BRIDGE_TESTS=     \
        sgen-bridge.exe \
@@ -1227,21 +1243,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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=Bridge" MONO_GC_PARAMS="" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE_TESTS)
 
 SGEN_BRIDGE2_TESTS=    \
        sgen-bridge-xref.exe
@@ -1257,21 +1273,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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 900 $(SGEN_BRIDGE2_TESTS)
+       MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="bridge=2Bridge" MONO_GC_PARAMS="" $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --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) $(TEST_RUNNER_ARGS) --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) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(SGEN_BRIDGE2_TESTS)
 
 SGEN_BRIDGE3_TESTS=    \
        sgen-bridge-gchandle.exe
@@ -1677,7 +1693,7 @@ PROCESS_STRESS_TESTS=     \
                process-leak.exe
 
 test-process-stress: $(PROCESS_STRESS_TESTS) test-runner.exe
-       $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --timeout 600 $(PROCESS_STRESS_TESTS)
+       $(RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 600 $(PROCESS_STRESS_TESTS)
 
 coreclr-gcstress:
        $(MAKE) -C $(mono_build_root)/acceptance-tests coreclr-gcstress
index ab301d1700bdb3b50958e69d3b858a9f34322f3c..35f218a8d0ac5cd4d0bd0ff650f69d1468ee6f14 100644 (file)
@@ -40,7 +40,7 @@ monoutils_sources = \
        mono-dl-darwin.c        \
        mono-dl-posix.c         \
        mono-dl.h               \
-       mono-dl-windows.h       \
+       mono-dl-windows-internals.h     \
        mono-log-windows.c      \
        mono-log-common.c       \
        mono-log-posix.c        \
@@ -57,7 +57,7 @@ monoutils_sources = \
        mono-mmap-windows.c             \
        mono-mmap.h             \
        mono-mmap-internals.h   \
-       mono-mmap-windows.h     \
+       mono-mmap-windows-internals.h   \
        mono-os-mutex.h         \
        mono-coop-mutex.h               \
        mono-once.h             \
@@ -67,7 +67,7 @@ monoutils_sources = \
        mono-proclib.c          \
        mono-proclib-windows.c          \
        mono-proclib.h          \
-       mono-proclib-windows.h          \
+       mono-proclib-windows-internals.h                \
        mono-publib.c           \
        mono-string.h           \
        mono-time.c             \
@@ -166,7 +166,7 @@ monoutils_sources = \
        mono-rand.c     \
        mono-rand-windows.c     \
        mono-rand.h \
-       mono-rand-windows.h \
+       mono-rand-windows-internals.h \
        memfuncs.c \
        memfuncs.h \
        parse.c \
index 2f5e8a8a673a8688e78c577b57b7c194effaad76..543e8ce9b0cb2c7171035f965964887b9835bd42 100644 (file)
@@ -12,6 +12,7 @@
 #include <glib.h>
 
 #include <mono/utils/atomic.h>
+#include <mono/utils/mono-compiler.h>
 
 #if defined (WAPI_NO_ATOMIC_ASM) || defined (BROKEN_64BIT_ATOMICS_INTRINSIC)
 
@@ -584,7 +585,6 @@ InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
 #endif
 #endif
 
-#if defined(HOST_WIN32) && defined(_MSC_VER)
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_atomic_lnk4221(void) {}
+#if !defined (WAPI_NO_ATOMIC_ASM) && !defined (BROKEN_64BIT_ATOMICS_INTRINSIC) && !defined (NEED_64BIT_CMPXCHG_FALLBACK)
+MONO_EMPTY_SOURCE_FILE (atomic);
 #endif
index 7becf4816ffd571052129646b5c7c39ae7db4275..680c5a4cdded0ff203f10adf121c6dff8d416fa5 100644 (file)
@@ -268,6 +268,13 @@ typedef SSIZE_T ssize_t;
 
 #endif /* _MSC_VER */
 
+#ifdef _MSC_VER
+// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+#define MONO_EMPTY_SOURCE_FILE(x) void __mono_win32_ ## x ## _quiet_lnk4221 (void) {}
+#else
+#define MONO_EMPTY_SOURCE_FILE(x)
+#endif
+
 #if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
 #if MONO_LLVM_LOADED
 #define MONO_LLVM_INTERNAL MONO_API
diff --git a/mono/utils/mono-dl-windows-internals.h b/mono/utils/mono-dl-windows-internals.h
new file mode 100644 (file)
index 0000000..5215418
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef __MONO_UTILS_DL_WINDOWS_H__
+#define __MONO_UTILS_DL_WINDOWS_H__
+
+#include <config.h>
+#include <glib.h>
+
+#ifdef HOST_WIN32
+#include "mono/utils/mono-dl.h"
+
+void*
+mono_dl_lookup_symbol_in_process (const char *symbol_name);
+#endif /* HOST_WIN32 */
+#endif /* __MONO_UTILS_DL_WINDOWS_H__ */
+
index 8bb8e6c7e08cf211e8a5c22e2f87028000453054..36ade1f67e9299f3b8a5f07f9ae249033d337e87 100644 (file)
@@ -6,10 +6,11 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
-#include "mono/utils/mono-dl-windows.h"
+#include <windows.h>
+#include "mono/utils/mono-dl-windows-internals.h"
 
 void*
 mono_dl_lookup_symbol_in_process (const char *symbol_name)
@@ -37,8 +38,5 @@ mono_dl_current_error_string (void)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_mono_dl_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (mono_dl_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 04f695d22de38e15d4a199142b400023df9e5f1c..32eaac799b6cae03ebef2cc16efd1584cb29cc09 100644 (file)
@@ -13,7 +13,7 @@
 #if defined(HOST_WIN32)
 
 #include "mono/utils/mono-dl.h"
-#include "mono/utils/mono-dl-windows.h"
+#include "mono/utils/mono-dl-windows-internals.h"
 #include "mono/utils/mono-embed.h"
 #include "mono/utils/mono-path.h"
 
diff --git a/mono/utils/mono-dl-windows.h b/mono/utils/mono-dl-windows.h
deleted file mode 100644 (file)
index 5215418..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __MONO_UTILS_DL_WINDOWS_H__
-#define __MONO_UTILS_DL_WINDOWS_H__
-
-#include <config.h>
-#include <glib.h>
-
-#ifdef HOST_WIN32
-#include "mono/utils/mono-dl.h"
-
-void*
-mono_dl_lookup_symbol_in_process (const char *symbol_name);
-#endif /* HOST_WIN32 */
-#endif /* __MONO_UTILS_DL_WINDOWS_H__ */
-
index f423096a7800194c73af530b756e897f9b8050c9..7e22eafa8cc9cf25b2c9870a6ad44c42e5e3df0b 100644 (file)
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <mono/utils/mono-io-portability.h>
 #include <mono/metadata/profiler-private.h>
+#include <mono/utils/mono-compiler.h>
 
 #ifndef DISABLE_PORTABILITY
 
@@ -390,8 +391,6 @@ static inline gchar *mono_portability_find_file_internal (GString **report, cons
 
 #else /* DISABLE_PORTABILITY */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_mono_io_portability_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (mono_io_portability);
+
 #endif /* DISABLE_PORTABILITY */
diff --git a/mono/utils/mono-mmap-windows-internals.h b/mono/utils/mono-mmap-windows-internals.h
new file mode 100644 (file)
index 0000000..44da254
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __MONO_UTILS_MMAP_WINDOWS_H__
+#define __MONO_UTILS_MMAP_WINDOWS_H__
+
+#include <config.h>
+#include <glib.h>
+
+#ifdef HOST_WIN32
+#include "mono/utils/mono-mmap.h"
+#include "mono/utils/mono-mmap-internals.h"
+
+int
+mono_mmap_win_prot_from_flags (int flags);
+#endif /* HOST_WIN32 */
+#endif /* __MONO_UTILS_MMAP_WINDOWS_H__ */
+
index 55652006d5aff540642f1fda890f4fd52aaf1f31..347fb70e89fa38d99faff71fc181b02ef8f633d4 100644 (file)
@@ -6,10 +6,11 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
-#include <mono/utils/mono-mmap-windows.h>
+#include <windows.h>
+#include <mono/utils/mono-mmap-windows-internals.h>
 
 void*
 mono_file_map (size_t length, int flags, int fd, guint64 offset, void **ret_handle)
@@ -50,8 +51,5 @@ mono_file_unmap (void *addr, void *handle)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_mono_mmap_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (mono_mmap_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index d0b6072bece42f0bf94070df2fdad50ed88d5df9..69619f8acb9440148ca1ff6663b1d985f1ac89c5 100644 (file)
@@ -13,7 +13,7 @@
 
 #if defined(HOST_WIN32)
 #include <windows.h>
-#include "mono/utils/mono-mmap-windows.h"
+#include "mono/utils/mono-mmap-windows-internals.h"
 #include <mono/utils/mono-counters.h>
 #include <io.h>
 
diff --git a/mono/utils/mono-mmap-windows.h b/mono/utils/mono-mmap-windows.h
deleted file mode 100644 (file)
index 44da254..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __MONO_UTILS_MMAP_WINDOWS_H__
-#define __MONO_UTILS_MMAP_WINDOWS_H__
-
-#include <config.h>
-#include <glib.h>
-
-#ifdef HOST_WIN32
-#include "mono/utils/mono-mmap.h"
-#include "mono/utils/mono-mmap-internals.h"
-
-int
-mono_mmap_win_prot_from_flags (int flags);
-#endif /* HOST_WIN32 */
-#endif /* __MONO_UTILS_MMAP_WINDOWS_H__ */
-
diff --git a/mono/utils/mono-proclib-windows-internals.h b/mono/utils/mono-proclib-windows-internals.h
new file mode 100644 (file)
index 0000000..f14c7a4
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef __MONO_UTILS_PROCLIB_WINDOWS_H__
+#define __MONO_UTILS_PROCLIB_WINDOWS_H__
+
+#include <config.h>
+#include <glib.h>
+
+#ifdef HOST_WIN32
+#include <process.h>
+#include "mono/utils/mono-proclib.h"
+
+#endif /* HOST_WIN32 */
+#endif /* __MONO_UTILS_PROCLIB_WINDOWS_H__ */
+
index e278eccede20f27e62a11c510de17b2df351e7cd..4a2f37dabf9318acc744729cf437a727d722ddef 100644 (file)
@@ -6,9 +6,10 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 #include <mono/utils/mono-proclib.h>
 
 gint32
@@ -57,8 +58,5 @@ mono_cpu_usage (MonoCpuUsageState *prev)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_mono_proclib_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (mono_proclib_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
diff --git a/mono/utils/mono-proclib-windows.h b/mono/utils/mono-proclib-windows.h
deleted file mode 100644 (file)
index f14c7a4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __MONO_UTILS_PROCLIB_WINDOWS_H__
-#define __MONO_UTILS_PROCLIB_WINDOWS_H__
-
-#include <config.h>
-#include <glib.h>
-
-#ifdef HOST_WIN32
-#include <process.h>
-#include "mono/utils/mono-proclib.h"
-
-#endif /* HOST_WIN32 */
-#endif /* __MONO_UTILS_PROCLIB_WINDOWS_H__ */
-
diff --git a/mono/utils/mono-rand-windows-internals.h b/mono/utils/mono-rand-windows-internals.h
new file mode 100644 (file)
index 0000000..f60c121
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef _MONO_UTILS_RAND_WINDOWS_H_
+#define _MONO_UTILS_RAND_WINDOWS_H_
+
+#include <config.h>
+#include <glib.h>
+
+#ifdef HOST_WIN32
+
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+#include <wincrypt.h>
+#define MONO_WIN32_CRYPT_PROVIDER_HANDLE HCRYPTPROV
+
+#else
+
+#include <bcrypt.h>
+#define MONO_WIN32_CRYPT_PROVIDER_HANDLE BCRYPT_ALG_HANDLE
+#endif
+
+MONO_WIN32_CRYPT_PROVIDER_HANDLE
+mono_rand_win_open_provider (void);
+
+gboolean
+mono_rand_win_gen (MONO_WIN32_CRYPT_PROVIDER_HANDLE provider, guchar *buffer, size_t buffer_size);
+
+gboolean
+mono_rand_win_seed (MONO_WIN32_CRYPT_PROVIDER_HANDLE provider, guchar *seed, size_t seed_size);
+
+void
+mono_rand_win_close_provider (MONO_WIN32_CRYPT_PROVIDER_HANDLE provider);
+
+#endif /* HOST_WIN32 */
+#endif /* _MONO_UTILS_RAND_WINDOWS_H_ */
+
index e9030fe85511cb086af7420b8ef91f38762b4be2..7d92434526c2e900198ccda099b6f7721e956ff3 100644 (file)
@@ -6,10 +6,11 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
-#include "mono/utils/mono-rand-windows.h"
+#include <windows.h>
+#include "mono/utils/mono-rand-windows-internals.h"
 
 MONO_WIN32_CRYPT_PROVIDER_HANDLE
 mono_rand_win_open_provider (void)
@@ -45,8 +46,5 @@ mono_rand_win_close_provider (MONO_WIN32_CRYPT_PROVIDER_HANDLE provider)
 
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_mono_rand_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (mono_rand_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
index 2ff32a99fa15977b4b2fe21b76e31aeb6e7a6ed8..97f57cee4ee331024d2088ed9b5b04c53ac151f6 100644 (file)
@@ -12,7 +12,7 @@
 
 #if defined(HOST_WIN32)
 #include <windows.h>
-#include "mono/utils/mono-rand-windows.h"
+#include "mono/utils/mono-rand-windows-internals.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
 #ifndef PROV_INTEL_SEC
diff --git a/mono/utils/mono-rand-windows.h b/mono/utils/mono-rand-windows.h
deleted file mode 100644 (file)
index f60c121..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _MONO_UTILS_RAND_WINDOWS_H_
-#define _MONO_UTILS_RAND_WINDOWS_H_
-
-#include <config.h>
-#include <glib.h>
-
-#ifdef HOST_WIN32
-
-#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
-#include <wincrypt.h>
-#define MONO_WIN32_CRYPT_PROVIDER_HANDLE HCRYPTPROV
-
-#else
-
-#include <bcrypt.h>
-#define MONO_WIN32_CRYPT_PROVIDER_HANDLE BCRYPT_ALG_HANDLE
-#endif
-
-MONO_WIN32_CRYPT_PROVIDER_HANDLE
-mono_rand_win_open_provider (void);
-
-gboolean
-mono_rand_win_gen (MONO_WIN32_CRYPT_PROVIDER_HANDLE provider, guchar *buffer, size_t buffer_size);
-
-gboolean
-mono_rand_win_seed (MONO_WIN32_CRYPT_PROVIDER_HANDLE provider, guchar *seed, size_t seed_size);
-
-void
-mono_rand_win_close_provider (MONO_WIN32_CRYPT_PROVIDER_HANDLE provider);
-
-#endif /* HOST_WIN32 */
-#endif /* _MONO_UTILS_RAND_WINDOWS_H_ */
-
index 763c85b0d3757f6244eef499a30492de291cc39d..8c8c75b5a1012ffdaab66fdac3d976abb6c76cea 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <mono/utils/networking.h>
+#include <mono/utils/mono-compiler.h>
 #include <glib.h>
 
 #ifdef HAVE_NETDB_H
@@ -55,8 +56,5 @@ inet_pton (int family, const char *address, void *inaddrp)
 
 #else /* !HAVE_INET_PTON */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_networking_missing_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (networking_missing);
 #endif /* !HAVE_INET_PTON */
index 06e9639d0c2f010959f5d306f7aa46c3f24c78c4..611cb76ffbc69038a739470bcad367cd6df8102a 100644 (file)
 static mono_lazy_init_t status = MONO_LAZY_INIT_STATUS_NOT_INITIALIZED;
 
 static mono_mutex_t signal_mutex;
-static mono_cond_t signal_cond;
 
 static void
 initialize (void)
 {
        mono_os_mutex_init (&signal_mutex);
-       mono_os_cond_init (&signal_cond);
 }
 
 void
@@ -33,8 +31,7 @@ mono_os_event_init (MonoOSEvent *event, gboolean initial)
 
        mono_lazy_initialize (&status, initialize);
 
-       mono_os_mutex_init (&event->mutex);
-       mono_os_cond_init (&event->cond);
+       event->conds = g_ptr_array_new ();
        event->signalled = initial;
 }
 
@@ -45,8 +42,10 @@ mono_os_event_destroy (MonoOSEvent *event)
 
        g_assert (event);
 
-       mono_os_mutex_destroy (&event->mutex);
-       mono_os_cond_destroy (&event->cond);
+       if (event->conds->len > 0)
+               g_error ("%s: cannot destroy osevent, there are still %d threads waiting on it", __func__, event->conds->len);
+
+       g_ptr_array_free (event->conds, TRUE);
 }
 
 static gboolean
@@ -58,19 +57,19 @@ mono_os_event_is_signalled (MonoOSEvent *event)
 void
 mono_os_event_set (MonoOSEvent *event)
 {
+       gsize i;
+
        g_assert (mono_lazy_is_initialized (&status));
 
        g_assert (event);
 
-       mono_os_mutex_lock (&event->mutex);
        mono_os_mutex_lock (&signal_mutex);
 
        event->signalled = TRUE;
 
-       mono_os_cond_broadcast (&event->cond);
-       mono_os_cond_broadcast (&signal_cond);
+       for (i = 0; i < event->conds->len; ++i)
+               mono_os_cond_signal ((mono_cond_t*) event->conds->pdata [i]);
 
-       mono_os_mutex_unlock (&event->mutex);
        mono_os_mutex_unlock (&signal_mutex);
 }
 
@@ -81,11 +80,11 @@ mono_os_event_reset (MonoOSEvent *event)
 
        g_assert (event);
 
-       mono_os_mutex_lock (&event->mutex);
+       mono_os_mutex_lock (&signal_mutex);
 
        event->signalled = FALSE;
 
-       mono_os_mutex_unlock (&event->mutex);
+       mono_os_mutex_unlock (&signal_mutex);
 }
 
 MonoOSEventWaitRet
@@ -113,41 +112,11 @@ signal_and_unref (gpointer user_data)
        }
 }
 
-static void
-mono_os_event_lock_events (MonoOSEvent **events, gsize nevents)
-{
-       gint i, j;
-
-retry:
-       for (i = 0; i < nevents; ++i) {
-               gint res;
-
-               res = mono_os_mutex_trylock (&events [i]->mutex);
-               if (res != 0) {
-                       for (j = i - 1; j >= 0; j--)
-                               mono_os_mutex_unlock (&events [j]->mutex);
-
-                       mono_thread_info_yield ();
-
-                       goto retry;
-               }
-       }
-}
-
-static void
-mono_os_event_unlock_events (MonoOSEvent **events, gsize nevents)
-{
-       gint i;
-
-       for (i = 0; i < nevents; ++i)
-               mono_os_mutex_unlock (&events [i]->mutex);
-}
-
 MonoOSEventWaitRet
 mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waitall, guint32 timeout)
 {
        MonoOSEventWaitRet ret;
-       MonoOSEvent *innerevents [MONO_OS_EVENT_WAIT_MAXIMUM_OBJECTS + 1];
+       mono_cond_t signal_cond;
        OSEventWaitData *data;
        gboolean alerted;
        gint64 start;
@@ -162,14 +131,10 @@ mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waita
        for (i = 0; i < nevents; ++i)
                g_assert (events [i]);
 
-       memcpy (innerevents, events, sizeof (MonoOSEvent*) * nevents);
-
        data = g_new0 (OSEventWaitData, 1);
        data->ref = 2;
        mono_os_event_init (&data->event, FALSE);
 
-       innerevents [nevents ++] = &data->event;
-
        alerted = FALSE;
        mono_thread_info_install_interrupt (signal_and_unref, data, &alerted);
        if (alerted) {
@@ -181,17 +146,24 @@ mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waita
        if (timeout != MONO_INFINITE_WAIT)
                start = mono_msec_ticks ();
 
+       mono_os_cond_init (&signal_cond);
+
+       mono_os_mutex_lock (&signal_mutex);
+
+       for (i = 0; i < nevents; ++i)
+               g_ptr_array_add (events [i]->conds, &signal_cond);
+
+       g_ptr_array_add (data->event.conds, &signal_cond);
+
        for (;;) {
                gint count, lowest;
                gboolean signalled;
 
-               mono_os_event_lock_events (innerevents, nevents);
-
                count = 0;
                lowest = -1;
 
-               for (i = 0; i < nevents - 1; ++i) {
-                       if (mono_os_event_is_signalled (innerevents [i])) {
+               for (i = 0; i < nevents; ++i) {
+                       if (mono_os_event_is_signalled (events [i])) {
                                count += 1;
                                if (lowest == -1)
                                        lowest = i;
@@ -201,44 +173,15 @@ mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waita
                if (mono_os_event_is_signalled (&data->event))
                        signalled = TRUE;
                else if (waitall)
-                       signalled = (count == nevents - 1);
+                       signalled = (count == nevents);
                else /* waitany */
                        signalled = (count > 0);
 
-               mono_os_event_unlock_events (innerevents, nevents);
-
                if (signalled) {
                        ret = MONO_OS_EVENT_WAIT_RET_SUCCESS_0 + lowest;
                        goto done;
                }
 
-               mono_os_mutex_lock (&signal_mutex);
-
-               if (mono_os_event_is_signalled (&data->event)) {
-                       signalled = TRUE;
-               } else if (waitall) {
-                       signalled = TRUE;
-                       for (i = 0; i < nevents - 1; ++i) {
-                               if (!mono_os_event_is_signalled (innerevents [i])) {
-                                       signalled = FALSE;
-                                       break;
-                               }
-                       }
-               } else {
-                       signalled = FALSE;
-                       for (i = 0; i < nevents - 1; ++i) {
-                               if (mono_os_event_is_signalled (innerevents [i])) {
-                                       signalled = TRUE;
-                                       break;
-                               }
-                       }
-               }
-
-               if (signalled) {
-                       mono_os_mutex_unlock (&signal_mutex);
-                       continue;
-               }
-
                if (timeout == MONO_INFINITE_WAIT) {
                        mono_os_cond_wait (&signal_cond, &signal_mutex);
                } else {
@@ -247,25 +190,28 @@ mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waita
 
                        elapsed = mono_msec_ticks () - start;
                        if (elapsed >= timeout) {
-                               mono_os_mutex_unlock (&signal_mutex);
-
                                ret = MONO_OS_EVENT_WAIT_RET_TIMEOUT;
                                goto done;
                        }
 
                        res = mono_os_cond_timedwait (&signal_cond, &signal_mutex, timeout - elapsed);
                        if (res != 0) {
-                               mono_os_mutex_unlock (&signal_mutex);
-
                                ret = MONO_OS_EVENT_WAIT_RET_TIMEOUT;
                                goto done;
                        }
                }
-
-               mono_os_mutex_unlock (&signal_mutex);
        }
 
 done:
+       for (i = 0; i < nevents; ++i)
+               g_ptr_array_remove (events [i]->conds, &signal_cond);
+
+       g_ptr_array_remove (data->event.conds, &signal_cond);
+
+       mono_os_mutex_unlock (&signal_mutex);
+
+       mono_os_cond_destroy (&signal_cond);
+
        mono_thread_info_uninstall_interrupt (&alerted);
        if (alerted) {
                if (InterlockedDecrement ((gint32*) &data->ref) == 0) {
index 3f04f0bfcafbbc4554d24431c095928825d80567..c3ca11b8504aa536845b6bca07fbe74a31e5ff9d 100644 (file)
@@ -27,8 +27,7 @@ struct _MonoOSEvent {
 #ifdef HOST_WIN32
        gpointer handle;
 #else
-       mono_mutex_t mutex;
-       mono_cond_t cond;
+       GPtrArray *conds;
        gboolean signalled;
 #endif
 };
index 94a7127d7318cad19bd892a6f7e50eb800455856..98a8849ab35efb07f61a8c00374ca6cdce77dbe9 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>\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|Win32">\r
     <ClCompile Include="..\eglib\src\gstr.c" />\r
     <ClCompile Include="..\eglib\src\gstring.c" />\r
     <ClCompile Include="..\eglib\src\gtimer-win32.c" />\r
+    <ClCompile Include="..\eglib\src\gunicode-win32.c" />\r
     <ClCompile Include="..\eglib\src\gunicode.c" />\r
     <ClCompile Include="..\eglib\src\gutf8.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="..\eglib\src\glib.h" />\r
+    <ClInclude Include="..\eglib\src\gmodule-win32-internals.h" />\r
     <ClInclude Include="..\eglib\src\gmodule.h" />\r
     <ClInclude Include="..\eglib\src\sort.frag.h" />\r
   </ItemGroup>\r
       <Project>{92ae7622-5f58-4234-9a26-9ec71876b3f4}</Project>\r
     </ProjectReference>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\eglib\src\Makefile.am" />\r
+  </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
-</Project>\r
+</Project>
\ No newline at end of file
index 680ff1a9fd998f8e518d723e3d93cb9f68a901c4..f49e42ae1598c84abe46799a2e66114c1017bfa9 100644 (file)
@@ -88,7 +88,7 @@
     <ClCompile Include="..\eglib\src\gutf8.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\eglib\src\vasprintf.c">\r
+    <ClCompile Include="..\eglib\src\gunicode-win32.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
   </ItemGroup>\r
     <ClInclude Include="..\eglib\src\sort.frag.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\eglib\src\gmodule-win32-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Filter Include="Source Files">\r
       <UniqueIdentifier>{38a39ff1-842b-431b-b54b-24094e8283eb}</UniqueIdentifier>\r
     </Filter>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\eglib\src\Makefile.am">\r
+      <Filter>Resource Files</Filter>\r
+    </None>\r
+  </ItemGroup>\r
 </Project>
\ No newline at end of file
index 775c7b8e5e3c98948f5eefbe4603b6f662985c80..b8ba2add1e26cb63a52cf948d3b12717f7d75910 100644 (file)
       <Project>{8fc2b0c8-51ad-49df-851f-5d01a77a75e4}</Project>\r
     </ProjectReference>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\mono\mini\Makefile.am.in" />\r
+  </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
index e0a3ad1227f88d363f3e10bf3fe48b46bde5e444..77099bed2f10b87c0f4fcfd21ac3839069c5e2a6 100644 (file)
       <UniqueIdentifier>{5370c3c4-b6ec-4f8a-8b21-ce4e782720a6}</UniqueIdentifier>\r
     </Filter>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\mono\mini\Makefile.am.in">\r
+      <Filter>Resource Files</Filter>\r
+    </None>\r
+  </ItemGroup>\r
 </Project>
\ No newline at end of file
index 54361b9ef2db6adeb8cee68bd67b9a19b36e65f5..762947af907c7144679b385094aa5574ac0cdde7 100644 (file)
@@ -27,6 +27,7 @@
     <ClCompile Include="..\mono\metadata\class.c" />\r
     <ClCompile Include="..\mono\metadata\cominterop.c" />\r
     <ClCompile Include="..\mono\metadata\console-win32.c" />\r
+    <ClCompile Include="..\mono\metadata\property-bag.c" />\r
     <ClCompile Include="..\mono\metadata\socket-io-windows.c" />\r
     <ClCompile Include="..\mono\metadata\file-io-windows.c" />\r
     <ClCompile Include="..\mono\metadata\icall-windows.c" />\r
     <ClInclude Include="..\mono\metadata\marshal-windows-internals.h" />\r
     <ClInclude Include="..\mono\metadata\mono-security-windows-internals.h" />\r
     <ClInclude Include="..\mono\metadata\number-ms.h" />\r
+    <ClInclude Include="..\mono\metadata\property-bag.h" />\r
     <ClInclude Include="..\mono\metadata\w32process.h" />\r
     <ClInclude Include="..\mono\metadata\w32process-internals.h" />\r
     <ClInclude Include="..\mono\metadata\w32process-win32-internals.h" />\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
     </ProjectReference>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\mono\metadata\Makefile.am" />\r
+  </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{C36612BD-22D3-4B95-85E2-7FDC4FC5D739}</ProjectGuid>\r
     <Keyword>Win32Proj</Keyword>\r
index c412bbe885d12e98bc9fdd639fb5a338928b049b..d36472937a11002b372216ac0db1d035b0d1d18b 100644 (file)
     <ClCompile Include="..\mono\metadata\class-accessors.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\property-bag.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="..\mono\metadata\appdomain.h">\r
     <ClInclude Include="..\mono\metadata\mono-security-windows-internals.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\property-bag.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Filter Include="Header Files">\r
       <UniqueIdentifier>{e37c9a88-bfb3-47dd-948c-a74dea25b3ad}</UniqueIdentifier>\r
     </Filter>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\mono\metadata\Makefile.am">\r
+      <Filter>Resource Files</Filter>\r
+    </None>\r
+  </ItemGroup>\r
 </Project>
\ No newline at end of file
index ae6dadbcc61146d58e65abbb5f1a488b72250a34..bd512ab75e69be5420df3b1f02b3fdfaec296edc 100644 (file)
     <ClInclude Include="..\mono\utils\mono-counters.h" />\r
     <ClInclude Include="..\mono\utils\mono-digest.h" />\r
     <ClInclude Include="..\mono\utils\mono-dl-fallback.h" />\r
-    <ClInclude Include="..\mono\utils\mono-dl-windows.h" />\r
+    <ClInclude Include="..\mono\utils\mono-dl-windows-internals.h" />\r
     <ClInclude Include="..\mono\utils\mono-dl.h" />\r
     <ClInclude Include="..\mono\utils\mono-error-internals.h" />\r
     <ClInclude Include="..\mono\utils\mono-error.h" />\r
     <ClInclude Include="..\mono\utils\mono-math.h" />\r
     <ClInclude Include="..\mono\utils\mono-membar.h" />\r
     <ClInclude Include="..\mono\utils\mono-memory-model.h" />\r
-    <ClInclude Include="..\mono\utils\mono-mmap-windows.h" />\r
+    <ClInclude Include="..\mono\utils\mono-mmap-internals.h" />\r
+    <ClInclude Include="..\mono\utils\mono-mmap-windows-internals.h" />\r
     <ClInclude Include="..\mono\utils\mono-mmap.h" />\r
     <ClInclude Include="..\mono\utils\mono-networkinterfaces.h" />\r
     <ClInclude Include="..\mono\utils\mono-once.h" />\r
     <ClInclude Include="..\mono\utils\mono-os-semaphore.h" />\r
     <ClInclude Include="..\mono\utils\mono-path.h" />\r
     <ClInclude Include="..\mono\utils\mono-poll.h" />\r
-    <ClInclude Include="..\mono\utils\mono-proclib-windows.h" />\r
+    <ClInclude Include="..\mono\utils\mono-proclib-windows-internals.h" />\r
     <ClInclude Include="..\mono\utils\mono-proclib.h" />\r
     <ClInclude Include="..\mono\utils\mono-property-hash.h" />\r
     <ClInclude Include="..\mono\utils\mono-publib.h" />\r
-    <ClInclude Include="..\mono\utils\mono-rand-windows.h" />\r
+    <ClInclude Include="..\mono\utils\mono-rand-windows-internals.h" />\r
     <ClInclude Include="..\mono\utils\mono-rand.h" />\r
     <ClInclude Include="..\mono\utils\mono-sigcontext.h" />\r
     <ClInclude Include="..\mono\utils\mono-stack-unwinding.h" />\r
       <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>\r
     </ProjectReference>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\mono\utils\Makefile.am" />\r
+  </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}</ProjectGuid>\r
     <Keyword>Win32Proj</Keyword>\r
index 8ee4fbe7c970d69acf6a6fec35b887ca710aaec5..30b819626b6fc91f3f5f3cea2ffabec06f416384 100644 (file)
     <ClInclude Include="..\mono\utils\valgrind.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\mono\utils\mono-rand-windows.h">\r
+    <ClInclude Include="..\mono\utils\mono-mmap-windows-internals.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\mono\utils\mono-dl-windows.h">\r
+    <ClInclude Include="..\mono\utils\mono-mmap-internals.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\mono\utils\mono-mmap-windows.h">\r
+    <ClInclude Include="..\mono\utils\mono-proclib-windows-internals.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\mono\utils\mono-proclib-windows.h">\r
+    <ClInclude Include="..\mono\utils\mono-rand-windows-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\utils\mono-dl-windows-internals.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\mono\utils\os-event.h">\r
       <Filter>Resource Files</Filter>\r
     </MASM>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="..\mono\utils\Makefile.am">\r
+      <Filter>Resource Files</Filter>\r
+    </None>\r
+  </ItemGroup>\r
 </Project>
\ No newline at end of file
index 611e4c7035cc49ff71830dfce29f6a8eabeb4c0f..bd2ac9f5a8389707eaae5efecb3c7b31d977f2bc 100644 (file)
@@ -49,8 +49,20 @@ Mono_Posix_Stdlib__IOLBF
 Mono_Posix_Stdlib__IONBF\r
 Mono_Posix_Stdlib_calloc\r
 Mono_Posix_Stdlib_clearerr\r
+Mono_Posix_Stdlib_fclose\r
+Mono_Posix_Stdlib_feof\r
+Mono_Posix_Stdlib_ferror\r
+Mono_Posix_Stdlib_fflush\r
+Mono_Posix_Stdlib_fgetc\r
 Mono_Posix_Stdlib_fgetpos\r
+Mono_Posix_Stdlib_fgets\r
+Mono_Posix_Stdlib_fopen\r
+Mono_Posix_Stdlib_fprintf\r
+Mono_Posix_Stdlib_fputc\r
+Mono_Posix_Stdlib_fputs\r
 Mono_Posix_Stdlib_fread\r
+Mono_Posix_Stdlib_free\r
+Mono_Posix_Stdlib_freopen\r
 Mono_Posix_Stdlib_fseek\r
 Mono_Posix_Stdlib_fsetpos\r
 Mono_Posix_Stdlib_ftell\r
@@ -65,6 +77,8 @@ Mono_Posix_Stdlib_stderr
 Mono_Posix_Stdlib_stdin\r
 Mono_Posix_Stdlib_stdout\r
 Mono_Posix_Stdlib_strlen\r
+Mono_Posix_Stdlib_tmpfile\r
+Mono_Posix_Stdlib_ungetc\r
 Mono_Posix_ToAccessModes\r
 Mono_Posix_ToConfstrName\r
 Mono_Posix_ToDirectoryNotifyFlags\r
@@ -92,6 +106,7 @@ Mono_Posix_ToSyslogLevel
 Mono_Posix_ToSyslogOptions\r
 Mono_Posix_ToWaitOptions\r
 Mono_Posix_ToXattrFlags\r
+Mono_Unix_VersionString\r
 CreateZStream\r
 CloseZStream\r
 ReadZStream\r
index 02ef2e45743d279ddbe795a9c3cb20ce3334647c..4c7e1dba13730b023206ef8b0b1da39c9aced209 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
index 348bedb9c1172f47fc9b0e7b07a39f16a7ac3945..cece22ecd78d5ca0c055dff860963d787cbdd29d 100644 (file)
       <resources></resources>
       <response>monolinker.exe.sources</response>
     </project>
-    <project dir="tools/tuner" library="Mono.Tuner-net_4_x">
-      <boot>false</boot>
-      <flags>/codepage:65001 -r:./../../class/lib/net_4_x/monolinker.exe -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -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.dll -r:./../../class/lib/net_4_x/Mono.Cecil.dll</flags>
-      <output>Mono.Tuner.dll</output>
-      <built_sources></built_sources>
-      <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">
       <boot></boot>
       <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -r:System -r:System.Xml</flags>
index d5d409a9f51ef49e156a6bcddfead00a86b5f7f5..e0164c4ebcd6b12f041d954b00cf6fe6961a0a2a 100644 (file)
@@ -589,8 +589,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "al-net_4_x", "mcs/tools/al/
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monolinker-net_4_x", "mcs/tools/linker/monolinker-net_4_x.csproj", "{FA920637-C202-4E75-AC0F-1A8DBD631DF1}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Tuner-net_4_x", "mcs/tools/tuner/Mono.Tuner-net_4_x.csproj", "{8CCE7044-3466-4599-B09E-9F8E0C2F4614}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "genxs-net_4_x", "mcs/tools/genxs/genxs-net_4_x.csproj", "{DCD2613C-B1A0-489B-BCA1-79BEBB9B9541}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mkbundle-net_4_x", "mcs/tools/mkbundle/mkbundle-net_4_x.csproj", "{3A3DAEC2-3DF4-4968-A191-8D6F207ABA5E}"
@@ -1855,10 +1853,6 @@ Global
                {FA920637-C202-4E75-AC0F-1A8DBD631DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {FA920637-C202-4E75-AC0F-1A8DBD631DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {FA920637-C202-4E75-AC0F-1A8DBD631DF1}.Release|Any CPU.Build.0 = Release|Any CPU
-               {8CCE7044-3466-4599-B09E-9F8E0C2F4614}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {8CCE7044-3466-4599-B09E-9F8E0C2F4614}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {8CCE7044-3466-4599-B09E-9F8E0C2F4614}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {8CCE7044-3466-4599-B09E-9F8E0C2F4614}.Release|Any CPU.Build.0 = Release|Any CPU
                {DCD2613C-B1A0-489B-BCA1-79BEBB9B9541}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {DCD2613C-B1A0-489B-BCA1-79BEBB9B9541}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {DCD2613C-B1A0-489B-BCA1-79BEBB9B9541}.Release|Any CPU.ActiveCfg = Release|Any CPU
index bc1f8168c6b1ef8702487b458a22d979bd44d0ed..fab38f5bd4ecfc856a81fd88627fc08b8db552c9 100755 (executable)
@@ -26,7 +26,7 @@ if [[ ${CI_TAGS} == *'mobile_static'* ]];
 elif [[ ${CI_TAGS} == *'acceptance-tests'* ]];
     then
     EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --prefix=${WORKSPACE}/tmp/mono-acceptance-tests --with-sgen-default-concurrent=yes";
-elif [[ ${label} != w* ]] && [[ ${label} != 'debian-ppc64el' ]] && [[ ${label} != 'centos-s390x' ]] && [[ ${CI_TAGS} != *'monolite'* ]];
+elif [[ ${label} != w* ]] && [[ ${label} != 'debian-8-ppc64el' ]] && [[ ${label} != 'centos-s390x' ]] && [[ ${CI_TAGS} != *'monolite'* ]];
     then
     # Override the defaults to skip profiles
     # only enable the mobile profiles and mobile_static on the main architectures
@@ -38,6 +38,8 @@ if [ -x "/usr/bin/dpkg-architecture" ];
        then
        EXTRA_CONF_FLAGS="$EXTRA_CONF_FLAGS --host=`/usr/bin/dpkg-architecture -qDEB_HOST_GNU_TYPE`"
        #force build arch = dpkg arch, sometimes misdetected
+       mkdir -p ~/.config/.mono/
+       wget -qO- https://download.mono-project.com/test/new-certs.tgz| tar zx -C ~/.config/.mono/
 fi
 
 
@@ -54,7 +56,10 @@ fi
 
 if [[ ${CI_TAGS} == *'monolite'* ]]; then make get-monolite-latest; fi
 
-${TESTCMD} --label=make --timeout=300m --fatal make -j4 -w V=1
+make_parallelism=-j4
+if [[ ${label} == 'debian-8-ppc64el' ]]; then make_parallelism=-j1; fi
+
+${TESTCMD} --label=make --timeout=300m --fatal make ${make_parallelism} -w V=1
 
 if [[ ${CI_TAGS} == *'acceptance-tests'* ]];
     then
index 91c9b11c9c5b1d751a2660da205ff0080118ee9d..3d9ac611c269a5a3f52e74e4b3162c722c46f657 100755 (executable)
@@ -3,15 +3,17 @@
 export TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
 
 ${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k check check-seq-points EMIT_NUNIT=1
-${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=compile-runtime-tests --timeout=20m make -w -C mono/tests -j4 tests
+${TESTCMD} --label=runtime --timeout=160m make -w -C mono/tests -k test-wrench V=1 CI=1 CI_PR=${ghprbPullId}
+${TESTCMD} --label=runtime-unit-tests --timeout=5m make -w -C mono/unit-tests -k check
+if [[ ${label} == 'debian-8-ppc64el' ]]; then ${TESTCMD} --label=corlib --skip; else ${TESTCMD} --label=corlib --timeout=30m make -w -C mcs/class/corlib run-test; fi
 ${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 bash -c "export MONO_TLS_PROVIDER=legacy && make -w -C mcs/class/System run-test"
 if [[ ${label} == osx-* ]]; then ${TESTCMD} --label=System-btls --timeout=10m bash -c "export MONO_TLS_PROVIDER=btls && make -w -C mcs/class/System run-test"; fi
-${TESTCMD} --label=System.XML --timeout=5m make -w -C mcs/class/System.XML run-test
+if [[ ${label} == 'debian-8-ppc64el' ]]; then ${TESTCMD} --label=System.XML --skip; else ${TESTCMD} --label=System.XML --timeout=5m make -w -C mcs/class/System.XML run-test; fi
 ${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
 if [[ ${label} == w* ]]
@@ -23,16 +25,17 @@ 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
+if [[ ${label} == w* ]]; then ${TESTCMD} --label=Mono.Data.Sqlite --skip; else ${TESTCMD} --label=Mono.Data.Sqlite --timeout=5m make -w -C mcs/class/Mono.Data.Sqlite run-test; fi
 ${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
+if [[ -n "${ghprbPullId}" ]] && [[ ${label} == w* ]]; then ${TESTCMD} --label=Mono.Posix --skip; else ${TESTCMD} --label=Mono.Posix --timeout=5m make -w -C mcs/class/Mono.Posix run-test; fi
 ${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;
-if [[ -n "${ghprbPullId}" ]] && [[ ${label} == w* ]]; then ${TESTCMD} --label=System.ServiceProcess --skip; else ${TESTCMD} --label=System.ServiceProcess --timeout=5m make -w -C mcs/class/System.ServiceProcess run-test; fi
+${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
@@ -46,8 +49,8 @@ ${TESTCMD} --label=Mono.Tasklets --timeout=5m make -w -C mcs/class/Mono.Tasklets
 ${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
-if [[ -n "${ghprbPullId}" ]] && [[ ${label} == w* ]]; then ${TESTCMD} --label=System.Core --skip; else ${TESTCMD} --label=System.Core --timeout=15m make -w -C mcs/class/System.Core run-test; fi
-if [[ -n "${ghprbPullId}" ]] && [[ ${label} == w* ]]; then ${TESTCMD} --label=symbolicate --skip; else ${TESTCMD} --label=symbolicate --timeout=60m make -w -C mcs/tools/mono-symbolicate check; fi
+${TESTCMD} --label=System.Core --timeout=15m make -w -C mcs/class/System.Core run-test
+if [[ -n "${ghprbPullId}" && ${label} == w* || ${label} == 'debian-8-ppc64el' ]]; then ${TESTCMD} --label=symbolicate --skip; else ${TESTCMD} --label=symbolicate --timeout=60m make -w -C mcs/tools/mono-symbolicate check; fi
 ${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
@@ -71,7 +74,7 @@ ${TESTCMD} --label=System.Xaml --timeout=5m make -w -C mcs/class/System.Xaml run
 ${TESTCMD} --label=System.Net.Http --timeout=5m make -w -C mcs/class/System.Net.Http run-test
 ${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run-test
 ${TESTCMD} --label=System.Threading.Tasks.Dataflow --timeout=5m make -w -C mcs/class/System.Threading.Tasks.Dataflow run-test
-${TESTCMD} --label=Mono.Debugger.Soft --timeout=5m make -w -C mcs/class/Mono.Debugger.Soft run-test
+if [[ ${label} == 'debian-8-ppc64el' ]]; then ${TESTCMD} --label=Mono.Debugger.Soft --skip; else ${TESTCMD} --label=Mono.Debugger.Soft --timeout=5m make -w -C mcs/class/Mono.Debugger.Soft run-test; fi
 ${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
@@ -84,6 +87,7 @@ ${TESTCMD} --label=Microsoft.Build.Engine-14 --timeout=60m make -w -C mcs/class/
 ${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
+${TESTCMD} --label=System.IO.Compression --timeout=5m make -w -C mcs/class/System.IO.Compression run-test
 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;
index ccd221b106a219d161e744e9e6f42828089f7130..8c6ef5000f2fc22c8dea1fac92404d3e2284ba74 100644 (file)
@@ -2181,10 +2181,24 @@ int Mono_Posix_Stdlib_MB_CUR_MAX (void);
 int Mono_Posix_Stdlib_perror (const char* s, int err);
 int Mono_Posix_Stdlib_RAND_MAX (void);
 void* Mono_Posix_Stdlib_realloc (void* ptr, guint64 size);
+void Mono_Posix_Stdlib_free (void* p);
 int Mono_Posix_Stdlib_rewind (void* stream);
 int Mono_Posix_Stdlib_setbuf (void* stream, void* buf);
 void Mono_Posix_Stdlib_SetLastError (int error);
 int Mono_Posix_Stdlib_setvbuf (void* stream, void* buf, int mode, guint64 size);
+void* Mono_Posix_Stdlib_fopen (char* path, char* mode);
+void* Mono_Posix_Stdlib_freopen (char* path, char* mode, void *stream);
+gint32 Mono_Posix_Stdlib_fprintf (void* stream, char* format, char *message);
+gint32 Mono_Posix_Stdlib_fgetc (void* stream);
+char* Mono_Posix_Stdlib_fgets (char* str, gint32 size, void* stream);
+gint32 Mono_Posix_Stdlib_fputc (gint32 c, void* stream);
+gint32 Mono_Posix_Stdlib_fputs (char* s, void* stream);
+gint32 Mono_Posix_Stdlib_fclose (void* stream);
+gint32 Mono_Posix_Stdlib_fflush (void* stream);
+void* Mono_Posix_Stdlib_tmpfile (void);
+gint32 Mono_Posix_Stdlib_ungetc (gint32 c, void* stream);
+gint32 Mono_Posix_Stdlib_feof (void* stream);
+gint32 Mono_Posix_Stdlib_ferror (void* stream);
 void* Mono_Posix_Stdlib_SIG_DFL (void);
 void* Mono_Posix_Stdlib_SIG_ERR (void);
 void* Mono_Posix_Stdlib_SIG_IGN (void);
index e5b54da47b909f222d3664480c522d34d40ca1f8..b914dfdb1d098ec4d4518fd5b28f13b770200b2c 100644 (file)
@@ -142,6 +142,12 @@ Mono_Posix_Stdlib_TMP_MAX (void)
        return TMP_MAX;
 }
 
+void*
+Mono_Posix_Stdlib_tmpfile (void)
+{
+       return tmpfile ();
+}
+
 gint32
 Mono_Posix_Stdlib_setvbuf (void* stream, void *buf, int mode, mph_size_t size)
 {
@@ -156,6 +162,60 @@ Mono_Posix_Stdlib_setbuf (void* stream, void* buf)
        return 0;
 }
 
+void*
+Mono_Posix_Stdlib_fopen (char* path, char* mode)
+{
+       return fopen (path, mode);
+}
+
+void*
+Mono_Posix_Stdlib_freopen (char* path, char* mode, void *stream)
+{
+       return freopen (path, mode, stream);
+}
+
+gint32
+Mono_Posix_Stdlib_fprintf (void* stream, char* format, char *message)
+{
+       return fprintf (stream, format, message);
+}
+
+gint32
+Mono_Posix_Stdlib_fgetc (void* stream)
+{
+       return fgetc (stream);
+}
+
+char*
+Mono_Posix_Stdlib_fgets (char* str, gint32 size, void* stream)
+{
+       return fgets (str, size, stream);
+}
+
+gint32
+Mono_Posix_Stdlib_fputc (gint32 c, void* stream)
+{
+       return fputc (c, stream);
+}
+
+gint32
+Mono_Posix_Stdlib_fputs (char* s, void* stream)
+{
+       return fputs (s, stream);
+}
+
+gint32
+Mono_Posix_Stdlib_fclose (void* stream)
+{
+       return fclose (stream);
+}
+
+gint32
+Mono_Posix_Stdlib_fflush (void* stream)
+{
+       return fflush (stream);
+}
+
 gint32
 Mono_Posix_Stdlib_fseek (void* stream, gint64 offset, int origin)
 {
@@ -207,6 +267,24 @@ Mono_Posix_Stdlib_clearerr (void* stream)
        return 0;
 }
 
+gint32
+Mono_Posix_Stdlib_ungetc (gint32 c, void* stream)
+{
+       return ungetc (c, stream);
+}
+
+gint32
+Mono_Posix_Stdlib_feof (void* stream)
+{
+       return feof (stream);
+}
+
+gint32
+Mono_Posix_Stdlib_ferror (void* stream)
+{
+       return ferror (stream);
+}
+
 int
 Mono_Posix_Stdlib_perror (const char* s, int err)
 {
index 0c4358a51402d3d7b2b577db88eef64497857af2..077a85e58f56388f1ab9357ccbfbc5f2ba8cdc4f 100644 (file)
@@ -72,6 +72,12 @@ Mono_Posix_Stdlib_realloc (void* ptr, mph_size_t size)
        return realloc (ptr, (size_t) size);
 }
 
+void
+Mono_Posix_Stdlib_free (void* p)
+{
+       free (p);
+}
+
 G_END_DECLS
 
 /*
index 61a0f8df9c00e1a1741c267488fe1ae3ee9c5e49..afc98f0d6b8c4483567b7da9c196e2d55b3decec 100644 (file)
@@ -1,4 +1,4 @@
-.stamp-clone
+.stamp-clone-*
 CppSharp
 *.exe
 *.h
index b4c6b68c22369b55c3ffcb20899241328b3287f5..4869bf291724bf41151719a4ca70023d19843e7b 100644 (file)
@@ -1,7 +1,34 @@
-CPPSHARP_DIR = CppSharp
+CPPSHARP_BASE_DIR = CppSharp
+
+ifeq ($(OS),Windows_NT)
+       CPPSHARP_OS=windows
+       ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
+               CPPSHARP_ARCH=64
+       else
+               ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
+                       CPPSHARP_ARCH=64
+               endif
+               ifeq ($(PROCESSOR_ARCHITECTURE),x86)
+                       CPPSHARP_ARCH=32
+               endif
+       endif
+else
+       UNAME_S := $(shell uname -s)
+       ifeq ($(UNAME_S),Linux)
+               CPPSHARP_OS=linux
+               CPPSHARP_ARCH=64
+       endif
+       ifeq ($(UNAME_S),Darwin)
+               CPPSHARP_OS=osx
+               CPPSHARP_ARCH=32
+       endif
+endif
+
+CPPSHARP_DIR = $(CPPSHARP_BASE_DIR)/$(CPPSHARP_OS)_$(CPPSHARP_ARCH)
 
 CPPSHARP_REFS = -r:$(CPPSHARP_DIR)/CppSharp.dll \
        -r:$(CPPSHARP_DIR)/CppSharp.AST.dll \
+       -r:$(CPPSHARP_DIR)/CppSharp.Parser.dll \
        -r:$(CPPSHARP_DIR)/CppSharp.Parser.CSharp.dll \
        -r:$(CPPSHARP_DIR)/CppSharp.Generator.dll
 
@@ -9,12 +36,12 @@ SRC_ROOT = ../..
 
 MONO_OPTIONS_SRC = $(SRC_ROOT)/mcs/class/Mono.Options/Mono.Options/Options.cs
 
-.stamp-clone:
-       @if [ ! -d $(CPPSHARP_DIR) ]; then \
-               git clone git://github.com/xamarin/CppSharpBinaries.git $(CPPSHARP_DIR) && touch $@; \
-       fi
+HASH=60f763a9
+.stamp-clone-$(HASH):
+       rm -Rf $(CPPSHARP_BASE_DIR)
+       git clone -b $(HASH) --depth 1 git://github.com/xamarin/CppSharpBinaries.git $(CPPSHARP_BASE_DIR) && touch $@
 
-MonoAotOffsetsDumper.exe: .stamp-clone MonoAotOffsetsDumper.cs $(MONO_OPTIONS_SRC)
+MonoAotOffsetsDumper.exe: .stamp-clone-$(HASH) MonoAotOffsetsDumper.cs $(MONO_OPTIONS_SRC)
        mcs MonoAotOffsetsDumper.cs /debug /nowarn:0436 $(MONO_OPTIONS_SRC) $(CPPSHARP_REFS)
 
 .PHONY: clean
index e04a23809a5428a760d06b8225467abacd3bbdaf..0f9a984833d766fdc48ceba51617882d361f3237 100644 (file)
@@ -235,7 +235,7 @@ namespace CppSharp
                 if (!driver.ParseCode())
                     return;
 
-                Dump(driver.ASTContext, driver.TargetInfo, target);
+                Dump(driver.Context.ASTContext, driver.Context.TargetInfo, target);
             }
         }
 
@@ -244,13 +244,13 @@ namespace CppSharp
             foreach (var header in driver.Options.Headers)
             {
                 var source = driver.Project.AddFile(header);
-                source.Options = driver.BuildParseOptions(source);
+                source.Options = driver.BuildParserOptions(source);
 
                 if (header.Contains ("mini"))
                     continue;
 
-                source.Options.addDefines ("HAVE_SGEN_GC");
-                source.Options.addDefines ("HAVE_MOVING_COLLECTOR");
+                source.Options.AddDefines ("HAVE_SGEN_GC");
+                source.Options.AddDefines ("HAVE_MOVING_COLLECTOR");
             }
         }
 
@@ -306,22 +306,24 @@ namespace CppSharp
         {
             var options = driver.Options;
             options.DryRun = true;
-            options.Verbose = false;
             options.LibraryName = "Mono";
-            options.MicrosoftMode = false;
-            options.addArguments("-xc");
-            options.addArguments("-std=gnu99");
-            options.addDefines("CPPSHARP");
+
+            var parserOptions = driver.ParserOptions;
+            parserOptions.Verbose = false;
+            parserOptions.MicrosoftMode = false;
+            parserOptions.AddArguments("-xc");
+            parserOptions.AddArguments("-std=gnu99");
+            parserOptions.AddDefines("CPPSHARP");
 
             foreach (var define in target.Defines)
-                options.addDefines(define);
+                parserOptions.AddDefines(define);
 
             SetupToolchainPaths(driver, target);
 
-            SetupMono(options, target);
+            SetupMono(driver, target);
         }
 
-        static void SetupMono(DriverOptions options, Target target)
+        static void SetupMono(Driver driver, Target target)
         {
             string targetPath;
             switch (target.Platform) {
@@ -356,7 +358,7 @@ namespace CppSharp
             };
 
             foreach (var inc in includeDirs)
-                options.addIncludeDirs(inc);
+                driver.ParserOptions.AddIncludeDirs(inc);
 
             var filesToParse = new[]
             {
@@ -365,15 +367,15 @@ namespace CppSharp
             };
 
             foreach (var file in filesToParse)
-                options.Headers.Add(file);
+                driver.Options.Headers.Add(file);
         }
 
         static void SetupMSVC(Driver driver, string triple)
         {
-            var options = driver.Options;
+            var parserOptions = driver.ParserOptions;
 
-            options.Abi = Parser.AST.CppAbi.Microsoft;
-            options.MicrosoftMode = true;
+            parserOptions.Abi = Parser.AST.CppAbi.Microsoft;
+            parserOptions.MicrosoftMode = true;
 
             var systemIncludeDirs = new[]
             {
@@ -382,9 +384,9 @@ namespace CppSharp
             };
 
             foreach (var inc in systemIncludeDirs)
-                options.addSystemIncludeDirs(inc);
+                parserOptions.AddSystemIncludeDirs(inc);
 
-            options.addDefines("HOST_WIN32");
+            parserOptions.AddDefines("HOST_WIN32");
         }
 
         static void SetupToolchainPaths(Driver driver, Target target)
@@ -487,7 +489,7 @@ namespace CppSharp
 
         static void SetupXcode(Driver driver, Target target)
         {
-            var options = driver.Options;
+            var parserOptions = driver.ParserOptions;
 
             var builtinsPath = GetXcodeBuiltinIncludesFolder();
             string includePath;
@@ -503,12 +505,12 @@ namespace CppSharp
                 throw new ArgumentOutOfRangeException ();
             }
 
-            options.addSystemIncludeDirs(builtinsPath);
-            options.addSystemIncludeDirs(includePath);
+            parserOptions.AddSystemIncludeDirs(builtinsPath);
+            parserOptions.AddSystemIncludeDirs(includePath);
 
-            options.NoBuiltinIncludes = true;
-            options.NoStandardIncludes = true;
-            options.TargetTriple = target.Triple;
+            parserOptions.NoBuiltinIncludes = true;
+            parserOptions.NoStandardIncludes = true;
+            parserOptions.TargetTriple = target.Triple;
         }
 
         static string GetAndroidHostToolchainPath()
@@ -555,9 +557,10 @@ namespace CppSharp
         static void SetupAndroidNDK(Driver driver, Target target)
         {
             var options = driver.Options;
+            var parserOptions = driver.ParserOptions;
 
             var builtinsPath = GetAndroidBuiltinIncludesFolder();
-            options.addSystemIncludeDirs(builtinsPath);
+            parserOptions.AddSystemIncludeDirs(builtinsPath);
 
             var androidNdkRoot = GetAndroidNdkPath ();
             const int androidNdkApiLevel = 21;
@@ -565,11 +568,11 @@ namespace CppSharp
             var toolchainPath = Path.Combine(androidNdkRoot, "platforms",
                 "android-" + androidNdkApiLevel, "arch-" + GetArchFromTriple(target.Triple),
                 "usr", "include");
-            options.addSystemIncludeDirs(toolchainPath);
+            parserOptions.AddSystemIncludeDirs(toolchainPath);
 
-            options.NoBuiltinIncludes = true;
-            options.NoStandardIncludes = true;
-            options.TargetTriple = target.Triple;
+            parserOptions.NoBuiltinIncludes = true;
+            parserOptions.NoStandardIncludes = true;
+            parserOptions.TargetTriple = target.Triple;
         }
 
         static uint GetTypeAlign(ParserTargetInfo target, ParserIntType type)
@@ -638,8 +641,8 @@ namespace CppSharp
         {
             var targetFile = target.Triple;
 
-                       if (!string.IsNullOrEmpty (OutputDir))
-                               targetFile = Path.Combine (OutputDir, targetFile);
+            if (!string.IsNullOrEmpty (OutputDir))
+                targetFile = Path.Combine (OutputDir, targetFile);
 
             targetFile += ".h";
 
@@ -754,7 +757,7 @@ namespace CppSharp
             var types = new List<string>
             {
                 "MonoObject",
-               "MonoObjectHandlePayload",
+                "MonoObjectHandlePayload",
                 "MonoClass",
                 "MonoVTable",
                 "MonoDelegate",
@@ -803,7 +806,7 @@ namespace CppSharp
                 "SeqPointInfo",
                 "DynCallArgs", 
                 "MonoLMFTramp",
-            };            
+            };
 
             DumpClasses(writer, ctx, optionalTypes, optional: true);
 
@@ -813,8 +816,8 @@ namespace CppSharp
         static void DumpStruct(TextWriter writer, Class @class)
         {
             var name = @class.Name;
-                       if (name.StartsWith ("_", StringComparison.Ordinal))
-                               name = name.Substring (1);
+            if (name.StartsWith ("_", StringComparison.Ordinal))
+                name = name.Substring (1);
 
             foreach (var field in @class.Fields)
             {
@@ -823,8 +826,10 @@ namespace CppSharp
                 if (name == "SgenThreadInfo" && field.Name == "regs")
                     continue;
 
+                var layout = @class.Layout.Fields.First(f => f.FieldPtr == field.OriginalPtr);
+
                 writer.WriteLine("DECL_OFFSET2({0},{1},{2})", name, field.Name,
-                    field.Offset / 8);
+                    layout.Offset);
             }
         }
     }
index d15685302eb4ca05c6a649ecba90f9911b7e6131..73f67534019a237795922f6b7b855ce5e4c8a259 100644 (file)
 #elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
        #define HAVE_CLASSIC_WINAPI_SUPPORT 0
        #define HAVE_UWP_WINAPI_SUPPORT 1
+#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
+       #error Unsupported WINAPI family
+#endif
 #else
        #define HAVE_CLASSIC_WINAPI_SUPPORT 0
        #define HAVE_UWP_WINAPI_SUPPORT 0
+#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
+       #error Unsupported WINAPI family
+#endif
 #endif
 
 #endif